# siva9664/time_table_scheduler architecture

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

- Interactive diagram: https://gitdiagram.com/siva9664/time_table_scheduler
- Repository: https://github.com/siva9664/time_table_scheduler

## Overview

The product is an AI-assisted academic timetable scheduler. Administrators and faculty manage academic data or upload source documents; the backend imports and interprets that knowledge, then provides constraint-based timetable generation and viewing. The frontend also supports authentication and ingestion review. The graph includes the main API, scheduling, ingestion, and persistence layers. Some ingestion and scheduler relationships are based on the source index and README rather than complete source excerpts, so uncertain internal sequencing is not shown.

Main entry points: [`backend/app/api/endpoints/knowledge_ingestion.py`](https://github.com/siva9664/time_table_scheduler/blob/main/backend/app/api/endpoints/knowledge_ingestion.py) (Knowledge ingestion API), [`frontend/src/services/api.js`](https://github.com/siva9664/time_table_scheduler/blob/main/frontend/src/services/api.js) (API client), [`frontend/src/App.jsx`](https://github.com/siva9664/time_table_scheduler/blob/main/frontend/src/App.jsx) (App routing), [`backend/app/api/endpoints/timetable.py`](https://github.com/siva9664/time_table_scheduler/blob/main/backend/app/api/endpoints/timetable.py) (Timetable API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend"]
  node_app["App routing<br/>[App.jsx]"]
  node_login["Login<br/>[Login.jsx]"]
  node_admin["Academic data management"]
  node_timetable_ui["Timetable UI"]
  node_knowledge_ui["Ingestion UI"]
  node_api_client["API client<br/>[api.js]"]
end

subgraph group_api["Backend API"]
  node_auth_endpoint["Authentication API<br/>[auth.py]"]
  node_imports_endpoint["CSV import API<br/>[imports.py]"]
  node_knowledge_endpoint["Knowledge ingestion API"]
  node_timetable_endpoint["Timetable API<br/>[timetable.py]"]
end

subgraph group_ingestion["Knowledge ingestion"]
  node_file_handler["File handling<br/>[file_handler.py]"]
  node_parsers["Document parsers<br/>[parsers.py]"]
  node_ocr["OCR engine<br/>[ocr_engine.py]"]
  node_ai_extractor["AI extraction<br/>[ai_extractor.py]"]
  node_deduplicator["Deduplication<br/>[deduplicator.py]"]
  node_learning["Learning rules<br/>[learning_engine.py]"]
  node_mongo_writer["Ingestion persistence<br/>[mongo_writer.py]"]
end

subgraph group_scheduling["Scheduling"]
  node_document_analysis["Document analysis"]
  node_document_constraints["Document constraints"]
  node_ai_parser["Constraint parser<br/>[ai_parser.py]"]
  node_scheduler["Constraint solver<br/>[scheduler.py]"]
end

subgraph group_platform["Identity and persistence"]
  node_security["Authentication and authorization<br/>[security.py]"]
  node_database[("MongoDB access<br/>[database.py]")]
end

node_user(("Administrator or faculty"))
node_mongo[("MongoDB")]
node_llm(("AI model service"))

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_admin
node_app -->|"routes to"| node_timetable_ui
node_app -->|"routes to"| node_knowledge_ui
node_login -->|"calls"| node_api_client
node_admin -->|"calls"| node_api_client
node_timetable_ui -->|"calls"| node_api_client
node_knowledge_ui -->|"calls"| node_api_client
node_api_client -->|"HTTP requests"| node_auth_endpoint
node_api_client -->|"HTTP requests"| node_imports_endpoint
node_api_client -->|"HTTP requests"| node_knowledge_endpoint
node_api_client -->|"HTTP requests"| node_timetable_endpoint
node_auth_endpoint -->|"authenticates"| node_security
node_auth_endpoint -->|"reads and writes"| node_database
node_security -->|"loads users"| node_database
node_imports_endpoint -->|"uses"| node_document_constraints
node_imports_endpoint -.->|"accesses"| node_database
node_knowledge_endpoint -->|"uses"| node_file_handler
node_knowledge_endpoint -->|"uses"| node_parsers
node_knowledge_endpoint -->|"uses"| node_ai_extractor
node_knowledge_endpoint -->|"uses"| node_deduplicator
node_knowledge_endpoint -->|"uses"| node_learning
node_knowledge_endpoint -->|"uses"| node_mongo_writer
node_knowledge_endpoint -->|"accesses"| node_database
node_parsers -->|"uses"| node_ocr
node_timetable_endpoint -->|"uses"| node_ai_parser
node_timetable_endpoint -->|"uses"| node_document_analysis
node_timetable_endpoint -->|"uses"| node_document_constraints
node_timetable_endpoint -->|"dispatches to"| node_scheduler
node_document_analysis -.->|"analyzes with"| node_llm
node_ai_parser -.->|"parses with"| node_llm
node_database -->|"connects to"| node_mongo

click node_app "https://github.com/siva9664/time_table_scheduler/blob/main/frontend/src/App.jsx"
click node_login "https://github.com/siva9664/time_table_scheduler/blob/main/frontend/src/components/Login.jsx"
click node_admin "https://github.com/siva9664/time_table_scheduler/tree/main/frontend/src/components/Admin"
click node_timetable_ui "https://github.com/siva9664/time_table_scheduler/tree/main/frontend/src/components/Timetable"
click node_knowledge_ui "https://github.com/siva9664/time_table_scheduler/tree/main/frontend/src/components/KnowledgeIngestion"
click node_api_client "https://github.com/siva9664/time_table_scheduler/blob/main/frontend/src/services/api.js"
click node_auth_endpoint "https://github.com/siva9664/time_table_scheduler/blob/main/backend/app/api/endpoints/auth.py"
click node_imports_endpoint "https://github.com/siva9664/time_table_scheduler/blob/main/backend/app/api/endpoints/imports.py"
click node_knowledge_endpoint "https://github.com/siva9664/time_table_scheduler/blob/main/backend/app/api/endpoints/knowledge_ingestion.py"
click node_timetable_endpoint "https://github.com/siva9664/time_table_scheduler/blob/main/backend/app/api/endpoints/timetable.py"
click node_file_handler "https://github.com/siva9664/time_table_scheduler/blob/main/backend/app/services/ingestion/file_handler.py"
click node_parsers "https://github.com/siva9664/time_table_scheduler/blob/main/backend/app/services/ingestion/parsers.py"
click node_ocr "https://github.com/siva9664/time_table_scheduler/blob/main/backend/app/services/ingestion/ocr_engine.py"
click node_ai_extractor "https://github.com/siva9664/time_table_scheduler/blob/main/backend/app/services/ingestion/ai_extractor.py"
click node_deduplicator "https://github.com/siva9664/time_table_scheduler/blob/main/backend/app/services/ingestion/deduplicator.py"
click node_learning "https://github.com/siva9664/time_table_scheduler/blob/main/backend/app/services/ingestion/learning_engine.py"
click node_mongo_writer "https://github.com/siva9664/time_table_scheduler/blob/main/backend/app/services/ingestion/mongo_writer.py"
click node_document_analysis "https://github.com/siva9664/time_table_scheduler/blob/main/backend/app/services/document_analysis.py"
click node_document_constraints "https://github.com/siva9664/time_table_scheduler/blob/main/backend/app/services/document_constraints.py"
click node_ai_parser "https://github.com/siva9664/time_table_scheduler/blob/main/backend/app/services/ai_parser.py"
click node_scheduler "https://github.com/siva9664/time_table_scheduler/blob/main/backend/app/services/scheduler.py"
click node_security "https://github.com/siva9664/time_table_scheduler/blob/main/backend/app/core/security.py"
click node_database "https://github.com/siva9664/time_table_scheduler/blob/main/backend/app/database/database.py"

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_app,node_login,node_admin,node_timetable_ui,node_knowledge_ui,node_api_client toneBlue
class node_auth_endpoint,node_imports_endpoint,node_knowledge_endpoint,node_timetable_endpoint,node_mongo toneAmber
class node_file_handler,node_parsers,node_ocr,node_ai_extractor,node_deduplicator,node_learning,node_mongo_writer toneMint
class node_document_analysis,node_document_constraints,node_ai_parser,node_scheduler toneRose
class node_security,node_database,node_user,node_llm toneIndigo
```

## Components

### Frontend

- [App routing](https://github.com/siva9664/time_table_scheduler/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Login](https://github.com/siva9664/time_table_scheduler/blob/main/frontend/src/components/Login.jsx): `frontend/src/components/Login.jsx`
- [Academic data management](https://github.com/siva9664/time_table_scheduler/tree/main/frontend/src/components/Admin): `frontend/src/components/Admin`
- [Timetable UI](https://github.com/siva9664/time_table_scheduler/tree/main/frontend/src/components/Timetable): `frontend/src/components/Timetable`
- [Ingestion UI](https://github.com/siva9664/time_table_scheduler/tree/main/frontend/src/components/KnowledgeIngestion): `frontend/src/components/KnowledgeIngestion`
- [API client](https://github.com/siva9664/time_table_scheduler/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`

### Backend API

- [Authentication API](https://github.com/siva9664/time_table_scheduler/blob/main/backend/app/api/endpoints/auth.py): `backend/app/api/endpoints/auth.py`
- [CSV import API](https://github.com/siva9664/time_table_scheduler/blob/main/backend/app/api/endpoints/imports.py): `backend/app/api/endpoints/imports.py`
- [Knowledge ingestion API](https://github.com/siva9664/time_table_scheduler/blob/main/backend/app/api/endpoints/knowledge_ingestion.py): `backend/app/api/endpoints/knowledge_ingestion.py`
- [Timetable API](https://github.com/siva9664/time_table_scheduler/blob/main/backend/app/api/endpoints/timetable.py): `backend/app/api/endpoints/timetable.py`

### Knowledge ingestion

- [File handling](https://github.com/siva9664/time_table_scheduler/blob/main/backend/app/services/ingestion/file_handler.py): `backend/app/services/ingestion/file_handler.py`
- [Document parsers](https://github.com/siva9664/time_table_scheduler/blob/main/backend/app/services/ingestion/parsers.py): `backend/app/services/ingestion/parsers.py`
- [OCR engine](https://github.com/siva9664/time_table_scheduler/blob/main/backend/app/services/ingestion/ocr_engine.py): `backend/app/services/ingestion/ocr_engine.py`
- [AI extraction](https://github.com/siva9664/time_table_scheduler/blob/main/backend/app/services/ingestion/ai_extractor.py): `backend/app/services/ingestion/ai_extractor.py`
- [Deduplication](https://github.com/siva9664/time_table_scheduler/blob/main/backend/app/services/ingestion/deduplicator.py): `backend/app/services/ingestion/deduplicator.py`
- [Learning rules](https://github.com/siva9664/time_table_scheduler/blob/main/backend/app/services/ingestion/learning_engine.py): `backend/app/services/ingestion/learning_engine.py`
- [Ingestion persistence](https://github.com/siva9664/time_table_scheduler/blob/main/backend/app/services/ingestion/mongo_writer.py): `backend/app/services/ingestion/mongo_writer.py`

### Scheduling

- [Document analysis](https://github.com/siva9664/time_table_scheduler/blob/main/backend/app/services/document_analysis.py): `backend/app/services/document_analysis.py`
- [Document constraints](https://github.com/siva9664/time_table_scheduler/blob/main/backend/app/services/document_constraints.py): `backend/app/services/document_constraints.py`
- [Constraint parser](https://github.com/siva9664/time_table_scheduler/blob/main/backend/app/services/ai_parser.py): `backend/app/services/ai_parser.py`
- [Constraint solver](https://github.com/siva9664/time_table_scheduler/blob/main/backend/app/services/scheduler.py): `backend/app/services/scheduler.py`

### Identity and persistence

- [Authentication and authorization](https://github.com/siva9664/time_table_scheduler/blob/main/backend/app/core/security.py): `backend/app/core/security.py`
- [MongoDB access](https://github.com/siva9664/time_table_scheduler/blob/main/backend/app/database/database.py): `backend/app/database/database.py`

### Other components

- **Administrator or faculty**
- **MongoDB**
- **AI model service**

## Connections

- Administrator or faculty → App routing: uses (evidence: `frontend/src/App.jsx`)
- App routing → Login: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Academic data management: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Timetable UI: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Ingestion UI: routes to (evidence: `frontend/src/App.jsx`)
- Login → API client: calls (evidence: `frontend/src/components/Login.jsx`)
- Academic data management → API client: calls (evidence: `frontend/src/components/Admin/BatchManager.jsx`)
- Timetable UI → API client: calls (evidence: `frontend/src/components/Timetable/TimetableGenerator.jsx`)
- Ingestion UI → API client: calls (evidence: `frontend/src/components/KnowledgeIngestion/DuplicateReview.jsx`)
- API client → Authentication API: HTTP requests (evidence: `frontend/src/services/api.js`)
- API client → CSV import API: HTTP requests
- API client → Knowledge ingestion API: HTTP requests (evidence: `frontend/src/services/api.js`)
- API client → Timetable API: HTTP requests (evidence: `frontend/src/services/api.js`)
- Authentication API → Authentication and authorization: authenticates (evidence: `backend/app/api/endpoints/auth.py`)
- Authentication API → MongoDB access: reads and writes (evidence: `backend/app/api/endpoints/auth.py`)
- Authentication and authorization → MongoDB access: loads users (evidence: `backend/app/core/security.py`)
- CSV import API → Document constraints: uses (evidence: `backend/app/api/endpoints/imports.py`)
- CSV import API → MongoDB access: accesses
- Knowledge ingestion API → File handling: uses (evidence: `backend/app/api/endpoints/knowledge_ingestion.py`)
- Knowledge ingestion API → Document parsers: uses (evidence: `backend/app/api/endpoints/knowledge_ingestion.py`)
- Knowledge ingestion API → AI extraction: uses (evidence: `backend/app/api/endpoints/knowledge_ingestion.py`)
- Knowledge ingestion API → Deduplication: uses (evidence: `backend/app/api/endpoints/knowledge_ingestion.py`)
- Knowledge ingestion API → Learning rules: uses (evidence: `backend/app/api/endpoints/knowledge_ingestion.py`)
- Knowledge ingestion API → Ingestion persistence: uses (evidence: `backend/app/api/endpoints/knowledge_ingestion.py`)
- Knowledge ingestion API → MongoDB access: accesses (evidence: `backend/app/api/endpoints/knowledge_ingestion.py`)
- Document parsers → OCR engine: uses (evidence: `backend/app/services/ingestion/parsers.py`)
- Timetable API → Constraint parser: uses (evidence: `backend/app/api/endpoints/timetable.py`)
- Timetable API → Document analysis: uses (evidence: `backend/app/api/endpoints/timetable.py`)
- Timetable API → Document constraints: uses (evidence: `backend/app/api/endpoints/timetable.py`)
- Timetable API → Constraint solver: dispatches to (evidence: `backend/app/api/endpoints/timetable.py`)
- Document analysis → AI model service: analyzes with
- Constraint parser → AI model service: parses with
- MongoDB access → MongoDB: connects to (evidence: `backend/app/database/database.py`)
