# samuelapoya/collegia architecture

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

- Interactive diagram: https://gitdiagram.com/samuelapoya/collegia
- Repository: https://github.com/samuelapoya/collegia

## Overview

Collegia is a Flask advising platform for students and professors. Students authenticate, browse availability, and book advising meetings; professors manage slots, meetings, and notes. The app stores accounts, availability, meetings, and notifications, with documented Google Calendar events and email reminders. Scheduled jobs check upcoming meetings and notify participants. The graph combines sampled route, model, and scheduler behavior with README-documented capabilities; unsampled route details are not independently verified.

Main entry points: [`app/routes.py`](https://github.com/samuelapoya/collegia/blob/main/app/routes.py) (Route handlers), [`notifications_scheduler.py`](https://github.com/samuelapoya/collegia/blob/main/notifications_scheduler.py) (Reminder scheduler), [`app/templates`](https://github.com/samuelapoya/collegia/tree/main/app/templates) (Web interface), [`app/models.py`](https://github.com/samuelapoya/collegia/blob/main/app/models.py) (Domain records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_web_ui["Web interface"]
  node_browser_behavior["Browser interactions<br/>[main.js]"]
end

subgraph group_advising["Advising workflows"]
  node_availability["Availability management<br/>[routes.py]"]
  node_booking["Meeting booking<br/>[routes.py]"]
  node_meeting_management["Meetings and notes<br/>[routes.py]"]
  node_account_settings["Account settings<br/>[routes.py]"]
end

subgraph group_platform["Application platform"]
  node_auth["Authentication<br/>[routes.py]"]
  node_forms["Validated forms<br/>[forms.py]"]
  node_route_handlers["Route handlers<br/>[routes.py]"]
  node_domain_models["Domain records<br/>[models.py]"]
  node_database[("Application database<br/>[collegia.db]")]
end

subgraph group_notifications["Notifications and integrations"]
  node_notification_records["In-app notifications<br/>[models.py]"]
  node_reminder_scheduler["Reminder scheduler"]
  node_calendar_api{{"Google Calendar"}}
  node_email_service{{"Email delivery"}}
  node_scheduler_launcher["Scheduler startup<br/>[run.py]"]
end

node_students(("Students"))
node_professors(("Professors"))

node_students -->|"use"| node_web_ui
node_professors -->|"use"| node_web_ui
node_web_ui -.->|"submit requests"| node_route_handlers
node_browser_behavior -->|"enhances"| node_web_ui
node_route_handlers -->|"handles login"| node_auth
node_route_handlers -->|"validates with"| node_forms
node_route_handlers -->|"dispatches to"| node_availability
node_route_handlers -->|"dispatches to"| node_booking
node_route_handlers -->|"dispatches to"| node_meeting_management
node_route_handlers -->|"dispatches to"| node_account_settings
node_availability -->|"creates slots"| node_domain_models
node_booking -->|"creates meeting"| node_domain_models
node_booking -->|"creates event"| node_calendar_api
node_booking -->|"records alert"| node_notification_records
node_meeting_management -->|"records cancellations"| node_notification_records
node_meeting_management -->|"emails participants"| node_email_service
node_domain_models -.->|"persists records"| node_database
node_scheduler_launcher -->|"starts"| node_reminder_scheduler
node_reminder_scheduler -->|"queries meetings"| node_domain_models
node_reminder_scheduler -->|"saves reminders"| node_notification_records
node_reminder_scheduler -->|"sends reminders"| node_email_service

click node_web_ui "https://github.com/samuelapoya/collegia/tree/main/app/templates"
click node_browser_behavior "https://github.com/samuelapoya/collegia/blob/main/app/static/js/main.js"
click node_auth "https://github.com/samuelapoya/collegia/blob/main/app/routes.py"
click node_forms "https://github.com/samuelapoya/collegia/blob/main/forms.py"
click node_route_handlers "https://github.com/samuelapoya/collegia/blob/main/app/routes.py"
click node_domain_models "https://github.com/samuelapoya/collegia/blob/main/app/models.py"
click node_database "https://github.com/samuelapoya/collegia/blob/main/instance/collegia.db"
click node_availability "https://github.com/samuelapoya/collegia/blob/main/app/routes.py"
click node_booking "https://github.com/samuelapoya/collegia/blob/main/app/routes.py"
click node_meeting_management "https://github.com/samuelapoya/collegia/blob/main/app/routes.py"
click node_account_settings "https://github.com/samuelapoya/collegia/blob/main/app/routes.py"
click node_notification_records "https://github.com/samuelapoya/collegia/blob/main/app/models.py"
click node_reminder_scheduler "https://github.com/samuelapoya/collegia/blob/main/notifications_scheduler.py"
click node_scheduler_launcher "https://github.com/samuelapoya/collegia/blob/main/run.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_web_ui,node_browser_behavior toneBlue
class node_availability,node_booking,node_meeting_management,node_account_settings toneAmber
class node_auth,node_forms,node_route_handlers,node_domain_models,node_database toneMint
class node_notification_records,node_reminder_scheduler,node_calendar_api,node_email_service,node_scheduler_launcher toneRose
class node_students,node_professors toneIndigo
```

## Components

### User experience

- [Web interface](https://github.com/samuelapoya/collegia/tree/main/app/templates): `app/templates`
- [Browser interactions](https://github.com/samuelapoya/collegia/blob/main/app/static/js/main.js): `app/static/js/main.js`

### Advising workflows

- [Availability management](https://github.com/samuelapoya/collegia/blob/main/app/routes.py): `app/routes.py`
- [Meeting booking](https://github.com/samuelapoya/collegia/blob/main/app/routes.py): `app/routes.py`
- [Meetings and notes](https://github.com/samuelapoya/collegia/blob/main/app/routes.py): `app/routes.py`
- [Account settings](https://github.com/samuelapoya/collegia/blob/main/app/routes.py): `app/routes.py`

### Application platform

- [Authentication](https://github.com/samuelapoya/collegia/blob/main/app/routes.py): `app/routes.py`
- [Validated forms](https://github.com/samuelapoya/collegia/blob/main/forms.py): `forms.py`
- [Route handlers](https://github.com/samuelapoya/collegia/blob/main/app/routes.py): `app/routes.py`
- [Domain records](https://github.com/samuelapoya/collegia/blob/main/app/models.py): `app/models.py`
- [Application database](https://github.com/samuelapoya/collegia/blob/main/instance/collegia.db): `instance/collegia.db`

### Notifications and integrations

- [In-app notifications](https://github.com/samuelapoya/collegia/blob/main/app/models.py): `app/models.py`
- [Reminder scheduler](https://github.com/samuelapoya/collegia/blob/main/notifications_scheduler.py): `notifications_scheduler.py`
- **Google Calendar**
- **Email delivery**
- [Scheduler startup](https://github.com/samuelapoya/collegia/blob/main/run.py): `run.py`

### Other components

- **Students**
- **Professors**

## Connections

- Students → Web interface: use (evidence: `README.md`)
- Professors → Web interface: use (evidence: `README.md`)
- Web interface → Route handlers: submit requests
- Browser interactions → Web interface: enhances (evidence: `app/static/js/main.js`)
- Route handlers → Authentication: handles login (evidence: `app/routes.py`)
- Route handlers → Validated forms: validates with (evidence: `app/routes.py`)
- Route handlers → Availability management: dispatches to (evidence: `app/routes.py`)
- Route handlers → Meeting booking: dispatches to (evidence: `app/routes.py`)
- Route handlers → Meetings and notes: dispatches to (evidence: `README.md`)
- Route handlers → Account settings: dispatches to (evidence: `app/routes.py`)
- Availability management → Domain records: creates slots (evidence: `app/routes.py`)
- Meeting booking → Domain records: creates meeting (evidence: `app/routes.py`)
- Meeting booking → Google Calendar: creates event (evidence: `app/routes.py`)
- Meeting booking → In-app notifications: records alert (evidence: `app/routes.py`)
- Meetings and notes → In-app notifications: records cancellations (evidence: `app/routes.py`)
- Meetings and notes → Email delivery: emails participants (evidence: `app/routes.py`)
- Domain records → Application database: persists records
- Scheduler startup → Reminder scheduler: starts (evidence: `run.py`)
- Reminder scheduler → Domain records: queries meetings (evidence: `notifications_scheduler.py`)
- Reminder scheduler → In-app notifications: saves reminders (evidence: `notifications_scheduler.py`)
- Reminder scheduler → Email delivery: sends reminders (evidence: `notifications_scheduler.py`)
