Prompt Details
Model
(claude-5-sonnet)
Token size
3,099
Example input
[PRODUCT_IDEA]: AI habit coach SaaS - daily SMS nudges, adjustable targets, streak freeze, dashboard
[USER_SCALE]: 0 to 5k users in 6 months, 500 DAU peak
[TECH_PREFERENCE]: Next.js + TypeScript + Supabase preferred, avoid DevOps
[TEAM_SIZE]: Solo founder + 1 freelance QA
[LAUNCH_TIMELINE]: 4 weeks to beta, nights + weekends
Example output
## Demo 1: Default Output (Architecture Blueprint)
**Model:** Claude 5 Sonnet
**Input:**
- PRODUCT_IDEA: AI habit coach SaaS — daily SMS nudges, adjustable targets, streak freeze, dashboard
- USER_SCALE: 0 to 5k users in 6 months, 500 DAU peak
- TECH_PREFERENCE: Next.js + TypeScript + Supabase preferred, avoid DevOps
- TEAM_SIZE: Solo founder + 1 freelance QA
- LAUNCH_TIMELINE: 4 weeks to beta, nights + weekends
**Output:**
# SaaS Architecture Generator
*Product: AI habit coach | Scale: 0-5k, 500 DAU | Stack: Next.js + Supabase | Team: Solo + QA | Timeline: 4 weeks beta*
## Executive Summary
**Architecture:** MODULAR MONOLITH
**Confidence:** HIGH
Next.js monolith + Supabase (Postgres + Auth + RLS) + Vercel + Stripe + Twilio covers 5k users with zero DevOps. Buy Auth/billing/SMS, build only habit logic. Modular folders keep future split easy without microservice overhead.
**Build vs Buy:** Buy Auth (Supabase), Billing (Stripe), SMS (Twilio). Build habits, nudges, dashboard only.
---
## 1. Stack Decision (For Next.js + Supabase + solo)
### 4-Layer Stack
| Layer | Choice | Why | Alternative |
|---|---|---|---|
| Frontend | Next.js 14 App Router + Tailwind | Solo knows it, Vercel deploys | Remix |
| Backend/API | Next.js Route Handlers + Supabase Edge | No separate server | FastAPI |
| Data/Auth | Supabase Postgres + Auth + RLS | Zero DevOps, RLS for tenants | Clerk + Neon |
| Infra/DevOps | Vercel + Supabase + GitHub Actions | Free tier to $25/mo | Fly.io |
## 2. System Diagram (Text, for habit coach)
```
[Web/PWA] -> [Vercel CDN] -> [Next.js App] -> [Route Handlers] -> [Supabase PG/RLS]
-> [Stripe] (billing)
-> [Twilio] (SMS cron)
-> [Claude API] (coach)
```
### Integrations
| Service | Purpose | Build vs Buy | Cost |
|---|---|---|---|
| Supabase Auth | Login, RLS | Buy | $0-25 |
| Stripe | $9/mo subs | Buy | 2.9% + 30c |
| Twilio | Daily SMS | Buy | $0.0079/msg |
| Claude API | Coach msgs | Buy | ~$30/mo |
## 3. Data Model (3-5 tables for habit coach)
| Table | Key Fields | Notes |
|---|---|---|
| users | id, email, phone, timezone | Supabase Auth + profile |
| habits | id, user_id, name, target, freq | RLS by user_id |
| checkins | id, habit_id, date, status | Index (habit_id, date) |
| freezes | id, user_id, count | Earned 1/7 days |
| messages | id, user_id, body, sent_at | Coach log |
### Multi-tenancy
- Single DB + user_id RLS (not tenant_id) — B2C single-user, fits 5k scale. No schemas needed.
## 4. Build vs Buy (For solo + 4 weeks)
| Feature | Build | Buy | Verdict |
|---|---|---|---|
| Auth | 1 week | 1 hr Supabase | Buy |
| Billing | 1 week | 2 hrs Stripe | Buy |
| SMS | 3 days | 2 hrs Twilio | Buy |
| Habits CRUD | 3 days | — | Build |
| Coach AI | 2 days | Claude API | Build thin |
## 5. Non-Functional (For 0-5k, 500 DAU)
### Performance / Security / Cost
- Cache: Next.js ISR for dashboard, no Redis yet
- Security: RLS on all tables, service key server-only
- Cost: Vercel $0 + Supabase $25 + Twilio ~$20 + Claude $30 = ~$75/mo
- Backups: Supabase PITR on Pro
## 6. Phased Build Plan (Fits 4 weeks)
### Week 1-2
- ☐ Supabase schema + RLS + Auth + landing + habits CRUD
### Week 3-4
- ☐ Checkins + freeze + Twilio cron + Stripe + dashboard + QA pass
### Launch
- ☐ Beta 50 users, analytics (Posthog free), on-call checklist
## 7. What to Defer to v2
- Redis, separate API service, multi-region, custom admin, team workspaces
## 8. First Action Today
- Scaffold: `npx create-next-app@latest` + `supabase init` + create habits/checkins tables with RLS
By purchasing this prompt, you agree to our terms of service
CLAUDE-5-SONNET
Turn any SaaS idea into a build-ready architecture. Input idea, scale, stack, team & timeline → get 4-layer stack, text system diagram, 3-5 table data model, build vs buy with costs, phased plan + v2 defer list. For founders & small teams. Works with GPT-4o, Claude 5 Sonnet, Gemini. Markdown + JSON. Example: habit coach SaaS → Next.js + Supabase, ~$75/mo, 4-week beta plan.
...more
Added 4 days ago
