The $0 Tech Stack for AI-Built MVPs
Free tiers for Vercel, Supabase, and adjacent services during validation.
Ask any AI app builder to create a SaaS MVP and it will likely output React, Next.js, and Supabase. That is not coincidence — this pairing balances speed, ownership, and a credible path to scale. Here is how to structure it deliberately instead of inheriting defaults blindly.
Large language models trained on modern web code converge on Next.js for full-stack React and Supabase for managed Postgres plus auth. Both have excellent free tiers, documentation AI tools can cite accurately, and huge communities — so generated code is more often correct than exotic stacks. Investors and early hires recognize the pattern, which reduces friction during diligence.
Next.js App Router gives you server components, API routes, and edge deployment on Vercel without configuring nginx. Supabase gives you authentication, realtime subscriptions, storage, and row-level security policies in SQL you can audit. Together they cover ninety percent of B2B SaaS MVPs: sign up, paywall, dashboard, CRUD, webhooks.
Keep layers explicit. Public marketing pages as static or server-rendered routes. Authenticated app under `/app` or `/dashboard` with a layout that checks session server-side. Supabase client in browser for user-scoped reads with RLS enforcing isolation. Server actions or route handlers for secrets — Stripe, email API keys, admin tasks.
Resist microservices. One Next.js repo, one Supabase project, one Vercel project until monthly active users exceed your comfort zone. Document environment variables in a table: `NEXT_PUBLIC_SUPABASE_URL`, `SUPABASE_SERVICE_ROLE_KEY` server-only, `STRIPE_SECRET_KEY` server-only. AI tools leak secrets into client bundles if you prompt carelessly — review every `NEXT_PUBLIC` prefix.
Use Supabase Auth with email magic links or OAuth providers your buyers already trust — Google for prosumer, Microsoft for enterprise pilots. Store `user_id` UUID foreign keys everywhere; never rely on email as primary key. Enable RLS on every table on day one with policies like `auth.uid() = user_id`.
Server-side session validation in Next.js middleware redirects unauthenticated users before they hit client bundles. Test logout, expired sessions, and password reset on mobile. These flows break most often in AI-generated apps. A fractional CTO review of auth and RLS before B2B pilots prevents embarrassing data leaks between tenants.
Normalize enough to avoid update anomalies; denormalize enough to ship one query per screen. Start with users, organizations optional until you need teams, and one core entity matching your workflow — projects, leads, documents. Add `created_at` and `updated_at` timestamps universally. Use Postgres enums sparingly; text columns plus application validation iterate faster pre-PMF.
Seed realistic demo data. Empty dashboards kill sales calls. Migrations live in Supabase SQL editor or CLI — commit them when you export from Lovable or generate via Cursor. Version your schema before you have paying teams.
Connect GitHub, enable preview deployments for every branch, protect production with required checks. Use Vercel environment scoping — development keys in preview, production keys only on main. Add Plausible or Vercel Analytics for traffic; add structured logging for API errors.
Monitor Supabase connection pooling when serverless functions scale; enable Supavisor if you see connection exhaustion. Set billing alerts on both platforms. This stack fits neatly inside a zero-dollar tech stack until roughly ten thousand monthly active users, depending on query patterns.
Stripe Checkout plus Customer Portal covers most MVP billing — implement webhooks in a Next.js route handler, store `stripe_customer_id` on users table, gate features with a `plan` column updated only from webhook code. Use Resend or Postmark for transactional email; never send from client.
When you add AI or ML features, run inference server-side and cache results in Postgres JSONB columns if latency allows. Do not expose provider API keys to the browser. Feature flags in Supabase or a simple `features` JSON column let you demo AI to design partners before GA.
This stack scales to millions in ARR for many SaaS categories before you need rearchitecture. Triggers to evolve: complex reporting needing warehouse analytics, strict data residency requiring self-hosted Postgres, or mobile apps needing shared API beyond REST. Until then, optimize queries and indexes instead of rewriting in Go.
Follow the timeline in Ship an MVP in 2 Weeks using this stack as default. Compare AI builders in Lovable vs Bolt vs v0 if you have not chosen how to generate v1. Own the stack mentally even if AI writes the first commit — your users depend on Postgres rows, not prompt history.
Ready to ship faster? Let's talk about your product goals.