# roshdyosf/high-concurrency-ticketing-api architecture

> Architecture diagram of the GitHub repository roshdyosf/high-concurrency-ticketing-api, 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/roshdyosf/high-concurrency-ticketing-api
- Repository: https://github.com/roshdyosf/high-concurrency-ticketing-api

## Overview

This Laravel API supports event discovery and ticket booking, with organizers managing events and seating. The principal customer flow is catalog search, seat-map or adjacent-seat selection, booking with temporary locks, Stripe payment, and webhook-confirmed tickets with QR codes. Other major capabilities include authentication, moderation, discounts, event-scoped gatekeepers, and organizer-reviewed refunds. Sampled controller and service calls anchor the catalog and organizer branches; several README-documented subsystems were not sampled, so their links are marked unverified.

Main entry points: [`app/Services/EventCatalogService.php`](https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Services/EventCatalogService.php) (Catalog and seat map), [`app/Http/Controllers/Api/V1`](https://github.com/roshdyosf/high-concurrency-ticketing-api/tree/main/app/Http/Controllers/Api/V1) (Booking and checkout), [`app/Services/AuthService.php`](https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Services/AuthService.php) (Authentication), [`app/Http/Controllers/Api/V1/Auth/AuthController.php`](https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Http/Controllers/Api/V1/Auth/AuthController.php) (Auth API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and moderation"]
  node_auth_api["Auth API<br/>[AuthController.php]"]
  node_auth_service["Authentication<br/>[AuthService.php]"]
  node_user_store[("User accounts<br/>[User.php]")]
  node_verification["Email verification"]
  node_admin["Admin moderation"]
end

subgraph group_events["Event management"]
  node_catalog_api["Event catalog API"]
  node_catalog["Catalog and seat map"]
  node_seat_finder["Adjacent-seat finder"]
  node_event_store[("Events and discounts<br/>[Event.php]")]
  node_tier_store[("Ticket tiers<br/>[TicketTier.php]")]
  node_seat_store[("Seat inventory<br/>[Seat.php]")]
  node_organizer_api["Organizer event API"]
  node_organizer_events["Event creation"]
  node_organizer_seats["Seat generation"]
  node_organizer_tiers["Tier management"]
end

subgraph group_booking["Booking and payment"]
  node_booking["Booking and checkout"]
  node_holds["Seat holds"]
  node_locks["Atomic seat locks"]
  node_orders[("Orders and order items<br/>[Order.php]")]
  node_stripe["Stripe payments"]
  node_webhooks["Payment webhooks"]
end

subgraph group_operations["Ticket operations"]
  node_tickets[("Tickets and QR codes<br/>[Ticket.php]")]
  node_refunds[("Refund requests<br/>[RefundRequest.php]")]
  node_gatekeepers["Gatekeeper access"]
end

node_customer(("Customer"))
node_organizer(("Organizer"))
node_redis[("Redis")]

node_customer -->|"authenticates"| node_auth_api
node_auth_api -->|"delegates"| node_auth_service
node_auth_service -->|"creates users"| node_user_store
node_auth_service -.->|"sends verification"| node_verification
node_organizer -.->|"requests approval"| node_admin
node_customer -.->|"browses events"| node_catalog_api
node_catalog_api -->|"delegates"| node_catalog
node_catalog -->|"queries events"| node_event_store
node_catalog -->|"queries tiers"| node_tier_store
node_catalog -->|"reads seats"| node_seat_store
node_catalog -->|"finds adjacent seats"| node_seat_finder
node_organizer -.->|"creates events"| node_organizer_api
node_organizer_api -->|"delegates"| node_organizer_events
node_organizer -.->|"generates seats"| node_organizer_seats
node_organizer_seats -->|"inserts seats"| node_seat_store
node_organizer -.->|"manages tiers"| node_organizer_tiers
node_customer -.->|"books tickets"| node_booking
node_booking -.->|"places holds"| node_holds
node_holds -->|"acquires locks"| node_locks
node_locks -.->|"locks inventory"| node_redis
node_booking -.->|"creates orders"| node_orders
node_booking -.->|"charges payment"| node_stripe
node_stripe -.->|"confirms payment"| node_webhooks
node_webhooks -.->|"issues tickets"| node_tickets
node_customer -.->|"requests refund"| node_refunds
node_organizer -.->|"reviews request"| node_refunds
node_organizer -.->|"assigns access"| node_gatekeepers

click node_auth_api "https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Http/Controllers/Api/V1/Auth/AuthController.php"
click node_auth_service "https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Services/AuthService.php"
click node_user_store "https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Models/User.php"
click node_verification "https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Services/EmailVerificationService.php"
click node_admin "https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Services/OrganizerRequestService.php"
click node_catalog_api "https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Http/Controllers/Api/V1/Catalog/EventController.php"
click node_catalog "https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Services/EventCatalogService.php"
click node_seat_finder "https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Services/ContiguousSeatFinder.php"
click node_event_store "https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Models/Event.php"
click node_tier_store "https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Models/TicketTier.php"
click node_seat_store "https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Models/Seat.php"
click node_organizer_api "https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Http/Controllers/Api/V1/Organizer/EventController.php"
click node_organizer_events "https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Services/OrganizerEventService.php"
click node_organizer_seats "https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Services/OrganizerSeatService.php"
click node_organizer_tiers "https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Services/OrganizerTierService.php"
click node_booking "https://github.com/roshdyosf/high-concurrency-ticketing-api/tree/main/app/Http/Controllers/Api/V1"
click node_holds "https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Services/SeatHoldService.php"
click node_locks "https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Services/SeatLockService.php"
click node_orders "https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Models/Order.php"
click node_webhooks "https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Models/StripeWebhookEvent.php"
click node_tickets "https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Models/Ticket.php"
click node_refunds "https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Models/RefundRequest.php"
click node_gatekeepers "https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Services/GatekeeperAccessService.php"

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_auth_api,node_auth_service,node_user_store,node_verification,node_admin toneBlue
class node_catalog_api,node_catalog,node_seat_finder,node_event_store,node_tier_store,node_seat_store,node_organizer_api,node_organizer_events,node_organizer_seats,node_organizer_tiers,node_redis toneAmber
class node_booking,node_holds,node_locks,node_orders,node_stripe,node_webhooks toneMint
class node_tickets,node_refunds,node_gatekeepers toneRose
class node_customer,node_organizer toneIndigo
```

## Components

### Access and moderation

- [Auth API](https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Http/Controllers/Api/V1/Auth/AuthController.php): `app/Http/Controllers/Api/V1/Auth/AuthController.php`
- [Authentication](https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Services/AuthService.php): `app/Services/AuthService.php`
- [User accounts](https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Models/User.php): `app/Models/User.php`
- [Email verification](https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Services/EmailVerificationService.php): `app/Services/EmailVerificationService.php`
- [Admin moderation](https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Services/OrganizerRequestService.php): `app/Services/OrganizerRequestService.php`

### Event management

- [Event catalog API](https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Http/Controllers/Api/V1/Catalog/EventController.php): `app/Http/Controllers/Api/V1/Catalog/EventController.php`
- [Catalog and seat map](https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Services/EventCatalogService.php): `app/Services/EventCatalogService.php`
- [Adjacent-seat finder](https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Services/ContiguousSeatFinder.php): `app/Services/ContiguousSeatFinder.php`
- [Events and discounts](https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Models/Event.php): `app/Models/Event.php`
- [Ticket tiers](https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Models/TicketTier.php): `app/Models/TicketTier.php`
- [Seat inventory](https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Models/Seat.php): `app/Models/Seat.php`
- [Organizer event API](https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Http/Controllers/Api/V1/Organizer/EventController.php): `app/Http/Controllers/Api/V1/Organizer/EventController.php`
- [Event creation](https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Services/OrganizerEventService.php): `app/Services/OrganizerEventService.php`
- [Seat generation](https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Services/OrganizerSeatService.php): `app/Services/OrganizerSeatService.php`
- [Tier management](https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Services/OrganizerTierService.php): `app/Services/OrganizerTierService.php`

### Booking and payment

- [Booking and checkout](https://github.com/roshdyosf/high-concurrency-ticketing-api/tree/main/app/Http/Controllers/Api/V1): `app/Http/Controllers/Api/V1`
- [Seat holds](https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Services/SeatHoldService.php): `app/Services/SeatHoldService.php`
- [Atomic seat locks](https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Services/SeatLockService.php): `app/Services/SeatLockService.php`
- [Orders and order items](https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Models/Order.php): `app/Models/Order.php`
- **Stripe payments**
- [Payment webhooks](https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Models/StripeWebhookEvent.php): `app/Models/StripeWebhookEvent.php`

### Ticket operations

- [Tickets and QR codes](https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Models/Ticket.php): `app/Models/Ticket.php`
- [Refund requests](https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Models/RefundRequest.php): `app/Models/RefundRequest.php`
- [Gatekeeper access](https://github.com/roshdyosf/high-concurrency-ticketing-api/blob/main/app/Services/GatekeeperAccessService.php): `app/Services/GatekeeperAccessService.php`

### Other components

- **Customer**
- **Organizer**
- **Redis**

## Connections

- Customer → Auth API: authenticates
- Auth API → Authentication: delegates (evidence: `app/Http/Controllers/Api/V1/Auth/AuthController.php`)
- Authentication → User accounts: creates users (evidence: `app/Services/AuthService.php`)
- Authentication → Email verification: sends verification
- Organizer → Admin moderation: requests approval (evidence: `README.md`)
- Customer → Event catalog API: browses events (evidence: `README.md`)
- Event catalog API → Catalog and seat map: delegates (evidence: `app/Http/Controllers/Api/V1/Catalog/EventController.php`)
- Catalog and seat map → Events and discounts: queries events (evidence: `app/Services/EventCatalogService.php`)
- Catalog and seat map → Ticket tiers: queries tiers (evidence: `app/Services/EventCatalogService.php`)
- Catalog and seat map → Seat inventory: reads seats (evidence: `app/Services/EventCatalogService.php`)
- Catalog and seat map → Adjacent-seat finder: finds adjacent seats (evidence: `app/Services/EventCatalogService.php`)
- Organizer → Organizer event API: creates events (evidence: `README.md`)
- Organizer event API → Event creation: delegates (evidence: `app/Http/Controllers/Api/V1/Organizer/EventController.php`)
- Organizer → Seat generation: generates seats (evidence: `README.md`)
- Seat generation → Seat inventory: inserts seats (evidence: `app/Services/OrganizerSeatService.php`)
- Organizer → Tier management: manages tiers (evidence: `README.md`)
- Customer → Booking and checkout: books tickets (evidence: `README.md`)
- Booking and checkout → Seat holds: places holds (evidence: `README.md`)
- Seat holds → Atomic seat locks: acquires locks (evidence: `app/Services/SeatHoldService.php`)
- Atomic seat locks → Redis: locks inventory (evidence: `README.md`)
- Booking and checkout → Orders and order items: creates orders (evidence: `README.md`)
- Booking and checkout → Stripe payments: charges payment (evidence: `README.md`)
- Stripe payments → Payment webhooks: confirms payment (evidence: `README.md`)
- Payment webhooks → Tickets and QR codes: issues tickets (evidence: `README.md`)
- Customer → Refund requests: requests refund (evidence: `README.md`)
- Organizer → Refund requests: reviews request (evidence: `README.md`)
- Organizer → Gatekeeper access: assigns access (evidence: `README.md`)
