# rohith-kanna-jr-2006/nec-faculty-timetable architecture

> Architecture diagram of the GitHub repository rohith-kanna-jr-2006/nec-faculty-timetable, 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-faculty-timetable
- Repository: https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable

## Overview

NEC’s Faculty Timetable & Workload System supports faculty schedule/workload views and institutional coordinator/HOD management of academic context, allocations, timetable generation, review, and publication. The principal workflow is to prepare course and faculty assignments, create/version timetable sessions, validate workload and scheduling, then move a timetable through HOD approval to publication. The backend exposes role-protected REST operations backed by MongoDB. The README establishes the product capabilities; sampled source confirms selected workload and timetable paths, while several UI and backend integrations remain unsampled.

Main entry points: [`backend/src/controllers/timetableController.js`](https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/backend/src/controllers/timetableController.js) (Timetable API), [`backend/src/controllers/workloadController.js`](https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/backend/src/controllers/workloadController.js) (Workload API), [`backend/src/models/FacultyWorkload.js`](https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/backend/src/models/FacultyWorkload.js) (Workload records), [`backend/src/models/TimetableVersion.js`](https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/backend/src/models/TimetableVersion.js) (Timetable versions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_faculty["Faculty experience"]
  node_faculty_portal["Faculty portal<br/>[dashboard.js]"]
  node_personal_schedule["Personal schedule<br/>[timetable.js]"]
  node_weekly_matrix["Weekly matrix"]
  node_workload_view["Workload validation<br/>[workload.js]"]
  node_faculty_alerts["Faculty alerts<br/>[notifications.js]"]
  node_faculty_profile["Faculty profile<br/>[profile.js]"]
end

subgraph group_governance["Academic governance"]
  node_course_selection["Course selection"]
  node_faculty_assignment["Faculty assignment"]
  node_conflict_review["Conflict review<br/>[conflict.js]"]
  node_hod_allocation["Faculty allocation"]
  node_timetable_review["Timetable review"]
  node_approval_desk["Approval desk<br/>[approval.js]"]
end

subgraph group_api["Backend API"]
  node_api_routes["REST routes<br/>[index.js]"]
  node_workload_api["Workload API"]
  node_timetable_api["Timetable API"]
  node_workload_engine["Workload calculations<br/>[workloadService.js]"]
  node_timetable_engine["Timetable lifecycle"]
end

subgraph group_domain["Domain state"]
  node_faculty_records[("Faculty records<br/>[Faculty.js]")]
  node_workload_records[("Workload records<br/>[FacultyWorkload.js]")]
  node_timetable_records[("Timetable versions")]
  node_session_records[("Schedule sessions")]
end

node_faculty_actor(("Faculty"))
node_coordinator_actor(("Coordinator"))
node_hod_actor(("HOD"))
node_mongo[("MongoDB")]

node_faculty_actor -->|"views"| node_faculty_portal
node_faculty_actor -->|"checks schedule"| node_personal_schedule
node_faculty_actor -->|"views week"| node_weekly_matrix
node_faculty_actor -->|"checks workload"| node_workload_view
node_faculty_actor -->|"receives alerts"| node_faculty_alerts
node_faculty_actor -->|"manages profile"| node_faculty_profile
node_coordinator_actor -.->|"selects courses"| node_course_selection
node_coordinator_actor -.->|"assigns faculty"| node_faculty_assignment
node_coordinator_actor -.->|"reviews conflicts"| node_conflict_review
node_hod_actor -->|"reviews allocation"| node_hod_allocation
node_hod_actor -->|"reviews timetable"| node_timetable_review
node_hod_actor -->|"approves version"| node_approval_desk
node_api_routes -->|"routes workload"| node_workload_api
node_api_routes -->|"routes timetable"| node_timetable_api
node_workload_api -->|"calculates metrics"| node_workload_engine
node_workload_api -->|"reads and writes"| node_workload_records
node_workload_engine -->|"aggregates"| node_workload_records
node_timetable_api -->|"delegates lifecycle"| node_timetable_engine
node_timetable_api -->|"reads versions"| node_timetable_records
node_timetable_api -->|"manages sessions"| node_session_records
node_timetable_engine -.->|"transitions state"| node_timetable_records
node_faculty_records -.->|"persists in"| node_mongo
node_workload_records -.->|"persists in"| node_mongo
node_timetable_records -.->|"persists in"| node_mongo
node_session_records -.->|"persists in"| node_mongo

click node_faculty_portal "https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/app/(faculty)/dashboard.js"
click node_personal_schedule "https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/app/(faculty)/timetable.js"
click node_weekly_matrix "https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/app/(faculty)/weekly-timetable.js"
click node_workload_view "https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/app/(faculty)/workload.js"
click node_faculty_alerts "https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/app/(faculty)/notifications.js"
click node_faculty_profile "https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/app/(faculty)/profile.js"
click node_course_selection "https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/app/coordinator/course-selection.js"
click node_faculty_assignment "https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/app/coordinator/faculty-assignment.js"
click node_conflict_review "https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/app/coordinator/conflict.js"
click node_hod_allocation "https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/app/hod/faculty-allocation.js"
click node_timetable_review "https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/app/hod/timetable-review.js"
click node_approval_desk "https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/app/hod/approval.js"
click node_api_routes "https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/backend/src/routes/index.js"
click node_workload_api "https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/backend/src/controllers/workloadController.js"
click node_timetable_api "https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/backend/src/controllers/timetableController.js"
click node_workload_engine "https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/backend/src/services/workloadService.js"
click node_timetable_engine "https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/backend/src/services/timetableService.js"
click node_faculty_records "https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/backend/src/models/Faculty.js"
click node_workload_records "https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/backend/src/models/FacultyWorkload.js"
click node_timetable_records "https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/backend/src/models/TimetableVersion.js"
click node_session_records "https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/backend/src/models/TimetableSession.js"

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_faculty_portal,node_personal_schedule,node_weekly_matrix,node_workload_view,node_faculty_alerts,node_faculty_profile toneBlue
class node_course_selection,node_faculty_assignment,node_conflict_review,node_hod_allocation,node_timetable_review,node_approval_desk,node_mongo toneAmber
class node_api_routes,node_workload_api,node_timetable_api,node_workload_engine,node_timetable_engine toneMint
class node_faculty_records,node_workload_records,node_timetable_records,node_session_records toneRose
class node_faculty_actor,node_coordinator_actor,node_hod_actor toneIndigo
```

## Components

### Faculty experience

- [Faculty portal](https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/app/(faculty)/dashboard.js): `app/(faculty)/dashboard.js`
- [Personal schedule](https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/app/(faculty)/timetable.js): `app/(faculty)/timetable.js`
- [Weekly matrix](https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/app/(faculty)/weekly-timetable.js): `app/(faculty)/weekly-timetable.js`
- [Workload validation](https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/app/(faculty)/workload.js): `app/(faculty)/workload.js`
- [Faculty alerts](https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/app/(faculty)/notifications.js): `app/(faculty)/notifications.js`
- [Faculty profile](https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/app/(faculty)/profile.js): `app/(faculty)/profile.js`

### Academic governance

- [Course selection](https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/app/coordinator/course-selection.js): `app/coordinator/course-selection.js`
- [Faculty assignment](https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/app/coordinator/faculty-assignment.js): `app/coordinator/faculty-assignment.js`
- [Conflict review](https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/app/coordinator/conflict.js): `app/coordinator/conflict.js`
- [Faculty allocation](https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/app/hod/faculty-allocation.js): `app/hod/faculty-allocation.js`
- [Timetable review](https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/app/hod/timetable-review.js): `app/hod/timetable-review.js`
- [Approval desk](https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/app/hod/approval.js): `app/hod/approval.js`

### Backend API

- [REST routes](https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/backend/src/routes/index.js): `backend/src/routes/index.js`
- [Workload API](https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/backend/src/controllers/workloadController.js): `backend/src/controllers/workloadController.js`
- [Timetable API](https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/backend/src/controllers/timetableController.js): `backend/src/controllers/timetableController.js`
- [Workload calculations](https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/backend/src/services/workloadService.js): `backend/src/services/workloadService.js`
- [Timetable lifecycle](https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/backend/src/services/timetableService.js): `backend/src/services/timetableService.js`

### Domain state

- [Faculty records](https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/backend/src/models/Faculty.js): `backend/src/models/Faculty.js`
- [Workload records](https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/backend/src/models/FacultyWorkload.js): `backend/src/models/FacultyWorkload.js`
- [Timetable versions](https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/backend/src/models/TimetableVersion.js): `backend/src/models/TimetableVersion.js`
- [Schedule sessions](https://github.com/rohith-kanna-jr-2006/nec-faculty-timetable/blob/main/backend/src/models/TimetableSession.js): `backend/src/models/TimetableSession.js`

### Other components

- **Faculty**
- **Coordinator**
- **HOD**
- **MongoDB**

## Connections

- Faculty → Faculty portal: views
- Faculty → Personal schedule: checks schedule
- Faculty → Weekly matrix: views week
- Faculty → Workload validation: checks workload
- Faculty → Faculty alerts: receives alerts
- Faculty → Faculty profile: manages profile
- Coordinator → Course selection: selects courses
- Coordinator → Faculty assignment: assigns faculty
- Coordinator → Conflict review: reviews conflicts
- HOD → Faculty allocation: reviews allocation
- HOD → Timetable review: reviews timetable
- HOD → Approval desk: approves version
- REST routes → Workload API: routes workload
- REST routes → Timetable API: routes timetable
- Workload API → Workload calculations: calculates metrics (evidence: `backend/src/controllers/workloadController.js`)
- Workload API → Workload records: reads and writes (evidence: `backend/src/controllers/workloadController.js`)
- Workload calculations → Workload records: aggregates (evidence: `backend/src/services/workloadService.js`)
- Timetable API → Timetable lifecycle: delegates lifecycle (evidence: `backend/src/controllers/timetableController.js`)
- Timetable API → Timetable versions: reads versions (evidence: `backend/src/controllers/timetableController.js`)
- Timetable API → Schedule sessions: manages sessions (evidence: `backend/src/controllers/timetableController.js`)
- Timetable lifecycle → Timetable versions: transitions state
- Faculty records → MongoDB: persists in
- Workload records → MongoDB: persists in
- Timetable versions → MongoDB: persists in
- Schedule sessions → MongoDB: persists in
