# saurabhsaini13/project-2025 architecture

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

- Interactive diagram: https://gitdiagram.com/saurabhsaini13/project-2025
- Repository: https://github.com/saurabhsaini13/project-2025

## Overview

EventSphere is an event discovery, registration, and ticketing platform with user and admin workflows, backed by an Express/MongoDB API and a suite of AI features. The principal workflow runs from browsing an event through registration and ticket retrieval; admin event management and AI capabilities are meaningful parallel branches. AI service internals and most page/API wiring were not sampled, so those connections are limited to documented modules and visible route dispatch.

Main entry points: [`frontend/src/App.jsx`](https://github.com/saurabhsaini13/project-2025/blob/master/frontend/src/App.jsx) (React application), [`backend/server.js`](https://github.com/saurabhsaini13/project-2025/blob/master/backend/server.js) (Express API), [`backend/routes/aiRoutes.js`](https://github.com/saurabhsaini13/project-2025/blob/master/backend/routes/aiRoutes.js) (AI routes), [`frontend/src/api/axiosInstance.js`](https://github.com/saurabhsaini13/project-2025/blob/master/frontend/src/api/axiosInstance.js) (API clients)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_webapp["React application<br/>[App.jsx]"]
  node_authstate["Authentication state<br/>[AuthContext.jsx]"]
  node_eventui["Event browsing UI<br/>[Events.jsx]"]
  node_registrationui["Registration and seats"]
  node_ticketui["Ticket views<br/>[TicketDetails.jsx]"]
  node_adminui["Event administration"]
  node_aiui["AI interface<br/>[Chatbot.jsx]"]
  node_apiclient["API clients<br/>[axiosInstance.js]"]
end

subgraph group_api["API workflows"]
  node_server["Express API<br/>[server.js]"]
  node_authroutes["Authentication routes<br/>[authRoutes.js]"]
  node_authcontroller["Authentication handlers<br/>[authController.js]"]
  node_eventroutes["Event routes<br/>[eventRoutes.js]"]
  node_eventcontroller["Event handlers<br/>[eventController.js]"]
  node_registerroutes["Registration routes<br/>[registerRoutes.js]"]
  node_ticketroutes["Ticket routes<br/>[ticketRoutes.js]"]
  node_ticketcontroller["Ticket handlers"]
  node_airoutes["AI routes<br/>[aiRoutes.js]"]
end

subgraph group_data["Domain data"]
  node_eventmodel["Event records<br/>[Event.js]"]
  node_registrationmodel["Registration records<br/>[Registration.js]"]
  node_usermodel["User records<br/>[User.js]"]
  node_mongodb[("MongoDB")]
end

subgraph group_ai["AI features"]
  node_recommendations["Recommendations"]
  node_forecast["Demand forecasting"]
  node_pricing["Dynamic pricing"]
  node_fraud["Fraud detection"]
  node_chatbot["Chatbot service<br/>[chatbotService.js]"]
end

node_attendee(("Attendee"))
node_admin(("Administrator"))

node_attendee -->|"uses"| node_webapp
node_admin -->|"manages events"| node_webapp
node_webapp -->|"provides auth"| node_authstate
node_webapp -->|"routes to"| node_eventui
node_webapp -->|"routes to"| node_registrationui
node_webapp -->|"routes to"| node_ticketui
node_webapp -->|"routes to"| node_adminui
node_webapp -->|"renders"| node_aiui
node_eventui -->|"requests events"| node_apiclient
node_registrationui -->|"submits booking"| node_apiclient
node_ticketui -->|"requests tickets"| node_apiclient
node_adminui -->|"sends changes"| node_apiclient
node_aiui -->|"sends queries"| node_apiclient
node_apiclient -->|"calls API"| node_server
node_server -->|"dispatches"| node_authroutes
node_server -->|"dispatches"| node_eventroutes
node_server -->|"dispatches"| node_registerroutes
node_server -->|"dispatches"| node_ticketroutes
node_server -->|"dispatches"| node_airoutes
node_authroutes -->|"dispatches"| node_authcontroller
node_eventroutes -->|"dispatches"| node_eventcontroller
node_ticketroutes -->|"dispatches"| node_ticketcontroller
node_authcontroller -->|"reads and writes"| node_usermodel
node_eventcontroller -->|"reads and writes"| node_eventmodel
node_ticketcontroller -->|"reads and writes"| node_registrationmodel
node_ticketcontroller -->|"updates availability"| node_eventmodel
node_ticketcontroller -->|"checks user"| node_usermodel
node_server -->|"connects"| node_mongodb
node_airoutes -->|"calls"| node_recommendations
node_airoutes -->|"calls"| node_forecast
node_airoutes -->|"calls"| node_pricing
node_airoutes -->|"calls"| node_fraud
node_airoutes -->|"calls"| node_chatbot
node_recommendations -->|"reads registrations"| node_registrationmodel
node_recommendations -->|"reads events"| node_eventmodel
node_recommendations -->|"reads preferences"| node_usermodel

click node_webapp "https://github.com/saurabhsaini13/project-2025/blob/master/frontend/src/App.jsx"
click node_authstate "https://github.com/saurabhsaini13/project-2025/blob/master/frontend/src/context/AuthContext.jsx"
click node_eventui "https://github.com/saurabhsaini13/project-2025/blob/master/frontend/src/pages/Events.jsx"
click node_registrationui "https://github.com/saurabhsaini13/project-2025/blob/master/frontend/src/components/TicketRegistrationForm.jsx"
click node_ticketui "https://github.com/saurabhsaini13/project-2025/blob/master/frontend/src/pages/TicketDetails.jsx"
click node_adminui "https://github.com/saurabhsaini13/project-2025/blob/master/frontend/src/components/admin/EventManagement.jsx"
click node_aiui "https://github.com/saurabhsaini13/project-2025/blob/master/frontend/src/components/Chatbot.jsx"
click node_apiclient "https://github.com/saurabhsaini13/project-2025/blob/master/frontend/src/api/axiosInstance.js"
click node_server "https://github.com/saurabhsaini13/project-2025/blob/master/backend/server.js"
click node_authroutes "https://github.com/saurabhsaini13/project-2025/blob/master/backend/routes/authRoutes.js"
click node_authcontroller "https://github.com/saurabhsaini13/project-2025/blob/master/backend/controllers/authController.js"
click node_eventroutes "https://github.com/saurabhsaini13/project-2025/blob/master/backend/routes/eventRoutes.js"
click node_eventcontroller "https://github.com/saurabhsaini13/project-2025/blob/master/backend/controllers/eventController.js"
click node_registerroutes "https://github.com/saurabhsaini13/project-2025/blob/master/backend/routes/registerRoutes.js"
click node_ticketroutes "https://github.com/saurabhsaini13/project-2025/blob/master/backend/routes/ticketRoutes.js"
click node_ticketcontroller "https://github.com/saurabhsaini13/project-2025/blob/master/backend/controllers/ticketController.js"
click node_airoutes "https://github.com/saurabhsaini13/project-2025/blob/master/backend/routes/aiRoutes.js"
click node_eventmodel "https://github.com/saurabhsaini13/project-2025/blob/master/backend/models/Event.js"
click node_registrationmodel "https://github.com/saurabhsaini13/project-2025/blob/master/backend/models/Registration.js"
click node_usermodel "https://github.com/saurabhsaini13/project-2025/blob/master/backend/models/User.js"
click node_recommendations "https://github.com/saurabhsaini13/project-2025/blob/master/backend/services/ai/recommendationService.js"
click node_forecast "https://github.com/saurabhsaini13/project-2025/blob/master/backend/services/ai/demandForecastService.js"
click node_pricing "https://github.com/saurabhsaini13/project-2025/blob/master/backend/services/ai/dynamicPricingService.js"
click node_fraud "https://github.com/saurabhsaini13/project-2025/blob/master/backend/services/ai/fraudDetectionService.js"
click node_chatbot "https://github.com/saurabhsaini13/project-2025/blob/master/backend/services/ai/chatbotService.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_webapp,node_authstate,node_eventui,node_registrationui,node_ticketui,node_adminui,node_aiui,node_apiclient toneBlue
class node_server,node_authroutes,node_authcontroller,node_eventroutes,node_eventcontroller,node_registerroutes,node_ticketroutes,node_ticketcontroller,node_airoutes toneAmber
class node_eventmodel,node_registrationmodel,node_usermodel,node_mongodb toneMint
class node_recommendations,node_forecast,node_pricing,node_fraud,node_chatbot toneRose
class node_attendee,node_admin toneIndigo
```

## Components

### Web application

- [React application](https://github.com/saurabhsaini13/project-2025/blob/master/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Authentication state](https://github.com/saurabhsaini13/project-2025/blob/master/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [Event browsing UI](https://github.com/saurabhsaini13/project-2025/blob/master/frontend/src/pages/Events.jsx): `frontend/src/pages/Events.jsx`
- [Registration and seats](https://github.com/saurabhsaini13/project-2025/blob/master/frontend/src/components/TicketRegistrationForm.jsx): `frontend/src/components/TicketRegistrationForm.jsx`
- [Ticket views](https://github.com/saurabhsaini13/project-2025/blob/master/frontend/src/pages/TicketDetails.jsx): `frontend/src/pages/TicketDetails.jsx`
- [Event administration](https://github.com/saurabhsaini13/project-2025/blob/master/frontend/src/components/admin/EventManagement.jsx): `frontend/src/components/admin/EventManagement.jsx`
- [AI interface](https://github.com/saurabhsaini13/project-2025/blob/master/frontend/src/components/Chatbot.jsx): `frontend/src/components/Chatbot.jsx`
- [API clients](https://github.com/saurabhsaini13/project-2025/blob/master/frontend/src/api/axiosInstance.js): `frontend/src/api/axiosInstance.js`

### API workflows

- [Express API](https://github.com/saurabhsaini13/project-2025/blob/master/backend/server.js): `backend/server.js`
- [Authentication routes](https://github.com/saurabhsaini13/project-2025/blob/master/backend/routes/authRoutes.js): `backend/routes/authRoutes.js`
- [Authentication handlers](https://github.com/saurabhsaini13/project-2025/blob/master/backend/controllers/authController.js): `backend/controllers/authController.js`
- [Event routes](https://github.com/saurabhsaini13/project-2025/blob/master/backend/routes/eventRoutes.js): `backend/routes/eventRoutes.js`
- [Event handlers](https://github.com/saurabhsaini13/project-2025/blob/master/backend/controllers/eventController.js): `backend/controllers/eventController.js`
- [Registration routes](https://github.com/saurabhsaini13/project-2025/blob/master/backend/routes/registerRoutes.js): `backend/routes/registerRoutes.js`
- [Ticket routes](https://github.com/saurabhsaini13/project-2025/blob/master/backend/routes/ticketRoutes.js): `backend/routes/ticketRoutes.js`
- [Ticket handlers](https://github.com/saurabhsaini13/project-2025/blob/master/backend/controllers/ticketController.js): `backend/controllers/ticketController.js`
- [AI routes](https://github.com/saurabhsaini13/project-2025/blob/master/backend/routes/aiRoutes.js): `backend/routes/aiRoutes.js`

### Domain data

- [Event records](https://github.com/saurabhsaini13/project-2025/blob/master/backend/models/Event.js): `backend/models/Event.js`
- [Registration records](https://github.com/saurabhsaini13/project-2025/blob/master/backend/models/Registration.js): `backend/models/Registration.js`
- [User records](https://github.com/saurabhsaini13/project-2025/blob/master/backend/models/User.js): `backend/models/User.js`
- **MongoDB**

### AI features

- [Recommendations](https://github.com/saurabhsaini13/project-2025/blob/master/backend/services/ai/recommendationService.js): `backend/services/ai/recommendationService.js`
- [Demand forecasting](https://github.com/saurabhsaini13/project-2025/blob/master/backend/services/ai/demandForecastService.js): `backend/services/ai/demandForecastService.js`
- [Dynamic pricing](https://github.com/saurabhsaini13/project-2025/blob/master/backend/services/ai/dynamicPricingService.js): `backend/services/ai/dynamicPricingService.js`
- [Fraud detection](https://github.com/saurabhsaini13/project-2025/blob/master/backend/services/ai/fraudDetectionService.js): `backend/services/ai/fraudDetectionService.js`
- [Chatbot service](https://github.com/saurabhsaini13/project-2025/blob/master/backend/services/ai/chatbotService.js): `backend/services/ai/chatbotService.js`

### Other components

- **Attendee**
- **Administrator**

## Connections

- Attendee → React application: uses
- Administrator → React application: manages events
- React application → Authentication state: provides auth
- React application → Event browsing UI: routes to
- React application → Registration and seats: routes to
- React application → Ticket views: routes to
- React application → Event administration: routes to
- React application → AI interface: renders
- Event browsing UI → API clients: requests events
- Registration and seats → API clients: submits booking
- Ticket views → API clients: requests tickets
- Event administration → API clients: sends changes
- AI interface → API clients: sends queries
- API clients → Express API: calls API
- Express API → Authentication routes: dispatches
- Express API → Event routes: dispatches
- Express API → Registration routes: dispatches
- Express API → Ticket routes: dispatches
- Express API → AI routes: dispatches
- Authentication routes → Authentication handlers: dispatches
- Event routes → Event handlers: dispatches
- Ticket routes → Ticket handlers: dispatches
- Authentication handlers → User records: reads and writes
- Event handlers → Event records: reads and writes
- Ticket handlers → Registration records: reads and writes
- Ticket handlers → Event records: updates availability
- Ticket handlers → User records: checks user
- Express API → MongoDB: connects
- AI routes → Recommendations: calls
- AI routes → Demand forecasting: calls
- AI routes → Dynamic pricing: calls
- AI routes → Fraud detection: calls
- AI routes → Chatbot service: calls
- Recommendations → Registration records: reads registrations
- Recommendations → Event records: reads events
- Recommendations → User records: reads preferences
