Tech stack for a SaaS or web app
A TypeScript stack that most tutorials, templates and AI coding assistants use. Every piece has a free plan and can be swapped later without rewriting the rest.
Cost $0 a month while you build on free tiers (Vercel’s Hobby plan is non-commercial), plus about $11 a year for a domain. Once you charge money, expect roughly $20 to $60 a month plus payment fees.
- 1
A framework
The code structure your app is written in: pages, routing, data loading and server code. Pick one and learn it well; the rest of the stack plugs into it.
Next.jsFree, open source
React with server rendering and API routes in one project. It is what most SaaS templates, tutorials and AI builders produce.
- 2
UI components
Buttons, forms, dialogs, menus and tables that look consistent and work with a keyboard and screen reader, so you do not build them from scratch.
shadcn/uiFree, open source
Copy-in components styled with Tailwind that you own and can change. Pairs naturally with Next.js.
- 3
Somewhere to run it
Your code has to run on a computer that is always online. An app host builds it from your GitHub repository on every push, so you never manage a server.
VercelFree tier, then from $20/mo
Pauses Non-commercial only
Made by the Next.js team: every branch gets a preview link. The free Hobby plan is for non-commercial use; once you charge money, Pro is $20 a month.
- 4
A database
Where user accounts and everything else you save is kept. Postgres is the safe default; almost every tool and tutorial supports it.
NeonFree tier, then usage-based
Pauses
Serverless Postgres with a generous free plan and a database branch for every preview deploy; paid use has no monthly minimum.
- 5
Talking to the database
A library that turns your code into SQL with types, and manages changes to your tables (migrations).
Drizzle ORMFree, open source
Tables defined in TypeScript and queries that read like SQL, with generated migrations. Works on serverless hosts with no extra setup.
- 6
User sign-in
Sign-up, log-in, password resets and "Sign in with Google". Writing this yourself is easy to get wrong in ways that leak accounts.
ClerkFree tier, then from $25/mo
Not stated Their branding
Ready-made sign-in screens for Next.js, free up to 50,000 monthly users.
At $0
Better AuthFree, open source
A free, open-source library that keeps users in your own database: no per-user bill however much you grow, for a little more code.
- 7
Taking payments
Charging for subscriptions or one-off purchases. Selling software abroad also means sales tax and VAT, which a merchant of record handles for you.
PolarUsage-based
A merchant of record built for developers: it deals with tax worldwide, with subscriptions, usage billing and license keys. 5% + 50¢ per sale to start, no monthly fee.
- 8
Sending email
Sign-up confirmations, password resets and receipts have to come from somewhere. Sending them from your own server usually lands in spam.
ResendFree tier, then from $20/mo
Stops at the limit
3,000 emails a month free (100 a day), with React Email templates and examples for most frameworks.
- 9
Work in the background
OptionalAnything slower than a page load should not make users wait: sending batches of email, processing uploads, calling AI models, nightly clean-ups.
InngestFree tier, then from $99/mo
Pauses
Runs steps from your existing API routes with retries, on any serverless host; 50,000 executions a month free.
- 10
File uploads
OptionalProfile pictures, documents and other files users upload belong in object storage, not in your database or on the app server.
UploadThingFree tier, then from $10/mo
Not stated
Upload buttons and a typed server API for Next.js, with 2 GB free and downloads not metered.
- 11
A domain name
The address people type (yourname.com). Your host gives you a free subdomain to start with, so this can wait until you have something to show. Compare renewal prices, not the first-year offer.
PorkbunFrom $11.08/yr
The same price for a .com in year one and at renewal, with free WHOIS privacy.
At $0
No free option
No registrar is free. A .com costs about $11 a year at a registrar that renews at the first-year price; free subdomains from your host work until then.
- 12
Knowing when it breaks
OptionalAn error tracker emails you the exact line that crashed before a user has to. Worth adding once real people use the app.
SentryFree tier, then from $26/mo
Stops at the limit
The free Developer plan covers 5,000 errors a month and has a setup guide for every framework.
What can wait
- Kubernetes, microservices or a separate backend. One Next.js app handles far more traffic than a new product gets.
- A separate CDN. Your app host already serves files from one.
- Enterprise SSO (SAML) until a company customer asks for it in a contract.
- Paid monitoring suites. A free error tracker and one uptime check are enough for a long time.
What do I need to build a SaaS or web app?
A framework, UI components, Somewhere to run it, A database, Talking to the database, User sign-in, Taking payments, Sending email, A domain name. $0 a month while you build on free tiers (Vercel’s Hobby plan is non-commercial), plus about $11 a year for a domain. Once you charge money, expect roughly $20 to $60 a month plus payment fees.
Is Next.js still a good choice for a SaaS?
Yes for most people: it has the most templates and examples, and it runs on Vercel and any Node host. SvelteKit and Nuxt are just as capable if you prefer Svelte or Vue.
Stripe or a merchant of record?
Stripe has lower fees but leaves sales tax and VAT to you. A merchant of record such as Polar or Paddle costs a little more per sale and handles tax in every country, which is usually worth it for a small team.