Skip to Content
Routes (HTTP URLs)user.route.ts

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)

AreaExamples of what routes do
Profile / onboardingUpdate name, exam goals, mark onboarded
LibrarySave channels/videos, user playlists
Study statsDashboard numbers, recent subtopics, attempt history
Continue learningResume where user left off

Pattern

  1. c.get('userId') — who is calling
  2. Parse body/query with Zod
  3. Call service in services/ or services/user-study-stats/
  4. 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