# saidmansurhon/table architecture

> Architecture diagram of the GitHub repository saidmansurhon/table, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/saidmansurhon/table
- Repository: https://github.com/saidmansurhon/table

## Overview

This Django university timetable scheduler takes administrators and coordinators from infrastructure and academic setup through combined-class definition and timetable generation, then offers saved, printable timetable views and student access. Class advisors have batch-scoped management; manual scheduling and conflict suggestions provide a separate editing path. The README documents CSV/student management and role capabilities beyond the sampled excerpts. Edges reflect explicit README descriptions or the shown source references and calls; unsampled routes and persistence details are not inferred.

Main entry points: [`core/models.py`](https://github.com/saidmansurhon/table/blob/main/core/models.py) (Academic Models), [`core/views.py`](https://github.com/saidmansurhon/table/blob/main/core/views.py) (Timetable Generation), [`scheduler_project/urls.py`](https://github.com/saidmansurhon/table/blob/main/scheduler_project/urls.py) (Application Routing), [`core/suggestions_django.py`](https://github.com/saidmansurhon/table/blob/main/core/suggestions_django.py) (Conflict Suggestions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Academic Setup"]
  node_forms["Setup Forms<br/>[forms.py]"]
  node_academic["Academic Management<br/>[views.py]"]
  node_infrastructure[("Room Infrastructure<br/>[models.py]")]
  node_csv["CSV Management<br/>[views.py]"]
end

subgraph group_schedule["Timetable Scheduling"]
  node_combined["Combined Classes<br/>[forms.py]"]
  node_generation["Timetable Generation<br/>[views.py]"]
  node_solver["CP-SAT Solver<br/>[solver.py]"]
  node_manual["Manual Scheduling<br/>[manual_schedule.py]"]
  node_suggestions["Conflict Suggestions"]
  node_search["Suggestion Search"]
  node_snapshots[("Saved Timetables<br/>[models.py]")]
end

subgraph group_portals["User Portals"]
  node_views["Timetable Views<br/>[views.py]"]
  node_student_mgmt["Student Management<br/>[views.py]"]
  node_routing["Application Routing<br/>[urls.py]"]
  node_ui["Web Interface<br/>[main.js]"]
end

subgraph group_domain["Domain Data"]
  node_models[("Academic Models<br/>[models.py]")]
end

node_staff(("Admin / Coordinator"))
node_advisor(("Class Advisor"))
node_student(("Student"))

node_staff -->|"manages setup"| node_academic
node_advisor -->|"manages batch"| node_academic
node_academic -->|"uses forms"| node_forms
node_forms -->|"validates against"| node_models
node_staff -->|"defines rooms"| node_infrastructure
node_academic -->|"uploads data"| node_csv
node_csv -->|"creates records"| node_models
node_staff -->|"defines shared slots"| node_combined
node_advisor -->|"manages shared slots"| node_combined
node_combined -->|"stores assignments"| node_models
node_staff -->|"requests generation"| node_generation
node_advisor -->|"requests batch run"| node_generation
node_generation -->|"invokes solver"| node_solver
node_generation -->|"loads inputs"| node_models
node_generation -->|"writes entries"| node_models
node_generation -->|"snapshots prior schedule"| node_snapshots
node_manual -->|"reads and saves"| node_models
node_manual -->|"requests proposals"| node_suggestions
node_suggestions -->|"ranks alternatives"| node_search
node_suggestions -->|"loads and applies"| node_models
node_student -->|"opens portal"| node_routing
node_staff -->|"opens application"| node_routing
node_routing -->|"routes requests"| node_views
node_views -->|"reads timetable"| node_models
node_student -->|"account provisioned"| node_student_mgmt
node_student_mgmt -->|"links student batch"| node_models
node_views -->|"renders saved schedule"| node_snapshots
node_ui -.->|"supports navigation"| node_routing

click node_models "https://github.com/saidmansurhon/table/blob/main/core/models.py"
click node_forms "https://github.com/saidmansurhon/table/blob/main/core/forms.py"
click node_academic "https://github.com/saidmansurhon/table/blob/main/core/views.py"
click node_infrastructure "https://github.com/saidmansurhon/table/blob/main/core/models.py"
click node_csv "https://github.com/saidmansurhon/table/blob/main/core/views.py"
click node_combined "https://github.com/saidmansurhon/table/blob/main/core/forms.py"
click node_generation "https://github.com/saidmansurhon/table/blob/main/core/views.py"
click node_solver "https://github.com/saidmansurhon/table/blob/main/scheduler_engine/solver.py"
click node_manual "https://github.com/saidmansurhon/table/blob/main/core/manual_schedule.py"
click node_suggestions "https://github.com/saidmansurhon/table/blob/main/core/suggestions_django.py"
click node_search "https://github.com/saidmansurhon/table/blob/main/core/suggestion_engine.py"
click node_snapshots "https://github.com/saidmansurhon/table/blob/main/core/models.py"
click node_views "https://github.com/saidmansurhon/table/blob/main/core/views.py"
click node_student_mgmt "https://github.com/saidmansurhon/table/blob/main/core/views.py"
click node_routing "https://github.com/saidmansurhon/table/blob/main/scheduler_project/urls.py"
click node_ui "https://github.com/saidmansurhon/table/blob/main/static/js/main.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_forms,node_academic,node_infrastructure,node_csv toneBlue
class node_combined,node_generation,node_solver,node_manual,node_suggestions,node_search,node_snapshots toneAmber
class node_views,node_student_mgmt,node_routing,node_ui toneMint
class node_models toneRose
class node_staff,node_advisor,node_student toneIndigo
```

## Components

### Academic Setup

- [Setup Forms](https://github.com/saidmansurhon/table/blob/main/core/forms.py): `core/forms.py`
- [Academic Management](https://github.com/saidmansurhon/table/blob/main/core/views.py): `core/views.py`
- [Room Infrastructure](https://github.com/saidmansurhon/table/blob/main/core/models.py): `core/models.py`
- [CSV Management](https://github.com/saidmansurhon/table/blob/main/core/views.py): `core/views.py`

### Timetable Scheduling

- [Combined Classes](https://github.com/saidmansurhon/table/blob/main/core/forms.py): `core/forms.py`
- [Timetable Generation](https://github.com/saidmansurhon/table/blob/main/core/views.py): `core/views.py`
- [CP-SAT Solver](https://github.com/saidmansurhon/table/blob/main/scheduler_engine/solver.py): `scheduler_engine/solver.py`
- [Manual Scheduling](https://github.com/saidmansurhon/table/blob/main/core/manual_schedule.py): `core/manual_schedule.py`
- [Conflict Suggestions](https://github.com/saidmansurhon/table/blob/main/core/suggestions_django.py): `core/suggestions_django.py`
- [Suggestion Search](https://github.com/saidmansurhon/table/blob/main/core/suggestion_engine.py): `core/suggestion_engine.py`
- [Saved Timetables](https://github.com/saidmansurhon/table/blob/main/core/models.py): `core/models.py`

### User Portals

- [Timetable Views](https://github.com/saidmansurhon/table/blob/main/core/views.py): `core/views.py`
- [Student Management](https://github.com/saidmansurhon/table/blob/main/core/views.py): `core/views.py`
- [Application Routing](https://github.com/saidmansurhon/table/blob/main/scheduler_project/urls.py): `scheduler_project/urls.py`
- [Web Interface](https://github.com/saidmansurhon/table/blob/main/static/js/main.js): `static/js/main.js`

### Domain Data

- [Academic Models](https://github.com/saidmansurhon/table/blob/main/core/models.py): `core/models.py`

### Other components

- **Admin / Coordinator**
- **Class Advisor**
- **Student**

## Connections

- Admin / Coordinator → Academic Management: manages setup
- Class Advisor → Academic Management: manages batch
- Academic Management → Setup Forms: uses forms (evidence: `core/forms.py`)
- Setup Forms → Academic Models: validates against (evidence: `core/forms.py`)
- Admin / Coordinator → Room Infrastructure: defines rooms
- Academic Management → CSV Management: uploads data (evidence: `core/views.py`)
- CSV Management → Academic Models: creates records (evidence: `core/views.py`)
- Admin / Coordinator → Combined Classes: defines shared slots
- Class Advisor → Combined Classes: manages shared slots
- Combined Classes → Academic Models: stores assignments (evidence: `core/forms.py`)
- Admin / Coordinator → Timetable Generation: requests generation
- Class Advisor → Timetable Generation: requests batch run
- Timetable Generation → CP-SAT Solver: invokes solver (evidence: `core/views.py`)
- Timetable Generation → Academic Models: loads inputs (evidence: `core/views.py`)
- Timetable Generation → Academic Models: writes entries (evidence: `core/views.py`)
- Timetable Generation → Saved Timetables: snapshots prior schedule (evidence: `core/views.py`)
- Manual Scheduling → Academic Models: reads and saves (evidence: `core/manual_schedule.py`)
- Manual Scheduling → Conflict Suggestions: requests proposals (evidence: `core/manual_schedule.py`)
- Conflict Suggestions → Suggestion Search: ranks alternatives (evidence: `core/suggestions_django.py`)
- Conflict Suggestions → Academic Models: loads and applies (evidence: `core/suggestions_django.py`)
- Student → Application Routing: opens portal
- Admin / Coordinator → Application Routing: opens application (evidence: `scheduler_project/urls.py`)
- Application Routing → Timetable Views: routes requests (evidence: `scheduler_project/urls.py`)
- Timetable Views → Academic Models: reads timetable (evidence: `core/views.py`)
- Student → Student Management: account provisioned
- Student Management → Academic Models: links student batch (evidence: `core/views.py`)
- Timetable Views → Saved Timetables: renders saved schedule (evidence: `core/views.py`)
- Web Interface → Application Routing: supports navigation
