How oyerohabib/departmentms works
The Department Management System supports student, lecturer, and admin workflows for authentication, course management and enrollment, learning-material distribution, and user profiles. The main flow runs from the web dashboard through frontend services and HTTP routes to backend controllers and MongoDB models. The graph includes documented capabilities whose exact UI wiring was not sampled; edges are limited to relationships shown in excerpts, the source index, or README. Material storage beyond the recorded file path is not established.
Main entry points: app.ts Express API · course.service.ts Course service · axios.ts HTTP client · material.routes.ts Material routes
Components 26
Web application
- Web interface
frontend/src/app - Course pages
frontend/src/app/dashboard/courses - Dashboard
frontend/src/app/dashboard/page.tsx - Course service
frontend/src/services/course.service.ts - Auth service
frontend/src/services/auth.service.ts - Material service
frontend/src/services/material.service.ts - User service
frontend/src/services/user.service.ts - HTTP client
frontend/src/lib/axios.ts
API and access
- Express API
backend/src/app.ts - Auth routes
backend/src/routes/auth.routes.ts - Course routes
backend/src/routes/course.routes.ts - Material routes
backend/src/routes/material.routes.ts - User routes
backend/src/routes/user.routes.ts - Auth and roles
backend/src/middlewares/auth.middleware.ts - File upload
backend/src/middlewares/uploadMiddleware.ts - API responses
backend/src/utils/responseHandler.ts
Academic operations
- Course operations
backend/src/controllers/course.controller.ts - Material operations
backend/src/controllers/material.controller.ts - Courses
backend/src/models/Course.ts - Materials
backend/src/models/Material.ts - Enrollment records
backend/src/models/Enrollment.ts
Identity and users
- Authentication
backend/src/controllers/auth.controller.ts - User operations
backend/src/controllers/user.controller.ts - User records
backend/src/models/User.ts - Password and tokens
backend/src/utils/auth.ts
Other components
- Department users
Connections 31
- Department users → Web interface: use
- Web interface → Course service: request courses
frontend/src/app/dashboard/page.tsx - Dashboard → Course service: fetch courses
frontend/src/app/dashboard/page.tsx - Course pages → Course service: manage courses
- Course service → HTTP client: send requests
frontend/src/services/course.service.ts - Auth service → HTTP client: send requests
frontend/src/services/auth.service.ts - Material service → HTTP client: send requests
- User service → HTTP client: send requests
- Course service → Course routes: calls endpoints
frontend/src/services/course.service.ts - HTTP client → Express API: sends HTTP
- Express API → Auth routes: mounts routes
backend/src/app.ts - Express API → User routes: mounts routes
backend/src/app.ts - Express API → Course routes: mounts routes
backend/src/app.ts - Express API → Material routes: mounts routes
backend/src/app.ts - Auth routes → Authentication: dispatches
backend/src/routes/auth.routes.ts - Course routes → Course operations: dispatches
backend/src/routes/course.routes.ts - Material routes → Material operations: dispatches
backend/src/routes/material.routes.ts - User routes → User operations: dispatches
backend/src/routes/user.routes.ts - Course routes → Auth and roles: checks access
backend/src/routes/course.routes.ts - Material routes → Auth and roles: checks access
backend/src/routes/material.routes.ts - Material routes → File upload: processes file
backend/src/routes/material.routes.ts - Course operations → Courses: reads and writes
backend/src/controllers/course.controller.ts - Material operations → Materials: reads and writes
backend/src/controllers/material.controller.ts - Material operations → Courses: updates materials
backend/src/controllers/material.controller.ts - Authentication → User records: reads and writes
backend/src/controllers/auth.controller.ts - User operations → User records: manages users
backend/src/controllers/user.controller.ts - Authentication → Password and tokens: hashes and signs
backend/src/controllers/auth.controller.ts - Authentication → API responses: formats results
backend/src/controllers/auth.controller.ts - Course operations → API responses: formats results
backend/src/controllers/course.controller.ts - Material operations → API responses: formats results
backend/src/controllers/material.controller.ts - User operations → API responses: formats results
backend/src/controllers/user.controller.ts