Playbooks#Open source#Self-hosted#Next.js#Tech stack#SaaS#Indie hacking

The 2026 low-cost indie stack: run a SaaS on $20 a month

A first pick and a backup for every layer — framework, starter, database, auth, payments, hosting, testing, monitoring — all with official links and free tiers. Follow it and your fixed monthly cost stays under $20; most months it is $0.

Colorful shipping containers stacked in a dense grid, a metaphor for a layered tech stack (photo: Guillaume Bolduc, Unsplash, CC0)

For a solo developer in 2026, AI agents have pushed the cost of writing code close to zero. What’s left is the monthly bill — and except for the domain, almost every layer of the chain has a usable free tier. This piece sets up all eight layers — framework, starter, database, auth, payments, hosting, testing, monitoring — with a first pick and a backup for each, all official links, free tiers checked on 2026-09-28. Follow it and your fixed monthly cost stays under $20; most months it is $0.

Ground rules

Three filters, applied to every layer below:

  1. Prove it first, pay later. Free tiers until real users show up; metered beats flat-rate while you have no traffic.
  2. Open source first. If the company dies, you can still self-host.
  3. Fewer services, less ops. One platform that does the job beats three that do it slightly better.

Framework

Next.js is still the safe default: the biggest ecosystem, the most templates and answers, one-click deploys on Vercel. The catch: the deeper you lean on their hosting, the faster the bill climbs once traffic arrives.

The new option worth a serious look is TanStack Start. It entered RC in September 2025 and has since shipped a stable v1 — still releasing daily as of 2026-09-27. Vite underneath, type-safe routing plus server functions, SSR and streaming included, and no platform lock-in: it runs on Cloudflare Workers out of the box. React Server Components are still on the roadmap. If you don’t need RSC, this lighter bet has no real downside.

For content sites and docs, Astro ships zero JS by default and hosts for pennies.

SaaS starters

Don’t start from git init. Three free, open-source starters cover the whole chain from login to billing:

  1. Next.js SaaS Starter: built by the Next.js team (16k stars) — Postgres, Stripe and shadcn/ui, kept deliberately simple. Read this one first to see what a complete SaaS looks like.
  2. next-forge: a production-grade Turborepo template from Vercel (7.6k stars) with observability, auth and payments wired in. Pick it if you want the engineering structure right from day one.
  3. Open SaaS: built on Wasp (16k stars) — auth, email, background jobs, Stripe and Polar billing out of the box, plus an AI-ready AGENTS.md and Claude Code plugin. If you plan to let agents modify your template, this one cooperates.

The few-hundred-dollar commercial boilerplates solve the same problem. Start free; spend once you know exactly what you’re missing.

Database

  • Supabase: Postgres plus auth, file storage and Realtime — the free tier gives 500 MB of database and 50k monthly auth users, so one platform covers three layers. Watch out: idle projects get paused after a week.
  • Neon: if you only want a database. Serverless Postgres with 0.5 GB and 100 compute hours a month free, plus branching for per-PR databases.
  • Turso: the SQLite camp — 100 databases and 5 GB free, cheap to replicate to the edge for read-heavy apps.

Pair any of them with Drizzle: TypeScript-first, light, and the SQL looks like the code.

Auth

First pick: Better Auth (30k stars), a framework-agnostic TypeScript auth framework with email/password, social login, two-factor and organizations out of the box — MIT-licensed, self-hosted, no per-monthly-active-user bill. It’s the 2026 default for indie projects.

Alternatives: Auth.js, the veteran in the Next.js ecosystem; or Supabase Auth if you’re already on Supabase — good enough for an MVP.

Payments

To sell globally as an individual, the keyword is MoR (Merchant of Record): they handle worldwide tax compliance so you can focus on the product.

  • Polar: an MoR for digital products and SaaS subscriptions, friendly to open source, supported natively by the Open SaaS starter.
  • Paddle: the veteran MoR, mature for subscription SaaS.
  • Stripe Managed Payments: Stripe’s MoR offering after it acquired Lemon Squeezy; existing Lemon Squeezy sellers are being migrated over.

If your market is mostly the US and you don’t mind doing your own taxes, plain Stripe takes the smallest cut (typically 2.9% + 30¢ — check the official page). The trade-off: VAT compliance in Europe becomes your problem.

Hosting

  • Default: Cloudflare — Pages/Workers gives you 100k function requests a day free with unmetered static requests, and a push to GitHub builds and ships automatically. CI/CD included. TanStack Start is supported natively; Next.js goes through OpenNext.
  • Vercel — the best developer experience, but Hobby is non-commercial and Pro starts at $20 a month. A spike in function invocations is the classic indie horror bill; set a spend limit.
  • Self-host Coolify (62k stars) — turns a few-dollars-a-month VPS into your own Vercel: git push deploys, automatic SSL, 280+ one-click services. Dokploy is a younger alternative. The catch: backups, certificates and restarts are all yours.

For CI, GitHub Actions: free on public repos, 2,000 free minutes a month on private ones — enough for tests plus build.

Testing

  • Vitest for unit and integration tests — same Vite base, fast startup.
  • Playwright for browser end-to-end, free and open source.

Even a one-person project needs two E2E tests covering sign-up and checkout — those are the two places where a bug costs money directly.

Monitoring

  • Umami: open-source web analytics, free self-hosted, light on the page and on your visitors’ privacy.
  • Plausible: same category, hosted for convenience, paid.
  • Sentry: error tracking; the free tier covers a solo project.

The monthly bill

Layer Pick Monthly cost
Framework Next.js or TanStack Start $0 (open source)
Database Supabase / Neon / Turso free tier $0
Auth Better Auth, self-hosted $0
Payments Polar or Stripe a cut of revenue
Hosting Cloudflare free tier $0
VPS (self-host route) any entry-level box about $5
Testing Vitest + Playwright $0 (open source)
Monitoring Umami self-hosted + Sentry free tier $0

Total: $0 to start, about $5 a month on the self-host route, plus the payment cut — the only cost that grows with revenue. Free tiers checked on 2026-09-28; treat the vendor pricing pages as the source of truth.

Failure modes

  • Free tiers move. Supabase pauses idle projects; Neon resets compute hours monthly. Once real users arrive, move the database to a paid plan or your own VPS — don’t gamble on quotas.
  • The Vercel bill. Hobby forbids commercial use and Pro starts at $20 a month. When traffic spikes, check function invocations first, and set a spend cap before you sleep.
  • Self-hosting has a hidden cost. The money Coolify saves comes back as your ops time. Snapshot regularly and keep one hosted backup of anything you can’t lose.
  • MoRs aren’t free. The cut is higher than plain Stripe, but it buys global tax compliance. If you sell into Europe, it’s worth it.

Next step

Clone the Next.js SaaS Starter or Open SaaS, wire it to a free Supabase project, and push through a $1 test charge. From there you have a production chain with near-zero fixed costs that can actually take money — spend the rest of the budget on the domain and coffee.