How ackzerman/learnr. works
learnr turns YouTube playlists or manually assembled video lists into personal learning courses, then tracks viewing, notes, goals, streaks, and analytics. The learner uses the React app to authenticate, browse or create courses, watch lessons, and review progress; the client calls the Express API, whose domain controllers coordinate persistence and external media services. The graph preserves the documented product branches. Some controller and client wiring is inferred from route declarations and README capabilities because those implementations were not sampled.
Main entry points: server.js Express server · index.js API client · models Learning records · userController.js Profile analytics
Components 25
Learning client
- React app
frontend/src/App.jsx - Auth state
frontend/src/hooks/useAuth.jsx - Course pages
frontend/src/pages/Courses.jsx - Lesson player
frontend/src/pages/VideoPlayer.jsx - Dashboard
frontend/src/pages/Dashboard.jsx - Day planner
frontend/src/pages/PlanYourDay.jsx - Profile
frontend/src/pages/Profile.jsx - API client
frontend/src/api/index.js
API and identity
- Express server
backend/server.js - Auth routes
backend/routes/authRoutes.js - Auth controller
backend/controllers/authController.js
Courses and study
- Course routes
backend/routes/courseRoutes.js - Course engine
backend/controllers/courseController.js - Progress engine
backend/controllers/progressController.js - Notes service
backend/controllers/notesController.js
Goals and analytics
- Goal planner
backend/controllers/goalController.js - Dashboard analytics
backend/controllers/dashboardController.js - Profile analytics
backend/controllers/userController.js - Streak routes
backend/routes/streakRoutes.js - User routes
backend/routes/userRoutes.js
Persistence and media
- Learning records
backend/models - MongoDB
backend/config/db.js - YouTube API
- Cloudinary
Other components
- Learner
Connections 31
- Learner → React app: uses
- React app → Auth state: provides auth
- Course pages → API client: requests courses
- Lesson player → API client: records viewing
- Dashboard → API client: loads analytics
- Day planner → API client: manages goals
- Profile → API client: loads profile
- Auth state → API client: verifies session
- API client → Express server: sends API requests
- Express server → MongoDB: connects
- Express server → Auth routes: dispatches
- Express server → Course routes: dispatches
- Express server → Streak routes: dispatches
- Express server → User routes: dispatches
- Auth routes → Auth controller: dispatches
- Auth controller → Learning records: reads/writes users
- Course routes → Course engine: dispatches
- Course engine → Learning records: manages courses
- Course engine → YouTube API: imports playlist data
- Express server → Progress engine: dispatches progress routes
- Progress engine → Learning records: updates viewing records
- Express server → Notes service: dispatches notes routes
- Notes service → Learning records: reads/writes notes
- Express server → Goal planner: dispatches goal routes
- Goal planner → Learning records: updates goals and streaks
- Express server → Dashboard analytics: dispatches dashboard routes
- Dashboard analytics → Learning records: aggregates activity
- Streak routes → Profile analytics: dispatches activity streak
- User routes → Profile analytics: dispatches profile and analytics
- Profile analytics → Learning records: reads/writes profile and activity
- Profile analytics → Cloudinary: uploads avatar