# harishkumardraksharan/event-management-platform architecture

> Architecture diagram of the GitHub repository harishkumardraksharan/event-management-platform, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/harishkumardraksharan/event-management-platform
- Repository: https://github.com/harishkumardraksharan/event-management-platform

## Overview

TSG EVENTS is a placeholder event-management platform: visitors browse public content and can submit enquiries; administrators sign in to manage site content and review enquiries. The frontend fetches public content from the separate backend, which reads and writes PostgreSQL through Prisma. Admin APIs enforce session and role checks. The graph preserves the documented content-management areas; some UI-to-API links are unverified because those source files were not excerpted.

Main entry points: [`backend/app/api/admin`](https://github.com/harishkumardraksharan/event-management-platform/tree/main/backend/app/api/admin) (Admin content routes), [`frontend/app/(public)`](https://github.com/harishkumardraksharan/event-management-platform/tree/main/frontend/app/(public)) (Public pages), [`frontend/app/(panel)/admin`](https://github.com/harishkumardraksharan/event-management-platform/tree/main/frontend/app/(panel)/admin) (Admin pages), [`backend/lib/prisma.ts`](https://github.com/harishkumardraksharan/event-management-platform/blob/main/backend/lib/prisma.ts) (Prisma client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public experience"]
  node_public_site["Public pages"]
  node_public_content["Content fetcher<br/>[public-content.ts]"]
  node_hero["Hero carousel<br/>[hero-carousel.tsx]"]
  node_about_section["About section"]
  node_enquiry_form["Enquiry form<br/>[enquiry-form.tsx]"]
end

subgraph group_admin["Admin experience"]
  node_admin_ui["Admin pages"]
  node_slide_manager["Slide manager"]
  node_service_manager["Service manager"]
  node_other_managers["Content managers"]
  node_enquiry_admin["Enquiry review<br/>[page.tsx]"]
end

subgraph group_api["Content API"]
  node_public_routes["Public content routes"]
  node_enquiry_route["Enquiry submission<br/>[route.ts]"]
  node_admin_routes["Admin content routes"]
  node_catalog_validation["Content validation<br/>[catalog.ts]"]
end

subgraph group_identity["Identity and access"]
  node_auth_route["Auth endpoint<br/>[route.ts]"]
  node_auth_service["Auth service<br/>[auth.ts]"]
  node_authorization["Admin authorization<br/>[authorization.ts]"]
  node_same_origin["Origin check<br/>[same-origin.ts]"]
end

subgraph group_data["Persistence"]
  node_prisma["Prisma client<br/>[prisma.ts]"]
  node_database[("PostgreSQL")]
end

node_visitor(("Visitor"))
node_admin_user(("Administrator"))

node_visitor -->|"browses"| node_public_site
node_public_site -->|"loads content"| node_public_content
node_public_site -->|"renders"| node_hero
node_public_site -->|"renders"| node_about_section
node_public_content -->|"fetches API"| node_public_routes
node_public_site -->|"renders"| node_enquiry_form
node_enquiry_form -->|"submits enquiry"| node_enquiry_route
node_admin_user -->|"manages content"| node_admin_ui
node_admin_ui -.->|"hosts"| node_slide_manager
node_admin_ui -.->|"hosts"| node_service_manager
node_slide_manager -->|"fetches and updates"| node_admin_routes
node_service_manager -->|"fetches and updates"| node_admin_routes
node_admin_ui -.->|"hosts"| node_other_managers
node_admin_ui -.->|"hosts"| node_enquiry_admin
node_enquiry_admin -.->|"requests enquiries"| node_admin_routes
node_public_routes -->|"queries content"| node_prisma
node_enquiry_route -->|"stores enquiry"| node_prisma
node_admin_routes -->|"checks admin"| node_authorization
node_admin_routes -->|"checks origin"| node_same_origin
node_admin_routes -->|"validates input"| node_catalog_validation
node_admin_routes -->|"reads and writes"| node_prisma
node_auth_route -->|"dispatches auth"| node_auth_service
node_auth_service -->|"uses adapter"| node_prisma
node_authorization -->|"checks session"| node_auth_service
node_prisma -->|"connects"| node_database

click node_public_site "https://github.com/harishkumardraksharan/event-management-platform/tree/main/frontend/app/(public)"
click node_public_content "https://github.com/harishkumardraksharan/event-management-platform/blob/main/frontend/lib/public-content.ts"
click node_hero "https://github.com/harishkumardraksharan/event-management-platform/blob/main/frontend/components/hero-carousel.tsx"
click node_about_section "https://github.com/harishkumardraksharan/event-management-platform/blob/main/frontend/components/about-us-section.tsx"
click node_enquiry_form "https://github.com/harishkumardraksharan/event-management-platform/blob/main/frontend/components/enquiry-form.tsx"
click node_admin_ui "https://github.com/harishkumardraksharan/event-management-platform/tree/main/frontend/app/(panel)/admin"
click node_slide_manager "https://github.com/harishkumardraksharan/event-management-platform/blob/main/frontend/components/admin-hero-slide-manager.tsx"
click node_service_manager "https://github.com/harishkumardraksharan/event-management-platform/blob/main/frontend/components/admin-service-manager.tsx"
click node_other_managers "https://github.com/harishkumardraksharan/event-management-platform/tree/main/frontend/components"
click node_enquiry_admin "https://github.com/harishkumardraksharan/event-management-platform/blob/main/frontend/app/(panel)/admin/enquiries/page.tsx"
click node_public_routes "https://github.com/harishkumardraksharan/event-management-platform/tree/main/backend/app/api"
click node_enquiry_route "https://github.com/harishkumardraksharan/event-management-platform/blob/main/backend/app/api/enquiries/route.ts"
click node_admin_routes "https://github.com/harishkumardraksharan/event-management-platform/tree/main/backend/app/api/admin"
click node_auth_route "https://github.com/harishkumardraksharan/event-management-platform/blob/main/backend/app/api/auth/%5B...all%5D/route.ts"
click node_auth_service "https://github.com/harishkumardraksharan/event-management-platform/blob/main/backend/lib/auth.ts"
click node_authorization "https://github.com/harishkumardraksharan/event-management-platform/blob/main/backend/lib/authorization.ts"
click node_same_origin "https://github.com/harishkumardraksharan/event-management-platform/blob/main/backend/lib/same-origin.ts"
click node_catalog_validation "https://github.com/harishkumardraksharan/event-management-platform/blob/main/backend/lib/catalog.ts"
click node_prisma "https://github.com/harishkumardraksharan/event-management-platform/blob/main/backend/lib/prisma.ts"

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_public_site,node_public_content,node_hero,node_about_section,node_enquiry_form toneBlue
class node_admin_ui,node_slide_manager,node_service_manager,node_other_managers,node_enquiry_admin toneAmber
class node_public_routes,node_enquiry_route,node_admin_routes,node_catalog_validation toneMint
class node_auth_route,node_auth_service,node_authorization,node_same_origin toneRose
class node_prisma,node_database,node_visitor,node_admin_user toneIndigo
```

## Components

### Public experience

- [Public pages](https://github.com/harishkumardraksharan/event-management-platform/tree/main/frontend/app/(public)): `frontend/app/(public)`
- [Content fetcher](https://github.com/harishkumardraksharan/event-management-platform/blob/main/frontend/lib/public-content.ts): `frontend/lib/public-content.ts`
- [Hero carousel](https://github.com/harishkumardraksharan/event-management-platform/blob/main/frontend/components/hero-carousel.tsx): `frontend/components/hero-carousel.tsx`
- [About section](https://github.com/harishkumardraksharan/event-management-platform/blob/main/frontend/components/about-us-section.tsx): `frontend/components/about-us-section.tsx`
- [Enquiry form](https://github.com/harishkumardraksharan/event-management-platform/blob/main/frontend/components/enquiry-form.tsx): `frontend/components/enquiry-form.tsx`

### Admin experience

- [Admin pages](https://github.com/harishkumardraksharan/event-management-platform/tree/main/frontend/app/(panel)/admin): `frontend/app/(panel)/admin`
- [Slide manager](https://github.com/harishkumardraksharan/event-management-platform/blob/main/frontend/components/admin-hero-slide-manager.tsx): `frontend/components/admin-hero-slide-manager.tsx`
- [Service manager](https://github.com/harishkumardraksharan/event-management-platform/blob/main/frontend/components/admin-service-manager.tsx): `frontend/components/admin-service-manager.tsx`
- [Content managers](https://github.com/harishkumardraksharan/event-management-platform/tree/main/frontend/components): `frontend/components`
- [Enquiry review](https://github.com/harishkumardraksharan/event-management-platform/blob/main/frontend/app/(panel)/admin/enquiries/page.tsx): `frontend/app/(panel)/admin/enquiries/page.tsx`

### Content API

- [Public content routes](https://github.com/harishkumardraksharan/event-management-platform/tree/main/backend/app/api): `backend/app/api`
- [Enquiry submission](https://github.com/harishkumardraksharan/event-management-platform/blob/main/backend/app/api/enquiries/route.ts): `backend/app/api/enquiries/route.ts`
- [Admin content routes](https://github.com/harishkumardraksharan/event-management-platform/tree/main/backend/app/api/admin): `backend/app/api/admin`
- [Content validation](https://github.com/harishkumardraksharan/event-management-platform/blob/main/backend/lib/catalog.ts): `backend/lib/catalog.ts`

### Identity and access

- [Auth endpoint](https://github.com/harishkumardraksharan/event-management-platform/blob/main/backend/app/api/auth/%5B...all%5D/route.ts): `backend/app/api/auth/[...all]/route.ts`
- [Auth service](https://github.com/harishkumardraksharan/event-management-platform/blob/main/backend/lib/auth.ts): `backend/lib/auth.ts`
- [Admin authorization](https://github.com/harishkumardraksharan/event-management-platform/blob/main/backend/lib/authorization.ts): `backend/lib/authorization.ts`
- [Origin check](https://github.com/harishkumardraksharan/event-management-platform/blob/main/backend/lib/same-origin.ts): `backend/lib/same-origin.ts`

### Persistence

- [Prisma client](https://github.com/harishkumardraksharan/event-management-platform/blob/main/backend/lib/prisma.ts): `backend/lib/prisma.ts`
- **PostgreSQL**

### Other components

- **Visitor**
- **Administrator**

## Connections

- Visitor → Public pages: browses (evidence: `README.md`)
- Public pages → Content fetcher: loads content (evidence: `frontend/app/(public)/page.tsx`)
- Public pages → Hero carousel: renders (evidence: `frontend/app/(public)/page.tsx`)
- Public pages → About section: renders (evidence: `frontend/app/(public)/page.tsx`)
- Content fetcher → Public content routes: fetches API (evidence: `frontend/lib/public-content.ts`)
- Public pages → Enquiry form: renders (evidence: `frontend/app/(public)/contact/page.tsx`)
- Enquiry form → Enquiry submission: submits enquiry (evidence: `README.md`)
- Administrator → Admin pages: manages content (evidence: `README.md`)
- Admin pages → Slide manager: hosts
- Admin pages → Service manager: hosts
- Slide manager → Admin content routes: fetches and updates (evidence: `frontend/components/admin-hero-slide-manager.tsx`)
- Service manager → Admin content routes: fetches and updates (evidence: `frontend/components/admin-service-manager.tsx`)
- Admin pages → Content managers: hosts
- Admin pages → Enquiry review: hosts
- Enquiry review → Admin content routes: requests enquiries
- Public content routes → Prisma client: queries content (evidence: `backend/app/api/homepage-introduction/route.ts`)
- Enquiry submission → Prisma client: stores enquiry (evidence: `backend/app/api/enquiries/route.ts`)
- Admin content routes → Admin authorization: checks admin (evidence: `backend/app/api/admin/about-us/route.ts`)
- Admin content routes → Origin check: checks origin (evidence: `backend/app/api/admin/about-us/route.ts`)
- Admin content routes → Content validation: validates input (evidence: `backend/app/api/admin/about-us/route.ts`)
- Admin content routes → Prisma client: reads and writes (evidence: `backend/app/api/admin/about-us/route.ts`)
- Auth endpoint → Auth service: dispatches auth (evidence: `backend/app/api/auth/[...all]/route.ts`)
- Auth service → Prisma client: uses adapter (evidence: `backend/lib/auth.ts`)
- Admin authorization → Auth service: checks session (evidence: `backend/lib/authorization.ts`)
- Prisma client → PostgreSQL: connects (evidence: `README.md`)
