How meaterick/studysite works
Aegis is an eight-week AI study site: learners move through curriculum stages, practice and quizzes, then complete a worksheet and submit an assignment for operator review. Progress, feedback, and chat support that learning loop; operators manage members, submissions, settings, and conversations. The graph preserves the documented course, practice, assignment, and operator branches, plus indexed persistence and authentication modules. Several page and action implementations were not sampled, so documented relationships use README evidence; unsampled wiring is omitted rather than inferred.
Main entry points: callback/route.ts Google sign-in · db.ts SQLite database · page.tsx Progress dashboard · stream/route.ts Chat event stream
Components 30
Learning experience
- Course navigation
src/app/weeks/[slug]/page.tsx - Learning stages
src/app/weeks/[slug]/sections/[sectionId]/page.tsx - Coding labs and quizzes
src/app/weeks/[slug]/lab/page.tsx - Worksheet
src/app/weeks/[slug]/worksheet/page.tsx - Assignment workspace
src/app/weeks/[slug]/assignment/page.tsx - Progress dashboard
src/app/progress/page.tsx
Course content
- Curriculum catalog
src/content/weeks/week1.ts - Week two content
src/content/weeks/week2.ts - Week three content
src/content/weeks/week3.ts - Section metadata
src/content/sections.ts - Learning tiers
src/content/tiers.ts - Lab and quiz specs
src/content/labs/week7.ts
Operations and feedback
- Feedback inbox
src/app/feedback/page.tsx - Submission review
src/app/operator/submissions/page.tsx - Member records
src/app/operator/members/page.tsx - Operator chat
src/app/operator/chat/page.tsx - Chat event stream
src/app/api/chat/stream/route.ts - Chat views
src/lib/chatView.ts
Identity and access
- Google sign-in
src/app/api/auth/google/callback/route.ts - OAuth state
src/lib/googleOAuth.ts - Session tokens
src/lib/session.ts - Access checks
src/lib/dal.ts
Persistence and services
- User records
src/lib/userStore.ts - Learning records
src/lib/learningStore.ts - Submission records
src/lib/submissionStore.ts - Chat records
src/lib/chatStore.ts - SQLite database
src/lib/db.ts - Backup service
src/lib/backup.ts
Other components
- Learner
- Google identity
Connections 32
- Learner → Course navigation: opens weeks
- Course navigation → Learning stages: opens stages
- Learning stages → Coding labs and quizzes: offers practice
- Learner → Coding labs and quizzes: attempts labs
- Learner → Worksheet: submits work
- Learner → Assignment workspace: writes and submits
- Learner → Progress dashboard: checks progress
- Curriculum catalog → Course navigation: provides content
- Week two content → Curriculum catalog: joins catalog
src/content/weeks/index.ts - Week three content → Curriculum catalog: joins catalog
src/content/weeks/index.ts - Section metadata → Learning stages: defines checks
- Learning tiers → Section metadata: categorizes stages
- Lab and quiz specs → Coding labs and quizzes: defines exercises
- Progress dashboard → Learning records: reads progress
src/app/progress/page.tsx - Progress dashboard → Submission records: reads assignment state
src/app/progress/page.tsx - Learner → Feedback inbox: reviews feedback
- Submission review → Submission records: reviews submissions
- Member records → Learning records: reviews learning records
- Operator chat → Chat event stream: receives live updates
- Chat event stream → Chat records: subscribes to changes
src/app/api/chat/stream/route.ts - Chat event stream → Chat views: builds snapshots
src/app/api/chat/stream/route.ts - Learner → Google sign-in: signs in
- Google sign-in → Google identity: exchanges identity
src/app/api/auth/google/callback/route.ts - Google sign-in → OAuth state: validates state
src/app/api/auth/google/callback/route.ts - Google sign-in → User records: finds or creates user
src/app/api/auth/google/callback/route.ts - Google sign-in → Session tokens: issues session
src/app/api/auth/google/callback/route.ts - Access checks → Session tokens: verifies token
src/lib/dal.ts - Access checks → User records: loads account
src/lib/dal.ts - Learning records → SQLite database: reads and writes
src/lib/learningStore.ts - Submission records → SQLite database: reads and writes
src/lib/submissionStore.ts - Chat records → SQLite database: reads and writes
src/lib/chatStore.ts - Backup service → SQLite database: backs up database
src/lib/backup.ts