You don't need complicated infrastructure to build a serious software company. I've spent 20 years building software and built two seven-figure software companies. This is exactly what I'd use if I started again tomorrow: proven tools, no Kubernetes, and a foundation that won't fall over when the product takes off.
Starting today? Read The Stack, then follow Setup or paste The Prompt into Claude Code. Already built something? Go straight to the Checklists.
Then stop. A month spent comparing databases is Building Theater: it feels like progress and nobody pays you for it. Take this list, start building, and spend the time you saved finding customers.
I'm building a place where you learn to build products that work like a real company's on your own, and get them in front of people who pay, with a CTO who's built two seven-figure software companies in your corner.
Less Debate. More Shipping.
Free to join the waitlist. Opens at $49/mo, and the price goes up as seats fill, so first in pays the least.
Every pick on this page follows seven rules. When a new tool comes along, run it through these before you touch your stack.
Your biggest problem is finding customers. Don't spend six months on an engineering platform before anyone has said they want the product.
Boring, established tools that developers know and AI coding tools write well. Don't experiment with your company's foundation because a framework is trending.
A bigger database plan is usually far cheaper than weeks spent adding distributed infrastructure. Pay first. Re-architect when paying stops working.
AI can build something that looks great and works, with serious holes underneath. Security needs deliberate attention, every time.
Analytics tell you what customers do. Monitoring tells you what the app does. Without both, you're flying blind.
Protect customer data, then prove you can get it back. A backup you've never restored is a hope, not a plan.
Make a handful of good decisions, avoid a few expensive mistakes, ship, and start selling.
One Next.js app on Vercel does almost everything. It talks to a handful of managed services. The only thing that runs outside Vercel is the worker that processes background jobs, and you won't need it on day one.
Here's the whole list. Where there's a second option, it's for a specific situation, not because I can't decide. Each section below explains why.
The less you have to run, the more time you spend selling. TypeScript on Next.js, deployed to Vercel, covers the web app and its backend in a single project.
JavaScript with types. If a function expects an invoice and gets a user, the editor tells you before anything ships.
"strict": true on day one. Turning it on later means fixing hundreds of errors at once.React builds the screens. It's mature, everyone knows it, and every component library and tutorial assumes it.
Next.js serves your pages and your API routes. A route is a file: app/api/invoices/route.ts answers /api/invoices.
middleware.ts to proxy.ts. Older tutorials still use the old name.If you need a phone app, build it in React Native. Your team already knows React, and the app calls the same Next.js API routes as the website.
Connect your repo and every push deploys. Each branch gets its own preview link, and your secrets live in its environment variables.
# A Next.js app with TypeScript, # the App Router and ESLint npx create-next-app@latest my-saas cd my-saas npm run dev # open http://localhost:3000 # Then push to GitHub and import # the repo at vercel.com/new
Express used to be a great default for a Node.js backend. Today there are better choices. Next.js API routes give you the backend with none of the extra service to deploy, secure and keep in sync with your front end.
Kubernetes is for companies with engineering teams and money to set on fire. As a solo founder, don't create an infrastructure job for yourself before you have a single customer.
Postgres can carry a serious SaaS business for years. Supabase runs it for you and adds logins and backups. Prisma gives your code a typed way to talk to it.
A real Postgres database you don't have to run, with auth, backups and point-in-time recovery in the same dashboard.
Also Postgres. It scales to zero when nobody's using it, so a quiet app costs very little. Branches give you a copy of the database in seconds.
Sign-up, login, magic links, social logins, password resets and sessions, in the same project as your database.
# Pin Prisma 7. Plain "npm i prisma" now installs # the Prisma 8 release candidate, which has no # migrate command yet. npm i -D prisma@7 dotenv npm i @prisma/client@7 @prisma/adapter-pg@7 pg npx prisma init --output ../generated/prisma # .env (never commit it) # DATABASE_URL: Supabase "Transaction pooler", port 6543. # The app uses this one. # DIRECT_URL: Supabase "Direct connection", port 5432. # Migrations use this one. If your network can't reach # it, use the "Session pooler" string instead. # Every time you change schema.prisma: npx prisma migrate dev --name add_invoices npx prisma generate # In production: apply migrations, never create them npx prisma migrate deploy
import "dotenv/config";
import { defineConfig, env } from "prisma/config";
export default defineConfig({
schema: "prisma/schema.prisma",
migrations: { path: "prisma/migrations" },
// The CLI (migrations) uses the direct connection.
datasource: { url: env("DIRECT_URL") },
});
generator client {
provider = "prisma-client"
output = "../generated/prisma"
}
datasource db {
provider = "postgresql"
}
// Every customer record belongs to an organization.
// That's what you'll filter on, and log on.
model Organization {
id String @id @default(uuid())
name String
stripeCustomerId String? @unique
members Membership[]
createdAt DateTime @default(now())
}
model Membership {
id String @id @default(uuid())
userId String // the Supabase Auth user id
orgId String
role String @default("member")
org Organization @relation(fields: [orgId], references: [id])
@@unique([userId, orgId])
}
import { PrismaClient } from "@/generated/prisma/client";
import { PrismaPg } from "@prisma/adapter-pg";
// One client per server, reused across hot reloads.
const adapter = new PrismaPg({
connectionString: process.env.DATABASE_URL!,
});
const g = globalThis as unknown as { prisma?: PrismaClient };
export const prisma = g.prisma ?? new PrismaClient({ adapter });
if (process.env.NODE_ENV !== "production") g.prisma = prisma;
npm i @supabase/supabase-js @supabase/ssr
# .env.local
# NEXT_PUBLIC_SUPABASE_URL=https://xyz.supabase.co
# NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=sb_publishable_...
# SUPABASE_SECRET_KEY=sb_secret_... (server only!)
# Then copy proxy.ts from Supabase's Next.js guide.
# It refreshes the login cookie on every request.
Start from Supabase's Next.js server-side auth guide. It has the browser client, the server client and the proxy.ts file.
import { createClient } from "@/lib/supabase/server";
import { prisma } from "@/lib/db";
export async function GET() {
// 1. Who is this? getClaims() checks the token.
// Never trust getSession() on the server.
const supabase = await createClient();
const { data } = await supabase.auth.getClaims();
const userId = data?.claims.sub;
if (!userId) return Response.json({ error: "Unauthorized" }, { status: 401 });
// 2. What can they see? Only their own orgs.
const orgs = await prisma.organization.findMany({
where: { members: { some: { userId } } },
});
return Response.json(orgs);
}
Prisma connects as a database owner, so Row Level Security doesn't apply to it. That means every query has to filter by the logged-in user's organization in your code. Keep RLS turned on anyway, with no policies, so nobody can read your tables straight from the browser with the publishable key.
The publishable key is meant for the browser. The secret key skips every rule, so it lives only in server environment variables. Never in a variable that starts with NEXT_PUBLIC_.
Supabase's built-in email sender is for testing and has tight limits. Before launch, set SendGrid as the custom SMTP server so sign-up and reset emails actually arrive.
Billing, file storage, email and texts are solved problems. Use the mature platform for each one and get back to the part of the product only you can build.
Stripe Checkout takes the payment. Stripe Billing runs the subscription. The Customer Portal lets customers change cards, plans and cancel without emailing you.
Every upload goes to S3. Turn on Block Public Access for the whole AWS account, and only make something public when there's a clear reason.
A CDN keeps copies of your files on servers near your customers, so they load fast and S3 isn't hit every time.
Receipts, password resets, invites and alerts. Not newsletters: keep marketing email on a separate tool and domain so a bad campaign can't hurt your password resets.
Appointment reminders, alerts and verification codes. One API, and it's the same company as SendGrid.
// app/api/stripe/webhook/route.ts import Stripe from "stripe"; const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!); export async function POST(req: Request) { let event: Stripe.Event; try { // Prove it came from Stripe. event = stripe.webhooks.constructEvent( await req.text(), req.headers.get("stripe-signature")!, process.env.STRIPE_WEBHOOK_SECRET!, ); } catch { return new Response("Bad signature", { status: 400 }); } // checkout.session.completed, // customer.subscription.updated / .deleted, // invoice.payment_failed: update the org. return new Response("ok"); }
Two different jobs. Conductor, Claude Code and good skills help you write the product. Anthropic, OpenAI and the AI SDK power the AI features your customers use.
Claude Code is the agent that writes the code. Conductor runs several Claude Code agents side by side, each in its own workspace: a separate copy of your repo on its own branch, so they never trip over each other.
A skill is a short instruction file your agent follows for one kind of job. Matt Pocock's set covers the parts AI skips when left alone: being questioned about your plan until it's solid (grill-me), building test-first in small slices (tdd), and turning a plan into tickets.
# Copies the skills into your repo. You pick # which ones, and can edit them. npx skills@latest add mattpocock/skills # Then, once, inside Claude Code: /setup-matt-pocock-skills
Keep the model name in config, not scattered through code. Then switching is a one-line change.
// npm i ai @ai-sdk/anthropic @ai-sdk/openai import { generateText } from "ai"; import { anthropic } from "@ai-sdk/anthropic"; import { openai } from "@ai-sdk/openai"; // Most features: Anthropic. const { text: summary } = await generateText({ model: anthropic(process.env.AI_MODEL_DEFAULT!), prompt: `Summarize this ticket: ${ticket}`, }); // Writing features: OpenAI. Same code, other model. const { text: draft } = await generateText({ model: openai(process.env.AI_MODEL_WRITING!), prompt: `Draft a friendly reply to: ${ticket}`, });
One API for every provider, plus streaming, structured output and tool calls. You build your feature, not model plumbing.
Scheduled jobs run on a clock. Background jobs run because something happened. They're different tools. And before you add a cache, try paying for a bigger database.
Vercel calls one of your API routes on a schedule. Good for daily digests, nightly cleanups and syncs that finish within the function's time limit.
// vercel.json { "crons": [{ "path": "/api/cron/daily-digest", "schedule": "0 9 * * *" }] } // In the route: reject anything without // Authorization: Bearer $CRON_SECRET
A customer uploads 500 rows to import. Don't make them wait. The API route adds a job to a queue and answers right away. A worker picks it up, and retries if it fails.
import { Queue } from "bullmq";
import IORedis from "ioredis";
const connection = new IORedis(process.env.REDIS_URL!,
{ maxRetriesPerRequest: null });
const imports = new Queue("imports", { connection });
await imports.add("csv", { orgId, fileKey },
{ attempts: 5,
backoff: { type: "exponential", delay: 10_000 } });
SQS is Amazon's managed queue. If your app already runs a lot of AWS infrastructure, it's an excellent choice, and there's no Redis to look after.
An expensive dashboard query hit hundreds of times a minute. An outside API that rate-limits you. AI answers to the same question. That's when Redis earns its place.
A cache is a second copy of your data that can be wrong. It adds bugs and a service to run. You can go a very long time without it.
Add the missing database index. Move to a bigger database plan. Fix the query that loads 10,000 rows to show 20. Then measure again. Most "we need Redis" problems end here.
PostHog shows you what customers do. Datadog shows you what the app does. Structured logs tie the two together, so you can see exactly what happened to one customer in one request.
Sign-ups are a vanity number. PostHog shows which features people use, the path they take, and where they give up.
Errors, slow routes, failed jobs and log search in one place, with alerts that reach you before a customer does.
// One JSON object per line.
// Datadog makes every key a filter.
type Fields = Record<string, unknown>;
export function log(
level: "info" | "warn" | "error",
msg: string,
fields: Fields = {},
) {
console.log(JSON.stringify({
ts: new Date().toISOString(),
level,
msg,
env: process.env.VERCEL_ENV,
...fields,
}));
}
{
"ts": "2026-11-08T14:03:22.418Z",
"level": "error",
"env": "production",
"msg": "Invoice email failed",
"requestId": "req_8f2c41", // on every line of this request
"correlationId": "job_77a1e0", // follows the work into the queue
"userId": "u_41b9d2",
"orgId": "org_9a7c13",
"route": "POST /api/invoices/send",
"op": "invoice.send",
"invoiceId": "inv_22013",
"status": 502,
"durationMs": 1834,
"error": { "code": "EMAIL_TIMEOUT", "message": "SendGrid timed out" }
}
With lines like this, "why did Acme's invoice fail yesterday?" is one search: @orgId:org_9a7c13 @op:invoice.send status:error. Without them, it's an afternoon of guessing.
Request id and correlation id. Timestamp and environment. User id and organization id. Route and operation. The ids of the business objects involved. Response status, duration, and the error code and details when it fails.
No passwords, auth tokens, API keys, payment details or anything sensitive a customer typed in. Log the id of the thing, not the thing.
Adding context to a thousand console.log("here") calls later is miserable. Put the logger in on day one and tell your agent to use it in CLAUDE.md.
AI can generate working software incredibly quickly. That includes working software with serious security holes. These are the ones that show up most in apps built in a hurry.
No public S3 buckets. RLS on for every Supabase table, so the publishable key can't read anything. Check from a logged-out browser, not by reading the code.
Form fields, query strings, headers, uploaded file names, webhook bodies. Check the type, the length and the allowed values on the server, every time. A check in the browser is a convenience, not security.
Prisma's normal queries are safe. If you need raw SQL, use the $queryRaw template form, which escapes values for you. Never pass user input to $queryRawUnsafe.
If a customer puts a script in their name and you render it as HTML, it runs in the browser of everyone who views it. React escapes text for you. dangerouslySetInnerHTML turns that off, so only use it on HTML you've cleaned.
Every API route checks who's calling with getClaims(). Webhooks from Stripe and Twilio check their signatures. A hidden button is not a lock.
Being logged in doesn't mean invoice 1043 is yours. Every query filters by the caller's organization, on the server. Test it: log in as customer A and request customer B's record by id.
Cloudflare's open-source skill turns your coding agent into a structured security auditor. It works through the code in phases, checks its own findings, and writes up what it found.
# Needs Node.js 22.20 or newer npx skills add https://github.com/cloudflare/security-audit-skill --skill security-audit # Then in Claude Code: /security-audit
Manage DNS there. Proxy your traffic through it and you get protection from network attacks, plus rate limiting rules you can switch on in minutes.
Want the full list of holes? Work through my Security Checklist: 15 checks, each with a test you can run.
Elaborate abuse protection for a product nobody uses yet is wasted time. B2C apps need more attention once usage grows, because strangers will try things your business customers won't.
Set monthly limits in the Anthropic and OpenAI consoles, spend alerts in Vercel and AWS Budgets, and usage alerts in Twilio. Add a per-user cap on AI calls. A viral week or one abusive user shouldn't hand you a bill bigger than your revenue.
Before your first customer, daily backups are fine. The day someone trusts you with their data, turn on point-in-time recovery. Then do the part everyone skips: restore it.
docs/restore.md, so a stressed you at 2am can follow it. Then delete the test project.Your laptop and Vercel preview links. Its own Supabase project, Stripe in test mode, test API keys. Nothing here can touch a real customer.
Its own Supabase project, Stripe live mode, live keys that only the production environment can see. No experiments, no test data, no "quick fix" straight in the database.
Once the business gets serious, add a third environment set up like production: its own database and domain, Stripe test mode. Changes land here first, you click through, then they go live.
The order I'd do it in. Steps 01 to 08 are a weekend. The rest arrive when the product needs them.
npx create-next-app@latest, strict TypeScript, push to GitHub, import on Vercel.@supabase/ssr and proxy.ts. Sign up, log in, log out, reset password. Create an organization on sign-up.Make an empty folder, open Claude Code in it, and paste this. It builds Weekend One step by step, stops whenever you need to click something in a dashboard, and shows you each piece working before it moves on.
You're helping me start a SaaS product: [one sentence on what it does and who pays for it]. I'm [not an engineer / a developer], so explain each step in plain words before you do it. The stack. Don't add or swap anything without asking: - TypeScript (strict) and Next.js with the App Router. API routes are the backend; no separate server, no Express, no Docker. - Vercel for hosting, deployed from GitHub. - Supabase Postgres, with separate dev and prod projects. - Prisma 7, pinned: prisma@7, @prisma/client@7, @prisma/adapter-pg@7 and pg. Not Prisma 8. prisma.config.ts uses DIRECT_URL for migrations; the app uses DATABASE_URL (the transaction pooler) through the pg adapter. - Supabase Auth with @supabase/ssr and proxy.ts. Use getClaims() on the server, never getSession(). - Stripe Checkout, Billing and the Customer Portal. - PostHog for product analytics. Build it in this order. After each step, show me it working and wait for my OK. 1. App. create-next-app, strict TypeScript, a CLAUDE.md that records this stack and these rules. 2. Logger. lib/log.ts writes one JSON object per line: ts, level, msg, env, plus fields. Every route logs requestId, userId, orgId, route, op, status and durationMs. Never log passwords, tokens or payment details. 3. Database. Organization (id, name, stripeCustomerId, subscriptionStatus, createdAt) and Membership (userId, orgId, role). First migration. Turn on RLS for every table with no policies, since all access goes through Prisma on the server. 4. Auth. Sign up, log in, log out, reset password. Create an Organization and an owner Membership on sign-up. A /app area only logged-in users can see. 5. Rule for every API route: check the user with getClaims(), then filter every query by an organization they belong to. Write a test that proves user A can't read user B's organization. 6. Billing. Stripe Checkout for [$X/month], the Customer Portal, and POST /api/stripe/webhook that verifies the signature and updates subscriptionStatus. The webhook is the source of truth, not the success page. 7. Analytics. PostHog, identifying the user after login and grouping by organization. Track sign_up, [the one action that means they got value] and subscribed. Rules: - Never print or commit secrets. Read them from .env.local and give me the list of variables to add on Vercel myself, per environment. - Validate every input on the server. No string-built SQL. No dangerouslySetInnerHTML on user content. - Before each step, tell me the plan in 3 to 5 bullets and wait. - When something needs me (Supabase, Stripe, Vercel or Cloudflare dashboards), tell me exactly where to click.
Fill in what you're building, your price and the action that means value. Leave the rest.
Make the accounts in Step 01 before you paste this. Your agent can't sign up for things for you.
When it's done, run Cloudflare's /security-audit and the Security Checklist below before a real customer signs up.
Two lists. Do the first before any real customer data touches your database. Do the second before you tell the world.
getClaims().NEXT_PUBLIC_ variables, the browser bundle or the repo.$queryRawUnsafe with user input.dangerouslySetInnerHTML on anything a user typed./security-audit has run, and every critical is fixed.prisma migrate deploy.Not everything on this page belongs in week one. Here's what to do now, and what can wait until the business asks for it.
/security-audit, before real dataAn Express server, a React app and a contract between them, all to serve ten users. Next.js API routes do the job in one project. Split it out when a real need shows up, not before.
Weeks of YAML and an infrastructure job nobody's paying you for. Vercel runs it. You sell.
Both look simple and are full of edge cases: resets, sessions, proration, failed cards, refunds, tax. Supabase Auth and Stripe have already hit every one.
Public buckets, tables open to the browser key, and routes that check you're logged in but not that the record is yours. Most AI-built leaks are one of these three.
A cache you didn't need is a second copy of your data that can be wrong. Add the index, buy the bigger plan, measure. Then decide.
You find out the backup doesn't work on the worst day of the year. Do the drill when nothing's on fire.
No user, no organization, no request id. Now a customer is on the phone and you're guessing. Structured logs from day one cost nothing.
One loop in your code, one abusive user or one great week, and the bill arrives before the revenue does. Set the limits before launch.
One database for everything means one bad migration away from losing customer data. Dev and prod are separate from day zero.
The framework will never be why you fail. Not talking to customers will be. Pick this stack, ship, and spend the month you saved on sales.
Anybody can build software now. Not everybody can build a business.
Reading about tools is a great way to feel busy. The Lab is for Founders who'd rather get customers: weekly office hours with a CTO who's built two seven-figure software companies, and a room of other Founders who care whether anybody buys what you're making.
Less Theater. More Customers.
Want my 30-Day Launch Plan? It's for Lab members only: validate, plan, build and launch, one week at a time.
See The Solo Founder Lab ▶