user.route.ts
Prefix: /api/v1/users
After login, students call these endpoints for their data: profile, YouTube library, playlists, study stats, continue learning, etc.
Almost every path uses authMiddleware — you must send Authorization: Bearer ....
Topic areas (grouped by feature)
| Area | Examples of what routes do |
|---|---|
| Profile / onboarding | Update name, exam goals, mark onboarded |
| Library | Save channels/videos, user playlists |
| Study stats | Dashboard numbers, recent subtopics, attempt history |
| Continue learning | Resume where user left off |
Pattern
c.get('userId')— who is calling- Parse body/query with Zod
- Call service in
services/orservices/user-study-stats/ - Return JSON DTO
File size tip
user.route.ts is large. When searching, use your editor’s symbol search or grep for userRouter.get / userRouter.post.
For line-by-line listing, see reference/user.route.ts in file index after running npm run generate:file-index.
Last updated on