# anesdevv/lycee-yaghmouracen architecture

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

- Interactive diagram: https://gitdiagram.com/anesdevv/lycee-yaghmouracen
- Repository: https://github.com/anesdevv/lycee-yaghmouracen

## Overview

Lycée Yaghmouracen is an offline desktop application for high-school administration. An administrator signs in, then uses the main window to manage students, classes, employees and attendance, review dashboard summaries, and generate official PDF or Excel records. SQLite provides persistent school and admin data; authentication and bilingual translations are shared services, while reusable widgets support the GUI. The README documents additional report types and security capabilities. Some subsystem details are unsampled, so edges rely on the README or SOURCE INDEX where noted.

Main entry points: [`ui/main_window.py`](https://github.com/anesdevv/lycee-yaghmouracen/blob/main/ui/main_window.py) (Main window), [`database/db.py`](https://github.com/anesdevv/lycee-yaghmouracen/blob/main/database/db.py) (SQLite school data), [`ui/login.py`](https://github.com/anesdevv/lycee-yaghmouracen/blob/main/ui/login.py) (Login screen), [`ui/students.py`](https://github.com/anesdevv/lycee-yaghmouracen/blob/main/ui/students.py) (Student records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application flow"]
  node_startup["App startup<br/>[main.py]"]
  node_login["Login screen<br/>[login.py]"]
  node_main_window["Main window<br/>[main_window.py]"]
end

subgraph group_records["School records"]
  node_dashboard["Dashboard<br/>[dashboard.py]"]
  node_students["Student records<br/>[students.py]"]
  node_classes["Class sections<br/>[classes.py]"]
  node_employees["Employee records<br/>[employees.py]"]
  node_attendance["Attendance<br/>[attendance.py]"]
  node_database[("SQLite school data<br/>[db.py]")]
end

subgraph group_services["Shared services"]
  node_auth["Authentication<br/>[auth_service.py]"]
  node_translations["Translations"]
  node_components["UI components<br/>[components.py]"]
end

subgraph group_reporting["Reporting"]
  node_exports_ui["Export center<br/>[exports.py]"]
  node_pdf["PDF reports<br/>[pdf_service.py]"]
  node_excel["Excel exports<br/>[excel_service.py]"]
  node_export_files["Generated files"]
end

node_administrator(("Administrator"))

node_administrator -->|"signs in"| node_login
node_startup -->|"initializes"| node_database
node_startup -->|"opens"| node_login
node_login -->|"authenticates"| node_auth
node_auth -->|"verifies credentials"| node_database
node_login -->|"success opens"| node_main_window
node_main_window -->|"logout returns"| node_login
node_main_window -->|"navigates"| node_dashboard
node_main_window -->|"navigates"| node_students
node_main_window -->|"navigates"| node_classes
node_main_window -->|"navigates"| node_employees
node_main_window -->|"navigates"| node_attendance
node_main_window -->|"navigates"| node_exports_ui
node_main_window -->|"manages session"| node_auth
node_dashboard -->|"reads summaries"| node_database
node_students -->|"manages students"| node_database
node_classes -->|"manages classes"| node_database
node_employees -->|"manages employees"| node_database
node_attendance -->|"records attendance"| node_database
node_login -->|"uses widgets"| node_components
node_main_window -->|"uses translations"| node_translations
node_students -->|"uses translations"| node_translations
node_employees -->|"uses widgets"| node_components
node_attendance -->|"uses widgets"| node_components
node_exports_ui -->|"requests reports"| node_pdf
node_exports_ui -->|"requests workbooks"| node_excel
node_pdf -->|"reads school data"| node_database
node_excel -->|"reads school data"| node_database
node_pdf -->|"writes PDFs"| node_export_files
node_excel -->|"writes workbooks"| node_export_files

click node_startup "https://github.com/anesdevv/lycee-yaghmouracen/blob/main/main.py"
click node_login "https://github.com/anesdevv/lycee-yaghmouracen/blob/main/ui/login.py"
click node_main_window "https://github.com/anesdevv/lycee-yaghmouracen/blob/main/ui/main_window.py"
click node_dashboard "https://github.com/anesdevv/lycee-yaghmouracen/blob/main/ui/dashboard.py"
click node_students "https://github.com/anesdevv/lycee-yaghmouracen/blob/main/ui/students.py"
click node_classes "https://github.com/anesdevv/lycee-yaghmouracen/blob/main/ui/classes.py"
click node_employees "https://github.com/anesdevv/lycee-yaghmouracen/blob/main/ui/employees.py"
click node_attendance "https://github.com/anesdevv/lycee-yaghmouracen/blob/main/ui/attendance.py"
click node_database "https://github.com/anesdevv/lycee-yaghmouracen/blob/main/database/db.py"
click node_auth "https://github.com/anesdevv/lycee-yaghmouracen/blob/main/services/auth_service.py"
click node_translations "https://github.com/anesdevv/lycee-yaghmouracen/blob/main/services/translation_service.py"
click node_components "https://github.com/anesdevv/lycee-yaghmouracen/blob/main/ui/components.py"
click node_exports_ui "https://github.com/anesdevv/lycee-yaghmouracen/blob/main/ui/exports.py"
click node_pdf "https://github.com/anesdevv/lycee-yaghmouracen/blob/main/services/pdf_service.py"
click node_excel "https://github.com/anesdevv/lycee-yaghmouracen/blob/main/services/excel_service.py"
click node_export_files "https://github.com/anesdevv/lycee-yaghmouracen/tree/main/exports"

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_startup,node_login,node_main_window toneBlue
class node_dashboard,node_students,node_classes,node_employees,node_attendance,node_database toneAmber
class node_auth,node_translations,node_components toneMint
class node_exports_ui,node_pdf,node_excel,node_export_files toneRose
class node_administrator toneIndigo
```

## Components

### Application flow

- [App startup](https://github.com/anesdevv/lycee-yaghmouracen/blob/main/main.py): `main.py`
- [Login screen](https://github.com/anesdevv/lycee-yaghmouracen/blob/main/ui/login.py): `ui/login.py`
- [Main window](https://github.com/anesdevv/lycee-yaghmouracen/blob/main/ui/main_window.py): `ui/main_window.py`

### School records

- [Dashboard](https://github.com/anesdevv/lycee-yaghmouracen/blob/main/ui/dashboard.py): `ui/dashboard.py`
- [Student records](https://github.com/anesdevv/lycee-yaghmouracen/blob/main/ui/students.py): `ui/students.py`
- [Class sections](https://github.com/anesdevv/lycee-yaghmouracen/blob/main/ui/classes.py): `ui/classes.py`
- [Employee records](https://github.com/anesdevv/lycee-yaghmouracen/blob/main/ui/employees.py): `ui/employees.py`
- [Attendance](https://github.com/anesdevv/lycee-yaghmouracen/blob/main/ui/attendance.py): `ui/attendance.py`
- [SQLite school data](https://github.com/anesdevv/lycee-yaghmouracen/blob/main/database/db.py): `database/db.py`

### Shared services

- [Authentication](https://github.com/anesdevv/lycee-yaghmouracen/blob/main/services/auth_service.py): `services/auth_service.py`
- [Translations](https://github.com/anesdevv/lycee-yaghmouracen/blob/main/services/translation_service.py): `services/translation_service.py`
- [UI components](https://github.com/anesdevv/lycee-yaghmouracen/blob/main/ui/components.py): `ui/components.py`

### Reporting

- [Export center](https://github.com/anesdevv/lycee-yaghmouracen/blob/main/ui/exports.py): `ui/exports.py`
- [PDF reports](https://github.com/anesdevv/lycee-yaghmouracen/blob/main/services/pdf_service.py): `services/pdf_service.py`
- [Excel exports](https://github.com/anesdevv/lycee-yaghmouracen/blob/main/services/excel_service.py): `services/excel_service.py`
- [Generated files](https://github.com/anesdevv/lycee-yaghmouracen/tree/main/exports): `exports`

### Other components

- **Administrator**

## Connections

- Administrator → Login screen: signs in (evidence: `README.md`)
- App startup → SQLite school data: initializes (evidence: `main.py`)
- App startup → Login screen: opens (evidence: `main.py`)
- Login screen → Authentication: authenticates (evidence: `ui/login.py`)
- Authentication → SQLite school data: verifies credentials (evidence: `services/auth_service.py`)
- Login screen → Main window: success opens (evidence: `main.py`)
- Main window → Login screen: logout returns (evidence: `main.py`)
- Main window → Dashboard: navigates (evidence: `ui/main_window.py`)
- Main window → Student records: navigates (evidence: `ui/main_window.py`)
- Main window → Class sections: navigates (evidence: `ui/main_window.py`)
- Main window → Employee records: navigates (evidence: `ui/main_window.py`)
- Main window → Attendance: navigates (evidence: `ui/main_window.py`)
- Main window → Export center: navigates (evidence: `ui/main_window.py`)
- Main window → Authentication: manages session (evidence: `ui/main_window.py`)
- Dashboard → SQLite school data: reads summaries (evidence: `ui/dashboard.py`)
- Student records → SQLite school data: manages students (evidence: `ui/students.py`)
- Class sections → SQLite school data: manages classes (evidence: `ui/classes.py`)
- Employee records → SQLite school data: manages employees (evidence: `ui/employees.py`)
- Attendance → SQLite school data: records attendance (evidence: `ui/attendance.py`)
- Login screen → UI components: uses widgets (evidence: `ui/login.py`)
- Main window → Translations: uses translations (evidence: `ui/main_window.py`)
- Student records → Translations: uses translations (evidence: `ui/students.py`)
- Employee records → UI components: uses widgets (evidence: `ui/employees.py`)
- Attendance → UI components: uses widgets (evidence: `ui/attendance.py`)
- Export center → PDF reports: requests reports (evidence: `ui/exports.py`)
- Export center → Excel exports: requests workbooks (evidence: `ui/exports.py`)
- PDF reports → SQLite school data: reads school data (evidence: `services/pdf_service.py`)
- Excel exports → SQLite school data: reads school data (evidence: `services/excel_service.py`)
- PDF reports → Generated files: writes PDFs (evidence: `README.md`)
- Excel exports → Generated files: writes workbooks (evidence: `README.md`)
