# rohith-kanna-jr-2006/nec_timetable_web_app architecture

> Architecture diagram of the GitHub repository rohith-kanna-jr-2006/nec_timetable_web_app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rohith-kanna-jr-2006/nec_timetable_web_app
- Repository: https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app

## Overview

NEC’s web application supports faculty, coordinators, and HODs managing academic context, faculty workload and inputs, course allocations, timetable generation, review, and approval. The principal workflow is coordinator/HOD setup and allocation, timetable solving and review, then approval and faculty/class timetable access. The graph includes documented domain capabilities; unsampled subsystem links are omitted rather than inferred.

Main entry points: [`backend/src/models`](https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/tree/main/backend/src/models) (Academic records), [`backend/src/app.js`](https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/backend/src/app.js) (Express API), [`backend/src/controllers/timetableController.js`](https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/backend/src/controllers/timetableController.js) (Timetable API), [`web/src/services/api.js`](https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/web/src/services/api.js) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Role-based web app"]
  node_webapp["Web app<br/>[App.js]"]
  node_routes["Role routes<br/>[AppRoutes.js]"]
  node_facultyui["Faculty portal"]
  node_coordinatorui["Coordinator workflow"]
  node_hodui["HOD workflow"]
  node_api_client["API client<br/>[api.js]"]
  node_academic_service["Academic context client"]
  node_timetable_client["Timetable client"]
end

subgraph group_api["API and access"]
  node_server["Express API<br/>[app.js]"]
  node_auth["Authentication and roles<br/>[authMiddleware.js]"]
end

subgraph group_academic["Academic operations"]
  node_faculty["Faculty management"]
  node_allocation["HOD faculty allocation"]
  node_allocation_policy["Allocation policy"]
  node_workload["Workload management<br/>[workloadService.js]"]
  node_faculty_inputs["Absence and availability"]
  node_courses["Curriculum and courses"]
  node_context_status["Context readiness"]
end

subgraph group_schedule["Timetable lifecycle"]
  node_timetable_controller["Timetable API"]
  node_solver["Timetable solver<br/>[timetableSolver.js]"]
  node_timetable_service["Timetable lifecycle"]
  node_notifications["Notifications"]
end

subgraph group_data["Persistence"]
  node_db[("MongoDB<br/>[db.js]")]
  node_models[("Academic records")]
end

node_users(("Faculty, coordinator, HOD"))

node_users -->|"use"| node_webapp
node_webapp -->|"renders"| node_routes
node_routes -->|"routes faculty"| node_facultyui
node_routes -->|"routes coordinator"| node_coordinatorui
node_routes -->|"routes HOD"| node_hodui
node_facultyui -.->|"uses API"| node_api_client
node_coordinatorui -.->|"uses API"| node_api_client
node_hodui -->|"loads contexts"| node_academic_service
node_hodui -->|"loads schedules"| node_timetable_client
node_academic_service -->|"sends requests"| node_api_client
node_timetable_client -.->|"sends requests"| node_api_client
node_api_client -->|"calls API"| node_server
node_server -.->|"secures routes"| node_auth
node_server -.->|"routes requests"| node_faculty
node_server -->|"routes requests"| node_allocation
node_server -->|"routes requests"| node_timetable_controller
node_allocation -->|"applies policy"| node_allocation_policy
node_allocation -->|"reads curriculum"| node_courses
node_faculty -->|"calculates workload"| node_workload
node_timetable_controller -.->|"generates schedule"| node_solver
node_timetable_controller -->|"checks readiness"| node_context_status
node_context_status -->|"validates courses"| node_courses
node_timetable_controller -.->|"manages lifecycle"| node_timetable_service
node_timetable_controller -->|"reads and writes"| node_models
node_allocation -->|"reads and writes"| node_models
node_faculty -->|"reads and writes"| node_models
node_db -.->|"connects store"| node_models
node_faculty_inputs -.->|"persists inputs"| node_models
node_notifications -.->|"persists notices"| node_models

