How code-the-dream-school/summer-26-js-practicum-team2 works
Sprout is a gamified money-basics learning app: learners authenticate, choose a learning path, complete short lessons and quizzes, and see progress and rewards. The frontend routes users through learning and account experiences and communicates with an Express REST API; backend controllers coordinate content, progress, quiz results, and reward state. The README documents the REST integration and MongoDB stack. Some route and feature implementations were not sampled, so uncertain links are omitted or marked dashed rather than inferred as direct calls.
Main entry points: api.js API client · UserProgress.model.js User progress · AppRouter.jsx App routing · quiz.controller.js Quiz handling
Components 29
Learner experience
- App routing
frontend/src/app/router/AppRouter.jsx - API client
frontend/src/services/api.js - Dashboard
frontend/src/pages/DashboardPage.jsx - Admin dashboard
frontend/src/pages/AdminDashboardPage.jsx
Learning journey
- Learning path
frontend/src/pages/LearningPathPage.jsx - Lesson experience
frontend/src/pages/LearnPage.jsx - Lesson flow
frontend/src/features/learn/LearnFlow/LearnFlow.component.jsx - Lesson renderer
frontend/src/features/learn/Lesson/LessonRenderer/LessonRenderer.component.jsx - Quiz interaction
frontend/src/hooks/useQuiz.js - Lesson content
backend/src/utils/content.js
Identity and access
- Auth context
frontend/src/context/AuthContext.jsx - Auth actions
frontend/src/hooks/useAuth.js - Account handling
backend/src/controllers/user.controller.js - OAuth routes
backend/src/routes/oauth.routes.js - OAuth user service
backend/src/services/oauthUser.service.js
Backend API
- Quiz handling
backend/src/controllers/quiz.controller.js - Lesson handling
backend/src/controllers/lesson.controller.js - Dashboard assembly
backend/src/controllers/dashboard.controller.js - Admin operations
backend/src/controllers/admin.controller.js
Progress and rewards
- Dashboard data
frontend/src/hooks/useDashboardData.js - Lesson modules
backend/src/models/LessonModule.model.js - User progress
backend/src/models/UserProgress.model.js - Quiz attempts
backend/src/models/QuizAttempt.model.js - User accounts
backend/src/models/User.model.js - XP rewards
backend/src/services/xp.service.js - Streak rewards
backend/src/services/streak.service.js - Badge rewards
backend/src/services/badge.service.js
Other components
- Learner
- MongoDB
Connections 46
- Learner → App routing: uses
frontend/src/app/router/AppRouter.jsx - App routing → Auth context: checks auth
frontend/src/app/router/AppRouter.jsx - App routing → Dashboard: routes to
frontend/src/app/router/AppRouter.jsx - App routing → Learning path: routes to
frontend/src/app/router/AppRouter.jsx - App routing → Lesson experience: routes to
frontend/src/app/router/AppRouter.jsx - App routing → Admin dashboard: routes to
frontend/src/app/router/AppRouter.jsx - Auth context → Auth actions: uses
frontend/src/context/AuthContext.jsx - Auth actions → API client: requests
frontend/src/hooks/useAuth.js - Dashboard → Dashboard data: loads data
- Learning path → API client: loads path
- Lesson experience → Lesson flow: renders
- Lesson flow → Lesson renderer: renders content
- Quiz interaction → API client: submits quizzes
frontend/src/hooks/useQuiz.js - API client → Lesson handling: calls API
- API client → Quiz handling: calls API
- API client → Dashboard assembly: calls API
- API client → Account handling: calls API
- API client → Admin operations: calls API
- OAuth routes → OAuth user service: delegates
- Lesson handling → Lesson content: loads content
backend/src/controllers/lesson.controller.js - Lesson handling → Lesson modules: reads modules
backend/src/controllers/lesson.controller.js - Lesson handling → User progress: updates progress
backend/src/controllers/lesson.controller.js - Lesson handling → Quiz attempts: checks attempts
backend/src/controllers/lesson.controller.js - Quiz handling → Quiz attempts: records attempts
backend/src/controllers/quiz.controller.js - Quiz handling → User progress: updates progress
backend/src/controllers/quiz.controller.js - Quiz handling → XP rewards: awards XP
backend/src/controllers/quiz.controller.js - Quiz handling → Streak rewards: updates streak
backend/src/controllers/quiz.controller.js - Quiz handling → Badge rewards: awards badges
backend/src/controllers/quiz.controller.js - Dashboard assembly → User progress: reads progress
backend/src/controllers/dashboard.controller.js - Dashboard assembly → Quiz attempts: reads attempts
backend/src/controllers/dashboard.controller.js - Dashboard assembly → Lesson modules: reads modules
backend/src/controllers/dashboard.controller.js - Dashboard assembly → XP rewards: reads XP
backend/src/controllers/dashboard.controller.js - Account handling → User accounts: manages accounts
backend/src/controllers/user.controller.js - Admin operations → User accounts: manages users
backend/src/controllers/admin.controller.js - Admin operations → User progress: reads progress
backend/src/controllers/admin.controller.js - Admin operations → Lesson modules: manages modules
backend/src/controllers/admin.controller.js - XP rewards → User progress: updates XP
backend/src/services/xp.service.js - XP rewards → User accounts: updates totals
backend/src/services/xp.service.js - Streak rewards → User accounts: updates streak
backend/src/services/streak.service.js - Badge rewards → User accounts: stores badges
backend/src/services/badge.service.js - Badge rewards → User progress: stores badges
backend/src/services/badge.service.js - API client → Lesson handling: integrates REST
README.md - Lesson modules → MongoDB: persists in
README.md - User progress → MongoDB: persists in
README.md - Quiz attempts → MongoDB: persists in
README.md - User accounts → MongoDB: persists in
README.md