Application shell
The monorepo serves www, library, checkout, journal, lab, and exam via middleware.ts host rewrites. Shared chrome hides on Journal/Lab/Exam/Login so those surfaces can feel like focused tools. Public marketing pages keep Navbar + Footer.
Data
PostgreSQL via Prisma (application database); Qdrant for RAG vectors. Core commerce: Order, OrderItem. Ownership: BookOwned. Lab: LearningObjective, UserObjectiveProgress, Milestone, StudySession, SessionMessage, RecallEvent, GeneratedMaterial, LabSettings. Exam: ExamSession with Zoom stub fields.
Auth
Supabase Google + Apple OAuth through /auth/callback. Account dropdown appears only when a session exists. Lab and Exam require auth when Supabase env is present; otherwise Lab allows a demo user id for local UX exercise.
Integration seams
TODO(AI-INTEGRATION)— mockInference → GPU/LLM RAG serviceTODO(PAYMENTS)— stub card capture → Stripe PaymentIntentsTODO(ZOOM)— stub meeting IDs → Zoom Meeting API
Related reading
Wiki home · RAG · CAG · ML techniques
