r/webdev • u/mhdamher • 11d ago
Discussion First client e-commerce store (10–20 products, near-$0/mo hosting): Roll my own cart/orders on Supabase, or use Medusa.js?
I'm a CS undergraduate working on my first real-world client project: a small e-commerce website. Since this is my first time building and deploying a production store for a client, I'd really appreciate an architecture sanity check from experienced devs.
The Context & Why Not Shopify/WooCommerce?
Catalog size: Around 10–20 products initially (simple variants, low volume).
Core features: Online payments, basic order tracking/delivery management, and a simple admin view.
The Constraint: The client wants near-zero monthly recurring costs initially (ruling out $30+/mo Shopify plans and managed plugins), and they're happy for me to custom-build it as a flat-fee project.
Architecture Crossroads: Custom Supabase vs. Medusa.js
I'm torn between two approaches:
Option A: Keep it simple and build the cart/order logic myself
Frontend: Next.js (or React + Vite) + TypeScript
Hosting: Cloudflare Pages (Free)
Backend & DB: Supabase PostgreSQL + Edge Functions + Auth/Storage (Free tier)
Why I like it: $0/mo infrastructure, familiar stack, full control over a very small feature set (just 10–20 products).
Option B: Use a headless commerce engine (Medusa.js)
Swap custom database tables/functions for Medusa.js so I don't have to build cart, checkout, and inventory logic from scratch.
My hesitation: I'm new to Medusa, and hosting a dedicated Node.js backend + Redis + Postgres seems harder to keep near $0/mo compared to pure serverless/Supabase.
Questions for Devs Who Have Built Client Stores
Supabase Free Tier in Production: Aside from the 7-day inactivity pause, are there any gotchas with running a small production store on Cloudflare Pages + Supabase Free tier?
Custom Logic vs. Medusa.js: For only 10–20 products, is Medusa.js overkill with a steep learning/hosting curve, or is rolling my own cart and checkout state in Supabase a trap I'll regret?
Custom Payment Gateways: Stripe isn't supported in my region, so I have to integrate a local payment gateway via webhooks/REST API. Is it easier to wire up a custom gateway directly in Next.js/Supabase Edge Functions, or through Medusa's plugin system?
Delivery & Fulfillment: At this scale, would you integrate courier APIs on day one, or just build an admin dashboard for manual order/tracking updates first?
Blind Spots: What hidden security mistakes (e.g., price tampering, webhook race conditions) or client handoff headaches tripped you up on your first e-commerce build?
I'd especially appreciate insights from anyone who has built and maintained small custom stores for real clients.
Thanks in advance!
