ADHD Diagnostic SaaS MVP — Spec-driven development with Turborepo, Next.js, Supabase, and Claude AI.
🚀 Status: Foundation phase (Week 1 of MVP)
📦 Tech Stack: Turborepo, Next.js 15, TypeScript, Tailwind CSS, Supabase, Claude API
🎯 Product Name: ADHD-Prep (adhd-prep.com)
- Node.js >= 20
- pnpm >= 8
- Git
# Install dependencies
pnpm install
# Start development server
pnpm dev
# Run tests
pnpm test
# Run linting
pnpm lint
# Code generation (specs → types → logic)
pnpm codegen# Link to Vercel (first time)
vercel
# Deploy on push to main (automatic via GitHub Actions)hex-adhd-prep/
├── apps/
│ ├── web/ # Next.js MVP (frontend + API routes)
│ ├── mobile/ # Expo (added in Phase 2)
│ └── api/ # Supabase Edge Functions (future)
│
├── packages/
│ ├── ui/ # Shared React components (Tailwind + shadcn)
│ ├── types/ # Generated TypeScript types (from specs)
│ ├── logic/ # Scoring engine (from specs)
│ ├── specs/ # YAML specs (SINGLE SOURCE OF TRUTH)
│ ├── hooks/ # Shared React hooks
│ ├── config/ # Constants + Zod schemas
│ ├── api-client/ # Shared API client
│ ├── cache/ # Redis wrapper (Upstash)
│ ├── database/ # Migrations + RLS
│ └── agent/ # Unified Dev Agent (CEK + Caveman + SDD)
│
├── docs/ # Architecture, API, schema docs
├── scripts/ # Codegen pipeline, validation
├── .github/workflows/ # CI/CD (test, lint, deploy)
│
├── CLAUDE.md # Master control document (READ FIRST)
├── tsconfig.json # Root TypeScript config (with path mappings)
├── turbo.json # Turborepo build orchestration
├── pnpm-workspace.yaml # Workspace configuration
└── package.json # Root workspace definition
Always start here. It contains:
- Product vision
- Tech stack decisions
- Development guardrails
- Escalation paths
Everything starts with specs:
/packages/specs/adhd/questionnaire.yaml
↓ (pnpm codegen)
/packages/types/questionnaire.ts
/packages/logic/scoring.ts
/apps/web/app/assessment/*
# Write test first (RED)
pnpm test -- --watch
# Write code to pass test (GREEN)
# Refactor + lint (REFACTOR)
pnpm lint:fix
# Commit + push
git push origin [feature-branch]All PRs must pass:
- ✅ Jest tests (≥80% coverage)
- ✅ ESLint
- ✅ TypeScript strict mode
- ✅ Snyk security scan (automated)
- ✅ CodeRabbit AI review (automated)
- CLAUDE.md — Master control (read first always)
- ARCHITECTURE.md — System design
- API-SPEC.md — API endpoints
- DATABASE-SCHEMA.md — Data model
- 10X-ARCHITECTURE-CRITIQUE.md — Optimizations applied
- ASRS module (10 questions, scoring, risk classification)
- API routes for ASRS submission
- Type-safe frontend forms
- Basic styling (Tailwind)
- Unit tests (≥80% coverage)
- Deploy skeleton to Vercel
- Health check endpoint
- FCP (First Contentful Paint) < 2 seconds
- Test coverage ≥ 80%
- Zero linting errors
- Zero security vulnerabilities
| Command | Purpose |
|---|---|
pnpm install |
Install dependencies |
pnpm dev |
Start dev server (all apps parallel) |
pnpm build |
Build all packages + apps |
pnpm test |
Run all tests |
pnpm test:coverage |
Run tests with coverage report |
pnpm lint |
Lint all code |
pnpm lint:fix |
Fix linting errors |
pnpm type-check |
TypeScript type check |
pnpm format |
Format with Prettier |
pnpm codegen |
Generate types + logic from specs |
pnpm specs:validate |
Validate YAML specs |
pnpm clean |
Clean build artifacts |
- Framework: Next.js 15, React 18
- UI: Tailwind CSS, shadcn/ui, Radix UI
- Database: Supabase (PostgreSQL + RLS)
- Cache: Upstash Redis
- Validation: Zod
- Testing: Jest, React Testing Library
- AI: Claude API (Anthropic)
- Build: Turborepo
- Package Manager: pnpm
- Copy
.env.exampleto.env.local - Fill in Supabase credentials (create account + project)
- Fill in Anthropic API key
- Fill in Upstash Redis credentials (optional, for Phase 2)
cp .env.example .env.local
# Edit .env.local with your credentials- Create feature branch:
git checkout -b [your-name]/[feature] - Implement feature (test-first)
- Pass all checks:
pnpm test && pnpm lint && pnpm type-check - Push:
git push origin [feature-branch] - Create PR on GitHub
- Wait for CodeRabbit + Snyk approval
- Merge when green
See CLAUDE.md for guardrails + escalation.
- Questions? Check CLAUDE.md (answers 90% of questions)
- Architecture issues? See ARCHITECTURE.md
- Database questions? See DATABASE-SCHEMA.md
- Blocker? Open GitHub issue with
[blocker]tag
MIT — Hex-Tech-Lab
Last Updated: 2026-05-02
Repo: https://github.com/Hex-Tech-Lab/hex-adhd-prep
Vercel: https://vercel.com/techhypexps-projects