# hifzawaseem0525-cpu/eventmesh architecture

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

- Interactive diagram: https://gitdiagram.com/hifzawaseem0525-cpu/eventmesh
- Repository: https://github.com/hifzawaseem0525-cpu/eventmesh

## Overview

EventMesh supports student event discovery, booking, and ticket use alongside organizer event and ticket operations. The frontend routes role-specific pages; the documented student journey runs from browsing an event through booking to bookings and tickets, while organizers create and manage events and check tickets in. A FastAPI backend provides authentication and event, tier, booking, and ticket APIs backed by SQLAlchemy models. The README describes browser Local Storage for frontend persistence, while sampled backend code also establishes a database-backed API; unsampled page-to-API connections are omitted unless directly evidenced.

Main entry points: [`frontend/src/App.jsx`](https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/frontend/src/App.jsx) (Page router), [`backend/app/main.py`](https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/backend/app/main.py) (API application), [`frontend/src/pages/Dashboard.jsx`](https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/frontend/src/pages/Dashboard.jsx) (Event management), [`backend/app/routes/bookings.py`](https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/backend/app/routes/bookings.py) (Booking operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_app["Page router<br/>[App.jsx]"]
  node_student["Student discovery"]
  node_eventdetail["Event details<br/>[EventDetail.jsx]"]
  node_bookingsview["Booking history<br/>[MyBookings.jsx]"]
  node_ticketsview["My tickets<br/>[MyTickets.jsx]"]
  node_organizer["Event management<br/>[Dashboard.jsx]"]
  node_eventform["Create and edit<br/>[CreateEvent.jsx]"]
  node_tiersview["Ticket tiers<br/>[Managetickets.jsx]"]
  node_scanner["Ticket scanner"]
  node_authui["Sign in<br/>[Login.jsx]"]
end

subgraph group_api["API workflows"]
  node_apiapp["API application<br/>[main.py]"]
  node_auth["Authentication<br/>[auth.py]"]
  node_events["Event operations<br/>[events.py]"]
  node_tiers["Tier operations<br/>[ticket_tiers.py]"]
  node_bookingapi["Booking operations<br/>[bookings.py]"]
  node_ticketapi["Ticket operations<br/>[tickets.py]"]
end

subgraph group_data["Persistence and identity"]
  node_dbsession["DB sessions<br/>[database.py]"]
  node_user[("User records<br/>[user.py]")]
  node_event[("Event records<br/>[event.py]")]
  node_booking[("Booking records<br/>[booking.py]")]
  node_ticket[("Ticket records<br/>[ticket.py]")]
  node_tier[("Tier records<br/>[ticket_tier.py]")]
  node_security["Token security<br/>[security.py]"]
  node_identity["User dependencies<br/>[dependencies.py]"]
end

node_visitor(("Student or organizer"))

node_visitor -->|"uses"| node_app
node_app -->|"routes to"| node_student
node_app -->|"routes to"| node_eventdetail
node_app -->|"routes to"| node_bookingsview
node_app -->|"routes to"| node_ticketsview
node_app -->|"routes to"| node_organizer
node_app -->|"routes to"| node_eventform
node_app -->|"routes to"| node_tiersview
node_app -->|"routes to"| node_scanner
node_app -->|"routes to"| node_authui
node_student -->|"selects event"| node_eventdetail
node_eventdetail -->|"books event"| node_bookingsview
node_bookingsview -->|"opens ticket"| node_ticketsview
node_organizer -->|"manages events"| node_eventform
node_organizer -->|"manages tiers"| node_tiersview
node_organizer -->|"scans tickets"| node_scanner
node_authui -->|"requests login"| node_auth
node_organizer -->|"fetches events"| node_events
node_apiapp -->|"registers router"| node_auth
node_apiapp -->|"registers router"| node_events
node_apiapp -->|"registers router"| node_tiers
node_apiapp -->|"registers router"| node_bookingapi
node_apiapp -->|"registers router"| node_ticketapi
node_apiapp -->|"creates tables"| node_dbsession
node_auth -->|"queries and writes"| node_user
node_auth -->|"creates token"| node_security
node_auth -->|"uses identity"| node_identity
node_identity -->|"opens session"| node_dbsession
node_identity -->|"loads user"| node_user
node_identity -->|"decodes token"| node_security
node_events -->|"reads and writes"| node_event
node_tiers -->|"checks event"| node_event
node_tiers -->|"reads and writes"| node_tier
node_bookingapi -->|"reads and writes"| node_booking
node_bookingapi -->|"checks event"| node_event
node_bookingapi -->|"checks tier"| node_tier
node_bookingapi -->|"creates tickets"| node_ticket
node_ticketapi -->|"reads and updates"| node_ticket
node_ticketapi -->|"checks booking"| node_booking
node_ticketapi -->|"checks ownership"| node_event

click node_app "https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/frontend/src/App.jsx"
click node_student "https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/frontend/src/pages/StudentDashboard.jsx"
click node_eventdetail "https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/frontend/src/pages/EventDetail.jsx"
click node_bookingsview "https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/frontend/src/pages/MyBookings.jsx"
click node_ticketsview "https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/frontend/src/pages/MyTickets.jsx"
click node_organizer "https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/frontend/src/pages/Dashboard.jsx"
click node_eventform "https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/frontend/src/pages/CreateEvent.jsx"
click node_tiersview "https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/frontend/src/pages/Managetickets.jsx"
click node_scanner "https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/frontend/src/pages/OrganizerScanner.jsx"
click node_authui "https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/frontend/src/pages/Login.jsx"
click node_apiapp "https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/backend/app/main.py"
click node_auth "https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/backend/app/routes/auth.py"
click node_events "https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/backend/app/routes/events.py"
click node_tiers "https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/backend/app/routes/ticket_tiers.py"
click node_bookingapi "https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/backend/app/routes/bookings.py"
click node_ticketapi "https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/backend/app/routes/tickets.py"
click node_dbsession "https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/backend/app/database.py"
click node_user "https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/backend/app/models/user.py"
click node_event "https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/backend/app/models/event.py"
click node_booking "https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/backend/app/models/booking.py"
click node_ticket "https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/backend/app/models/ticket.py"
click node_tier "https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/backend/app/models/ticket_tier.py"
click node_security "https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/backend/app/utils/security.py"
click node_identity "https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/backend/app/utils/dependencies.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_app,node_student,node_eventdetail,node_bookingsview,node_ticketsview,node_organizer,node_eventform,node_tiersview,node_scanner,node_authui toneBlue
class node_apiapp,node_auth,node_events,node_tiers,node_bookingapi,node_ticketapi toneAmber
class node_dbsession,node_user,node_event,node_booking,node_ticket,node_tier,node_security,node_identity toneMint
class node_visitor toneIndigo
```

## Components

### Web application

- [Page router](https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Student discovery](https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/frontend/src/pages/StudentDashboard.jsx): `frontend/src/pages/StudentDashboard.jsx`
- [Event details](https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/frontend/src/pages/EventDetail.jsx): `frontend/src/pages/EventDetail.jsx`
- [Booking history](https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/frontend/src/pages/MyBookings.jsx): `frontend/src/pages/MyBookings.jsx`
- [My tickets](https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/frontend/src/pages/MyTickets.jsx): `frontend/src/pages/MyTickets.jsx`
- [Event management](https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`
- [Create and edit](https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/frontend/src/pages/CreateEvent.jsx): `frontend/src/pages/CreateEvent.jsx`
- [Ticket tiers](https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/frontend/src/pages/Managetickets.jsx): `frontend/src/pages/Managetickets.jsx`
- [Ticket scanner](https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/frontend/src/pages/OrganizerScanner.jsx): `frontend/src/pages/OrganizerScanner.jsx`
- [Sign in](https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/frontend/src/pages/Login.jsx): `frontend/src/pages/Login.jsx`

### API workflows

- [API application](https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/backend/app/main.py): `backend/app/main.py`
- [Authentication](https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/backend/app/routes/auth.py): `backend/app/routes/auth.py`
- [Event operations](https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/backend/app/routes/events.py): `backend/app/routes/events.py`
- [Tier operations](https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/backend/app/routes/ticket_tiers.py): `backend/app/routes/ticket_tiers.py`
- [Booking operations](https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/backend/app/routes/bookings.py): `backend/app/routes/bookings.py`
- [Ticket operations](https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/backend/app/routes/tickets.py): `backend/app/routes/tickets.py`

### Persistence and identity

- [DB sessions](https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/backend/app/database.py): `backend/app/database.py`
- [User records](https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/backend/app/models/user.py): `backend/app/models/user.py`
- [Event records](https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/backend/app/models/event.py): `backend/app/models/event.py`
- [Booking records](https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/backend/app/models/booking.py): `backend/app/models/booking.py`
- [Ticket records](https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/backend/app/models/ticket.py): `backend/app/models/ticket.py`
- [Tier records](https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/backend/app/models/ticket_tier.py): `backend/app/models/ticket_tier.py`
- [Token security](https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/backend/app/utils/security.py): `backend/app/utils/security.py`
- [User dependencies](https://github.com/hifzawaseem0525-cpu/eventmesh/blob/main/backend/app/utils/dependencies.py): `backend/app/utils/dependencies.py`

### Other components

- **Student or organizer**

## Connections

- Student or organizer → Page router: uses (evidence: `README.md`)
- Page router → Student discovery: routes to (evidence: `frontend/src/App.jsx`)
- Page router → Event details: routes to (evidence: `frontend/src/App.jsx`)
- Page router → Booking history: routes to (evidence: `frontend/src/App.jsx`)
- Page router → My tickets: routes to (evidence: `frontend/src/App.jsx`)
- Page router → Event management: routes to (evidence: `frontend/src/App.jsx`)
- Page router → Create and edit: routes to (evidence: `frontend/src/App.jsx`)
- Page router → Ticket tiers: routes to (evidence: `frontend/src/App.jsx`)
- Page router → Ticket scanner: routes to (evidence: `frontend/src/App.jsx`)
- Page router → Sign in: routes to (evidence: `frontend/src/App.jsx`)
- Student discovery → Event details: selects event (evidence: `README.md`)
- Event details → Booking history: books event (evidence: `README.md`)
- Booking history → My tickets: opens ticket (evidence: `README.md`)
- Event management → Create and edit: manages events (evidence: `README.md`)
- Event management → Ticket tiers: manages tiers (evidence: `frontend/src/App.jsx`)
- Event management → Ticket scanner: scans tickets (evidence: `frontend/src/App.jsx`)
- Sign in → Authentication: requests login
- Event management → Event operations: fetches events (evidence: `frontend/src/pages/Dashboard.jsx`)
- API application → Authentication: registers router (evidence: `backend/app/main.py`)
- API application → Event operations: registers router (evidence: `backend/app/main.py`)
- API application → Tier operations: registers router (evidence: `backend/app/main.py`)
- API application → Booking operations: registers router (evidence: `backend/app/main.py`)
- API application → Ticket operations: registers router (evidence: `backend/app/main.py`)
- API application → DB sessions: creates tables (evidence: `backend/app/main.py`)
- Authentication → User records: queries and writes (evidence: `backend/app/routes/auth.py`)
- Authentication → Token security: creates token (evidence: `backend/app/routes/auth.py`)
- Authentication → User dependencies: uses identity (evidence: `backend/app/routes/auth.py`)
- User dependencies → DB sessions: opens session (evidence: `backend/app/utils/dependencies.py`)
- User dependencies → User records: loads user (evidence: `backend/app/utils/dependencies.py`)
- User dependencies → Token security: decodes token (evidence: `backend/app/utils/dependencies.py`)
- Event operations → Event records: reads and writes (evidence: `backend/app/routes/events.py`)
- Tier operations → Event records: checks event (evidence: `backend/app/routes/ticket_tiers.py`)
- Tier operations → Tier records: reads and writes (evidence: `backend/app/routes/ticket_tiers.py`)
- Booking operations → Booking records: reads and writes (evidence: `backend/app/routes/bookings.py`)
- Booking operations → Event records: checks event (evidence: `backend/app/routes/bookings.py`)
- Booking operations → Tier records: checks tier (evidence: `backend/app/routes/bookings.py`)
- Booking operations → Ticket records: creates tickets (evidence: `backend/app/routes/bookings.py`)
- Ticket operations → Ticket records: reads and updates (evidence: `backend/app/routes/tickets.py`)
- Ticket operations → Booking records: checks booking (evidence: `backend/app/routes/tickets.py`)
- Ticket operations → Event records: checks ownership (evidence: `backend/app/routes/tickets.py`)
