# deepak-3357/eventsphere architecture

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

- Interactive diagram: https://gitdiagram.com/deepak-3357/eventsphere
- Repository: https://github.com/deepak-3357/eventsphere

## Overview

EventSphere is a campus event-management portal. Students discover events, register, receive notifications, present signed passes for attendance, and request OD letters; organizers manage events and attendance, while admins oversee users and events. The browser calls a Flask REST API, which verifies Supabase Auth tokens and uses PostgreSQL through a shared connection layer. The README also documents dashboards and analytics, XML event export, and role-based administration. Some feature routes and services are indexed but not excerpted; their documented capabilities are included, with links limited to relationships supported by the README or source index.

Main entry points: [`backend/app/__init__.py`](https://github.com/deepak-3357/eventsphere/blob/main/backend/app/__init__.py) (Flask app), [`backend/app/db.py`](https://github.com/deepak-3357/eventsphere/blob/main/backend/app/db.py) (PostgreSQL access), [`backend/app/services/event_service.py`](https://github.com/deepak-3357/eventsphere/blob/main/backend/app/services/event_service.py) (Event management), [`frontend`](https://github.com/deepak-3357/eventsphere/tree/main/frontend) (Portal pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Browser experience"]
  node_webapp["Portal pages"]
  node_event_ui["Event discovery<br/>[event-list.js]"]
  node_registration_ui["My registrations"]
  node_pass_ui["Event passes<br/>[event-pass.js]"]
  node_attendance_ui["Attendance scanner"]
  node_dashboard_ui["Role dashboards<br/>[dashboard.js]"]
  node_notification_ui["Notifications<br/>[notifications.js]"]
  node_od_ui["OD letters<br/>[od-letter.js]"]
end

subgraph group_api["Flask API"]
  node_app["Flask app<br/>[__init__.py]"]
  node_event_routes["Event endpoints<br/>[events.py]"]
  node_auth_routes["Authentication<br/>[auth.py]"]
  node_registration_routes["Registration endpoints<br/>[registrations.py]"]
  node_attendance_routes["Attendance endpoints<br/>[attendance.py]"]
  node_notification_routes["Notification endpoints<br/>[notifications.py]"]
  node_dashboard_routes["Dashboard endpoints<br/>[dashboard.py]"]
  node_od_routes["OD endpoints<br/>[od_letters.py]"]
  node_admin_routes["Admin endpoints<br/>[admin.py]"]
  node_catalog_routes["XML catalog<br/>[catalog.py]"]
end

subgraph group_domain["Event operations"]
  node_event_service["Event management<br/>[event_service.py]"]
  node_registration_service["Registration"]
  node_attendance_service["Passes and check-in"]
  node_notification_service["In-app notifications"]
  node_dashboard_service["Analytics"]
  node_od_service["OD generation"]
  node_admin_service["Administration<br/>[admin_service.py]"]
end

subgraph group_platform["Identity and data"]
  node_config["API configuration<br/>[config.py]"]
  node_db["PostgreSQL access<br/>[db.py]"]
  node_schema["Schema contract<br/>[schema_contract.py]"]
end

node_student(("Student"))
node_organizer(("Organizer"))
node_admin(("Admin"))
node_supabase_auth["Supabase Auth"]
node_postgres[("Supabase PostgreSQL")]

node_student -->|"uses"| node_webapp
node_organizer -->|"uses"| node_webapp
node_admin -->|"uses"| node_webapp
node_webapp -->|"Fetch API"| node_app
node_app -->|"registers"| node_event_routes
node_app -->|"registers"| node_auth_routes
node_app -->|"registers"| node_registration_routes
node_app -->|"registers"| node_attendance_routes
node_app -->|"registers"| node_notification_routes
node_app -->|"registers"| node_dashboard_routes
node_app -->|"registers"| node_od_routes
node_app -->|"registers"| node_admin_routes
node_app -->|"registers"| node_catalog_routes
node_event_routes -->|"calls"| node_event_service
node_catalog_routes -->|"calls"| node_event_service
node_registration_routes -->|"calls"| node_registration_service
node_registration_routes -->|"calls"| node_event_service
node_attendance_routes -->|"calls"| node_attendance_service
node_attendance_routes -->|"calls"| node_event_service
node_notification_routes -->|"calls"| node_notification_service
node_dashboard_routes -->|"calls"| node_dashboard_service
node_od_routes -->|"calls"| node_od_service
node_admin_routes -->|"calls"| node_admin_service
node_event_service -->|"creates alerts"| node_notification_service
node_registration_service -->|"creates alerts"| node_notification_service
node_event_service -->|"queries"| node_db
node_registration_service -->|"queries"| node_db
node_attendance_service -->|"queries"| node_db
node_notification_service -->|"queries"| node_db
node_dashboard_service -->|"queries"| node_db
node_od_service -.->|"queries"| node_db
node_admin_service -->|"queries"| node_db
node_db -->|"connects"| node_postgres
node_auth_routes -->|"verifies tokens"| node_supabase_auth
node_auth_routes -->|"loads profiles"| node_db
node_app -->|"loads settings"| node_config
node_schema -->|"checks schema"| node_db
node_event_ui -.->|"requests events"| node_app
node_registration_ui -.->|"requests registrations"| node_app
node_pass_ui -.->|"requests passes"| node_app
node_attendance_ui -.->|"submits check-in"| node_app
node_dashboard_ui -.->|"loads dashboards"| node_app
node_notification_ui -.->|"manages alerts"| node_app
node_od_ui -.->|"requests letters"| node_app
node_dashboard_routes -->|"aggregates"| node_dashboard_service
node_od_service -.->|"stores letters"| node_postgres

click node_webapp "https://github.com/deepak-3357/eventsphere/tree/main/frontend"
click node_event_ui "https://github.com/deepak-3357/eventsphere/blob/main/frontend/assets/js/event-list.js"
click node_registration_ui "https://github.com/deepak-3357/eventsphere/blob/main/frontend/assets/js/my-registrations.js"
click node_pass_ui "https://github.com/deepak-3357/eventsphere/blob/main/frontend/assets/js/event-pass.js"
click node_attendance_ui "https://github.com/deepak-3357/eventsphere/blob/main/frontend/assets/js/attendance-scanner.js"
click node_dashboard_ui "https://github.com/deepak-3357/eventsphere/blob/main/frontend/assets/js/dashboard.js"
click node_notification_ui "https://github.com/deepak-3357/eventsphere/blob/main/frontend/assets/js/notifications.js"
click node_od_ui "https://github.com/deepak-3357/eventsphere/blob/main/frontend/assets/js/od-letter.js"
click node_app "https://github.com/deepak-3357/eventsphere/blob/main/backend/app/__init__.py"
click node_event_routes "https://github.com/deepak-3357/eventsphere/blob/main/backend/app/routes/events.py"
click node_auth_routes "https://github.com/deepak-3357/eventsphere/blob/main/backend/app/routes/auth.py"
click node_registration_routes "https://github.com/deepak-3357/eventsphere/blob/main/backend/app/routes/registrations.py"
click node_attendance_routes "https://github.com/deepak-3357/eventsphere/blob/main/backend/app/routes/attendance.py"
click node_notification_routes "https://github.com/deepak-3357/eventsphere/blob/main/backend/app/routes/notifications.py"
click node_dashboard_routes "https://github.com/deepak-3357/eventsphere/blob/main/backend/app/routes/dashboard.py"
click node_od_routes "https://github.com/deepak-3357/eventsphere/blob/main/backend/app/routes/od_letters.py"
click node_admin_routes "https://github.com/deepak-3357/eventsphere/blob/main/backend/app/routes/admin.py"
click node_catalog_routes "https://github.com/deepak-3357/eventsphere/blob/main/backend/app/routes/catalog.py"
click node_event_service "https://github.com/deepak-3357/eventsphere/blob/main/backend/app/services/event_service.py"
click node_registration_service "https://github.com/deepak-3357/eventsphere/blob/main/backend/app/services/registration_service.py"
click node_attendance_service "https://github.com/deepak-3357/eventsphere/blob/main/backend/app/services/attendance_service.py"
click node_notification_service "https://github.com/deepak-3357/eventsphere/blob/main/backend/app/services/notification_service.py"
click node_dashboard_service "https://github.com/deepak-3357/eventsphere/blob/main/backend/app/services/dashboard_service.py"
click node_od_service "https://github.com/deepak-3357/eventsphere/blob/main/backend/app/services/od_letter_service.py"
click node_admin_service "https://github.com/deepak-3357/eventsphere/blob/main/backend/app/services/admin_service.py"
click node_config "https://github.com/deepak-3357/eventsphere/blob/main/backend/config.py"
click node_db "https://github.com/deepak-3357/eventsphere/blob/main/backend/app/db.py"
click node_schema "https://github.com/deepak-3357/eventsphere/blob/main/backend/app/schema_contract.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_webapp,node_event_ui,node_registration_ui,node_pass_ui,node_attendance_ui,node_dashboard_ui,node_notification_ui,node_od_ui toneBlue
class node_app,node_event_routes,node_auth_routes,node_registration_routes,node_attendance_routes,node_notification_routes,node_dashboard_routes,node_od_routes,node_admin_routes,node_catalog_routes,node_postgres toneAmber
class node_event_service,node_registration_service,node_attendance_service,node_notification_service,node_dashboard_service,node_od_service,node_admin_service toneMint
class node_config,node_db,node_schema toneRose
class node_student,node_organizer,node_admin,node_supabase_auth toneIndigo
```

## Components

### Browser experience

- [Portal pages](https://github.com/deepak-3357/eventsphere/tree/main/frontend): `frontend`
- [Event discovery](https://github.com/deepak-3357/eventsphere/blob/main/frontend/assets/js/event-list.js): `frontend/assets/js/event-list.js`
- [My registrations](https://github.com/deepak-3357/eventsphere/blob/main/frontend/assets/js/my-registrations.js): `frontend/assets/js/my-registrations.js`
- [Event passes](https://github.com/deepak-3357/eventsphere/blob/main/frontend/assets/js/event-pass.js): `frontend/assets/js/event-pass.js`
- [Attendance scanner](https://github.com/deepak-3357/eventsphere/blob/main/frontend/assets/js/attendance-scanner.js): `frontend/assets/js/attendance-scanner.js`
- [Role dashboards](https://github.com/deepak-3357/eventsphere/blob/main/frontend/assets/js/dashboard.js): `frontend/assets/js/dashboard.js`
- [Notifications](https://github.com/deepak-3357/eventsphere/blob/main/frontend/assets/js/notifications.js): `frontend/assets/js/notifications.js`
- [OD letters](https://github.com/deepak-3357/eventsphere/blob/main/frontend/assets/js/od-letter.js): `frontend/assets/js/od-letter.js`

### Flask API

- [Flask app](https://github.com/deepak-3357/eventsphere/blob/main/backend/app/__init__.py): `backend/app/__init__.py`
- [Event endpoints](https://github.com/deepak-3357/eventsphere/blob/main/backend/app/routes/events.py): `backend/app/routes/events.py`
- [Authentication](https://github.com/deepak-3357/eventsphere/blob/main/backend/app/routes/auth.py): `backend/app/routes/auth.py`
- [Registration endpoints](https://github.com/deepak-3357/eventsphere/blob/main/backend/app/routes/registrations.py): `backend/app/routes/registrations.py`
- [Attendance endpoints](https://github.com/deepak-3357/eventsphere/blob/main/backend/app/routes/attendance.py): `backend/app/routes/attendance.py`
- [Notification endpoints](https://github.com/deepak-3357/eventsphere/blob/main/backend/app/routes/notifications.py): `backend/app/routes/notifications.py`
- [Dashboard endpoints](https://github.com/deepak-3357/eventsphere/blob/main/backend/app/routes/dashboard.py): `backend/app/routes/dashboard.py`
- [OD endpoints](https://github.com/deepak-3357/eventsphere/blob/main/backend/app/routes/od_letters.py): `backend/app/routes/od_letters.py`
- [Admin endpoints](https://github.com/deepak-3357/eventsphere/blob/main/backend/app/routes/admin.py): `backend/app/routes/admin.py`
- [XML catalog](https://github.com/deepak-3357/eventsphere/blob/main/backend/app/routes/catalog.py): `backend/app/routes/catalog.py`

### Event operations

- [Event management](https://github.com/deepak-3357/eventsphere/blob/main/backend/app/services/event_service.py): `backend/app/services/event_service.py`
- [Registration](https://github.com/deepak-3357/eventsphere/blob/main/backend/app/services/registration_service.py): `backend/app/services/registration_service.py`
- [Passes and check-in](https://github.com/deepak-3357/eventsphere/blob/main/backend/app/services/attendance_service.py): `backend/app/services/attendance_service.py`
- [In-app notifications](https://github.com/deepak-3357/eventsphere/blob/main/backend/app/services/notification_service.py): `backend/app/services/notification_service.py`
- [Analytics](https://github.com/deepak-3357/eventsphere/blob/main/backend/app/services/dashboard_service.py): `backend/app/services/dashboard_service.py`
- [OD generation](https://github.com/deepak-3357/eventsphere/blob/main/backend/app/services/od_letter_service.py): `backend/app/services/od_letter_service.py`
- [Administration](https://github.com/deepak-3357/eventsphere/blob/main/backend/app/services/admin_service.py): `backend/app/services/admin_service.py`

### Identity and data

- [API configuration](https://github.com/deepak-3357/eventsphere/blob/main/backend/config.py): `backend/config.py`
- [PostgreSQL access](https://github.com/deepak-3357/eventsphere/blob/main/backend/app/db.py): `backend/app/db.py`
- [Schema contract](https://github.com/deepak-3357/eventsphere/blob/main/backend/app/schema_contract.py): `backend/app/schema_contract.py`

### Other components

- **Student**
- **Organizer**
- **Admin**
- **Supabase Auth**
- **Supabase PostgreSQL**

## Connections

- Student → Portal pages: uses (evidence: `README.md`)
- Organizer → Portal pages: uses (evidence: `README.md`)
- Admin → Portal pages: uses (evidence: `README.md`)
- Portal pages → Flask app: Fetch API (evidence: `README.md`)
- Flask app → Event endpoints: registers (evidence: `backend/app/__init__.py`)
- Flask app → Authentication: registers (evidence: `backend/app/__init__.py`)
- Flask app → Registration endpoints: registers (evidence: `backend/app/__init__.py`)
- Flask app → Attendance endpoints: registers (evidence: `backend/app/__init__.py`)
- Flask app → Notification endpoints: registers (evidence: `backend/app/__init__.py`)
- Flask app → Dashboard endpoints: registers (evidence: `backend/app/__init__.py`)
- Flask app → OD endpoints: registers (evidence: `backend/app/__init__.py`)
- Flask app → Admin endpoints: registers (evidence: `backend/app/__init__.py`)
- Flask app → XML catalog: registers (evidence: `backend/app/__init__.py`)
- Event endpoints → Event management: calls (evidence: `backend/app/routes/events.py`)
- XML catalog → Event management: calls (evidence: `backend/app/routes/catalog.py`)
- Registration endpoints → Registration: calls (evidence: `backend/app/routes/registrations.py`)
- Registration endpoints → Event management: calls (evidence: `backend/app/routes/registrations.py`)
- Attendance endpoints → Passes and check-in: calls (evidence: `backend/app/routes/attendance.py`)
- Attendance endpoints → Event management: calls (evidence: `backend/app/routes/attendance.py`)
- Notification endpoints → In-app notifications: calls (evidence: `backend/app/routes/notifications.py`)
- Dashboard endpoints → Analytics: calls (evidence: `backend/app/routes/dashboard.py`)
- OD endpoints → OD generation: calls (evidence: `backend/app/routes/od_letters.py`)
- Admin endpoints → Administration: calls (evidence: `backend/app/routes/admin.py`)
- Event management → In-app notifications: creates alerts (evidence: `backend/app/services/event_service.py`)
- Registration → In-app notifications: creates alerts (evidence: `backend/app/services/registration_service.py`)
- Event management → PostgreSQL access: queries (evidence: `backend/app/services/event_service.py`)
- Registration → PostgreSQL access: queries (evidence: `backend/app/services/registration_service.py`)
- Passes and check-in → PostgreSQL access: queries (evidence: `backend/app/services/attendance_service.py`)
- In-app notifications → PostgreSQL access: queries (evidence: `backend/app/services/notification_service.py`)
- Analytics → PostgreSQL access: queries (evidence: `backend/app/services/dashboard_service.py`)
- OD generation → PostgreSQL access: queries (evidence: `backend/app/services/od_letter_service.py`)
- Administration → PostgreSQL access: queries (evidence: `backend/app/services/admin_service.py`)
- PostgreSQL access → Supabase PostgreSQL: connects (evidence: `README.md`)
- Authentication → Supabase Auth: verifies tokens (evidence: `backend/app/routes/auth.py`)
- Authentication → PostgreSQL access: loads profiles (evidence: `backend/app/routes/auth.py`)
- Flask app → API configuration: loads settings (evidence: `backend/app/__init__.py`)
- Schema contract → PostgreSQL access: checks schema (evidence: `backend/app/schema_contract.py`)
- Event discovery → Flask app: requests events
- My registrations → Flask app: requests registrations
- Event passes → Flask app: requests passes
- Attendance scanner → Flask app: submits check-in
- Role dashboards → Flask app: loads dashboards
- Notifications → Flask app: manages alerts
- OD letters → Flask app: requests letters
- Dashboard endpoints → Analytics: aggregates (evidence: `backend/app/routes/dashboard.py`)
- OD generation → Supabase PostgreSQL: stores letters
