full stack
Wonderkin - Parent-Controlled, Child-Safe AI Companion
Designed, built, and shipped wonderkin.net, a live production COPPA-minded AI companion where parents own the account and each child runs under age-adaptive safety policies, live oversight, and hard per-account cost limits. Built on Next.js 16 (App Router, Server Actions) and TypeScript with a strict server-only service layer over Supabase Postgres (Row-Level Security, Auth, Realtime, Storage), so safety rules cannot be bypassed by the client. Engineered defense-in-depth AI safety: age-adaptive prompts, OpenAI input/output moderation, a dedicated Anthropic Claude crisis classifier on its own independent model, and real-time parent alerts via Supabase Realtime and Web Push, plus moderation-gated child vision where photos are screened before the model sees them, read once, and never stored. Implemented token-accurate cost governance with per-account USD ceilings and an 80% model-downgrade governor so no account runs at a loss. Owned the full billing lifecycle: built a Stripe Checkout loop with a signed webhook as the single source of truth for paid state, then migrated to Lemon Squeezy as merchant of record behind a PaymentProvider seam. Hardened multi-tenant RLS in production, including a closed privilege-escalation fix, with GitHub Actions CI (Vitest, RLS integration tests against live Postgres) and $0 deterministic tests via a mock AI provider. Deployed on Vercel and Supabase with shadcn/ui and Tailwind v4.