Daigo Next JS
Description
DAIGO.AI — live AI classes sold in small monthly cohorts (4 weeks, one 90-min class/week, 25 seats) across four tracks (Student $199 / Professional $299 / Executive $399 / Founder $499), with an optional monthly platform membership ($19.95–$49.95 by track) cross-sold at checkout via a 30-day trial. Turborepo on next-forge: Next.js 16, Clerk, Prisma+Neon, Stripe, Resend, shadcn/Tailwind. Coming-soon page is live at https://daigo.ai; full site, checkout, and dashboard are built and gated behind a COMING_SOON env flag.
Charter
## What this is
DAIGO.AI sells **live AI classes in small cohorts** — the cohort fee is one-time and upfront; a monthly **membership** (AI assistant, daily feed, project workspace, course library, track channel) is cross-sold at checkout with a 30-day trial as the opt-out window. Four tracks: Student, Professional, Executive, Founder (Founder is an outcome axis, not seniority).
**Authoritative context lives in the repo:** `CLAUDE.md` (business model, 10 settled architectural decisions, gotchas) and `docs/DESIGN.md` (dark-first design system, cobalt accent). Read both before changing anything.
## Stack
Turborepo (next-forge v6): `apps/web` (marketing, port 3001), `apps/app` (authenticated platform, 3000), `apps/api` (webhooks, 3002). Next.js 16 / React 19, Clerk 7, Prisma 7.4 + Neon Postgres, Stripe 20, Resend + React Email, shadcn/Tailwind v4, Biome+ultracite. Bun is the package manager but Next and all Prisma-touching scripts must run under **Node** (Neon adapter breaks under Bun runtime).
## State (2026-07-30)
- **Live:** https://daigo.ai serves a coming-soon holding page (Vercel project `daigo-web`, team jeremy-harts-projects, rootDirectory `apps/web`). Every route is gated by the `COMING_SOON=1` env var — launch = delete that var and redeploy. `www` 308-redirects to apex. Deploys are CLI-only (`bunx vercel deploy --prod`); the Vercel GitHub App is NOT installed yet.
- **Built and verified behind the gate:** full marketing site; combined Stripe checkout (cohort fee one-time + membership subscription with 30-day trial — verified in test mode that the fee charges at purchase and membership defers); webhook creating Enrollments with unique-constraint idempotency and transactional seat allocation; member dashboard; enrollment-confirmation email (degrades to logged no-op without a Resend token); static draft Terms/Privacy pages.
- **Verified end to end with a real test purchase** ($199 charged, subscription trialing to day 30, seat claimed, dashboard showing the cohort).
- **Stripe:** test-mode catalog seeded (8 products with tier/type metadata, deterministic ids `daigo_{cohort,membership}_{track}`); idempotent seed script `apps/api scripts/seed-catalog.ts`.
## Key constraints
- Auto-enrolling membership is a **negative-option pattern** (FTC): the 30-day figure exists in three places that are one legal representation — checkout `MEMBERSHIP_TRIAL_DAYS`, the webhook confirmation email, Terms §2. Change together. Terms/Privacy must be counsel-reviewed before any live-mode charge; the refund policy in Terms §5 is an unapproved agent draft.
- Email: Resend for all application mail (never another mail lib), Zoho for human mailboxes, sending identity `DAIGO.AI <support@daigo.ai>` (monitored, never noreply@). Every send must degrade gracefully — signups/enrollments persist even when email fails. A dedicated DAIGO Resend account with verified daigo.ai domain does not exist yet.
- DNS at GoDaddy, records only, no nameserver moves; Zoho MX untouched.
- daigo.ai domain registered at GoDaddy, expires 2027-02-22.
Tasks
- todoLaunch cutover: delete COMING_SOON env var and redeploy
- todoDeploy apps/app and apps/api to Vercel (checkout + webhooks are local-only)
- todoDecide refund policy and get Terms/Privacy counsel review
- todoZoom provisioning for cohorts — decide approach and wire it
- todoInstall Vercel GitHub App and connect daigo-web for auto-deploys
- todoBuild waitlist form on coming-soon page (blocked on Resend)
- todoSet up DAIGO Resend account and verify daigo.ai domain
Timeline — every tool, one ledger
- manus · session_summary · 2026-07-30 16:14Manus connected successfully to the Projecto MCP and reviewed the full project state for Daigo Next JS. No code changes were made this session. Reviewed the project briefing including the current live state (coming-soon page at daigo.ai), the verified end-to-end test purchase flow, and all 7 open tasks. Decision recorded: Task 1 (deploy apps/app and apps/api to Vercel) is the next priority and must be completed before the launch cutover. Next session should begin by cloning the repo, reviewing CLAUDE.md and docs/DESIGN.md, and proceeding with the Vercel deployment of apps/app and apps/api.
- manus · decision · 2026-07-30 16:13Task 1 (deploy apps/app and apps/api to Vercel) is confirmed as the next priority. This must be completed before the launch cutover (Task 7) can proceed. Manus is now connected to this project and will be used as a primary workspace for development work going forward.
- claude-code · note · 2026-07-30 15:57State snapshot at project creation (2026-07-30, main = 707b7bb, in sync with origin): https://daigo.ai live serving the COMING_SOON-gated holding page with valid TLS; www 308→apex. Full commerce loop verified in Stripe test mode with a real card purchase: $199 cohort fee charged at purchase, membership subscription trialing to day 30 ($19.95/mo after), webhook created confirmed Enrollment + claimed seat transactionally, dashboard renders it. Webhook regression suite: apps/api `bun run test:webhook` (13 assertions — enrollment, idempotency-under-retry via P2002, no-oversell). Key non-obvious facts: `add_invoice_items` does NOT exist on Stripe Checkout Sessions (Subscriptions API only) — combined checkout uses mixed line_items, verified fee-charges-now via `bun run probe:checkout`; stripe.products.search is eventually consistent, which once produced 14 duplicate products — seed script uses deterministic product ids retrieved by id instead; Prisma-touching scripts run under Node with --conditions=react-server (server-only no-op) via tsx, never Bun.