vercel / commerce

Next.js Commerce
https://demo.vercel.store
MIT License
11.21k stars 4.14k forks source link

No longer maintained? #1282

Closed osseonews closed 8 months ago

osseonews commented 8 months ago

This repo hasn't been updated in awhile. I assume it's no longer maintained or big changes are being contemplated internally or it's really not meant to be a production-ready solution (more like an example to showcase some App features).

In any case, the entire premise of this repo is flawed, so I hope it's getting re-worked internally. Why is Shopify the default provider? Shopify owns Remix, and has it's own Hydrogen framework for building e-commerce websites that is actively maintained. Why would anyone who uses Shopify use this repo? It would be just plain silly. And getting this repo to work with Shopify is a hassle.

What should be done here is to build an agnostic provider that will work locally without any external e-commerce provider. This was done to an extent in the V1 version (local provider option), but it just wasn't built upon for some reason. Anyway, just store the product data with prices in a local JSON file and call that to build the product pages. Then, any backend e-commerce can easily hook into it by transforming their API call into the format the JSON file exposes (of course if you use an external provider, you would use the API as opposed to the local JSON file). For smaller websites, you don't even need a backend e-commerce provider because using the local JSON file will be fine for product data. For larger websites, just have a function that transforms the data, per above.

As for other e-commerce operations, you have Cart and Checkout. To do a cart, you can easily just use Vercel's KV (built on Upstash Redis). There are few tutorials online for using Redis for a cart, and I'm sure the engineers at Vercel can easily make a basic cart with Vercel KV to be used with this repo.

For Checkout, just use Stripe. It's simple to create a Stripe API route with NextJs and now that you can embed Stripe into a Page, it is trivial to run the Checkout with Stripe when integrated with a Vercel Cart running on KV/Redis.

So honestly, just the Cart is probably the hard part. But again, there is no doubt in my mind that a good Vercel software engineer can create a cart functionality in Upstash Redis/Cloudflare in a few days max.

Thanks for listening to this rant. Hopefully someone at Vercel will read it and implement the suggestions to create a true agnostic e-commerce package.

leerob commented 8 months ago

It's actively maintained and we're pretty happy with the current state of template. We don't plan to make any major changes, other than the in-flight move to Partial Prerendering.

There's more than just Shopify listed in the README if you prefer other providers. A lot of folks use Next.js + Shopify together. If you would like to build a provider agnostic fork of this with Redis / Stripe, we'd be open to adding it to the README!