Skip to content

Latest commit

 

History

History
114 lines (83 loc) · 2.67 KB

File metadata and controls

114 lines (83 loc) · 2.67 KB

INSTALL

Requirements

  • Node 20+
  • pnpm 9+ (npm i -g pnpm)
  • Claude Code (npm i -g @anthropic-ai/claude-code)

Steps

1. Create an empty workspace directory

mkdir my-saas && cd my-saas

2. Copy this repo inside

Copy these files/folders into the directory:

  • SPEC.md
  • AGENT.md
  • INSTALL.md (optional, reference)
  • modules/
  • tests/

The agent will first ask for your project name (e.g. invoicer) and will generate it in a subfolder with that name, separate from the specs. Final layout:

workspace/
  SPEC.md, AGENT.md, INSTALL.md   ← specs (reference, don't touch)
  modules/, tests/                 ← specs (reference)
  scope.json                       ← config created by the agent
  invoicer/                        ← ← your SaaS (name you picked)
    src/, package.json, ...
    .env.local                     ← fill your keys here

3. Open Claude Code

claude

4. Kick off the interview

Paste this prompt:

Read AGENT.md and run the interview step by step. One question at a
time. Save the answers in scope.json. When done, generate the
Next.js 16 project following SPEC.md + the active modules in modules/.
Then run the tests in tests/ and iterate until they all pass.

5. Answer the interview

The agent offers 3 modes upfront:

  • Preset (30 sec, recommended): pick an archetype (ai-saas, waitlist, b2b-classic, solopreneur, api-service)
    • a single extras question.
  • Quick (1 min): 5 core questions (auth, db, billing, forms, email)
    • extras.
  • Custom (3 min): full control.

Modules always applied (not asked): SEO, legal pages, rate-limit, error-tracking. If you don't want one of them, say so at the end ("remove sentry").

Shortcuts:

  • Option number
  • First letter
  • skip / Enter → use the default

6. Wait for generation

The agent will:

  1. Scaffold with pnpm create next-app into <projectName>/
  2. Apply every active module
  3. Generate .env.example, README.md, CLAUDE.md
  4. Install dependencies
  5. Run typecheck, lint, build
  6. Run the tests in tests/ and iterate

7. Fill in .env.local

The agent prints which env vars you must fill in based on the active modules.

cd <projectName>           # e.g. cd invoicer
cp .env.example .env.local
# Edit .env.local with your real keys

8. Run

cd <projectName>
pnpm dev

Troubleshooting

  • Build fails: the agent should iterate. If it doesn't, tell it: "Run pnpm build and fix errors until it passes".
  • Tests fail: tests are functional. If one needs real credentials (Stripe, Resend), the agent should skip it by marking it requires_env in the YAML.