click node_webapp "https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/web/src/App.js"
click node_routes "https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/web/src/routes/AppRoutes.js"
click node_facultyui "https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/tree/main/web/src/pages/faculty"
click node_coordinatorui "https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/tree/main/web/src/pages/coordinator"
click node_hodui "https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/tree/main/web/src/pages/hod"
click node_api_client "https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/web/src/services/api.js"
click node_academic_service "https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/web/src/services/academicContextService.js"
click node_timetable_client "https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/web/src/services/timetableService.js"
click node_server "https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/backend/src/app.js"
click node_auth "https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/backend/src/middleware/authMiddleware.js"
click node_faculty "https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/backend/src/controllers/facultyController.js"
click node_allocation "https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/backend/src/controllers/hodAllocationController.js"
click node_allocation_policy "https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/backend/src/services/allocationPolicyService.js"
click node_workload "https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/backend/src/services/workloadService.js"
click node_faculty_inputs "https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/backend/src/controllers/absenceController.js"
click node_courses "https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/backend/src/data/r22CurriculumMaster.js"
click node_context_status "https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/backend/src/services/contextStatusService.js"
click node_timetable_controller "https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/backend/src/controllers/timetableController.js"
click node_solver "https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/backend/src/services/timetable/timetableSolver.js"
click node_timetable_service "https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/backend/src/services/timetableService.js"
click node_notifications "https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/backend/src/services/notificationService.js"
click node_db "https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/backend/src/config/db.js"
click node_models "https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/tree/main/backend/src/models"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_webapp,node_routes,node_facultyui,node_coordinatorui,node_hodui,node_api_client,node_academic_service,node_timetable_client toneBlue
class node_server,node_auth toneAmber
class node_faculty,node_allocation,node_allocation_policy,node_workload,node_faculty_inputs,node_courses,node_context_status toneMint
class node_timetable_controller,node_solver,node_timetable_service,node_notifications toneRose
class node_db,node_models,node_users toneIndigo
```

## Components

### Role-based web app

- [Web app](https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/web/src/App.js): `web/src/App.js`
- [Role routes](https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/web/src/routes/AppRoutes.js): `web/src/routes/AppRoutes.js`
- [Faculty portal](https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/tree/main/web/src/pages/faculty): `web/src/pages/faculty`
- [Coordinator workflow](https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/tree/main/web/src/pages/coordinator): `web/src/pages/coordinator`
- [HOD workflow](https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/tree/main/web/src/pages/hod): `web/src/pages/hod`
- [API client](https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/web/src/services/api.js): `web/src/services/api.js`
- [Academic context client](https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/web/src/services/academicContextService.js): `web/src/services/academicContextService.js`
- [Timetable client](https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/web/src/services/timetableService.js): `web/src/services/timetableService.js`

### API and access

- [Express API](https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/backend/src/app.js): `backend/src/app.js`
- [Authentication and roles](https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/backend/src/middleware/authMiddleware.js): `backend/src/middleware/authMiddleware.js`

### Academic operations

- [Faculty management](https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/backend/src/controllers/facultyController.js): `backend/src/controllers/facultyController.js`
- [HOD faculty allocation](https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/backend/src/controllers/hodAllocationController.js): `backend/src/controllers/hodAllocationController.js`
- [Allocation policy](https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/backend/src/services/allocationPolicyService.js): `backend/src/services/allocationPolicyService.js`
- [Workload management](https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/backend/src/services/workloadService.js): `backend/src/services/workloadService.js`
- [Absence and availability](https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/backend/src/controllers/absenceController.js): `backend/src/controllers/absenceController.js`
- [Curriculum and courses](https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/backend/src/data/r22CurriculumMaster.js): `backend/src/data/r22CurriculumMaster.js`
- [Context readiness](https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/backend/src/services/contextStatusService.js): `backend/src/services/contextStatusService.js`

### Timetable lifecycle

- [Timetable API](https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/backend/src/controllers/timetableController.js): `backend/src/controllers/timetableController.js`
- [Timetable solver](https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/backend/src/services/timetable/timetableSolver.js): `backend/src/services/timetable/timetableSolver.js`
- [Timetable lifecycle](https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/backend/src/services/timetableService.js): `backend/src/services/timetableService.js`
- [Notifications](https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/backend/src/services/notificationService.js): `backend/src/services/notificationService.js`

### Persistence

- [MongoDB](https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/blob/main/backend/src/config/db.js): `backend/src/config/db.js`
- [Academic records](https://github.com/rohith-kanna-jr-2006/nec_timetable_web_app/tree/main/backend/src/models): `backend/src/models`

### Other components

- **Faculty, coordinator, HOD**

## Connections

- Faculty, coordinator, HOD → Web app: use (evidence: `README.md`)
- Web app → Role routes: renders (evidence: `web/src/App.js`)
- Role routes → Faculty portal: routes faculty (evidence: `web/src/routes/AppRoutes.js`)
- Role routes → Coordinator workflow: routes coordinator (evidence: `web/src/routes/AppRoutes.js`)
- Role routes → HOD workflow: routes HOD (evidence: `web/src/routes/AppRoutes.js`)
- Faculty portal → API client: uses API
- Coordinator workflow → API client: uses API
- HOD workflow → Academic context client: loads contexts (evidence: `web/src/pages/hod/TimetableReviewPage.js`)
- HOD workflow → Timetable client: loads schedules (evidence: `web/src/pages/hod/TimetableReviewPage.js`)
- Academic context client → API client: sends requests (evidence: `web/src/services/academicContextService.js`)
- Timetable client → API client: sends requests
- API client → Express API: calls API (evidence: `README.md`)
- Express API → Authentication and roles: secures routes
- Express API → Faculty management: routes requests
- Express API → HOD faculty allocation: routes requests
- Express API → Timetable API: routes requests
- HOD faculty allocation → Allocation policy: applies policy (evidence: `backend/src/controllers/hodAllocationController.js`)
- HOD faculty allocation → Curriculum and courses: reads curriculum (evidence: `backend/src/controllers/hodAllocationController.js`)
- Faculty management → Workload management: calculates workload (evidence: `backend/src/controllers/facultyController.js`)
- Timetable API → Timetable solver: generates schedule
- Timetable API → Context readiness: checks readiness (evidence: `backend/src/controllers/timetableController.js`)
- Context readiness → Curriculum and courses: validates courses (evidence: `backend/src/services/contextStatusService.js`)
- Timetable API → Timetable lifecycle: manages lifecycle (evidence: `backend/src/controllers/timetableController.js`)
- Timetable API → Academic records: reads and writes (evidence: `backend/src/controllers/timetableController.js`)
- HOD faculty allocation → Academic records: reads and writes (evidence: `backend/src/controllers/hodAllocationController.js`)
- Faculty management → Academic records: reads and writes (evidence: `backend/src/controllers/facultyController.js`)
- MongoDB → Academic records: connects store
- Absence and availability → Academic records: persists inputs
- Notifications → Academic records: persists notices
