# artyom7774/schedule architecture

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

- Interactive diagram: https://gitdiagram.com/artyom7774/schedule
- Repository: https://github.com/artyom7774/schedule

## Overview

SuperZavych is a desktop timetable-generation assistant. The user creates or opens a project, enters scheduling parameters and school data, refines the schedule with constants and groups, runs generation, then reviews or exports class and teacher timetables. The README documents these product stages and the simulated-annealing algorithm; sampled source also shows project settings persisted as JSON and the application dispatching between its start and main menus. The generation, AI, and result-tab implementations were not sampled, so their documented connections are identified as such.

Main entry points: [`src/modules/functions/tree.py`](https://github.com/artyom7774/schedule/blob/main/src/modules/functions/tree.py) (Project management), [`src/main.py`](https://github.com/artyom7774/schedule/blob/main/src/main.py) (Application window), [`src/modules/menues/start.py`](https://github.com/artyom7774/schedule/blob/main/src/modules/menues/start.py) (Project start), [`src/modules/menues/main.py`](https://github.com/artyom7774/schedule/blob/main/src/modules/menues/main.py) (Tab navigation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Desktop application"]
  node_app_entry["Application window<br/>[main.py]"]
  node_start_menu["Project start<br/>[start.py]"]
  node_project_management["Project management<br/>[tree.py]"]
  node_main_menu["Tab navigation<br/>[main.py]"]
end

subgraph group_inputs["Schedule inputs"]
  node_project_settings["Project settings<br/>[settings.py]"]
  node_class_loads["Class loads<br/>[classes.py]"]
  node_classrooms["Classrooms<br/>[classrooms.py]"]
  node_subjects["Subjects<br/>[subjects.py]"]
  node_teachers["Teacher setup<br/>[teachers.py]"]
  node_ai_assistant["AI assistant<br/>[ai.py]"]
end

subgraph group_generation["Generation and refinement"]
  node_constants["Fixed lessons<br/>[constants.py]"]
  node_groups["Profile groups<br/>[groups.py]"]
  node_run_schedule["Run generation<br/>[run.py]"]
  node_solver["Schedule solver<br/>[solve.cpp]"]
end

subgraph group_results["Results and export"]
  node_schedule_view["Schedule viewing<br/>[view.py]"]
  node_schedule_export["XLSX export<br/>[export.py]"]
end

subgraph group_support["Shared services"]
  node_project_data[("Project files<br/>[tree.py]")]
  node_shared_settings["Shared settings<br/>[variables.py]"]
end

node_organizer(("Organizer"))
node_ai_service["AI service"]

node_organizer -->|"launches"| node_app_entry
node_app_entry -->|"dispatches"| node_start_menu
node_app_entry -->|"dispatches"| node_main_menu
node_organizer -->|"creates or opens"| node_start_menu
node_start_menu -->|"calls"| node_project_management
node_project_management -->|"creates and reads"| node_project_data
node_project_management -->|"opens project"| node_main_menu
node_main_menu -.->|"shows tabs"| node_project_settings
node_organizer -->|"configures"| node_project_settings
node_organizer -->|"sets weekly loads"| node_class_loads
node_organizer -->|"defines rooms"| node_classrooms
node_organizer -->|"defines subjects"| node_subjects
node_organizer -->|"sets availability"| node_teachers
node_organizer -->|"uses assistant"| node_ai_assistant
node_ai_assistant -.->|"requests AI"| node_ai_service
node_organizer -->|"defines fixed lessons"| node_constants
node_organizer -->|"creates groups"| node_groups
node_organizer -->|"starts generation"| node_run_schedule
node_run_schedule -.->|"runs solver"| node_solver
node_solver -.->|"produces schedule"| node_schedule_view
node_organizer -->|"reviews results"| node_schedule_view
node_organizer -->|"exports timetable"| node_schedule_export
node_project_management -->|"normalizes settings"| node_shared_settings

click node_app_entry "https://github.com/artyom7774/schedule/blob/main/src/main.py"
click node_start_menu "https://github.com/artyom7774/schedule/blob/main/src/modules/menues/start.py"
click node_project_management "https://github.com/artyom7774/schedule/blob/main/src/modules/functions/tree.py"
click node_main_menu "https://github.com/artyom7774/schedule/blob/main/src/modules/menues/main.py"
click node_project_settings "https://github.com/artyom7774/schedule/blob/main/src/modules/menues/tabs/settings.py"
click node_class_loads "https://github.com/artyom7774/schedule/blob/main/src/modules/menues/tabs/classes.py"
click node_classrooms "https://github.com/artyom7774/schedule/blob/main/src/modules/menues/tabs/classrooms.py"
click node_subjects "https://github.com/artyom7774/schedule/blob/main/src/modules/menues/tabs/subjects.py"
click node_teachers "https://github.com/artyom7774/schedule/blob/main/src/modules/menues/tabs/teachers.py"
click node_ai_assistant "https://github.com/artyom7774/schedule/blob/main/src/modules/menues/tabs/ai.py"
click node_constants "https://github.com/artyom7774/schedule/blob/main/src/modules/menues/tabs/constants.py"
click node_groups "https://github.com/artyom7774/schedule/blob/main/src/modules/menues/tabs/groups.py"
click node_run_schedule "https://github.com/artyom7774/schedule/blob/main/src/modules/menues/tabs/run.py"
click node_solver "https://github.com/artyom7774/schedule/blob/main/src/modules/solve.cpp"
click node_project_data "https://github.com/artyom7774/schedule/blob/main/src/modules/functions/tree.py"
click node_shared_settings "https://github.com/artyom7774/schedule/blob/main/src/variables.py"
click node_schedule_view "https://github.com/artyom7774/schedule/blob/main/src/modules/menues/tabs/view.py"
click node_schedule_export "https://github.com/artyom7774/schedule/blob/main/src/modules/menues/tabs/export.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_entry,node_start_menu,node_project_management,node_main_menu toneBlue
class node_project_settings,node_class_loads,node_classrooms,node_subjects,node_teachers,node_ai_assistant toneAmber
class node_constants,node_groups,node_run_schedule,node_solver toneMint
class node_schedule_view,node_schedule_export toneRose
class node_project_data,node_shared_settings,node_organizer,node_ai_service toneIndigo
```

## Components

### Desktop application

- [Application window](https://github.com/artyom7774/schedule/blob/main/src/main.py): `src/main.py`
- [Project start](https://github.com/artyom7774/schedule/blob/main/src/modules/menues/start.py): `src/modules/menues/start.py`
- [Project management](https://github.com/artyom7774/schedule/blob/main/src/modules/functions/tree.py): `src/modules/functions/tree.py`
- [Tab navigation](https://github.com/artyom7774/schedule/blob/main/src/modules/menues/main.py): `src/modules/menues/main.py`

### Schedule inputs

- [Project settings](https://github.com/artyom7774/schedule/blob/main/src/modules/menues/tabs/settings.py): `src/modules/menues/tabs/settings.py`
- [Class loads](https://github.com/artyom7774/schedule/blob/main/src/modules/menues/tabs/classes.py): `src/modules/menues/tabs/classes.py`
- [Classrooms](https://github.com/artyom7774/schedule/blob/main/src/modules/menues/tabs/classrooms.py): `src/modules/menues/tabs/classrooms.py`
- [Subjects](https://github.com/artyom7774/schedule/blob/main/src/modules/menues/tabs/subjects.py): `src/modules/menues/tabs/subjects.py`
- [Teacher setup](https://github.com/artyom7774/schedule/blob/main/src/modules/menues/tabs/teachers.py): `src/modules/menues/tabs/teachers.py`
- [AI assistant](https://github.com/artyom7774/schedule/blob/main/src/modules/menues/tabs/ai.py): `src/modules/menues/tabs/ai.py`

### Generation and refinement

- [Fixed lessons](https://github.com/artyom7774/schedule/blob/main/src/modules/menues/tabs/constants.py): `src/modules/menues/tabs/constants.py`
- [Profile groups](https://github.com/artyom7774/schedule/blob/main/src/modules/menues/tabs/groups.py): `src/modules/menues/tabs/groups.py`
- [Run generation](https://github.com/artyom7774/schedule/blob/main/src/modules/menues/tabs/run.py): `src/modules/menues/tabs/run.py`
- [Schedule solver](https://github.com/artyom7774/schedule/blob/main/src/modules/solve.cpp): `src/modules/solve.cpp`

### Results and export

- [Schedule viewing](https://github.com/artyom7774/schedule/blob/main/src/modules/menues/tabs/view.py): `src/modules/menues/tabs/view.py`
- [XLSX export](https://github.com/artyom7774/schedule/blob/main/src/modules/menues/tabs/export.py): `src/modules/menues/tabs/export.py`

### Shared services

- [Project files](https://github.com/artyom7774/schedule/blob/main/src/modules/functions/tree.py): `src/modules/functions/tree.py`
- [Shared settings](https://github.com/artyom7774/schedule/blob/main/src/variables.py): `src/variables.py`

### Other components

- **Organizer**
- **AI service**

## Connections

- Organizer → Application window: launches
- Application window → Project start: dispatches (evidence: `src/main.py`)
- Application window → Tab navigation: dispatches (evidence: `src/main.py`)
- Organizer → Project start: creates or opens
- Project start → Project management: calls (evidence: `src/modules/menues/start.py`)
- Project management → Project files: creates and reads (evidence: `src/modules/functions/tree.py`)
- Project management → Tab navigation: opens project (evidence: `src/modules/functions/tree.py`)
- Tab navigation → Project settings: shows tabs (evidence: `src/modules/menues/main.py`)
- Organizer → Project settings: configures
- Organizer → Class loads: sets weekly loads
- Organizer → Classrooms: defines rooms
- Organizer → Subjects: defines subjects
- Organizer → Teacher setup: sets availability
- Organizer → AI assistant: uses assistant
- AI assistant → AI service: requests AI
- Organizer → Fixed lessons: defines fixed lessons
- Organizer → Profile groups: creates groups
- Organizer → Run generation: starts generation
- Run generation → Schedule solver: runs solver
- Schedule solver → Schedule viewing: produces schedule
- Organizer → Schedule viewing: reviews results
- Organizer → XLSX export: exports timetable
- Project management → Shared settings: normalizes settings (evidence: `src/modules/functions/tree.py`)
