How veasnachan1/hanmemo works
HanMemo is a Mandarin vocabulary-learning app built around lessons, quizzes, flashcard study, and spaced-repetition review. Learners authenticate, select a level, progress through lessons, and rate due vocabulary cards; the API tracks lesson completion and schedules reviews. Separate branches support learner progress/profile views and administrator management of users and learning content. The graph reflects sampled server flows and documented routes; several client and backend subsystems are represented by tree paths and capability names, without asserting unsampled internal wiring.
Main entry points: index.js Learning models · App.jsx App routing · server.js Express API · axios.js HTTP client
Components 32
Learner application
- App routing
Client/src/App.jsx - Lessons and study
Client/src/pages/LessonsPage.jsx - Lesson quiz
Client/src/pages/QuizPage.jsx - Review session
Client/src/pages/ReviewSessionPage.jsx - Progress views
Client/src/pages/ProgressPage.jsx - Admin dashboard
Client/src/pages/AdminDashboard.jsx - Lesson API client
Client/src/api/lessonApi.js - Review API client
Client/src/api/reviewApi.js - Progress API client
Client/src/api/progressApi.js - Admin API client
Client/src/api/adminApi.js - HTTP client
Client/src/api/axios.js
API routing
- Express API
server/server.js - Lesson routes
server/routes/lessonRoutes.js - Review routes
server/routes/reviewRoutes.js - Auth routes
server/routes/authRoutes.js - Admin routes
server/routes/adminRoutes.js - Progress routes
server/routes/progressRoutes.js
Learning services
- Lesson workflow
server/controllers/lessonController.js - Review workflow
server/controllers/reviewController.js - Quiz generation
server/services/quizService.js - SM-2 scheduling
server/services/srsService.js - Progress tracking
server/controllers/progressController.js - Content administration
server/controllers/adminController.js
Identity and access
- Authentication
server/controllers/authController.js - Credential and tokens
server/service/authService.js - JWT authentication
server/middlewares/authMiddleware.js
Persistent data
- MySQL database
server/config/db.js - Learning models
server/models/index.js - User records
server/models/User.js - Lesson and vocabulary
server/models/Lesson.js - Review sessions
server/models/ReviewSession.js
Other components
- Learner
Connections 43
- Learner → App routing: uses
- App routing → Lessons and study: routes to
- App routing → Lesson quiz: routes to
- App routing → Review session: routes to
- App routing → Progress views: routes to
- App routing → Admin dashboard: routes to
- Lessons and study → Lesson API client: requests lessons
- Lesson quiz → Lesson API client: requests quiz
- Review session → Review API client: loads and rates
- Progress views → Progress API client: requests progress
- Admin dashboard → Admin API client: manages content
- Lesson API client → HTTP client: sends requests
- Review API client → HTTP client: sends requests
- Progress API client → HTTP client: sends requests
- Admin API client → HTTP client: sends requests
- HTTP client → Express API: HTTP requests
- Express API → Lesson routes: dispatches
- Express API → Review routes: dispatches
- Express API → Auth routes: dispatches
- Express API → Admin routes: dispatches
- Express API → Progress routes: dispatches
- Lesson routes → JWT authentication: requires identity
- Review routes → JWT authentication: requires identity
- Lesson routes → Lesson workflow: dispatches
- Review routes → Review workflow: dispatches
- Admin routes → Content administration: dispatches
- Progress routes → Progress tracking: dispatches
- Auth routes → Authentication: dispatches
- Lesson workflow → Quiz generation: generates quiz
- Review workflow → SM-2 scheduling: calculates schedule
- Lesson workflow → Learning models: reads and writes
- Review workflow → Learning models: reads and writes
- Progress tracking → Learning models: tracks progress
- Content administration → Learning models: manages records
- Authentication → Credential and tokens: hashes and signs
- Authentication → Learning models: reads and writes
- JWT authentication → Credential and tokens: verifies token
- Learning models → MySQL database: persists records
- Learning models → User records: defines
- Learning models → Lesson and vocabulary: defines
- Learning models → Review sessions: defines
- Lesson workflow → Review sessions: creates due reviews
- Review workflow → Review sessions: loads and updates