How silentk15/learnloop works
LearnLoop is an adaptive learning web app: students choose a subject, review their curriculum and mastery, complete adaptive drills or randomized Stat Trials, submit answers that update mastery, and view a session debrief. The graph separates the documented learning stages and persistence/assessment layers. Sampled routes establish the attempt, profile, question-selection, and diagnostic behavior; unsampled UI and route details are represented only where the README or imports support them.
Main entry points: page.tsx Learning home · prisma.ts Prisma client · getDemoStudent.ts Student lookup · route.ts Answer processing
Components 22
Student experience
- Learning home
src/app/page.tsx - Access check
src/components/AuthCheck.tsx - Sign in
src/app/login/page.tsx - Sign up
src/app/signup/page.tsx - Subject selector
src/components/SubjectSelector.tsx - Quest dashboard
src/components/DashboardView.tsx
Assessment workflow
- Adaptive drill
src/components/AdaptiveQuizView.tsx - Question selection
src/app/api/quiz/adaptive/route.ts - Stat Trial
src/components/DiagnosticView.tsx - Trial sampling
src/app/api/diagnostic/route.ts - Answer processing
src/app/api/attempts/route.ts - Mastery calculation
src/lib/mastery.ts
Progress and insight
- Progress summary
src/app/api/profile/route.ts - Session debrief
src/components/SessionResultsView.tsx - AI synthesis
src/app/api/session/summary/route.ts
Identity and persistence
- Student lookup
src/lib/getDemoStudent.ts - Realm progress
src/app/api/subjects/route.ts - Prisma client
src/lib/prisma.ts - PostgreSQL
prisma/schema.prisma - Demo reset
src/app/api/reset/route.ts
Other components
- Student
- Google Gemini
Connections 30
- Student → Learning home: opens
- Learning home → Access check: checks access
- Student → Sign in: signs in
- Student → Sign up: registers
- Learning home → Subject selector: selects realm
- Learning home → Quest dashboard: shows progress
- Learning home → Adaptive drill: starts drill
- Learning home → Stat Trial: starts trial
- Adaptive drill → Question selection: requests questions
- Stat Trial → Trial sampling: requests sample
- Adaptive drill → Answer processing: submits answer
- Answer processing → Mastery calculation: computes update
- Learning home → Progress summary: loads profile
- Learning home → Realm progress: loads realms
- Learning home → Session debrief: shows debrief
- Session debrief → AI synthesis: requests synthesis
- AI synthesis → Google Gemini: generates feedback
- Progress summary → Mastery calculation: recommends concept
- Progress summary → Student lookup: resolves student
- Realm progress → Student lookup: resolves student
- Trial sampling → Student lookup: resolves student
- Question selection → Student lookup: resolves student
- Answer processing → Student lookup: resolves student
- Progress summary → Prisma client: reads progress
- Realm progress → Prisma client: reads realms
- Trial sampling → Prisma client: reads questions
- Question selection → Prisma client: selects questions
- Answer processing → Prisma client: records attempt
- Demo reset → PostgreSQL: resets demo data
- Prisma client → PostgreSQL: queries