# roa-aw/eventsphere architecture

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

- Interactive diagram: https://gitdiagram.com/roa-aw/eventsphere
- Repository: https://github.com/roa-aw/eventsphere

## Overview

EventSphere is an event discovery, venue and seat management, and ticket-booking application, with a React client and ASP.NET API. Users browse approved events, select a seat, book it, and manage bookings; organizers and administrators also manage events and rooms, while administrators access reports and audit views. The API uses service layers and EF Core persistence; bookings include payment-status handling and downloadable PDF/QR tickets. Several frontend pages and API controllers were not excerpted, so those branches are represented at subsystem level and uncertain connections are omitted.

Main entry points: [`Program.cs`](https://github.com/roa-aw/eventsphere/blob/main/Program.cs) (API configuration), [`Data/AppDbContext.cs`](https://github.com/roa-aw/eventsphere/blob/main/Data/AppDbContext.cs) (EF Core context), [`eventsphere-frontend/src/App.js`](https://github.com/roa-aw/eventsphere/blob/main/eventsphere-frontend/src/App.js) (App navigation), [`Services/EventService.cs`](https://github.com/roa-aw/eventsphere/blob/main/Services/EventService.cs) (Event service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["App navigation<br/>[App.js]"]
  node_event_pages["Event pages"]
  node_booking_pages["Booking pages"]
  node_admin_pages["Admin pages"]
  node_client_api["API client<br/>[api.js]"]
end

subgraph group_api["API and identity"]
  node_auth_controller["Authentication<br/>[AuthController.cs]"]
  node_users_controller["User management<br/>[UsersController.cs]"]
  node_jwt["JWT service<br/>[JwtService.cs]"]
  node_event_controller["Event endpoints"]
  node_room_controller["Room endpoints<br/>[RoomsController.cs]"]
  node_seat_controller["Seat endpoints<br/>[SeatController.cs]"]
  node_user_service["User service<br/>[UserService.cs]"]
  node_app_start["API configuration<br/>[Program.cs]"]
end

subgraph group_events["Events and venues"]
  node_event_service["Event service<br/>[EventService.cs]"]
  node_room_service["Room service<br/>[RoomService.cs]"]
end

subgraph group_bookings["Booking and tickets"]
  node_booking_controller["Booking endpoints"]
  node_booking_service["Booking service<br/>[BookingService.cs]"]
  node_ticket_output["PDF and QR tickets"]
end

subgraph group_data["Persistence"]
  node_dbcontext["EF Core context<br/>[AppDbContext.cs]"]
  node_domain_entities["Domain entities"]
  node_audit_entity["Audit records<br/>[AuditLog.cs]"]
end

node_visitor(("User"))
node_postgres[("PostgreSQL")]

node_visitor -->|"uses"| node_app
node_app -->|"routes to"| node_event_pages
node_app -->|"routes to"| node_booking_pages
node_app -->|"routes to"| node_admin_pages
node_app -->|"loads profile"| node_client_api
node_app_start -->|"registers"| node_event_service
node_app_start -->|"registers"| node_room_service
node_app_start -->|"registers"| node_user_service
node_app_start -->|"registers"| node_booking_service
node_app_start -->|"registers"| node_jwt
node_app_start -->|"configures"| node_dbcontext
node_app_start -->|"connects"| node_postgres
node_auth_controller -->|"uses"| node_jwt
node_users_controller -.->|"uses"| node_user_service
node_event_controller -.->|"calls"| node_event_service
node_room_controller -.->|"calls"| node_room_service
node_booking_controller -->|"calls"| node_booking_service
node_booking_controller -->|"queries"| node_dbcontext
node_booking_controller -->|"generates"| node_ticket_output
node_event_service -->|"reads and writes"| node_dbcontext
node_event_service -->|"records changes"| node_audit_entity
node_room_service -.->|"reads and writes"| node_dbcontext
node_user_service -.->|"reads and writes"| node_dbcontext
node_booking_service -->|"reads and writes"| node_dbcontext
node_dbcontext -->|"maps"| node_domain_entities
node_dbcontext -->|"creates audit records"| node_audit_entity

click node_app "https://github.com/roa-aw/eventsphere/blob/main/eventsphere-frontend/src/App.js"
click node_event_pages "https://github.com/roa-aw/eventsphere/tree/main/eventsphere-frontend/src/pages"
click node_booking_pages "https://github.com/roa-aw/eventsphere/tree/main/eventsphere-frontend/src/pages"
click node_admin_pages "https://github.com/roa-aw/eventsphere/tree/main/eventsphere-frontend/src/pages"
click node_client_api "https://github.com/roa-aw/eventsphere/blob/main/eventsphere-frontend/src/services/api.js"
click node_auth_controller "https://github.com/roa-aw/eventsphere/blob/main/Controllers/AuthController.cs"
click node_users_controller "https://github.com/roa-aw/eventsphere/blob/main/Controllers/UsersController.cs"
click node_jwt "https://github.com/roa-aw/eventsphere/blob/main/Services/JwtService.cs"
click node_event_controller "https://github.com/roa-aw/eventsphere/blob/main/Controllers/EventsController.cs"
click node_room_controller "https://github.com/roa-aw/eventsphere/blob/main/Controllers/RoomsController.cs"
click node_seat_controller "https://github.com/roa-aw/eventsphere/blob/main/Controllers/SeatController.cs"
click node_booking_controller "https://github.com/roa-aw/eventsphere/blob/main/Controllers/BookingController.cs"
click node_event_service "https://github.com/roa-aw/eventsphere/blob/main/Services/EventService.cs"
click node_room_service "https://github.com/roa-aw/eventsphere/blob/main/Services/RoomService.cs"
click node_user_service "https://github.com/roa-aw/eventsphere/blob/main/Services/UserService.cs"
click node_booking_service "https://github.com/roa-aw/eventsphere/blob/main/Services/BookingService.cs"
click node_ticket_output "https://github.com/roa-aw/eventsphere/blob/main/Controllers/BookingController.cs"
click node_app_start "https://github.com/roa-aw/eventsphere/blob/main/Program.cs"
click node_dbcontext "https://github.com/roa-aw/eventsphere/blob/main/Data/AppDbContext.cs"
click node_domain_entities "https://github.com/roa-aw/eventsphere/tree/main/Entities"
click node_audit_entity "https://github.com/roa-aw/eventsphere/blob/main/Entities/AuditLog.cs"

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_event_pages,node_booking_pages,node_admin_pages,node_client_api,node_visitor toneBlue
class node_auth_controller,node_users_controller,node_jwt,node_event_controller,node_room_controller,node_seat_controller,node_user_service,node_app_start,node_postgres toneAmber
class node_event_service,node_room_service toneMint
class node_booking_controller,node_booking_service,node_ticket_output toneRose
class node_dbcontext,node_domain_entities,node_audit_entity toneIndigo
```

## Components

### Web client

- [App navigation](https://github.com/roa-aw/eventsphere/blob/main/eventsphere-frontend/src/App.js): `eventsphere-frontend/src/App.js`
- [Event pages](https://github.com/roa-aw/eventsphere/tree/main/eventsphere-frontend/src/pages): `eventsphere-frontend/src/pages`
- [Booking pages](https://github.com/roa-aw/eventsphere/tree/main/eventsphere-frontend/src/pages): `eventsphere-frontend/src/pages`
- [Admin pages](https://github.com/roa-aw/eventsphere/tree/main/eventsphere-frontend/src/pages): `eventsphere-frontend/src/pages`
- [API client](https://github.com/roa-aw/eventsphere/blob/main/eventsphere-frontend/src/services/api.js): `eventsphere-frontend/src/services/api.js`

### API and identity

- [Authentication](https://github.com/roa-aw/eventsphere/blob/main/Controllers/AuthController.cs): `Controllers/AuthController.cs`
- [User management](https://github.com/roa-aw/eventsphere/blob/main/Controllers/UsersController.cs): `Controllers/UsersController.cs`
- [JWT service](https://github.com/roa-aw/eventsphere/blob/main/Services/JwtService.cs): `Services/JwtService.cs`
- [Event endpoints](https://github.com/roa-aw/eventsphere/blob/main/Controllers/EventsController.cs): `Controllers/EventsController.cs`
- [Room endpoints](https://github.com/roa-aw/eventsphere/blob/main/Controllers/RoomsController.cs): `Controllers/RoomsController.cs`
- [Seat endpoints](https://github.com/roa-aw/eventsphere/blob/main/Controllers/SeatController.cs): `Controllers/SeatController.cs`
- [User service](https://github.com/roa-aw/eventsphere/blob/main/Services/UserService.cs): `Services/UserService.cs`
- [API configuration](https://github.com/roa-aw/eventsphere/blob/main/Program.cs): `Program.cs`

### Events and venues

- [Event service](https://github.com/roa-aw/eventsphere/blob/main/Services/EventService.cs): `Services/EventService.cs`
- [Room service](https://github.com/roa-aw/eventsphere/blob/main/Services/RoomService.cs): `Services/RoomService.cs`

### Booking and tickets

- [Booking endpoints](https://github.com/roa-aw/eventsphere/blob/main/Controllers/BookingController.cs): `Controllers/BookingController.cs`
- [Booking service](https://github.com/roa-aw/eventsphere/blob/main/Services/BookingService.cs): `Services/BookingService.cs`
- [PDF and QR tickets](https://github.com/roa-aw/eventsphere/blob/main/Controllers/BookingController.cs): `Controllers/BookingController.cs`

### Persistence

- [EF Core context](https://github.com/roa-aw/eventsphere/blob/main/Data/AppDbContext.cs): `Data/AppDbContext.cs`
- [Domain entities](https://github.com/roa-aw/eventsphere/tree/main/Entities): `Entities`
- [Audit records](https://github.com/roa-aw/eventsphere/blob/main/Entities/AuditLog.cs): `Entities/AuditLog.cs`

### Other components

- **User**
- **PostgreSQL**

## Connections

- User → App navigation: uses (evidence: `eventsphere-frontend/src/App.js`)
- App navigation → Event pages: routes to (evidence: `eventsphere-frontend/src/App.js`)
- App navigation → Booking pages: routes to (evidence: `eventsphere-frontend/src/App.js`)
- App navigation → Admin pages: routes to (evidence: `eventsphere-frontend/src/App.js`)
- App navigation → API client: loads profile (evidence: `eventsphere-frontend/src/App.js`)
- API configuration → Event service: registers (evidence: `Program.cs`)
- API configuration → Room service: registers (evidence: `Program.cs`)
- API configuration → User service: registers (evidence: `Program.cs`)
- API configuration → Booking service: registers (evidence: `Program.cs`)
- API configuration → JWT service: registers (evidence: `Program.cs`)
- API configuration → EF Core context: configures (evidence: `Program.cs`)
- API configuration → PostgreSQL: connects (evidence: `Program.cs`)
- Authentication → JWT service: uses (evidence: `Controllers/AuthController.cs`)
- User management → User service: uses
- Event endpoints → Event service: calls
- Room endpoints → Room service: calls
- Booking endpoints → Booking service: calls (evidence: `Controllers/BookingController.cs`)
- Booking endpoints → EF Core context: queries (evidence: `Controllers/BookingController.cs`)
- Booking endpoints → PDF and QR tickets: generates (evidence: `Controllers/BookingController.cs`)
- Event service → EF Core context: reads and writes (evidence: `Services/EventService.cs`)
- Event service → Audit records: records changes (evidence: `Services/EventService.cs`)
- Room service → EF Core context: reads and writes (evidence: `Services/RoomService.cs`)
- User service → EF Core context: reads and writes (evidence: `Services/UserService.cs`)
- Booking service → EF Core context: reads and writes (evidence: `Services/BookingService.cs`)
- EF Core context → Domain entities: maps (evidence: `Data/AppDbContext.cs`)
- EF Core context → Audit records: creates audit records (evidence: `Data/AppDbContext.cs`)
