Claude Code prompt to build a SaaS starter app
Run this in an empty directory and Claude Code builds the unglamorous first week of a SaaS project: auth with verification, org and role tables, guarded routes, and a billing stub ready for a payment provider. It seeds demo data and proves the auth flow with tests before you write a single line yourself.
Last updated
Create a new SaaS starter in {{language}} in an empty directory: auth, billing scaffolding, and a protected app shell. Include email-plus-password signup with verification tokens stored in {{database}}, session handling via httpOnly cookies, an organizations table with a member role column (owner, admin, member), and route guards that redirect unauthenticated users to /login. Stub billing with a plans table and a checkout redirect placeholder so a payment provider can slot in later. Add {{addon}} as an optional integration behind a feature flag read from env. Ship a seed script that creates a demo org and two users, plus a README section documenting env vars. Cover the auth flow with tests: signup, duplicate email rejection, expired verification token, and role-gated access. Initialize git, run the seed and the tests, and finish with a tree of the directories you created.Customize it
Runs in your browser. Nothing you type here is sent anywhere.
Create a new SaaS starter in TypeScript in an empty directory: auth, billing scaffolding, and a protected app shell. Include email-plus-password signup with verification tokens stored in PostgreSQL, session handling via httpOnly cookies, an organizations table with a member role column (owner, admin, member), and route guards that redirect unauthenticated users to /login. Stub billing with a plans table and a checkout redirect placeholder so a payment provider can slot in later. Add input validation as an optional integration behind a feature flag read from env. Ship a seed script that creates a demo org and two users, plus a README section documenting env vars. Cover the auth flow with tests: signup, duplicate email rejection, expired verification token, and role-gated access. Initialize git, run the seed and the tests, and finish with a tree of the directories you created.
Same task in other tools
Questions about this prompt
Should I run this inside an existing repo?
No. In a populated repo Claude Code spends its effort reconciling this spec with what already exists, which produces awkward merges. Start in an empty directory, or break the spec into per-feature prompts for an existing app.
How do I turn the billing stub into real payments?
Send a follow-up prompt naming your provider. The plans table and the checkout redirect are deliberate seams, so the change stays contained to those spots plus a new webhook route.
The agent chose a framework I would not have picked. Can I control that?
Yes. The language token only pins the language, so name the framework and ORM in the first sentence, for example "using Next.js and Drizzle". Deciding up front is much cheaper than asking it to convert a finished scaffold.