# fossasia/open-event-server architecture

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

- Interactive diagram: https://gitdiagram.com/fossasia/open-event-server
- Repository: https://github.com/fossasia/open-event-server

## Overview

Open Event Server is a Flask-based event-management API. Organizers and other clients use its REST endpoints to create and manage event schedules, speakers, attendees, ticket sales, and related data; they can also import and export event data and media. The graph follows app initialization into API routing, then highlights permission checks, persistence, and key domain models. README capability descriptions preserve import/export and integrations that the sampled source does not fully expose; those links are marked as documented rather than inferred calls.

Main entry points: [`app/api/routes.py`](https://github.com/fossasia/open-event-server/blob/development/app/api/routes.py) (REST routing), [`app/instance.py`](https://github.com/fossasia/open-event-server/blob/development/app/instance.py) (Flask application), [`app/api/orders.py`](https://github.com/fossasia/open-event-server/blob/development/app/api/orders.py) (Orders and tickets), [`app/models/session.py`](https://github.com/fossasia/open-event-server/blob/development/app/models/session.py) (Session model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_application["Application API"]
  node_flask_app["Flask application<br/>[instance.py]"]
  node_rest_routes["REST routing<br/>[routes.py]"]
  node_api_bootstrap["API bootstrap<br/>[bootstrap.py]"]
  node_access_control["Permission checks"]
end

subgraph group_event_ops["Event Management"]
  node_event_api["Event endpoints<br/>[events.py]"]
  node_schedule_api["Schedule endpoints<br/>[sessions.py]"]
  node_attendee_api["Attendee endpoints<br/>[attendees.py]"]
  node_identity_api["User and role endpoints<br/>[users.py]"]
end

subgraph group_commerce["Ticketing and Sales"]
  node_sales_api["Orders and tickets<br/>[orders.py]"]
  node_sales_admin["Organizer sales"]
end

subgraph group_data["Domain and Persistence"]
  node_event_model["Event model<br/>[event.py]"]
  node_session_model["Session model<br/>[session.py]"]
  node_user_model["User model<br/>[user.py]"]
  node_order_model["Order model<br/>[order.py]"]
  node_db_layer["Database operations<br/>[db.py]"]
end

subgraph group_integrations["Data Exchange"]
  node_import_export["Import and export<br/>[exports.py]"]
  node_import_jobs["Import processing<br/>[imports.py]"]
  node_media_storage["Media storage<br/>[storage.py]"]
  node_payment["Payment gateways<br/>[payment.py]"]
  node_email["Email delivery<br/>[mail.py]"]
end

node_clients(("API clients"))
node_database[("PostgreSQL database")]

node_clients -->|"send requests"| node_flask_app
node_flask_app -->|"registers routes"| node_rest_routes
node_rest_routes -.->|"uses API setup"| node_api_bootstrap
node_api_bootstrap -->|"sets permission handler"| node_access_control
node_rest_routes -->|"routes requests"| node_event_api
node_rest_routes -->|"routes requests"| node_schedule_api
node_rest_routes -->|"routes requests"| node_attendee_api
node_rest_routes -->|"routes requests"| node_identity_api
node_access_control -->|"checks roles"| node_user_model
node_event_model -->|"relates sessions"| node_session_model
node_session_model -->|"relates creators"| node_user_model
node_rest_routes -.->|"routes requests"| node_sales_api
node_rest_routes -->|"routes sales operations"| node_sales_admin
node_sales_api -.->|"manages orders"| node_order_model
node_db_layer -->|"reads and writes"| node_database
node_event_model -->|"persists event data"| node_database
node_session_model -->|"persists schedule data"| node_database
node_user_model -->|"persists user data"| node_database
node_order_model -->|"persists order data"| node_database
node_flask_app -->|"registers export routes"| node_import_export
node_flask_app -->|"registers import routes"| node_import_jobs
node_import_export -.->|"handles media files"| node_media_storage
node_clients -.->|"exchanges event data"| node_import_export
node_sales_api -.->|"supports ticket payments"| node_payment
node_flask_app -.->|"sends configured email"| node_email

click node_flask_app "https://github.com/fossasia/open-event-server/blob/development/app/instance.py"
click node_rest_routes "https://github.com/fossasia/open-event-server/blob/development/app/api/routes.py"
click node_api_bootstrap "https://github.com/fossasia/open-event-server/blob/development/app/api/bootstrap.py"
click node_access_control "https://github.com/fossasia/open-event-server/blob/development/app/api/helpers/permission_manager.py"
click node_event_api "https://github.com/fossasia/open-event-server/blob/development/app/api/events.py"
click node_schedule_api "https://github.com/fossasia/open-event-server/blob/development/app/api/sessions.py"
click node_attendee_api "https://github.com/fossasia/open-event-server/blob/development/app/api/attendees.py"
click node_identity_api "https://github.com/fossasia/open-event-server/blob/development/app/api/users.py"
click node_sales_api "https://github.com/fossasia/open-event-server/blob/development/app/api/orders.py"
click node_sales_admin "https://github.com/fossasia/open-event-server/tree/development/app/api/admin_sales"
click node_event_model "https://github.com/fossasia/open-event-server/blob/development/app/models/event.py"
click node_session_model "https://github.com/fossasia/open-event-server/blob/development/app/models/session.py"
click node_user_model "https://github.com/fossasia/open-event-server/blob/development/app/models/user.py"
click node_order_model "https://github.com/fossasia/open-event-server/blob/development/app/models/order.py"
click node_db_layer "https://github.com/fossasia/open-event-server/blob/development/app/api/helpers/db.py"
click node_import_export "https://github.com/fossasia/open-event-server/blob/development/app/api/exports.py"
click node_import_jobs "https://github.com/fossasia/open-event-server/blob/development/app/api/imports.py"
click node_media_storage "https://github.com/fossasia/open-event-server/blob/development/app/api/helpers/storage.py"
click node_payment "https://github.com/fossasia/open-event-server/blob/development/app/api/helpers/payment.py"
click node_email "https://github.com/fossasia/open-event-server/blob/development/app/api/helpers/mail.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_app,node_rest_routes,node_api_bootstrap,node_access_control,node_clients toneBlue
class node_event_api,node_schedule_api,node_attendee_api,node_identity_api,node_database toneAmber
class node_sales_api,node_sales_admin toneMint
class node_event_model,node_session_model,node_user_model,node_order_model,node_db_layer toneRose
class node_import_export,node_import_jobs,node_media_storage,node_payment,node_email toneIndigo
```

## Components

### Application API

- [Flask application](https://github.com/fossasia/open-event-server/blob/development/app/instance.py): `app/instance.py`
- [REST routing](https://github.com/fossasia/open-event-server/blob/development/app/api/routes.py): `app/api/routes.py`
- [API bootstrap](https://github.com/fossasia/open-event-server/blob/development/app/api/bootstrap.py): `app/api/bootstrap.py`
- [Permission checks](https://github.com/fossasia/open-event-server/blob/development/app/api/helpers/permission_manager.py): `app/api/helpers/permission_manager.py`

### Event Management

- [Event endpoints](https://github.com/fossasia/open-event-server/blob/development/app/api/events.py): `app/api/events.py`
- [Schedule endpoints](https://github.com/fossasia/open-event-server/blob/development/app/api/sessions.py): `app/api/sessions.py`
- [Attendee endpoints](https://github.com/fossasia/open-event-server/blob/development/app/api/attendees.py): `app/api/attendees.py`
- [User and role endpoints](https://github.com/fossasia/open-event-server/blob/development/app/api/users.py): `app/api/users.py`

### Ticketing and Sales

- [Orders and tickets](https://github.com/fossasia/open-event-server/blob/development/app/api/orders.py): `app/api/orders.py`
- [Organizer sales](https://github.com/fossasia/open-event-server/tree/development/app/api/admin_sales): `app/api/admin_sales`

### Domain and Persistence

- [Event model](https://github.com/fossasia/open-event-server/blob/development/app/models/event.py): `app/models/event.py`
- [Session model](https://github.com/fossasia/open-event-server/blob/development/app/models/session.py): `app/models/session.py`
- [User model](https://github.com/fossasia/open-event-server/blob/development/app/models/user.py): `app/models/user.py`
- [Order model](https://github.com/fossasia/open-event-server/blob/development/app/models/order.py): `app/models/order.py`
- [Database operations](https://github.com/fossasia/open-event-server/blob/development/app/api/helpers/db.py): `app/api/helpers/db.py`

### Data Exchange

- [Import and export](https://github.com/fossasia/open-event-server/blob/development/app/api/exports.py): `app/api/exports.py`
- [Import processing](https://github.com/fossasia/open-event-server/blob/development/app/api/imports.py): `app/api/imports.py`
- [Media storage](https://github.com/fossasia/open-event-server/blob/development/app/api/helpers/storage.py): `app/api/helpers/storage.py`
- [Payment gateways](https://github.com/fossasia/open-event-server/blob/development/app/api/helpers/payment.py): `app/api/helpers/payment.py`
- [Email delivery](https://github.com/fossasia/open-event-server/blob/development/app/api/helpers/mail.py): `app/api/helpers/mail.py`

### Other components

- **API clients**
- **PostgreSQL database**

## Connections

- API clients → Flask application: send requests
- Flask application → REST routing: registers routes (evidence: `app/instance.py`)
- REST routing → API bootstrap: uses API setup (evidence: `app/api/routes.py`)
- API bootstrap → Permission checks: sets permission handler (evidence: `app/api/bootstrap.py`)
- REST routing → Event endpoints: routes requests (evidence: `app/api/routes.py`)
- REST routing → Schedule endpoints: routes requests (evidence: `app/api/routes.py`)
- REST routing → Attendee endpoints: routes requests (evidence: `app/api/routes.py`)
- REST routing → User and role endpoints: routes requests (evidence: `app/api/routes.py`)
- Permission checks → User model: checks roles (evidence: `app/api/helpers/permission_manager.py`)
- Event model → Session model: relates sessions (evidence: `app/models/event.py`)
- Session model → User model: relates creators (evidence: `app/models/session.py`)
- REST routing → Orders and tickets: routes requests
- REST routing → Organizer sales: routes sales operations (evidence: `app/api/routes.py`)
- Orders and tickets → Order model: manages orders
- Database operations → PostgreSQL database: reads and writes
- Event model → PostgreSQL database: persists event data
- Session model → PostgreSQL database: persists schedule data
- User model → PostgreSQL database: persists user data
- Order model → PostgreSQL database: persists order data
- Flask application → Import and export: registers export routes (evidence: `app/instance.py`)
- Flask application → Import processing: registers import routes (evidence: `app/instance.py`)
- Import and export → Media storage: handles media files
- API clients → Import and export: exchanges event data
- Orders and tickets → Payment gateways: supports ticket payments
- Flask application → Email delivery: sends configured email
