# sivadhanushreddykotturu/timetablekl architecture

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

- Interactive diagram: https://gitdiagram.com/sivadhanushreddykotturu/timetablekl
- Repository: https://github.com/sivadhanushreddykotturu/timetablekl

## Overview

KL Timetable PWA lets students authenticate against the university ERP, keep credentials and timetable data locally, then browse schedules and related student information. The documented workflow also includes CAPTCHA-gated refresh and attendance retrieval; the repository tree shows additional grades, exams, friends, and calculator features. The neo interface adds theme customization and a desktop mascot. Several feature pages are present but unsampled, so their internal calls are not inferred; the documented backend and feature descriptions are preserved without inventing implementation details.

Main entry points: [`src/App.jsx`](https://github.com/sivadhanushreddykotturu/timetablekl/blob/main/src/App.jsx) (App routing), [`src/components/GuestAuthModal.jsx`](https://github.com/sivadhanushreddykotturu/timetablekl/blob/main/src/components/GuestAuthModal.jsx) (Guest login), [`src/config/api.js`](https://github.com/sivadhanushreddykotturu/timetablekl/blob/main/src/config/api.js) (ERP request forms), [`src/neo/pages/Attendance.jsx`](https://github.com/sivadhanushreddykotturu/timetablekl/blob/main/src/neo/pages/Attendance.jsx) (Attendance)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_app_shell["App routing<br/>[App.jsx]"]
end

subgraph group_erp["ERP access and data"]
  node_login["Guest login<br/>[GuestAuthModal.jsx]"]
  node_api_forms["ERP request forms<br/>[api.js]"]
  node_erp_service["ERP backend"]
  node_sync["Timetable sync<br/>[syncTimetable.js]"]
end

subgraph group_student["Student features"]
  node_timetable["Timetable views<br/>[Timetable.jsx]"]
  node_attendance["Attendance<br/>[Attendance.jsx]"]
  node_grades_exam["Grades and exams"]
  node_friends["Friends timetables<br/>[Maddys.jsx]"]
  node_calculator["Attendance calculators<br/>[Calculator.jsx]"]
  node_subjects_profile["Subjects and profile"]
end

subgraph group_neo["neo interface"]
  node_theme["Theme engine<br/>[themeEngine.js]"]
  node_companion["Desktop companion"]
  node_bot_engine["Mascot frame engine<br/>[engine.js]"]
  node_bot_math["Mascot math<br/>[math.js]"]
end

subgraph group_shared["Shared services"]
  node_local_data[("Browser storage<br/>[storage.js]")]
  node_theme_context["Theme context<br/>[ThemeContext.jsx]"]
  node_toast["Notifications<br/>[Toast.jsx]"]
  node_analytics["Event analytics<br/>[analytics.js]"]
end

node_student_actor(("Student"))

node_student_actor -->|"opens"| node_app_shell
node_app_shell -->|"routes to"| node_timetable
node_app_shell -->|"routes to"| node_attendance
node_app_shell -->|"routes to"| node_friends
node_app_shell -->|"routes to"| node_grades_exam
node_app_shell -->|"routes to"| node_calculator
node_app_shell -->|"routes to"| node_subjects_profile
node_app_shell -->|"provides"| node_theme_context
node_app_shell -->|"loads theme"| node_theme
node_app_shell -->|"mounts"| node_companion
node_student_actor -->|"submits credentials"| node_login
node_login -->|"builds request"| node_api_forms
node_login -->|"fetches timetable"| node_erp_service
node_api_forms -.->|"formats ERP requests"| node_erp_service
node_login -->|"saves credentials"| node_local_data
node_login -->|"calls background sync"| node_sync
node_sync -->|"uses request forms"| node_api_forms
node_sync -->|"uses storage"| node_local_data
node_timetable -.->|"reads cached data"| node_local_data
node_attendance -->|"uses ERP forms"| node_api_forms
node_attendance -->|"reads stored data"| node_local_data
node_attendance -->|"uses calculator modal"| node_calculator
node_friends -->|"uses timetable sync"| node_sync
node_friends -->|"uses ERP forms"| node_api_forms
node_calculator -->|"uses academic-year options"| node_api_forms
node_companion -.->|"uses bot engine"| node_bot_engine
node_bot_engine -->|"calls math helpers"| node_bot_math
node_login -.->|"surfaces status"| node_toast
node_login -->|"tracks login event"| node_analytics

click node_app_shell "https://github.com/sivadhanushreddykotturu/timetablekl/blob/main/src/App.jsx"
click node_login "https://github.com/sivadhanushreddykotturu/timetablekl/blob/main/src/components/GuestAuthModal.jsx"
click node_api_forms "https://github.com/sivadhanushreddykotturu/timetablekl/blob/main/src/config/api.js"
click node_sync "https://github.com/sivadhanushreddykotturu/timetablekl/blob/main/utils/syncTimetable.js"
click node_local_data "https://github.com/sivadhanushreddykotturu/timetablekl/blob/main/utils/storage.js"
click node_timetable "https://github.com/sivadhanushreddykotturu/timetablekl/blob/main/src/neo/pages/Timetable.jsx"
click node_attendance "https://github.com/sivadhanushreddykotturu/timetablekl/blob/main/src/neo/pages/Attendance.jsx"
click node_grades_exam "https://github.com/sivadhanushreddykotturu/timetablekl/tree/main/src/neo/pages"
click node_friends "https://github.com/sivadhanushreddykotturu/timetablekl/blob/main/src/neo/pages/Maddys.jsx"
click node_calculator "https://github.com/sivadhanushreddykotturu/timetablekl/blob/main/src/pages/Calculator.jsx"
click node_subjects_profile "https://github.com/sivadhanushreddykotturu/timetablekl/tree/main/src/neo/pages"
click node_theme "https://github.com/sivadhanushreddykotturu/timetablekl/blob/main/src/neo/utils/themeEngine.js"
click node_theme_context "https://github.com/sivadhanushreddykotturu/timetablekl/blob/main/src/contexts/ThemeContext.jsx"
click node_companion "https://github.com/sivadhanushreddykotturu/timetablekl/blob/main/src/neo/bot/DesktopCompanion.jsx"
click node_bot_engine "https://github.com/sivadhanushreddykotturu/timetablekl/blob/main/src/neo/bot/engine.js"
click node_bot_math "https://github.com/sivadhanushreddykotturu/timetablekl/blob/main/src/neo/bot/math.js"
click node_toast "https://github.com/sivadhanushreddykotturu/timetablekl/blob/main/src/components/Toast.jsx"
click node_analytics "https://github.com/sivadhanushreddykotturu/timetablekl/blob/main/src/utils/analytics.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_app_shell toneBlue
class node_login,node_api_forms,node_erp_service,node_sync toneAmber
class node_timetable,node_attendance,node_grades_exam,node_friends,node_calculator,node_subjects_profile toneMint
class node_theme,node_companion,node_bot_engine,node_bot_math toneRose
class node_local_data,node_theme_context,node_toast,node_analytics,node_student_actor toneIndigo
```

## Components

### Application shell

- [App routing](https://github.com/sivadhanushreddykotturu/timetablekl/blob/main/src/App.jsx): `src/App.jsx`

### ERP access and data

- [Guest login](https://github.com/sivadhanushreddykotturu/timetablekl/blob/main/src/components/GuestAuthModal.jsx): `src/components/GuestAuthModal.jsx`
- [ERP request forms](https://github.com/sivadhanushreddykotturu/timetablekl/blob/main/src/config/api.js): `src/config/api.js`
- **ERP backend**
- [Timetable sync](https://github.com/sivadhanushreddykotturu/timetablekl/blob/main/utils/syncTimetable.js): `utils/syncTimetable.js`

### Student features

- [Timetable views](https://github.com/sivadhanushreddykotturu/timetablekl/blob/main/src/neo/pages/Timetable.jsx): `src/neo/pages/Timetable.jsx`
- [Attendance](https://github.com/sivadhanushreddykotturu/timetablekl/blob/main/src/neo/pages/Attendance.jsx): `src/neo/pages/Attendance.jsx`
- [Grades and exams](https://github.com/sivadhanushreddykotturu/timetablekl/tree/main/src/neo/pages): `src/neo/pages`
- [Friends timetables](https://github.com/sivadhanushreddykotturu/timetablekl/blob/main/src/neo/pages/Maddys.jsx): `src/neo/pages/Maddys.jsx`
- [Attendance calculators](https://github.com/sivadhanushreddykotturu/timetablekl/blob/main/src/pages/Calculator.jsx): `src/pages/Calculator.jsx`
- [Subjects and profile](https://github.com/sivadhanushreddykotturu/timetablekl/tree/main/src/neo/pages): `src/neo/pages`

### neo interface

- [Theme engine](https://github.com/sivadhanushreddykotturu/timetablekl/blob/main/src/neo/utils/themeEngine.js): `src/neo/utils/themeEngine.js`
- [Desktop companion](https://github.com/sivadhanushreddykotturu/timetablekl/blob/main/src/neo/bot/DesktopCompanion.jsx): `src/neo/bot/DesktopCompanion.jsx`
- [Mascot frame engine](https://github.com/sivadhanushreddykotturu/timetablekl/blob/main/src/neo/bot/engine.js): `src/neo/bot/engine.js`
- [Mascot math](https://github.com/sivadhanushreddykotturu/timetablekl/blob/main/src/neo/bot/math.js): `src/neo/bot/math.js`

### Shared services

- [Browser storage](https://github.com/sivadhanushreddykotturu/timetablekl/blob/main/utils/storage.js): `utils/storage.js`
- [Theme context](https://github.com/sivadhanushreddykotturu/timetablekl/blob/main/src/contexts/ThemeContext.jsx): `src/contexts/ThemeContext.jsx`
- [Notifications](https://github.com/sivadhanushreddykotturu/timetablekl/blob/main/src/components/Toast.jsx): `src/components/Toast.jsx`
- [Event analytics](https://github.com/sivadhanushreddykotturu/timetablekl/blob/main/src/utils/analytics.js): `src/utils/analytics.js`

### Other components

- **Student**

## Connections

- Student → App routing: opens
- App routing → Timetable views: routes to (evidence: `src/App.jsx`)
- App routing → Attendance: routes to (evidence: `src/App.jsx`)
- App routing → Friends timetables: routes to (evidence: `src/App.jsx`)
- App routing → Grades and exams: routes to (evidence: `src/App.jsx`)
- App routing → Attendance calculators: routes to (evidence: `src/App.jsx`)
- App routing → Subjects and profile: routes to (evidence: `src/App.jsx`)
- App routing → Theme context: provides (evidence: `src/App.jsx`)
- App routing → Theme engine: loads theme (evidence: `src/App.jsx`)
- App routing → Desktop companion: mounts (evidence: `src/App.jsx`)
- Student → Guest login: submits credentials
- Guest login → ERP request forms: builds request (evidence: `src/components/GuestAuthModal.jsx`)
- Guest login → ERP backend: fetches timetable
- ERP request forms → ERP backend: formats ERP requests
- Guest login → Browser storage: saves credentials (evidence: `src/components/GuestAuthModal.jsx`)
- Guest login → Timetable sync: calls background sync (evidence: `src/components/GuestAuthModal.jsx`)
- Timetable sync → ERP request forms: uses request forms (evidence: `utils/syncTimetable.js`)
- Timetable sync → Browser storage: uses storage (evidence: `utils/syncTimetable.js`)
- Timetable views → Browser storage: reads cached data
- Attendance → ERP request forms: uses ERP forms (evidence: `src/neo/pages/Attendance.jsx`)
- Attendance → Browser storage: reads stored data (evidence: `src/neo/pages/Attendance.jsx`)
- Attendance → Attendance calculators: uses calculator modal (evidence: `src/neo/pages/Attendance.jsx`)
- Friends timetables → Timetable sync: uses timetable sync (evidence: `src/neo/pages/Maddys.jsx`)
- Friends timetables → ERP request forms: uses ERP forms (evidence: `src/neo/pages/Maddys.jsx`)
- Attendance calculators → ERP request forms: uses academic-year options (evidence: `src/pages/Calculator.jsx`)
- Desktop companion → Mascot frame engine: uses bot engine
- Mascot frame engine → Mascot math: calls math helpers (evidence: `src/neo/bot/engine.js`)
- Guest login → Notifications: surfaces status
- Guest login → Event analytics: tracks login event (evidence: `src/components/GuestAuthModal.jsx`)
