How energizee/gdgstudyapp works
Momentum is a learner study-planning app: learners enter courses and assessments, review a study plan, work through focus sessions, and track progress. Its UI also supports syllabus scanning, work marking, adapting schedules, unblocking study, and learner profiling. The sampled code shows a shared Gemma API route dispatching model tasks, with prompts, tools, caching, and model-call helpers behind it. Relationships for unsampled feature implementations are included only where the source index or route excerpts show them; the README is empty.
Main entry points: store.ts Learner state · api.ts Gemma client · FocusSession.tsx Focus session · route.ts Task dispatcher
Components 23
Learner experience
- App shell
components/AppShell.tsx - Course setup
components/Onboarding.tsx - Study dashboard
components/Home.tsx - Course views
components/CoursesView.tsx - Course detail
components/CourseDetail.tsx - Plan views
components/PlansView.tsx - Plan detail
components/PlanDetail.tsx - Learner profile
components/ProfileView.tsx
Study workflows
- Focus session
components/FocusSession.tsx - Syllabus scan
components/SyllabusScan.tsx - Work marking
components/WorkScan.tsx - Study unblock
components/Unblock.tsx - Schedule adaptation
components/AdaptPanel.tsx
AI services
- Gemma client
lib/api.ts - Task dispatcher
app/api/gemma/route.ts - Task prompts
lib/prompts.ts - Schedule tools
lib/tools.ts - Gemma calls
lib/gemma.ts - Response cache
lib/cache.ts
State and domain
- Learner state
lib/store.ts - Grade calculations
lib/grades.ts - Starter state
lib/seed.ts
Other components
- Learner
Connections 33
- Learner → Course setup: sets up courses
- Learner → Study dashboard: reviews progress
- Learner → Course views: browses courses
- Learner → Plan views: reviews plans
- Learner → Learner profile: checks profile
- Learner → Focus session: studies
- App shell → Course setup: shows setup
app/(shell)/layout.tsx - App shell → Learner state: reads state
app/(shell)/layout.tsx - Course views → Course detail: opens course
- Plan views → Plan detail: opens plan
- Focus session → Study unblock: opens blocker help
components/FocusSession.tsx - Focus session → Work marking: uses work scan
components/FocusSession.tsx - Course setup → Syllabus scan: offers scanning
components/Onboarding.tsx - Plan views → Syllabus scan: offers scanning
components/PlansView.tsx - Course setup → Learner state: updates state
components/Onboarding.tsx - Study dashboard → Learner state: reads state
components/Home.tsx - Learner profile → Learner state: reads state
components/ProfileView.tsx - Focus session → Learner state: updates state
app/session/[id]/page.tsx - Focus session → Gemma client: requests tasks
components/FocusSession.tsx - Syllabus scan → Gemma client: requests extraction
components/SyllabusScan.tsx - Work marking → Gemma client: requests marking
components/WorkScan.tsx - Study unblock → Gemma client: requests help
components/Unblock.tsx - Schedule adaptation → Gemma client: requests adaptation
components/AdaptPanel.tsx - Gemma client → Task dispatcher: posts tasks
lib/api.ts - Task dispatcher → Gemma calls: calls model
app/api/gemma/route.ts - Task dispatcher → Task prompts: builds task prompts
app/api/gemma/route.ts - Task dispatcher → Schedule tools: dispatches schedule tools
app/api/gemma/route.ts - Task dispatcher → Response cache: reads and writes cache
app/api/gemma/route.ts - Learner state → Gemma client: requests triage
lib/store.ts - Learner state → Starter state: initializes state
lib/store.ts - Learner state → Grade calculations: uses date logic
lib/store.ts - Study dashboard → Grade calculations: calculates metrics
components/Home.tsx - Learner profile → Grade calculations: calculates metrics
components/ProfileView.tsx