# thiraya-git/events-management-system architecture

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

- Interactive diagram: https://gitdiagram.com/thiraya-git/events-management-system
- Repository: https://github.com/thiraya-git/events-management-system

## Overview

Aazath Plaza’s Events Management System supports customer hall and room reservations, event coordination, catering, payments, and staff administration. The main workflow is customer booking submission through the React application, API routing, booking orchestration, and PostgreSQL persistence; staff then manage approval and organizer assignment, with payment and invoicing available afterward. Other documented capabilities include analytics and reports, sponsor connections, catering, timelines, and notifications. Some feature links are documented only at product level; those are cited to the README rather than inferred from unsampled implementation.

Main entry points: [`server/src/app.js`](https://github.com/thiraya-git/events-management-system/blob/main/server/src/app.js) (Express API), [`client/src/pages/organizer`](https://github.com/thiraya-git/events-management-system/tree/main/client/src/pages/organizer) (Partner portals), [`client/src/App.tsx`](https://github.com/thiraya-git/events-management-system/blob/main/client/src/App.tsx) (React application), [`server/src/routes/booking.routes.js`](https://github.com/thiraya-git/events-management-system/blob/main/server/src/routes/booking.routes.js) (Booking routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web application"]
  node_app["React application<br/>[App.tsx]"]
  node_booking_ui["Booking workflow"]
  node_admin_ui["Admin portal"]
  node_partner_ui["Partner portals"]
end

subgraph group_booking["Booking and payment"]
  node_booking_routes["Booking routes<br/>[booking.routes.js]"]
  node_booking_controller["Booking handlers"]
  node_booking_service["Booking rules<br/>[booking.service.js]"]
  node_pricing["Event pricing<br/>[pricing.service.js]"]
  node_payments["Payment processing<br/>[payment.routes.js]"]
  node_invoices["PDF invoices<br/>[pdf.service.js]"]
end

subgraph group_operations["Hall operations"]
  node_hall_ops["Availability and halls"]
  node_timeline["Event timeline"]
  node_analytics["Analytics and reports"]
  node_feedback["Customer feedback"]
end

subgraph group_partners["Event partners"]
  node_catering["Restaurant and catering"]
  node_organizers["Organizer coordination"]
  node_sponsors["Sponsor connections<br/>[sponsor.service.js]"]
end

subgraph group_platform["Shared platform"]
  node_api["Express API<br/>[app.js]"]
  node_auth["Authentication and roles<br/>[auth.middleware.js]"]
  node_database[("PostgreSQL access<br/>[db.js]")]
  node_notifications["Email and SMS<br/>[email.service.js]"]
end

node_customer(("Customer"))
node_payhere{{"PayHere"}}

node_customer -->|"uses"| node_app
node_app -->|"routes to"| node_booking_ui
node_booking_ui -->|"submits booking"| node_api
node_admin_ui -->|"manages bookings"| node_api
node_partner_ui -->|"coordinates events"| node_api
node_api -->|"mounts routes"| node_booking_routes
node_booking_routes -->|"dispatches"| node_booking_controller
node_booking_controller -->|"creates booking"| node_booking_service
node_booking_service -->|"calculates price"| node_pricing
node_booking_service -->|"checks and stores"| node_database
node_booking_routes -->|"serves availability"| node_hall_ops
node_api -->|"mounts routes"| node_payments
node_payments -.->|"processes payments"| node_payhere
node_payments -->|"generates invoice"| node_invoices
node_admin_ui -->|"views reporting"| node_analytics
node_partner_ui -->|"handles requests"| node_organizers
node_partner_ui -->|"manages offers"| node_sponsors
node_partner_ui -->|"manages orders"| node_catering
node_booking_controller -->|"sends updates"| node_notifications
node_booking_routes -->|"routes activities"| node_timeline
node_app -->|"protects pages"| node_auth
node_api -->|"checks health"| node_database
node_app -.->|"supports feedback"| node_feedback

click node_app "https://github.com/thiraya-git/events-management-system/blob/main/client/src/App.tsx"
click node_booking_ui "https://github.com/thiraya-git/events-management-system/blob/main/client/src/pages/customer/BookingWizardPage.tsx"
click node_admin_ui "https://github.com/thiraya-git/events-management-system/tree/main/client/src/pages/admin"
click node_partner_ui "https://github.com/thiraya-git/events-management-system/tree/main/client/src/pages/organizer"
click node_api "https://github.com/thiraya-git/events-management-system/blob/main/server/src/app.js"
click node_booking_routes "https://github.com/thiraya-git/events-management-system/blob/main/server/src/routes/booking.routes.js"
click node_booking_controller "https://github.com/thiraya-git/events-management-system/blob/main/server/src/controllers/booking.controller.js"
click node_booking_service "https://github.com/thiraya-git/events-management-system/blob/main/server/src/services/booking.service.js"
click node_pricing "https://github.com/thiraya-git/events-management-system/blob/main/server/src/services/pricing.service.js"
click node_payments "https://github.com/thiraya-git/events-management-system/blob/main/server/src/routes/payment.routes.js"
click node_invoices "https://github.com/thiraya-git/events-management-system/blob/main/server/src/services/pdf.service.js"
click node_hall_ops "https://github.com/thiraya-git/events-management-system/blob/main/server/src/services/hall.availability.service.js"
click node_catering "https://github.com/thiraya-git/events-management-system/blob/main/server/src/controllers/catering.controller.js"
click node_organizers "https://github.com/thiraya-git/events-management-system/blob/main/server/src/controllers/organizer.controller.js"
click node_sponsors "https://github.com/thiraya-git/events-management-system/blob/main/server/src/services/sponsor.service.js"
click node_timeline "https://github.com/thiraya-git/events-management-system/blob/main/server/src/services/timeline.service.js"
click node_analytics "https://github.com/thiraya-git/events-management-system/blob/main/server/src/services/analytics.service.js"
click node_feedback "https://github.com/thiraya-git/events-management-system/blob/main/server/src/controllers/feedback.controller.js"
click node_auth "https://github.com/thiraya-git/events-management-system/blob/main/server/src/middleware/auth.middleware.js"
click node_database "https://github.com/thiraya-git/events-management-system/blob/main/server/src/config/db.js"
click node_notifications "https://github.com/thiraya-git/events-management-system/blob/main/server/src/services/email.service.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_booking_ui,node_admin_ui,node_partner_ui toneBlue
class node_booking_routes,node_booking_controller,node_booking_service,node_pricing,node_payments,node_invoices toneAmber
class node_hall_ops,node_timeline,node_analytics,node_feedback toneMint
class node_catering,node_organizers,node_sponsors toneRose
class node_api,node_auth,node_database,node_notifications,node_customer,node_payhere toneIndigo
```

## Components

### Web application

- [React application](https://github.com/thiraya-git/events-management-system/blob/main/client/src/App.tsx): `client/src/App.tsx`
- [Booking workflow](https://github.com/thiraya-git/events-management-system/blob/main/client/src/pages/customer/BookingWizardPage.tsx): `client/src/pages/customer/BookingWizardPage.tsx`
- [Admin portal](https://github.com/thiraya-git/events-management-system/tree/main/client/src/pages/admin): `client/src/pages/admin`
- [Partner portals](https://github.com/thiraya-git/events-management-system/tree/main/client/src/pages/organizer): `client/src/pages/organizer`

### Booking and payment

- [Booking routes](https://github.com/thiraya-git/events-management-system/blob/main/server/src/routes/booking.routes.js): `server/src/routes/booking.routes.js`
- [Booking handlers](https://github.com/thiraya-git/events-management-system/blob/main/server/src/controllers/booking.controller.js): `server/src/controllers/booking.controller.js`
- [Booking rules](https://github.com/thiraya-git/events-management-system/blob/main/server/src/services/booking.service.js): `server/src/services/booking.service.js`
- [Event pricing](https://github.com/thiraya-git/events-management-system/blob/main/server/src/services/pricing.service.js): `server/src/services/pricing.service.js`
- [Payment processing](https://github.com/thiraya-git/events-management-system/blob/main/server/src/routes/payment.routes.js): `server/src/routes/payment.routes.js`
- [PDF invoices](https://github.com/thiraya-git/events-management-system/blob/main/server/src/services/pdf.service.js): `server/src/services/pdf.service.js`

### Hall operations

- [Availability and halls](https://github.com/thiraya-git/events-management-system/blob/main/server/src/services/hall.availability.service.js): `server/src/services/hall.availability.service.js`
- [Event timeline](https://github.com/thiraya-git/events-management-system/blob/main/server/src/services/timeline.service.js): `server/src/services/timeline.service.js`
- [Analytics and reports](https://github.com/thiraya-git/events-management-system/blob/main/server/src/services/analytics.service.js): `server/src/services/analytics.service.js`
- [Customer feedback](https://github.com/thiraya-git/events-management-system/blob/main/server/src/controllers/feedback.controller.js): `server/src/controllers/feedback.controller.js`

### Event partners

- [Restaurant and catering](https://github.com/thiraya-git/events-management-system/blob/main/server/src/controllers/catering.controller.js): `server/src/controllers/catering.controller.js`
- [Organizer coordination](https://github.com/thiraya-git/events-management-system/blob/main/server/src/controllers/organizer.controller.js): `server/src/controllers/organizer.controller.js`
- [Sponsor connections](https://github.com/thiraya-git/events-management-system/blob/main/server/src/services/sponsor.service.js): `server/src/services/sponsor.service.js`

### Shared platform

- [Express API](https://github.com/thiraya-git/events-management-system/blob/main/server/src/app.js): `server/src/app.js`
- [Authentication and roles](https://github.com/thiraya-git/events-management-system/blob/main/server/src/middleware/auth.middleware.js): `server/src/middleware/auth.middleware.js`
- [PostgreSQL access](https://github.com/thiraya-git/events-management-system/blob/main/server/src/config/db.js): `server/src/config/db.js`
- [Email and SMS](https://github.com/thiraya-git/events-management-system/blob/main/server/src/services/email.service.js): `server/src/services/email.service.js`

### Other components

- **Customer**
- **PayHere**

## Connections

- Customer → React application: uses
- React application → Booking workflow: routes to (evidence: `client/src/App.tsx`)
- Booking workflow → Express API: submits booking
- Admin portal → Express API: manages bookings
- Partner portals → Express API: coordinates events
- Express API → Booking routes: mounts routes (evidence: `server/src/app.js`)
- Booking routes → Booking handlers: dispatches (evidence: `server/src/routes/booking.routes.js`)
- Booking handlers → Booking rules: creates booking (evidence: `server/src/controllers/booking.controller.js`)
- Booking rules → Event pricing: calculates price (evidence: `server/src/services/booking.service.js`)
- Booking rules → PostgreSQL access: checks and stores (evidence: `server/src/services/booking.service.js`)
- Booking routes → Availability and halls: serves availability
- Express API → Payment processing: mounts routes (evidence: `server/src/app.js`)
- Payment processing → PayHere: processes payments
- Payment processing → PDF invoices: generates invoice (evidence: `server/src/routes/payment.routes.js`)
- Admin portal → Analytics and reports: views reporting
- Partner portals → Organizer coordination: handles requests
- Partner portals → Sponsor connections: manages offers
- Partner portals → Restaurant and catering: manages orders
- Booking handlers → Email and SMS: sends updates (evidence: `server/src/controllers/booking.controller.js`)
- Booking routes → Event timeline: routes activities (evidence: `server/src/routes/booking.routes.js`)
- React application → Authentication and roles: protects pages (evidence: `client/src/App.tsx`)
- Express API → PostgreSQL access: checks health (evidence: `server/src/app.js`)
- React application → Customer feedback: supports feedback
