# rishi07jain/eventora architecture

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

- Interactive diagram: https://gitdiagram.com/rishi07jain/eventora
- Repository: https://github.com/rishi07jain/eventora

## Overview

Eventora is an event discovery, management, and ticket-booking platform. Visitors browse events; users register and verify by email OTP, then request a booking using another OTP; admins manage events and review bookings, with confirmed bookings updating seat counts and triggering email notifications. The graph follows the documented and sampled client/API flow. Several page and route implementations are unsampled, so their links are shown only where supported by the README or sampled code; no payment processor is evidenced.

Main entry points: [`client/src/App.jsx`](https://github.com/rishi07jain/eventora/blob/main/client/src/App.jsx) (Application router), [`client/src/utils/axios.js`](https://github.com/rishi07jain/eventora/blob/main/client/src/utils/axios.js) (HTTP client), [`server/controllers/bookingController.js`](https://github.com/rishi07jain/eventora/blob/main/server/controllers/bookingController.js) (Booking workflow), [`server/index.js`](https://github.com/rishi07jain/eventora/blob/main/server/index.js) (Express API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["Application router<br/>[App.jsx]"]
  node_auth_ui["Auth context<br/>[AuthContext.jsx]"]
  node_api_client["HTTP client<br/>[axios.js]"]
  node_home["Event browsing<br/>[Home.jsx]"]
  node_event_detail["Event details<br/>[EventDetail.jsx]"]
  node_login["Login and registration<br/>[Login.jsx]"]
  node_register["Registration<br/>[Register.jsx]"]
  node_user_dashboard["User bookings<br/>[UserDashboard.jsx]"]
  node_admin_dashboard["Admin operations<br/>[AdminDashboard.jsx]"]
  node_payment_results["Payment result pages<br/>[PaymentSuccess.jsx]"]
end

subgraph group_api["API layer"]
  node_server["Express API<br/>[index.js]"]
  node_auth_routes["Authentication routes<br/>[auth.js]"]
  node_event_routes["Event routes<br/>[events.js]"]
  node_booking_routes["Booking routes<br/>[bookings.js]"]
  node_auth_middleware["Access control<br/>[auth.js]"]
end

subgraph group_domain["Event and booking domain"]
  node_auth_controller["Authentication logic<br/>[authController.js]"]
  node_event_controller["Event management<br/>[eventController.js]"]
  node_booking_controller["Booking workflow"]
end

subgraph group_services["Persistence and email"]
  node_user_model["User model<br/>[User.js]"]
  node_event_model["Event model<br/>[Event.js]"]
  node_booking_model["Booking model<br/>[Bookings.js]"]
  node_otp_model["OTP model<br/>[OTP.js]"]
  node_email["Email delivery<br/>[email.js]"]
end

node_visitor(("Visitor or user"))
node_database[("MongoDB")]
node_mail_service(("Gmail SMTP"))

node_visitor -->|"uses"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_event_detail
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_register
node_app -->|"routes to"| node_user_dashboard
node_app -->|"routes to"| node_admin_dashboard
node_app -->|"routes to"| node_payment_results
node_auth_ui -->|"sends auth requests"| node_api_client
node_home -->|"requests events"| node_api_client
node_event_detail -->|"requests booking"| node_api_client
node_user_dashboard -->|"requests bookings"| node_api_client
node_admin_dashboard -->|"manages events and bookings"| node_api_client
node_api_client -->|"sends API requests"| node_server
node_server -->|"mounts"| node_auth_routes
node_server -->|"mounts"| node_event_routes
node_server -->|"mounts"| node_booking_routes
node_auth_routes -->|"dispatches"| node_auth_controller
node_event_routes -->|"dispatches"| node_event_controller
node_booking_routes -->|"dispatches"| node_booking_controller
node_auth_controller -->|"reads and writes"| node_user_model
node_auth_controller -->|"manages verification codes"| node_otp_model
node_auth_controller -->|"sends verification code"| node_email
node_event_controller -->|"reads and writes"| node_event_model
node_booking_controller -->|"creates and updates bookings"| node_booking_model
node_booking_controller -->|"checks and updates seats"| node_event_model
node_booking_controller -->|"verifies booking code"| node_otp_model
node_booking_controller -->|"sends booking notifications"| node_email
node_auth_routes -.->|"uses protection"| node_auth_middleware
node_event_routes -.->|"uses access control"| node_auth_middleware
node_booking_routes -.->|"uses access control"| node_auth_middleware
node_auth_middleware -->|"loads user"| node_user_model
node_user_model -->|"persists users"| node_database
node_event_model -->|"persists events"| node_database
node_booking_model -->|"persists bookings"| node_database
node_otp_model -->|"persists codes"| node_database
node_email -->|"sends mail"| node_mail_service

click node_app "https://github.com/rishi07jain/eventora/blob/main/client/src/App.jsx"
click node_auth_ui "https://github.com/rishi07jain/eventora/blob/main/client/src/context/AuthContext.jsx"
click node_api_client "https://github.com/rishi07jain/eventora/blob/main/client/src/utils/axios.js"
click node_home "https://github.com/rishi07jain/eventora/blob/main/client/src/pages/Home.jsx"
click node_event_detail "https://github.com/rishi07jain/eventora/blob/main/client/src/pages/EventDetail.jsx"
click node_login "https://github.com/rishi07jain/eventora/blob/main/client/src/pages/Login.jsx"
click node_register "https://github.com/rishi07jain/eventora/blob/main/client/src/pages/Register.jsx"
click node_user_dashboard "https://github.com/rishi07jain/eventora/blob/main/client/src/pages/UserDashboard.jsx"
click node_admin_dashboard "https://github.com/rishi07jain/eventora/blob/main/client/src/pages/AdminDashboard.jsx"
click node_payment_results "https://github.com/rishi07jain/eventora/blob/main/client/src/pages/PaymentSuccess.jsx"
click node_server "https://github.com/rishi07jain/eventora/blob/main/server/index.js"
click node_auth_routes "https://github.com/rishi07jain/eventora/blob/main/server/routes/auth.js"
click node_event_routes "https://github.com/rishi07jain/eventora/blob/main/server/routes/events.js"
click node_booking_routes "https://github.com/rishi07jain/eventora/blob/main/server/routes/bookings.js"
click node_auth_controller "https://github.com/rishi07jain/eventora/blob/main/server/controllers/authController.js"
click node_event_controller "https://github.com/rishi07jain/eventora/blob/main/server/controllers/eventController.js"
click node_booking_controller "https://github.com/rishi07jain/eventora/blob/main/server/controllers/bookingController.js"
click node_auth_middleware "https://github.com/rishi07jain/eventora/blob/main/server/middleware/auth.js"
click node_user_model "https://github.com/rishi07jain/eventora/blob/main/server/models/User.js"
click node_event_model "https://github.com/rishi07jain/eventora/blob/main/server/models/Event.js"
click node_booking_model "https://github.com/rishi07jain/eventora/blob/main/server/models/Bookings.js"
click node_otp_model "https://github.com/rishi07jain/eventora/blob/main/server/models/OTP.js"
click node_email "https://github.com/rishi07jain/eventora/blob/main/server/utils/email.js"

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_ui,node_api_client,node_home,node_event_detail,node_login,node_register,node_user_dashboard,node_admin_dashboard,node_payment_results,node_visitor toneBlue
class node_server,node_auth_routes,node_event_routes,node_booking_routes,node_auth_middleware,node_database toneAmber
class node_auth_controller,node_event_controller,node_booking_controller toneMint
class node_user_model,node_event_model,node_booking_model,node_otp_model,node_email toneRose
class node_mail_service toneIndigo
```

## Components

### Web client

- [Application router](https://github.com/rishi07jain/eventora/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Auth context](https://github.com/rishi07jain/eventora/blob/main/client/src/context/AuthContext.jsx): `client/src/context/AuthContext.jsx`
- [HTTP client](https://github.com/rishi07jain/eventora/blob/main/client/src/utils/axios.js): `client/src/utils/axios.js`
- [Event browsing](https://github.com/rishi07jain/eventora/blob/main/client/src/pages/Home.jsx): `client/src/pages/Home.jsx`
- [Event details](https://github.com/rishi07jain/eventora/blob/main/client/src/pages/EventDetail.jsx): `client/src/pages/EventDetail.jsx`
- [Login and registration](https://github.com/rishi07jain/eventora/blob/main/client/src/pages/Login.jsx): `client/src/pages/Login.jsx`
- [Registration](https://github.com/rishi07jain/eventora/blob/main/client/src/pages/Register.jsx): `client/src/pages/Register.jsx`
- [User bookings](https://github.com/rishi07jain/eventora/blob/main/client/src/pages/UserDashboard.jsx): `client/src/pages/UserDashboard.jsx`
- [Admin operations](https://github.com/rishi07jain/eventora/blob/main/client/src/pages/AdminDashboard.jsx): `client/src/pages/AdminDashboard.jsx`
- [Payment result pages](https://github.com/rishi07jain/eventora/blob/main/client/src/pages/PaymentSuccess.jsx): `client/src/pages/PaymentSuccess.jsx`

### API layer

- [Express API](https://github.com/rishi07jain/eventora/blob/main/server/index.js): `server/index.js`
- [Authentication routes](https://github.com/rishi07jain/eventora/blob/main/server/routes/auth.js): `server/routes/auth.js`
- [Event routes](https://github.com/rishi07jain/eventora/blob/main/server/routes/events.js): `server/routes/events.js`
- [Booking routes](https://github.com/rishi07jain/eventora/blob/main/server/routes/bookings.js): `server/routes/bookings.js`
- [Access control](https://github.com/rishi07jain/eventora/blob/main/server/middleware/auth.js): `server/middleware/auth.js`

### Event and booking domain

- [Authentication logic](https://github.com/rishi07jain/eventora/blob/main/server/controllers/authController.js): `server/controllers/authController.js`
- [Event management](https://github.com/rishi07jain/eventora/blob/main/server/controllers/eventController.js): `server/controllers/eventController.js`
- [Booking workflow](https://github.com/rishi07jain/eventora/blob/main/server/controllers/bookingController.js): `server/controllers/bookingController.js`

### Persistence and email

- [User model](https://github.com/rishi07jain/eventora/blob/main/server/models/User.js): `server/models/User.js`
- [Event model](https://github.com/rishi07jain/eventora/blob/main/server/models/Event.js): `server/models/Event.js`
- [Booking model](https://github.com/rishi07jain/eventora/blob/main/server/models/Bookings.js): `server/models/Bookings.js`
- [OTP model](https://github.com/rishi07jain/eventora/blob/main/server/models/OTP.js): `server/models/OTP.js`
- [Email delivery](https://github.com/rishi07jain/eventora/blob/main/server/utils/email.js): `server/utils/email.js`

### Other components

- **Visitor or user**
- **MongoDB**
- **Gmail SMTP**

## Connections

- Visitor or user → Application router: uses
- Application router → Event browsing: routes to
- Application router → Event details: routes to
- Application router → Login and registration: routes to
- Application router → Registration: routes to
- Application router → User bookings: routes to
- Application router → Admin operations: routes to
- Application router → Payment result pages: routes to
- Auth context → HTTP client: sends auth requests
- Event browsing → HTTP client: requests events
- Event details → HTTP client: requests booking
- User bookings → HTTP client: requests bookings
- Admin operations → HTTP client: manages events and bookings
- HTTP client → Express API: sends API requests
- Express API → Authentication routes: mounts
- Express API → Event routes: mounts
- Express API → Booking routes: mounts
- Authentication routes → Authentication logic: dispatches
- Event routes → Event management: dispatches
- Booking routes → Booking workflow: dispatches
- Authentication logic → User model: reads and writes
- Authentication logic → OTP model: manages verification codes
- Authentication logic → Email delivery: sends verification code
- Event management → Event model: reads and writes
- Booking workflow → Booking model: creates and updates bookings
- Booking workflow → Event model: checks and updates seats
- Booking workflow → OTP model: verifies booking code
- Booking workflow → Email delivery: sends booking notifications
- Authentication routes → Access control: uses protection
- Event routes → Access control: uses access control
- Booking routes → Access control: uses access control
- Access control → User model: loads user
- User model → MongoDB: persists users
- Event model → MongoDB: persists events
- Booking model → MongoDB: persists bookings
- OTP model → MongoDB: persists codes
- Email delivery → Gmail SMTP: sends mail
