# tapan48/event_ticket_booking_api architecture

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

- Interactive diagram: https://gitdiagram.com/tapan48/event_ticket_booking_api
- Repository: https://github.com/tapan48/event_ticket_booking_api

## Overview

This is an event-ticketing marketplace: attendees discover events, reserve tickets, pay, and use tickets for entry; organizers manage venues, events, ticket tiers, and check-in. The React app routes users through these tasks and calls a Django REST API. Booking logic locks stock and updates orders transactionally; Celery handles expiry and ticket email. The README documents the runtime and API workflow. Some backend capabilities are represented at subsystem level because their detailed source was not sampled.

Main entry points: [`frontend/src/App.tsx`](https://github.com/tapan48/event_ticket_booking_api/blob/main/frontend/src/App.tsx) (App routing), [`apps/orders/tasks.py`](https://github.com/tapan48/event_ticket_booking_api/blob/main/apps/orders/tasks.py) (Celery tasks), [`apps/orders/services.py`](https://github.com/tapan48/event_ticket_booking_api/blob/main/apps/orders/services.py) (Booking services), [`frontend/src/lib/api.ts`](https://github.com/tapan48/event_ticket_booking_api/blob/main/frontend/src/lib/api.ts) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_app["App routing<br/>[App.tsx]"]
  node_auth["Session and auth<br/>[auth.tsx]"]
  node_catalogui["Event browsing<br/>[catalog.tsx]"]
  node_accountui["Account profile<br/>[account.tsx]"]
  node_ordersui["Orders and tickets<br/>[orders.tsx]"]
  node_organizerui["Organizer workspace<br/>[organizer.tsx]"]
  node_sharedui["Shared components<br/>[shared.tsx]"]
  node_button["Button control<br/>[button.tsx]"]
  node_input["Input control<br/>[input.tsx]"]
  node_dialog["Dialog control<br/>[dialog.tsx]"]
  node_format["Display formatting<br/>[format.ts]"]
  node_api_client["API client<br/>[api.ts]"]
  node_api_types["API types<br/>[types.ts]"]
end

subgraph group_identity["Identity and catalog"]
  node_account_api["Account endpoints<br/>[views.py]"]
  node_event_api["Event catalog API<br/>[views.py]"]
  node_event_rules["Catalog filters<br/>[filters.py]"]
  node_event_data[("Events and inventory<br/>[models.py]")]
end

subgraph group_booking["Booking and entry"]
  node_booking_api["Order and check-in API<br/>[views.py]"]
  node_booking_logic["Booking services<br/>[services.py]"]
  node_order_data[("Orders and tickets<br/>[models.py]")]
end

subgraph group_async["Background processing"]
  node_worker["Celery tasks<br/>[tasks.py]"]
  node_email["Ticket email<br/>[emails.py]"]
  node_redis["Redis broker"]
end

subgraph group_platform["Shared platform"]
  node_django["Django API<br/>[api_router.py]"]
  node_permission["Access permissions<br/>[permissions.py]"]
  node_postgres[("PostgreSQL")]
  node_common_models["Shared model base<br/>[models.py]"]
end

node_attendee(("Attendee"))
node_organizer(("Organizer"))
node_staff(("Staff"))

node_attendee -->|"uses"| node_app
node_organizer -->|"uses"| node_app
node_staff -->|"uses"| node_app
node_app -->|"provides auth"| node_auth
node_app -->|"routes to"| node_catalogui
node_app -->|"routes to"| node_accountui
node_app -->|"routes to"| node_ordersui
node_app -->|"routes to"| node_organizerui
node_auth -->|"calls"| node_api_client
node_catalogui -->|"calls"| node_api_client
node_organizerui -->|"calls"| node_api_client
node_sharedui -->|"formats with"| node_format
node_sharedui -->|"renders"| node_button
node_organizerui -->|"renders"| node_input
node_organizerui -->|"uses"| node_dialog
node_api_client -->|"uses types"| node_api_types
node_api_client -->|"requests"| node_django
node_django -->|"routes to"| node_account_api
node_django -->|"routes to"| node_event_api
node_django -->|"routes to"| node_booking_api
node_event_api -->|"filters with"| node_event_rules
node_event_api -->|"queries"| node_event_data
node_event_api -->|"checks access"| node_permission
node_booking_api -->|"calls"| node_booking_logic
node_booking_api -->|"queries"| node_order_data
node_booking_api -->|"checks access"| node_permission
node_booking_logic -->|"locks inventory"| node_event_data
node_booking_logic -->|"creates and updates"| node_order_data
node_booking_logic -->|"queues email"| node_worker
node_worker -->|"expires orders"| node_booking_logic
node_worker -->|"loads paid orders"| node_order_data
node_worker -->|"sends tickets"| node_email
node_worker -.->|"uses broker"| node_redis
node_event_data -->|"persists"| node_postgres
node_order_data -->|"persists"| node_postgres
node_event_data -->|"inherits"| node_common_models
node_order_data -->|"inherits"| node_common_models
node_email -.->|"reads order data"| node_postgres

click node_app "https://github.com/tapan48/event_ticket_booking_api/blob/main/frontend/src/App.tsx"
click node_auth "https://github.com/tapan48/event_ticket_booking_api/blob/main/frontend/src/auth.tsx"
click node_catalogui "https://github.com/tapan48/event_ticket_booking_api/blob/main/frontend/src/pages/catalog.tsx"
click node_accountui "https://github.com/tapan48/event_ticket_booking_api/blob/main/frontend/src/pages/account.tsx"
click node_ordersui "https://github.com/tapan48/event_ticket_booking_api/blob/main/frontend/src/pages/orders.tsx"
click node_organizerui "https://github.com/tapan48/event_ticket_booking_api/blob/main/frontend/src/pages/organizer.tsx"
click node_sharedui "https://github.com/tapan48/event_ticket_booking_api/blob/main/frontend/src/components/shared.tsx"
click node_button "https://github.com/tapan48/event_ticket_booking_api/blob/main/frontend/src/components/ui/button.tsx"
click node_input "https://github.com/tapan48/event_ticket_booking_api/blob/main/frontend/src/components/ui/input.tsx"
click node_dialog "https://github.com/tapan48/event_ticket_booking_api/blob/main/frontend/src/components/ui/dialog.tsx"
click node_format "https://github.com/tapan48/event_ticket_booking_api/blob/main/frontend/src/lib/format.ts"
click node_api_client "https://github.com/tapan48/event_ticket_booking_api/blob/main/frontend/src/lib/api.ts"
click node_api_types "https://github.com/tapan48/event_ticket_booking_api/blob/main/frontend/src/lib/types.ts"
click node_django "https://github.com/tapan48/event_ticket_booking_api/blob/main/config/api_router.py"
click node_account_api "https://github.com/tapan48/event_ticket_booking_api/blob/main/apps/accounts/views.py"
click node_event_api "https://github.com/tapan48/event_ticket_booking_api/blob/main/apps/events/views.py"
click node_event_rules "https://github.com/tapan48/event_ticket_booking_api/blob/main/apps/events/filters.py"
click node_event_data "https://github.com/tapan48/event_ticket_booking_api/blob/main/apps/events/models.py"
click node_permission "https://github.com/tapan48/event_ticket_booking_api/blob/main/common/permissions.py"
click node_booking_api "https://github.com/tapan48/event_ticket_booking_api/blob/main/apps/orders/views.py"
click node_booking_logic "https://github.com/tapan48/event_ticket_booking_api/blob/main/apps/orders/services.py"
click node_order_data "https://github.com/tapan48/event_ticket_booking_api/blob/main/apps/orders/models.py"
click node_worker "https://github.com/tapan48/event_ticket_booking_api/blob/main/apps/orders/tasks.py"
click node_email "https://github.com/tapan48/event_ticket_booking_api/blob/main/apps/orders/emails.py"
click node_common_models "https://github.com/tapan48/event_ticket_booking_api/blob/main/common/models.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_auth,node_catalogui,node_accountui,node_ordersui,node_organizerui,node_sharedui,node_button,node_input,node_dialog,node_format,node_api_client,node_api_types toneBlue
class node_account_api,node_event_api,node_event_rules,node_event_data toneAmber
class node_booking_api,node_booking_logic,node_order_data toneMint
class node_worker,node_email,node_redis toneRose
class node_django,node_permission,node_postgres,node_common_models,node_attendee,node_organizer,node_staff toneIndigo
```

## Components

### Web application

- [App routing](https://github.com/tapan48/event_ticket_booking_api/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Session and auth](https://github.com/tapan48/event_ticket_booking_api/blob/main/frontend/src/auth.tsx): `frontend/src/auth.tsx`
- [Event browsing](https://github.com/tapan48/event_ticket_booking_api/blob/main/frontend/src/pages/catalog.tsx): `frontend/src/pages/catalog.tsx`
- [Account profile](https://github.com/tapan48/event_ticket_booking_api/blob/main/frontend/src/pages/account.tsx): `frontend/src/pages/account.tsx`
- [Orders and tickets](https://github.com/tapan48/event_ticket_booking_api/blob/main/frontend/src/pages/orders.tsx): `frontend/src/pages/orders.tsx`
- [Organizer workspace](https://github.com/tapan48/event_ticket_booking_api/blob/main/frontend/src/pages/organizer.tsx): `frontend/src/pages/organizer.tsx`
- [Shared components](https://github.com/tapan48/event_ticket_booking_api/blob/main/frontend/src/components/shared.tsx): `frontend/src/components/shared.tsx`
- [Button control](https://github.com/tapan48/event_ticket_booking_api/blob/main/frontend/src/components/ui/button.tsx): `frontend/src/components/ui/button.tsx`
- [Input control](https://github.com/tapan48/event_ticket_booking_api/blob/main/frontend/src/components/ui/input.tsx): `frontend/src/components/ui/input.tsx`
- [Dialog control](https://github.com/tapan48/event_ticket_booking_api/blob/main/frontend/src/components/ui/dialog.tsx): `frontend/src/components/ui/dialog.tsx`
- [Display formatting](https://github.com/tapan48/event_ticket_booking_api/blob/main/frontend/src/lib/format.ts): `frontend/src/lib/format.ts`
- [API client](https://github.com/tapan48/event_ticket_booking_api/blob/main/frontend/src/lib/api.ts): `frontend/src/lib/api.ts`
- [API types](https://github.com/tapan48/event_ticket_booking_api/blob/main/frontend/src/lib/types.ts): `frontend/src/lib/types.ts`

### Identity and catalog

- [Account endpoints](https://github.com/tapan48/event_ticket_booking_api/blob/main/apps/accounts/views.py): `apps/accounts/views.py`
- [Event catalog API](https://github.com/tapan48/event_ticket_booking_api/blob/main/apps/events/views.py): `apps/events/views.py`
- [Catalog filters](https://github.com/tapan48/event_ticket_booking_api/blob/main/apps/events/filters.py): `apps/events/filters.py`
- [Events and inventory](https://github.com/tapan48/event_ticket_booking_api/blob/main/apps/events/models.py): `apps/events/models.py`

### Booking and entry

- [Order and check-in API](https://github.com/tapan48/event_ticket_booking_api/blob/main/apps/orders/views.py): `apps/orders/views.py`
- [Booking services](https://github.com/tapan48/event_ticket_booking_api/blob/main/apps/orders/services.py): `apps/orders/services.py`
- [Orders and tickets](https://github.com/tapan48/event_ticket_booking_api/blob/main/apps/orders/models.py): `apps/orders/models.py`

### Background processing

- [Celery tasks](https://github.com/tapan48/event_ticket_booking_api/blob/main/apps/orders/tasks.py): `apps/orders/tasks.py`
- [Ticket email](https://github.com/tapan48/event_ticket_booking_api/blob/main/apps/orders/emails.py): `apps/orders/emails.py`
- **Redis broker**

### Shared platform

- [Django API](https://github.com/tapan48/event_ticket_booking_api/blob/main/config/api_router.py): `config/api_router.py`
- [Access permissions](https://github.com/tapan48/event_ticket_booking_api/blob/main/common/permissions.py): `common/permissions.py`
- **PostgreSQL**
- [Shared model base](https://github.com/tapan48/event_ticket_booking_api/blob/main/common/models.py): `common/models.py`

### Other components

- **Attendee**
- **Organizer**
- **Staff**

## Connections

- Attendee → App routing: uses (evidence: `README.md`)
- Organizer → App routing: uses (evidence: `README.md`)
- Staff → App routing: uses (evidence: `README.md`)
- App routing → Session and auth: provides auth (evidence: `frontend/src/App.tsx`)
- App routing → Event browsing: routes to (evidence: `frontend/src/App.tsx`)
- App routing → Account profile: routes to (evidence: `frontend/src/App.tsx`)
- App routing → Orders and tickets: routes to (evidence: `frontend/src/App.tsx`)
- App routing → Organizer workspace: routes to (evidence: `frontend/src/App.tsx`)
- Session and auth → API client: calls (evidence: `frontend/src/auth.tsx`)
- Event browsing → API client: calls (evidence: `frontend/src/pages/catalog.tsx`)
- Organizer workspace → API client: calls (evidence: `frontend/src/pages/organizer.tsx`)
- Shared components → Display formatting: formats with (evidence: `frontend/src/components/shared.tsx`)
- Shared components → Button control: renders (evidence: `frontend/src/components/shared.tsx`)
- Organizer workspace → Input control: renders (evidence: `frontend/src/pages/organizer.tsx`)
- Organizer workspace → Dialog control: uses (evidence: `frontend/src/pages/organizer.tsx`)
- API client → API types: uses types (evidence: `frontend/src/lib/api.ts`)
- API client → Django API: requests (evidence: `README.md`)
- Django API → Account endpoints: routes to (evidence: `config/api_router.py`)
- Django API → Event catalog API: routes to (evidence: `config/api_router.py`)
- Django API → Order and check-in API: routes to (evidence: `config/api_router.py`)
- Event catalog API → Catalog filters: filters with (evidence: `apps/events/views.py`)
- Event catalog API → Events and inventory: queries (evidence: `apps/events/views.py`)
- Event catalog API → Access permissions: checks access (evidence: `apps/events/views.py`)
- Order and check-in API → Booking services: calls (evidence: `apps/orders/views.py`)
- Order and check-in API → Orders and tickets: queries (evidence: `apps/orders/views.py`)
- Order and check-in API → Access permissions: checks access (evidence: `apps/orders/views.py`)
- Booking services → Events and inventory: locks inventory (evidence: `apps/orders/services.py`)
- Booking services → Orders and tickets: creates and updates (evidence: `apps/orders/services.py`)
- Booking services → Celery tasks: queues email (evidence: `apps/orders/services.py`)
- Celery tasks → Booking services: expires orders (evidence: `apps/orders/tasks.py`)
- Celery tasks → Orders and tickets: loads paid orders (evidence: `apps/orders/tasks.py`)
- Celery tasks → Ticket email: sends tickets (evidence: `apps/orders/tasks.py`)
- Celery tasks → Redis broker: uses broker (evidence: `README.md`)
- Events and inventory → PostgreSQL: persists (evidence: `README.md`)
- Orders and tickets → PostgreSQL: persists (evidence: `README.md`)
- Events and inventory → Shared model base: inherits (evidence: `apps/events/models.py`)
- Orders and tickets → Shared model base: inherits (evidence: `apps/orders/models.py`)
- Ticket email → PostgreSQL: reads order data
