Stack Guide
What to build your SaaS on in 2026
A subscription product has to do five things well: render an app shell, store tenant data, know who is logged in, take money, and stay up. Everything else is decoration. This guide picks one stack that handles all five, names what it costs before you have a customer, and says exactly when a different answer is better.
About 6 min read. Recommendations verified August 2026.
The recommended SaaS stack
One pick per layer. Every one of these has a free or near-free tier, a real company or foundation behind it, and an exit path that does not require a rewrite.
| Layer | Pick | Why |
|---|---|---|
| Framework | Next.js 16 | Server components remove the "build an API for my own frontend" tax. Biggest hiring pool and template ecosystem in web. |
| Language | TypeScript | Types across the schema, the API, and the UI catch the refactor bugs that kill velocity in year two. |
| Styling | Tailwind CSS v4 | No config file, CSS-native theming, and builds up to 5x faster than v3. Pair it with shadcn/ui so you own the components. |
| Database | PostgreSQL 18 | Row-level security for multi-tenancy, JSONB when the schema is unclear, and pgvector waiting when you add AI. |
| Database host | Neon | Scale-to-zero compute and per-branch databases for preview deploys. Free plan is 0.5 GB and 100 CU-hours a month. |
| Data access | Drizzle ORM | Roughly 7 KB gzipped, no code generation step, and queries you can read as SQL when something is slow. |
| Auth | Clerk | Free to 50,000 monthly users since February 2026, with organizations, invites, and SSO built in. Pro is $25 a month after that. |
| Payments | Stripe Billing | 2.9% + $0.30 on US online cards, unchanged for a decade. Hosted Checkout means no card form of your own to secure. |
| Hosting | Vercel Pro | $20 per developer seat with $20 of usage credit. Hobby is free but non-commercial, so a paying product needs Pro. |
| Background jobs | Postgres queue | A jobs table with SKIP LOCKED covers everything until real volume. Add Inngest or a worker when retries get complicated. |
| Product analytics | PostHog | Free plan covers 1M events and 5,000 session replays a month, plus feature flags you will want for staged rollouts. |
| Error tracking | Sentry | Free Developer plan to start; Team is $26 a month for 50,000 errors. Install it before launch, not after the first outage. |
The verdict
Next.js 16 on Vercel, Postgres 18 on Neon through Drizzle, Clerk for auth, Stripe for money. Total fixed cost before your first customer: $0. Total after: about $45 a month for one seat and one paid auth tier.
Why this stack and not something cleverer
SaaS fails for commercial reasons far more often than technical ones, so the stack's job is to stay out of the way. Every pick above trades a small amount of theoretical performance for a large amount of boredom. Next.js is not the fastest React framework, but it is the one where the answer to almost any question already exists, where the auth and payment vendors ship a first-class adapter, and where you can hire someone in a week.
The database choice matters more than the framework choice, because it is the one you cannot walk away from. Postgres 18 gives you relational integrity, row-level security for tenant isolation, JSONB for the columns you have not designed yet, full-text search that is good enough for years, and pgvector if the roadmap turns toward AI. Picking anything else means eventually running Postgres alongside it.
On the ORM, Drizzle passed Prisma in weekly downloads in late 2025 and it earns the win here for one reason: it generates SQL you can paste into psql. When a query is slow at 2am, that is the only property that matters. Prisma 7 dropped its Rust engine and closed most of the gap on bundle size and runtime support, so if your team already knows Prisma, staying is defensible. See the full breakdown in Prisma vs Drizzle.
Buy auth. Do not build it. Clerk's free tier now covers 50,000 monthly users, which is more than most SaaS companies ever reach, and it ships organizations, invitations, and SAML SSO - three features that each take a competent engineer a month to build badly. The counterargument is lock-in, and it is real: read Clerk vs Auth.js before you commit if owning the user table is a hard requirement.
Credible alternatives and when they win
Ruby on Rails or Laravel
Wins when one or two people are building the whole product and already know the framework. Auth, jobs, mail, admin, and migrations arrive in the box, and a single process on a $7 server runs the business. The tradeoff is a smaller pool of frontend-first hires and a heavier interactive-UI story.
SvelteKit
Wins when the app is UI-heavy, the team is small and senior, and React's ceremony is genuinely slowing them down. Smaller bundles and less boilerplate, but fewer paid integrations ship a first-party SvelteKit adapter. Compare the tradeoffs in React vs Svelte.
Supabase as the whole backend
Wins when you want Postgres, auth, storage, realtime, and edge functions from one $25 a month vendor. Excellent until you need custom server logic that does not fit an edge function. Free projects pause after 7 days of inactivity, which is fine for a prototype and not for a demo environment.
Cloudflare instead of Vercel
Wins on cost and on egress. Static asset requests are free and unlimited on both plans, and the paid Workers tier starts at $5 a month for an entire account rather than per seat. Weigh it in Vercel vs Cloudflare.
Decision factors that change the answer
- Team language. If everyone is fluent in Python or Ruby, use it. A stack your team is slow in beats no stack, but a stack your team is fast in beats both.
- Compliance timeline. If SOC 2 or HIPAA is on the roadmap this year, pick vendors that already have the report and can sign a BAA. That constraint outranks every preference on this page.
- Tenancy model. Shared tables with row-level security is right for almost everyone. Database-per-tenant only pays off with fewer than a few hundred large customers who demand isolation in writing.
- Who pays. Vercel Hobby is explicitly non-commercial. The moment you charge money, you are on Pro at $20 per seat, or you move to Cloudflare. Budget for it on day one.
- Egress and media. Video, large file storage, or heavy image processing changes the hosting math entirely. Cheap object storage with free egress beats a fast framework.
SaaS stack questions, answered
Is Next.js still the right default for a SaaS in 2026?
Yes, for most teams. Next.js 16 has been the active LTS line since October 2025 and reached 16.3 in August 2026, so the churn that made 13 and 14 painful has settled. The real argument for it is not technical: it is that every auth provider, payment processor, and analytics vendor ships a Next.js adapter first, which removes a week of integration work per vendor.
Should I use Postgres or SQLite for a SaaS?
Postgres. SQLite is genuinely excellent for single-writer, read-heavy workloads, but a multi-tenant SaaS wants concurrent writes, row-level security, and a managed host with point-in-time recovery. Postgres 18 gives you all three plus pgvector and full-text search, so you do not add a second datastore later.
Do I need Clerk, or can I roll my own auth?
Roll your own only if owning the user table is a contractual requirement or you expect to blow past 50,000 monthly users fast. Otherwise the free tier covers you, and organizations, invitations, and SAML SSO are three features that each cost a competent engineer a month to build badly. Better Auth is the strongest self-hosted option if you want the control without the vendor.
How much does this stack cost before I have customers?
Zero plus a domain name. Neon's free plan gives 0.5 GB of storage and 100 CU-hours, Clerk is free to 50,000 monthly users, PostHog covers 1M events, Sentry's Developer plan is free, and Stripe only charges on a transaction. Your first real bill is Vercel Pro at $20 a month, and it arrives the day you start charging.
Where to go next
Pull the layers apart in the backend tools directory, size up managed Postgres in databases, and compare providers in auth. If you are still validating the idea rather than building the company, the weekend MVP guide strips this stack down to what you can ship in two days.