# kimberlychelsie/liceo_a architecture

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

- Interactive diagram: https://gitdiagram.com/kimberlychelsie/liceo_a
- Repository: https://github.com/kimberlychelsie/liceo_a

## Overview

This is a Flask-based, multi-branch school management system. Users enter through web routes, authenticate into role-specific experiences, and carry out school operations such as enrollment, teaching and grading, student/parent access, administration, and cashier or library transactions. Route handlers use shared database and utility layers; the sampled sources show authentication/session handling, file uploads, email, parent-link synchronization, and payment-first reservation helpers. The README is empty, so some capabilities are inferred from route names and source-index references; unsampled route details are not asserted.

Main entry points: [`app.py`](https://github.com/kimberlychelsie/liceo_a/blob/main/app.py) (Flask application), [`db.py`](https://github.com/kimberlychelsie/liceo_a/blob/main/db.py) (Database access), [`routes/branch_admin.py`](https://github.com/kimberlychelsie/liceo_a/blob/main/routes/branch_admin.py) (Branch administration), [`routes/registrar.py`](https://github.com/kimberlychelsie/liceo_a/blob/main/routes/registrar.py) (Enrollment and records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web and access"]
  node_flask["Flask application<br/>[app.py]"]
  node_auth["Authentication<br/>[auth.py]"]
end

subgraph group_school["School operations"]
  node_superadmin["System administration<br/>[super_admin.py]"]
  node_branchadmin["Branch administration<br/>[branch_admin.py]"]
  node_registrar["Enrollment and records<br/>[registrar.py]"]
  node_student["Student services<br/>[student.py]"]
  node_portal["Student portal<br/>[student_portal.py]"]
  node_parent["Parent services<br/>[parent.py]"]
  node_teacher["Teaching and grading<br/>[teacher.py]"]
end

subgraph group_commerce["Payments and resources"]
  node_cashier["Cashier services<br/>[cashier.py]"]
  node_librarian["Library services<br/>[librarian.py]"]
  node_reservations["Payment-first reservations"]
  node_paymenthelpers["Reservation payments"]
  node_paymentevents["Reservation events"]
  node_paymentlifecycle["Reservation lifecycle"]
end

subgraph group_shared["Shared services"]
  node_sessions["Session registry<br/>[auth_sessions.py]"]
  node_gradehistory["Grade approval history"]
  node_db["Database access<br/>[db.py]"]
  node_parent_sync["Parent link sync<br/>[parent_sync.py]"]
  node_uploads["File upload helper"]
  node_email["Email delivery<br/>[send_email.py]"]
end

node_browser(("Web user"))
node_postgres[("PostgreSQL")]
node_cloudinary["Cloudinary"]
node_smtp["SMTP service"]

node_browser -.->|"sends requests"| node_flask
node_flask -->|"registers routes"| node_auth
node_flask -->|"registers routes"| node_superadmin
node_flask -->|"registers routes"| node_branchadmin
node_flask -->|"registers routes"| node_registrar
node_flask -->|"registers routes"| node_student
node_flask -->|"registers routes"| node_portal
node_flask -->|"registers routes"| node_parent
node_flask -->|"registers routes"| node_teacher
node_flask -->|"registers routes"| node_cashier
node_flask -->|"registers routes"| node_librarian
node_flask -->|"uses"| node_sessions
node_auth -->|"uses"| node_sessions
node_auth -->|"queries"| node_db
node_auth -->|"sends email"| node_email
node_auth -->|"syncs parent links"| node_parent_sync
node_branchadmin -->|"queries and updates"| node_db
node_branchadmin -->|"uploads files"| node_uploads
node_branchadmin -->|"sends email"| node_email
node_branchadmin -->|"syncs parent links"| node_parent_sync
node_branchadmin -->|"uses"| node_gradehistory
node_registrar -->|"queries and updates"| node_db
node_registrar -->|"validates identity"| node_student
node_registrar -->|"sends email"| node_email
node_registrar -->|"syncs parent links"| node_parent_sync
node_registrar -->|"uses"| node_gradehistory
node_student -->|"queries and updates"| node_db
node_student -->|"uploads files"| node_uploads
node_student -->|"creates reservations"| node_reservations
node_portal -->|"queries and updates"| node_db
node_portal -->|"uses uploads"| node_uploads
node_portal -->|"uses"| node_parent_sync
node_teacher -->|"queries and updates"| node_db
node_teacher -->|"sends email"| node_email
node_teacher -->|"uploads files"| node_uploads
node_teacher -->|"uses"| node_gradehistory
node_superadmin -->|"queries and updates"| node_db
node_cashier -->|"queries and updates"| node_db
node_cashier -->|"uses"| node_reservations
node_cashier -->|"uses"| node_paymenthelpers
node_cashier -->|"uses"| node_paymentevents
node_cashier -->|"uses"| node_paymentlifecycle
node_librarian -.->|"queries and updates"| node_db
node_reservations -.->|"supports"| node_paymenthelpers
node_reservations -.->|"supports"| node_paymentevents
node_reservations -.->|"supports"| node_paymentlifecycle
node_db -->|"reads and writes"| node_postgres
node_uploads -->|"uploads files"| node_cloudinary

click node_flask "https://github.com/kimberlychelsie/liceo_a/blob/main/app.py"
click node_auth "https://github.com/kimberlychelsie/liceo_a/blob/main/routes/auth.py"
click node_sessions "https://github.com/kimberlychelsie/liceo_a/blob/main/utils/auth_sessions.py"
click node_superadmin "https://github.com/kimberlychelsie/liceo_a/blob/main/routes/super_admin.py"
click node_branchadmin "https://github.com/kimberlychelsie/liceo_a/blob/main/routes/branch_admin.py"
click node_registrar "https://github.com/kimberlychelsie/liceo_a/blob/main/routes/registrar.py"
click node_student "https://github.com/kimberlychelsie/liceo_a/blob/main/routes/student.py"
click node_portal "https://github.com/kimberlychelsie/liceo_a/blob/main/routes/student_portal.py"
click node_parent "https://github.com/kimberlychelsie/liceo_a/blob/main/routes/parent.py"
click node_teacher "https://github.com/kimberlychelsie/liceo_a/blob/main/routes/teacher.py"
click node_gradehistory "https://github.com/kimberlychelsie/liceo_a/blob/main/utils/grade_approval_history.py"
click node_cashier "https://github.com/kimberlychelsie/liceo_a/blob/main/routes/cashier.py"
click node_librarian "https://github.com/kimberlychelsie/liceo_a/blob/main/routes/librarian.py"
click node_reservations "https://github.com/kimberlychelsie/liceo_a/blob/main/utils/payment_first_reservations.py"
click node_paymenthelpers "https://github.com/kimberlychelsie/liceo_a/blob/main/utils/payment_first_payments.py"
click node_paymentevents "https://github.com/kimberlychelsie/liceo_a/blob/main/utils/payment_first_events.py"
click node_paymentlifecycle "https://github.com/kimberlychelsie/liceo_a/blob/main/utils/payment_first_lifecycle.py"
click node_db "https://github.com/kimberlychelsie/liceo_a/blob/main/db.py"
click node_parent_sync "https://github.com/kimberlychelsie/liceo_a/blob/main/utils/parent_sync.py"
click node_uploads "https://github.com/kimberlychelsie/liceo_a/blob/main/cloudinary_helper.py"
click node_email "https://github.com/kimberlychelsie/liceo_a/blob/main/utils/send_email.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_flask,node_auth,node_browser toneBlue
class node_superadmin,node_branchadmin,node_registrar,node_student,node_portal,node_parent,node_teacher,node_postgres toneAmber
class node_cashier,node_librarian,node_reservations,node_paymenthelpers,node_paymentevents,node_paymentlifecycle toneMint
class node_sessions,node_gradehistory,node_db,node_parent_sync,node_uploads,node_email toneRose
class node_cloudinary,node_smtp toneIndigo
```

## Components

### Web and access

- [Flask application](https://github.com/kimberlychelsie/liceo_a/blob/main/app.py): `app.py`
- [Authentication](https://github.com/kimberlychelsie/liceo_a/blob/main/routes/auth.py): `routes/auth.py`

### School operations

- [System administration](https://github.com/kimberlychelsie/liceo_a/blob/main/routes/super_admin.py): `routes/super_admin.py`
- [Branch administration](https://github.com/kimberlychelsie/liceo_a/blob/main/routes/branch_admin.py): `routes/branch_admin.py`
- [Enrollment and records](https://github.com/kimberlychelsie/liceo_a/blob/main/routes/registrar.py): `routes/registrar.py`
- [Student services](https://github.com/kimberlychelsie/liceo_a/blob/main/routes/student.py): `routes/student.py`
- [Student portal](https://github.com/kimberlychelsie/liceo_a/blob/main/routes/student_portal.py): `routes/student_portal.py`
- [Parent services](https://github.com/kimberlychelsie/liceo_a/blob/main/routes/parent.py): `routes/parent.py`
- [Teaching and grading](https://github.com/kimberlychelsie/liceo_a/blob/main/routes/teacher.py): `routes/teacher.py`

### Payments and resources

- [Cashier services](https://github.com/kimberlychelsie/liceo_a/blob/main/routes/cashier.py): `routes/cashier.py`
- [Library services](https://github.com/kimberlychelsie/liceo_a/blob/main/routes/librarian.py): `routes/librarian.py`
- [Payment-first reservations](https://github.com/kimberlychelsie/liceo_a/blob/main/utils/payment_first_reservations.py): `utils/payment_first_reservations.py`
- [Reservation payments](https://github.com/kimberlychelsie/liceo_a/blob/main/utils/payment_first_payments.py): `utils/payment_first_payments.py`
- [Reservation events](https://github.com/kimberlychelsie/liceo_a/blob/main/utils/payment_first_events.py): `utils/payment_first_events.py`
- [Reservation lifecycle](https://github.com/kimberlychelsie/liceo_a/blob/main/utils/payment_first_lifecycle.py): `utils/payment_first_lifecycle.py`

### Shared services

- [Session registry](https://github.com/kimberlychelsie/liceo_a/blob/main/utils/auth_sessions.py): `utils/auth_sessions.py`
- [Grade approval history](https://github.com/kimberlychelsie/liceo_a/blob/main/utils/grade_approval_history.py): `utils/grade_approval_history.py`
- [Database access](https://github.com/kimberlychelsie/liceo_a/blob/main/db.py): `db.py`
- [Parent link sync](https://github.com/kimberlychelsie/liceo_a/blob/main/utils/parent_sync.py): `utils/parent_sync.py`
- [File upload helper](https://github.com/kimberlychelsie/liceo_a/blob/main/cloudinary_helper.py): `cloudinary_helper.py`
- [Email delivery](https://github.com/kimberlychelsie/liceo_a/blob/main/utils/send_email.py): `utils/send_email.py`

### Other components

- **Web user**
- **PostgreSQL**
- **Cloudinary**
- **SMTP service**

## Connections

- Web user → Flask application: sends requests
- Flask application → Authentication: registers routes
- Flask application → System administration: registers routes
- Flask application → Branch administration: registers routes
- Flask application → Enrollment and records: registers routes
- Flask application → Student services: registers routes
- Flask application → Student portal: registers routes
- Flask application → Parent services: registers routes
- Flask application → Teaching and grading: registers routes (evidence: `app.py`)
- Flask application → Cashier services: registers routes
- Flask application → Library services: registers routes
- Flask application → Session registry: uses (evidence: `app.py`)
- Authentication → Session registry: uses (evidence: `routes/auth.py`)
- Authentication → Database access: queries (evidence: `routes/auth.py`)
- Authentication → Email delivery: sends email (evidence: `routes/auth.py`)
- Authentication → Parent link sync: syncs parent links (evidence: `routes/auth.py`)
- Branch administration → Database access: queries and updates (evidence: `routes/branch_admin.py`)
- Branch administration → File upload helper: uploads files (evidence: `routes/branch_admin.py`)
- Branch administration → Email delivery: sends email (evidence: `routes/branch_admin.py`)
- Branch administration → Parent link sync: syncs parent links (evidence: `routes/branch_admin.py`)
- Branch administration → Grade approval history: uses (evidence: `routes/branch_admin.py`)
- Enrollment and records → Database access: queries and updates (evidence: `routes/registrar.py`)
- Enrollment and records → Student services: validates identity (evidence: `routes/registrar.py`)
- Enrollment and records → Email delivery: sends email (evidence: `routes/registrar.py`)
- Enrollment and records → Parent link sync: syncs parent links (evidence: `routes/registrar.py`)
- Enrollment and records → Grade approval history: uses (evidence: `routes/registrar.py`)
- Student services → Database access: queries and updates (evidence: `routes/student.py`)
- Student services → File upload helper: uploads files (evidence: `routes/student.py`)
- Student services → Payment-first reservations: creates reservations (evidence: `routes/student.py`)
- Student portal → Database access: queries and updates (evidence: `routes/student_portal.py`)
- Student portal → File upload helper: uses uploads (evidence: `routes/student_portal.py`)
- Student portal → Parent link sync: uses (evidence: `routes/student_portal.py`)
- Teaching and grading → Database access: queries and updates (evidence: `routes/teacher.py`)
- Teaching and grading → Email delivery: sends email (evidence: `routes/teacher.py`)
- Teaching and grading → File upload helper: uploads files (evidence: `routes/teacher.py`)
- Teaching and grading → Grade approval history: uses (evidence: `routes/teacher.py`)
- System administration → Database access: queries and updates (evidence: `routes/super_admin.py`)
- Cashier services → Database access: queries and updates (evidence: `routes/cashier.py`)
- Cashier services → Payment-first reservations: uses (evidence: `routes/cashier.py`)
- Cashier services → Reservation payments: uses (evidence: `routes/cashier.py`)
- Cashier services → Reservation events: uses (evidence: `routes/cashier.py`)
- Cashier services → Reservation lifecycle: uses (evidence: `routes/cashier.py`)
- Library services → Database access: queries and updates
- Payment-first reservations → Reservation payments: supports (evidence: `utils/payment_first_payments.py`)
- Payment-first reservations → Reservation events: supports (evidence: `utils/payment_first_events.py`)
- Payment-first reservations → Reservation lifecycle: supports (evidence: `utils/payment_first_lifecycle.py`)
- Database access → PostgreSQL: reads and writes (evidence: `db.py`)
- File upload helper → Cloudinary: uploads files (evidence: `cloudinary_helper.py`)
