Claude Templates / S-tier · Foundation

Foundation

The App Infrastructure Playbook

The mother playbook: the full stack, the topology, and the Week 0 → launch sequence.

APP-INFRASTRUCTURE-PLAYBOOK.md · 12 sections · 3,757 words · 29 KB · markdown

By Moe Ameen, founder of BILT · Published · Updated

The App Infrastructure Playbook is the first Claude Code template to run on a new SaaS app. It locks the stack (Next.js on Vercel, Supabase, Trigger.dev, Stripe, Postmark, Upstash Redis, GitHub), walks the Week 0 bootstrap, lists every environment variable, and sets the order the other playbooks run in. You give Claude an app name, domain, one-liner, ICP and launch date.

Key takeaways

  • Run it on day one, before any feature code.
  • It fixes the stack: Vercel, Supabase, Trigger.dev, Stripe, Postmark, Upstash, GitHub.
  • By the end of Week 0 the app runs locally on port 3001 and auto-deploys from master.
  • Every other playbook in the library assumes this one ran first.

This is the first file you hand Claude when you say "build me a new app." It defines the entire stack (Vercel, Supabase, Trigger.dev, GitHub) the deployment topology, every environment variable, and the order the other playbooks get executed in. Everything else in this library assumes this one ran first.

What does the App Infrastructure Playbook set up?

It sets up the accounts, repo and wiring a new app needs before features: a GitHub repo, a Vercel project deploying on push to master, Supabase, Trigger.dev, Postmark with SPF/DKIM/DMARC, Stripe and Upstash Redis.

The file also carries a table of hard architectural rules from past deploys, such as moving any task over 60 seconds into a Trigger.dev worker and running Next.js on webpack rather than Turbopack.

When should you use it instead of a starter kit?

Use it when you want Claude Code to build the app on this exact stack and keep going with the rest of the library. It is opinionated on purpose and says not to swap tools without approval.

If you already have a stack you like, a generic starter is a better fit. Most of the later playbooks assume Supabase, Trigger.dev and Vercel.

What do you need before you start?

You need six inputs: APP_NAME, a DOMAIN you control at the registrar, a ONE_LINER, the ICP, a PRIMARY_KEYWORD_CLUSTER and a TARGET_LAUNCH_DATE. Brand tokens are optional.

You also need accounts on the services in the stack. The file tells you which keys go in which service.

What's inside

What does the playbook give you?

When to use it

Day 1. Before any code.

Build these first

Nothing. This one stands alone.

Straight from the file

What does the writing look like?

When you say "I want to launch a new app," this is the first thing the agent reads. It explains the full stack, the deployment topology, the bootstrapping sequence (Week 0 → Launch), and points to every other tier-S/A/B/C playbook in the order they should be executed.

Table of contents

Which sections does the file cover?

  1. 0. Use this spec
  2. 1. The stack (canonical)
  3. 2. Deployment topology
  4. 3. Bootstrapping sequence (Week 0)
  5. 4. Reference repo structure (mirror BKE)
  6. 5. The build sequence (order of operations)
  7. 6. Environment variables checklist
  8. 7. Hard architectural rules (locked-in decisions across all apps)
  9. 8. Common pitfalls (from BKE lab notes)
  10. 9. Agent kickoff prompt (paste into Claude when launching a new app)
  11. 10. Reference files in BKE (every key pattern)
  12. 11. Cross-reference index

How do you run it?

Drop APP-INFRASTRUCTURE-PLAYBOOK.md into your repo, then tell Claude Code: “Read APP-INFRASTRUCTURE-PLAYBOOK.md and implement it in this codebase.” It's written for an agent to execute end to end. Search the file for angle-bracket placeholders and swap in your own project names, domains, and keys before the first run.

↓ Download the playbook

Who is this for, and who should skip it?

Best for

  • Founders starting a new SaaS from an empty repo with Claude Code
  • Builders who want the same stack across several apps
  • Anyone who plans to run the other playbooks in this library

Not ideal for

  • Apps already built on a different host or database
  • Teams that want to pick their own tools layer by layer
  • Static marketing sites with no backend
  • Builders who won't adapt paths: the file points to a reference app you won't have

What else do people ask?

What is in the App Infrastructure Playbook download?

The App Infrastructure Playbook is a single markdown file of about 3,800 words. It has a deployment topology diagram, a 14-step Week 0 bootstrap with a check after each step, a reference folder tree, the env-var block, a pitfalls list and a kickoff prompt you can paste to the agent.

Can I swap Vercel, Supabase or Trigger.dev for other tools?

The App Infrastructure Playbook calls its stack locked and says not to substitute any tool without explicit approval. Its reason is maintenance: each swap multiplies what you have to maintain across a portfolio of apps.

Where do the environment variables need to be set?

The App Infrastructure Playbook puts every variable in three places: .env.local, the Vercel project and the Trigger.dev project. Before launch it has you grep the repo for process.env and confirm each one exists in all three, because a Vercel build still passes with a variable missing and the gap only shows up at runtime.

Does a push to master also deploy the Trigger.dev workers?

No. The App Infrastructure Playbook says a push to master deploys Vercel only, and Trigger.dev needs its own npx trigger.dev@<version> deploy whenever worker code or a file it imports changes. Skip that and the workers keep running yesterday's code.

What if my launch date is less than four weeks away?

The App Infrastructure Playbook plans a 4-week build backward from your TARGET_LAUNCH_DATE. With less than four weeks, the playbook says to cut Week 3 admin scope first.

How do we know this?

This page is based on the playbook file itself, APP-INFRASTRUCTURE-PLAYBOOK.md, which Moe Ameen wrote from the Kompozy codebase (called BKE in the file). We read the file on November 4, 2026; the facts here come from it, not from independent testing in other codebases.

More foundation playbooks

← All 28 Claude templates