Next.js Discord

Discord Forum

Building e-commerce with Next.js

Answered
Rhinelander posted this in #help-forum
Open in Discord
RhinelanderOP
What tools would you use to build scalable e-commerce stores with Next.js? I’m considering a full-stack Next.js approach, but I’m open to other suggestions.

The store should feature:

- 200 items with multiple variants.
- Integrated payment with voucher/coupon functionality.
- A recommendation section using an algorithm (e.g., based on user history/location).
- A CMS (preferably custom, but open to suggestions).
- Special offers at checkout (e.g., buy 1 get 2 free, or discounts on additional items).
- User profile and email messages.

Which tools would simplify this process? Also, for ORM, I currently use Prisma but have heard Drizzle is better—what's your take?

Here is what I would use. If your stack is diffrent feel free to comment, I am open to suggestions.
Stripe, NextAuth, Next.js, Prisma, Custom CMS or maybe Strapi
Answered by B33fb0n3
I like to use: nextjs, tailwind, shadcn, next-auth, drizzle, postgresql (custom server), s3, react query, next-safe-action and bunnycdn. It's pretty easy to set everything up with these technologies. What do you think?
View full answer

10 Replies

Answer
RhinelanderOP
Yeah i forgot to mention tailwind as its default pick for me. How would you compare drizzle to prisma, why is drizzle your pick (I was thinking about switching but was never really sure). Forgot to mention S3 too. But its first time i heard about bunnycdn - gonna check that out rn.
Oh and where would you host custom posgresql server. for development i can run local but for production what is your pick.
How would you compare drizzle to prisma
drizzle is free and prisma is pointed towards money. That's why I am using drizzle. From the DX it's nearly the same. Prisma give you 60k queries for free, but if I would build an ecommerce store (especially for others) I want to be scaleable for low costs.

But its first time i heard about bunnycdn
It's a pretty nice and cheap cdn. Pretty fast delivery of content and way better than using signed links from s3 (origin) directly.

Oh and where would you host custom posgresql server
I am using a vps from netcup right now ("VPS 500 G11s"). That can easily handle all my database stuff. If needed I can even host my app on it with all features supported, but I can also use vercel as hosting
RhinelanderOP
I will for sure use drizzle. Learning curve is probably linear as its same as Prisma. Would look it to bunnycdn as it sound pretty nice if its cheap. About server - should I use Coolify (if you've heard about it - it was blowing up for couple of weeks now), Vercel is quite expensive to scale on. The thing is that I lack knowledge in hosting stuff. I always used Vercel as its the easiest thing in the world and Cpanel at a start of my careere. Any good resource to deepen my knowledge about CDNs, VPSs like i know what this stuff is used for but never really used anything beyond vercel and neon
RhinelanderOP
Oh, extra stuff if you have any experience from. Let's say I work for a client, I make everything. Do I ask customer to create own Stripe and send me their key or it there a better way? Also for the hosting to they pay and give me access or do I pay and send them invoice every month (i wouldn't like that if there was cyber attack and bill would go to 10k - too much risk on me). I always wondered that. I worked in webagency and they all had diffrent answers as agency was hosting for the client so that is diffrent story....
Learning curve is probably linear as its same as Prisma.
yea.. the relations can be a little hard, but their AI inside the docs it pretty good for helping. Drizzle itself improves right now to a way better solution for the relations as well

Yea, doing things in the backend can be really cool and you will learn so much cool stuff. I never rused Coolify and also haven't watched it. So I can't say much about coolify. Vercel at scale is more expensive, but I haven't reached the point to need to upgrade. So it should be fine 🙂
Do I ask customer to create own Stripe and send me their key or it there a better way?
no. You can directly use: https://stripe.com/connect
@Rhinelander Oh, extra stuff if you have any experience from. Let's say I work for a client, I make everything. Do I ask customer to create own Stripe and send me their key or it there a better way? Also for the hosting to they pay and give me access or do I pay and send them invoice every month (i wouldn't like that if there was cyber attack and bill would go to 10k - too much risk on me). I always wondered that. I worked in webagency and they all had diffrent answers as agency was hosting for the client so that is diffrent story....
Also for the hosting to they pay and give me access or do I pay and send them invoice every month (i wouldn't like that if there was cyber attack and bill would go to 10k - too much risk on me). I always wondered that. I worked in webagency and they all had diffrent answers as agency was hosting for the client so that is diffrent story....
You can decide how you want to handle invoicing. Just keep in mind: it is your job to make a offer, that is good for your customer (and you should minimize your risks as well 🙂 )
RhinelanderOP
Yeah will keep that in mind. Thank you!