# darshtulsiyan/bookmyevent architecture

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

- Interactive diagram: https://gitdiagram.com/darshtulsiyan/bookmyevent
- Repository: https://github.com/darshtulsiyan/bookmyevent

## Overview

BookMyEvent is a Rails event-ticketing application. Attendees browse approved upcoming events, select ticket quantities, submit a booking, and view the resulting bookings and individual Ticket IDs. Organizers create events and manage ticket tiers; admins review pending events. The graph preserves these documented capabilities, including sold-out handling. Some controllers and models were not excerpted, so documented relationships are cited to the README; internal calls are shown only where visible in excerpts.

Main entry points: [`config/routes.rb`](https://github.com/darshtulsiyan/bookmyevent/blob/main/config/routes.rb) (Rails routes), [`app/controllers/events_controller.rb`](https://github.com/darshtulsiyan/bookmyevent/blob/main/app/controllers/events_controller.rb) (Event requests), [`app/models/booking.rb`](https://github.com/darshtulsiyan/bookmyevent/blob/main/app/models/booking.rb) (Booking operation), [`app/controllers/sessions_controller.rb`](https://github.com/darshtulsiyan/bookmyevent/blob/main/app/controllers/sessions_controller.rb) (Login and logout)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Web entry"]
  node_routes["Rails routes<br/>[routes.rb]"]
end

subgraph group_accounts["Accounts and roles"]
  node_sessions["Login and logout"]
  node_users["User registration"]
  node_account["Account page<br/>[home_controller.rb]"]
  node_user_model["User records<br/>[user.rb]"]
  node_admin["Admin dashboard"]
end

subgraph group_events["Event management"]
  node_event_controller["Event requests"]
  node_event_model["Event rules<br/>[event.rb]"]
  node_event_store[("Event records<br/>[schema.rb]")]
  node_tier_controller["Tier management"]
  node_tier_model["Ticket tier rules<br/>[ticket_tier.rb]"]
end

subgraph group_ticketing["Ticketing"]
  node_booking_controller["Booking requests"]
  node_booking_model["Booking operation<br/>[booking.rb]"]
  node_ticket_controller["My Tickets"]
  node_ticket_model["Ticket records<br/>[ticket.rb]"]
  node_database[("Application records<br/>[schema.rb]")]
end

node_visitor(("Browser user"))

node_visitor -->|"sends requests"| node_routes
node_routes -->|"routes login"| node_sessions
node_routes -->|"routes signup"| node_users
node_routes -->|"routes account"| node_account
node_routes -->|"routes events"| node_event_controller
node_routes -->|"routes tiers"| node_tier_controller
node_routes -->|"routes bookings"| node_booking_controller
node_routes -->|"routes tickets"| node_ticket_controller
node_routes -->|"routes admin"| node_admin
node_sessions -.->|"authenticates users"| node_user_model
node_users -.->|"registers accounts"| node_user_model
node_event_controller -->|"queries and updates"| node_event_model
node_event_controller -.->|"admin review"| node_admin
node_tier_controller -.->|"manages tiers"| node_tier_model
node_booking_controller -->|"places booking"| node_booking_model
node_booking_model -.->|"creates tickets"| node_ticket_model
node_ticket_controller -.->|"lists ticket IDs"| node_ticket_model
node_event_model -.->|"persists events"| node_event_store
node_booking_model -.->|"stores bookings"| node_database

click node_routes "https://github.com/darshtulsiyan/bookmyevent/blob/main/config/routes.rb"
click node_sessions "https://github.com/darshtulsiyan/bookmyevent/blob/main/app/controllers/sessions_controller.rb"
click node_users "https://github.com/darshtulsiyan/bookmyevent/blob/main/app/controllers/users_controller.rb"
click node_account "https://github.com/darshtulsiyan/bookmyevent/blob/main/app/controllers/home_controller.rb"
click node_user_model "https://github.com/darshtulsiyan/bookmyevent/blob/main/app/models/user.rb"
click node_admin "https://github.com/darshtulsiyan/bookmyevent/blob/main/app/controllers/admin_controller.rb"
click node_event_controller "https://github.com/darshtulsiyan/bookmyevent/blob/main/app/controllers/events_controller.rb"
click node_event_model "https://github.com/darshtulsiyan/bookmyevent/blob/main/app/models/event.rb"
click node_event_store "https://github.com/darshtulsiyan/bookmyevent/blob/main/db/schema.rb"
click node_tier_controller "https://github.com/darshtulsiyan/bookmyevent/blob/main/app/controllers/ticket_tiers_controller.rb"
click node_tier_model "https://github.com/darshtulsiyan/bookmyevent/blob/main/app/models/ticket_tier.rb"
click node_booking_controller "https://github.com/darshtulsiyan/bookmyevent/blob/main/app/controllers/bookings_controller.rb"
click node_booking_model "https://github.com/darshtulsiyan/bookmyevent/blob/main/app/models/booking.rb"
click node_ticket_controller "https://github.com/darshtulsiyan/bookmyevent/blob/main/app/controllers/tickets_controller.rb"
click node_ticket_model "https://github.com/darshtulsiyan/bookmyevent/blob/main/app/models/ticket.rb"
click node_database "https://github.com/darshtulsiyan/bookmyevent/blob/main/db/schema.rb"

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_routes,node_visitor toneBlue
class node_sessions,node_users,node_account,node_user_model,node_admin toneAmber
class node_event_controller,node_event_model,node_event_store,node_tier_controller,node_tier_model toneMint
class node_booking_controller,node_booking_model,node_ticket_controller,node_ticket_model,node_database toneRose
```

## Components

### Web entry

- [Rails routes](https://github.com/darshtulsiyan/bookmyevent/blob/main/config/routes.rb): `config/routes.rb`

### Accounts and roles

- [Login and logout](https://github.com/darshtulsiyan/bookmyevent/blob/main/app/controllers/sessions_controller.rb): `app/controllers/sessions_controller.rb`
- [User registration](https://github.com/darshtulsiyan/bookmyevent/blob/main/app/controllers/users_controller.rb): `app/controllers/users_controller.rb`
- [Account page](https://github.com/darshtulsiyan/bookmyevent/blob/main/app/controllers/home_controller.rb): `app/controllers/home_controller.rb`
- [User records](https://github.com/darshtulsiyan/bookmyevent/blob/main/app/models/user.rb): `app/models/user.rb`
- [Admin dashboard](https://github.com/darshtulsiyan/bookmyevent/blob/main/app/controllers/admin_controller.rb): `app/controllers/admin_controller.rb`

### Event management

- [Event requests](https://github.com/darshtulsiyan/bookmyevent/blob/main/app/controllers/events_controller.rb): `app/controllers/events_controller.rb`
- [Event rules](https://github.com/darshtulsiyan/bookmyevent/blob/main/app/models/event.rb): `app/models/event.rb`
- [Event records](https://github.com/darshtulsiyan/bookmyevent/blob/main/db/schema.rb): `db/schema.rb`
- [Tier management](https://github.com/darshtulsiyan/bookmyevent/blob/main/app/controllers/ticket_tiers_controller.rb): `app/controllers/ticket_tiers_controller.rb`
- [Ticket tier rules](https://github.com/darshtulsiyan/bookmyevent/blob/main/app/models/ticket_tier.rb): `app/models/ticket_tier.rb`

### Ticketing

- [Booking requests](https://github.com/darshtulsiyan/bookmyevent/blob/main/app/controllers/bookings_controller.rb): `app/controllers/bookings_controller.rb`
- [Booking operation](https://github.com/darshtulsiyan/bookmyevent/blob/main/app/models/booking.rb): `app/models/booking.rb`
- [My Tickets](https://github.com/darshtulsiyan/bookmyevent/blob/main/app/controllers/tickets_controller.rb): `app/controllers/tickets_controller.rb`
- [Ticket records](https://github.com/darshtulsiyan/bookmyevent/blob/main/app/models/ticket.rb): `app/models/ticket.rb`
- [Application records](https://github.com/darshtulsiyan/bookmyevent/blob/main/db/schema.rb): `db/schema.rb`

### Other components

- **Browser user**

## Connections

- Browser user → Rails routes: sends requests (evidence: `config/routes.rb`)
- Rails routes → Login and logout: routes login (evidence: `config/routes.rb`)
- Rails routes → User registration: routes signup (evidence: `config/routes.rb`)
- Rails routes → Account page: routes account (evidence: `config/routes.rb`)
- Rails routes → Event requests: routes events (evidence: `config/routes.rb`)
- Rails routes → Tier management: routes tiers (evidence: `config/routes.rb`)
- Rails routes → Booking requests: routes bookings (evidence: `config/routes.rb`)
- Rails routes → My Tickets: routes tickets (evidence: `config/routes.rb`)
- Rails routes → Admin dashboard: routes admin (evidence: `config/routes.rb`)
- Login and logout → User records: authenticates users
- User registration → User records: registers accounts (evidence: `README.md`)
- Event requests → Event rules: queries and updates (evidence: `app/controllers/events_controller.rb`)
- Event requests → Admin dashboard: admin review (evidence: `README.md`)
- Tier management → Ticket tier rules: manages tiers (evidence: `README.md`)
- Booking requests → Booking operation: places booking (evidence: `app/controllers/bookings_controller.rb`)
- Booking operation → Ticket records: creates tickets (evidence: `README.md`)
- My Tickets → Ticket records: lists ticket IDs (evidence: `README.md`)
- Event rules → Event records: persists events (evidence: `README.md`)
- Booking operation → Application records: stores bookings (evidence: `README.md`)
