# rohanpathak06/evento2 architecture

> Architecture diagram of the GitHub repository rohanpathak06/evento2, 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/rohanpathak06/evento2
- Repository: https://github.com/rohanpathak06/evento2

## Overview

Eventora is an event discovery and booking platform: visitors browse events, register or log in with email OTP verification, request tickets with booking OTP, and track or cancel bookings; admins manage events and review bookings, including payment status. The graph follows the React routes through the API controllers to MongoDB-backed domain records, with email delivery as a separate integration. README capabilities are included, but detailed route-to-controller and client-to-endpoint wiring is only shown where the supplied excerpts or README support it.

Main entry points: [`client/src/App.jsx`](https://github.com/rohanpathak06/evento2/blob/main/client/src/App.jsx) (App routes), [`client/src/utils/axios.js`](https://github.com/rohanpathak06/evento2/blob/main/client/src/utils/axios.js) (API client), [`server/server.js`](https://github.com/rohanpathak06/evento2/blob/main/server/server.js) (API entry), [`server/controllers/bookingController.js`](https://github.com/rohanpathak06/evento2/blob/main/server/controllers/bookingController.js) (Booking workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["App routes<br/>[App.jsx]"]
  node_auth_ui["Auth state<br/>[AuthContext.jsx]"]
  node_browse_ui["Event browsing<br/>[Home.jsx]"]
  node_event_ui["Event booking<br/>[EventDetail.jsx]"]
  node_user_ui["User dashboard<br/>[UserDashboard.jsx]"]
  node_admin_ui["Admin dashboard<br/>[AdminDashboard.jsx]"]
  node_http_client["API client<br/>[axios.js]"]
end

subgraph group_api["API server"]
  node_api_entry["API entry<br/>[server.js]"]
  node_auth_routes["Auth routes<br/>[auth.js]"]
  node_event_routes["Event routes<br/>[events.js]"]
  node_booking_routes["Booking routes<br/>[bookings.js]"]
  node_auth_controller["Authentication<br/>[authController.js]"]
  node_event_controller["Event management<br/>[eventController.js]"]
  node_booking_controller["Booking workflow"]
  node_authorization["Access control<br/>[auth.js]"]
end

subgraph group_domain["Domain data"]
  node_users[("User records<br/>[User.js]")]
  node_otps[("OTP records<br/>[OTP.js]")]
  node_events[("Event records<br/>[Event.js]")]
  node_bookings[("Booking records<br/>[Booking.js]")]
end

subgraph group_integration["External services"]
  node_email_sender["Email delivery<br/>[email.js]"]
  node_mongo[("MongoDB")]
  node_email_service["Resend"]
end

node_visitor(("Visitor"))

node_visitor -->|"uses"| node_app
node_app -->|"routes to"| node_browse_ui
node_app -->|"routes to"| node_event_ui
node_app -->|"provides auth"| node_auth_ui
node_app -->|"routes to"| node_user_ui
node_app -->|"routes to"| node_admin_ui
node_auth_ui -->|"sends auth requests"| node_http_client
node_browse_ui -->|"requests events"| node_http_client
node_event_ui -->|"requests booking"| node_http_client
node_user_ui -->|"requests bookings"| node_http_client
node_admin_ui -->|"manages events bookings"| node_http_client
node_http_client -->|"calls API"| node_api_entry
node_api_entry -->|"mounts"| node_auth_routes
node_api_entry -->|"mounts"| node_event_routes
node_api_entry -->|"mounts"| node_booking_routes
node_auth_routes -->|"routes to"| node_auth_controller
node_event_routes -->|"routes to"| node_event_controller
node_booking_routes -->|"routes to"| node_booking_controller
node_booking_routes -->|"protects routes"| node_authorization
node_event_routes -->|"protects routes"| node_authorization
node_auth_controller -->|"reads and writes"| node_users
node_auth_controller -->|"reads and writes"| node_otps
node_auth_controller -->|"sends OTP"| node_email_sender
node_event_controller -->|"reads and writes"| node_events
node_booking_controller -->|"reads and writes"| node_bookings
node_booking_controller -->|"checks seats"| node_events
node_booking_controller -->|"verifies OTP"| node_otps
node_booking_controller -->|"sends notifications"| node_email_sender
node_authorization -->|"loads user"| node_users
node_api_entry -->|"connects"| node_mongo
node_email_sender -->|"sends email"| node_email_service
node_users -.->|"persists in"| node_mongo
node_otps -.->|"persists in"| node_mongo
node_events -.->|"persists in"| node_mongo
node_bookings -.->|"persists in"| node_mongo

click node_app "https://github.com/rohanpathak06/evento2/blob/main/client/src/App.jsx"
click node_auth_ui "https://github.com/rohanpathak06/evento2/blob/main/client/src/context/AuthContext.jsx"
click node_browse_ui "https://github.com/rohanpathak06/evento2/blob/main/client/src/pages/Home.jsx"
click node_event_ui "https://github.com/rohanpathak06/evento2/blob/main/client/src/pages/EventDetail.jsx"
click node_user_ui "https://github.com/rohanpathak06/evento2/blob/main/client/src/pages/UserDashboard.jsx"
click node_admin_ui "https://github.com/rohanpathak06/evento2/blob/main/client/src/pages/AdminDashboard.jsx"
click node_http_client "https://github.com/rohanpathak06/evento2/blob/main/client/src/utils/axios.js"
click node_api_entry "https://github.com/rohanpathak06/evento2/blob/main/server/server.js"
click node_auth_routes "https://github.com/rohanpathak06/evento2/blob/main/server/routes/auth.js"
click node_event_routes "https://github.com/rohanpathak06/evento2/blob/main/server/routes/events.js"
click node_booking_routes "https://github.com/rohanpathak06/evento2/blob/main/server/routes/bookings.js"
click node_auth_controller "https://github.com/rohanpathak06/evento2/blob/main/server/controllers/authController.js"
click node_event_controller "https://github.com/rohanpathak06/evento2/blob/main/server/controllers/eventController.js"
click node_booking_controller "https://github.com/rohanpathak06/evento2/blob/main/server/controllers/bookingController.js"
click node_authorization "https://github.com/rohanpathak06/evento2/blob/main/server/middleware/auth.js"
click node_users "https://github.com/rohanpathak06/evento2/blob/main/server/models/User.js"
click node_otps "https://github.com/rohanpathak06/evento2/blob/main/server/models/OTP.js"
click node_events "https://github.com/rohanpathak06/evento2/blob/main/server/models/Event.js"
click node_bookings "https://github.com/rohanpathak06/evento2/blob/main/server/models/Booking.js"
click node_email_sender "https://github.com/rohanpathak06/evento2/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_browse_ui,node_event_ui,node_user_ui,node_admin_ui,node_http_client toneBlue
class node_api_entry,node_auth_routes,node_event_routes,node_booking_routes,node_auth_controller,node_event_controller,node_booking_controller,node_authorization toneAmber
class node_users,node_otps,node_events,node_bookings toneMint
class node_email_sender,node_mongo,node_email_service toneRose
class node_visitor toneIndigo
```

## Components

### Web client

- [App routes](https://github.com/rohanpathak06/evento2/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Auth state](https://github.com/rohanpathak06/evento2/blob/main/client/src/context/AuthContext.jsx): `client/src/context/AuthContext.jsx`
- [Event browsing](https://github.com/rohanpathak06/evento2/blob/main/client/src/pages/Home.jsx): `client/src/pages/Home.jsx`
- [Event booking](https://github.com/rohanpathak06/evento2/blob/main/client/src/pages/EventDetail.jsx): `client/src/pages/EventDetail.jsx`
- [User dashboard](https://github.com/rohanpathak06/evento2/blob/main/client/src/pages/UserDashboard.jsx): `client/src/pages/UserDashboard.jsx`
- [Admin dashboard](https://github.com/rohanpathak06/evento2/blob/main/client/src/pages/AdminDashboard.jsx): `client/src/pages/AdminDashboard.jsx`
- [API client](https://github.com/rohanpathak06/evento2/blob/main/client/src/utils/axios.js): `client/src/utils/axios.js`

### API server

- [API entry](https://github.com/rohanpathak06/evento2/blob/main/server/server.js): `server/server.js`
- [Auth routes](https://github.com/rohanpathak06/evento2/blob/main/server/routes/auth.js): `server/routes/auth.js`
- [Event routes](https://github.com/rohanpathak06/evento2/blob/main/server/routes/events.js): `server/routes/events.js`
- [Booking routes](https://github.com/rohanpathak06/evento2/blob/main/server/routes/bookings.js): `server/routes/bookings.js`
- [Authentication](https://github.com/rohanpathak06/evento2/blob/main/server/controllers/authController.js): `server/controllers/authController.js`
- [Event management](https://github.com/rohanpathak06/evento2/blob/main/server/controllers/eventController.js): `server/controllers/eventController.js`
- [Booking workflow](https://github.com/rohanpathak06/evento2/blob/main/server/controllers/bookingController.js): `server/controllers/bookingController.js`
- [Access control](https://github.com/rohanpathak06/evento2/blob/main/server/middleware/auth.js): `server/middleware/auth.js`

### Domain data

- [User records](https://github.com/rohanpathak06/evento2/blob/main/server/models/User.js): `server/models/User.js`
- [OTP records](https://github.com/rohanpathak06/evento2/blob/main/server/models/OTP.js): `server/models/OTP.js`
- [Event records](https://github.com/rohanpathak06/evento2/blob/main/server/models/Event.js): `server/models/Event.js`
- [Booking records](https://github.com/rohanpathak06/evento2/blob/main/server/models/Booking.js): `server/models/Booking.js`

### External services

- [Email delivery](https://github.com/rohanpathak06/evento2/blob/main/server/utils/email.js): `server/utils/email.js`
- **MongoDB**
- **Resend**

### Other components

- **Visitor**

## Connections

- Visitor → App routes: uses (evidence: `README.md`)
- App routes → Event browsing: routes to (evidence: `client/src/App.jsx`)
- App routes → Event booking: routes to (evidence: `client/src/App.jsx`)
- App routes → Auth state: provides auth (evidence: `client/src/context/AuthContext.jsx`)
- App routes → User dashboard: routes to (evidence: `client/src/App.jsx`)
- App routes → Admin dashboard: routes to (evidence: `client/src/App.jsx`)
- Auth state → API client: sends auth requests (evidence: `client/src/context/AuthContext.jsx`)
- Event browsing → API client: requests events (evidence: `README.md`)
- Event booking → API client: requests booking (evidence: `README.md`)
- User dashboard → API client: requests bookings (evidence: `README.md`)
- Admin dashboard → API client: manages events bookings (evidence: `README.md`)
- API client → API entry: calls API (evidence: `README.md`)
- API entry → Auth routes: mounts (evidence: `server/server.js`)
- API entry → Event routes: mounts (evidence: `server/server.js`)
- API entry → Booking routes: mounts (evidence: `server/server.js`)
- Auth routes → Authentication: routes to (evidence: `server/routes/auth.js`)
- Event routes → Event management: routes to (evidence: `server/controllers/eventController.js`)
- Booking routes → Booking workflow: routes to (evidence: `server/controllers/bookingController.js`)
- Booking routes → Access control: protects routes (evidence: `server/routes/bookings.js`)
- Event routes → Access control: protects routes (evidence: `server/routes/events.js`)
- Authentication → User records: reads and writes (evidence: `server/controllers/authController.js`)
- Authentication → OTP records: reads and writes (evidence: `server/controllers/authController.js`)
- Authentication → Email delivery: sends OTP (evidence: `server/controllers/authController.js`)
- Event management → Event records: reads and writes (evidence: `server/controllers/eventController.js`)
- Booking workflow → Booking records: reads and writes (evidence: `server/controllers/bookingController.js`)
- Booking workflow → Event records: checks seats (evidence: `server/controllers/bookingController.js`)
- Booking workflow → OTP records: verifies OTP (evidence: `server/controllers/bookingController.js`)
- Booking workflow → Email delivery: sends notifications (evidence: `server/controllers/bookingController.js`)
- Access control → User records: loads user (evidence: `server/middleware/auth.js`)
- API entry → MongoDB: connects (evidence: `server/server.js`)
- Email delivery → Resend: sends email (evidence: `server/utils/email.js`)
- User records → MongoDB: persists in
- OTP records → MongoDB: persists in
- Event records → MongoDB: persists in
- Booking records → MongoDB: persists in
