# johnweslykurasa/event_manager architecture

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

## Overview

EventPulse is an event-management platform for attendees and organizers. Attendees discover events, select ticket tiers, check out, and manage tickets; organizers create and publish events, review analytics, and check in ticket holders. The React client calls an Express API, whose route handlers enforce validation and authorization before operating on event, registration, or account data. AI event-generation, marketing-copy, and concierge tools are additional documented-by-routes capabilities. Evidence is limited to the README and indexed or excerpted files; unshown connections are omitted.

Main entry points: [`client/src/services/api.ts`](https://github.com/johnweslykurasa/event_manager/blob/main/client/src/services/api.ts) (Client API), [`client/src/App.tsx`](https://github.com/johnweslykurasa/event_manager/blob/main/client/src/App.tsx) (Web app routes), [`server/src/config/db.ts`](https://github.com/johnweslykurasa/event_manager/blob/main/server/src/config/db.ts) (Database access), [`server/src/routes/authRoutes.ts`](https://github.com/johnweslykurasa/event_manager/blob/main/server/src/routes/authRoutes.ts) (Auth routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["Web app routes<br/>[App.tsx]"]
  node_authstate["Session state<br/>[AuthContext.tsx]"]
  node_discover["Event discovery"]
  node_eventdetail["Event details"]
  node_checkout["Ticket checkout<br/>[CheckoutPage.tsx]"]
  node_tickets["My tickets<br/>[MyTicketsPage.tsx]"]
  node_create["Event creation"]
  node_dashboard["Organizer dashboard<br/>[DashboardPage.tsx]"]
  node_checkin["Check-in console<br/>[CheckInPage.tsx]"]
  node_aiwidget["AI event tools"]
  node_api["Client API<br/>[api.ts]"]
end

subgraph group_api["API workflows"]
  node_authroutes["Auth routes<br/>[authRoutes.ts]"]
  node_eventroutes["Event routes<br/>[eventRoutes.ts]"]
  node_regroutes["Registration routes"]
  node_airoutes["AI routes<br/>[aiRoutes.ts]"]
  node_authctrl["Account operations<br/>[authController.ts]"]
  node_eventctrl["Event operations<br/>[eventController.ts]"]
  node_regctrl["Registration operations"]
  node_aictrl["AI operations<br/>[aiController.ts]"]
end

subgraph group_services["Platform services"]
  node_validation["Request validation"]
  node_authz["Token and roles<br/>[authMiddleware.ts]"]
  node_ticketgen["Ticket utilities<br/>[ticketGenerator.ts]"]
end

subgraph group_data["Data and AI"]
  node_store[("Database access<br/>[db.ts]")]
  node_mock[("In-memory fallback<br/>[mockStore.ts]")]
  node_gemini["Gemini service<br/>[gemini.ts]"]
end

node_attendee(("Attendee"))
node_organizer(("Organizer"))

node_attendee -->|"uses"| node_app
node_organizer -->|"uses"| node_app
node_app -->|"routes to"| node_discover
node_app -->|"routes to"| node_eventdetail
node_app -->|"routes to"| node_checkout
node_app -->|"routes to"| node_tickets
node_app -->|"routes to"| node_create
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_checkin
node_discover -->|"requests data"| node_api
node_eventdetail -->|"requests data"| node_api
node_checkout -->|"submits checkout"| node_api
node_tickets -->|"requests tickets"| node_api
node_create -->|"submits event"| node_api
node_create -->|"opens generator"| node_aiwidget
node_dashboard -->|"requests analytics"| node_api
node_checkin -->|"submits check-in"| node_api
node_authstate -->|"refreshes session"| node_api
node_api -->|"HTTP requests"| node_authroutes
node_api -->|"HTTP requests"| node_eventroutes
node_api -->|"HTTP requests"| node_regroutes
node_api -->|"HTTP requests"| node_airoutes
node_authroutes -->|"dispatches"| node_authctrl
node_eventroutes -->|"dispatches"| node_eventctrl
node_regroutes -->|"dispatches"| node_regctrl
node_airoutes -->|"dispatches"| node_aictrl
node_authroutes -->|"validates with"| node_validation
node_eventroutes -->|"validates with"| node_validation
node_airoutes -->|"validates with"| node_validation
node_authroutes -->|"authenticates with"| node_authz
node_eventroutes -->|"authenticates with"| node_authz
node_regroutes -->|"authenticates with"| node_authz
node_airoutes -->|"authenticates with"| node_authz
node_authctrl -->|"queries"| node_store
node_eventctrl -->|"queries"| node_store
node_eventctrl -->|"generates slugs"| node_ticketgen
node_regctrl -->|"reads and writes"| node_store
node_regctrl -->|"uses ticket utilities"| node_ticketgen
node_aictrl -->|"loads event context"| node_store
node_aictrl -->|"generates content"| node_gemini
node_store -->|"falls back"| node_mock

click node_app "https://github.com/johnweslykurasa/event_manager/blob/main/client/src/App.tsx"
click node_authstate "https://github.com/johnweslykurasa/event_manager/blob/main/client/src/context/AuthContext.tsx"
click node_discover "https://github.com/johnweslykurasa/event_manager/blob/main/client/src/pages/EventListingPage.tsx"
click node_eventdetail "https://github.com/johnweslykurasa/event_manager/blob/main/client/src/pages/EventDetailPage.tsx"
click node_checkout "https://github.com/johnweslykurasa/event_manager/blob/main/client/src/pages/CheckoutPage.tsx"
click node_tickets "https://github.com/johnweslykurasa/event_manager/blob/main/client/src/pages/MyTicketsPage.tsx"
click node_create "https://github.com/johnweslykurasa/event_manager/blob/main/client/src/pages/EventCreatePage.tsx"
click node_dashboard "https://github.com/johnweslykurasa/event_manager/blob/main/client/src/pages/DashboardPage.tsx"
click node_checkin "https://github.com/johnweslykurasa/event_manager/blob/main/client/src/pages/CheckInPage.tsx"
click node_aiwidget "https://github.com/johnweslykurasa/event_manager/blob/main/client/src/components/AiEventGeneratorModal.tsx"
click node_api "https://github.com/johnweslykurasa/event_manager/blob/main/client/src/services/api.ts"
click node_authroutes "https://github.com/johnweslykurasa/event_manager/blob/main/server/src/routes/authRoutes.ts"
click node_eventroutes "https://github.com/johnweslykurasa/event_manager/blob/main/server/src/routes/eventRoutes.ts"
click node_regroutes "https://github.com/johnweslykurasa/event_manager/blob/main/server/src/routes/registrationRoutes.ts"
click node_airoutes "https://github.com/johnweslykurasa/event_manager/blob/main/server/src/routes/aiRoutes.ts"
click node_authctrl "https://github.com/johnweslykurasa/event_manager/blob/main/server/src/controllers/authController.ts"
click node_eventctrl "https://github.com/johnweslykurasa/event_manager/blob/main/server/src/controllers/eventController.ts"
click node_regctrl "https://github.com/johnweslykurasa/event_manager/blob/main/server/src/controllers/registrationController.ts"
click node_aictrl "https://github.com/johnweslykurasa/event_manager/blob/main/server/src/controllers/aiController.ts"
click node_validation "https://github.com/johnweslykurasa/event_manager/blob/main/server/src/middleware/validateMiddleware.ts"
click node_authz "https://github.com/johnweslykurasa/event_manager/blob/main/server/src/middleware/authMiddleware.ts"
click node_ticketgen "https://github.com/johnweslykurasa/event_manager/blob/main/server/src/utils/ticketGenerator.ts"
click node_store "https://github.com/johnweslykurasa/event_manager/blob/main/server/src/config/db.ts"
click node_mock "https://github.com/johnweslykurasa/event_manager/blob/main/server/src/config/mockStore.ts"
click node_gemini "https://github.com/johnweslykurasa/event_manager/blob/main/server/src/config/gemini.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_app,node_authstate,node_discover,node_eventdetail,node_checkout,node_tickets,node_create,node_dashboard,node_checkin,node_aiwidget,node_api toneBlue
class node_authroutes,node_eventroutes,node_regroutes,node_airoutes,node_authctrl,node_eventctrl,node_regctrl,node_aictrl toneAmber
class node_validation,node_authz,node_ticketgen toneMint
class node_store,node_mock,node_gemini toneRose
class node_attendee,node_organizer toneIndigo
```

## Components

### Web client

- [Web app routes](https://github.com/johnweslykurasa/event_manager/blob/main/client/src/App.tsx): `client/src/App.tsx`
- [Session state](https://github.com/johnweslykurasa/event_manager/blob/main/client/src/context/AuthContext.tsx): `client/src/context/AuthContext.tsx`
- [Event discovery](https://github.com/johnweslykurasa/event_manager/blob/main/client/src/pages/EventListingPage.tsx): `client/src/pages/EventListingPage.tsx`
- [Event details](https://github.com/johnweslykurasa/event_manager/blob/main/client/src/pages/EventDetailPage.tsx): `client/src/pages/EventDetailPage.tsx`
- [Ticket checkout](https://github.com/johnweslykurasa/event_manager/blob/main/client/src/pages/CheckoutPage.tsx): `client/src/pages/CheckoutPage.tsx`
- [My tickets](https://github.com/johnweslykurasa/event_manager/blob/main/client/src/pages/MyTicketsPage.tsx): `client/src/pages/MyTicketsPage.tsx`
- [Event creation](https://github.com/johnweslykurasa/event_manager/blob/main/client/src/pages/EventCreatePage.tsx): `client/src/pages/EventCreatePage.tsx`
- [Organizer dashboard](https://github.com/johnweslykurasa/event_manager/blob/main/client/src/pages/DashboardPage.tsx): `client/src/pages/DashboardPage.tsx`
- [Check-in console](https://github.com/johnweslykurasa/event_manager/blob/main/client/src/pages/CheckInPage.tsx): `client/src/pages/CheckInPage.tsx`
- [AI event tools](https://github.com/johnweslykurasa/event_manager/blob/main/client/src/components/AiEventGeneratorModal.tsx): `client/src/components/AiEventGeneratorModal.tsx`
- [Client API](https://github.com/johnweslykurasa/event_manager/blob/main/client/src/services/api.ts): `client/src/services/api.ts`

### API workflows

- [Auth routes](https://github.com/johnweslykurasa/event_manager/blob/main/server/src/routes/authRoutes.ts): `server/src/routes/authRoutes.ts`
- [Event routes](https://github.com/johnweslykurasa/event_manager/blob/main/server/src/routes/eventRoutes.ts): `server/src/routes/eventRoutes.ts`
- [Registration routes](https://github.com/johnweslykurasa/event_manager/blob/main/server/src/routes/registrationRoutes.ts): `server/src/routes/registrationRoutes.ts`
- [AI routes](https://github.com/johnweslykurasa/event_manager/blob/main/server/src/routes/aiRoutes.ts): `server/src/routes/aiRoutes.ts`
- [Account operations](https://github.com/johnweslykurasa/event_manager/blob/main/server/src/controllers/authController.ts): `server/src/controllers/authController.ts`
- [Event operations](https://github.com/johnweslykurasa/event_manager/blob/main/server/src/controllers/eventController.ts): `server/src/controllers/eventController.ts`
- [Registration operations](https://github.com/johnweslykurasa/event_manager/blob/main/server/src/controllers/registrationController.ts): `server/src/controllers/registrationController.ts`
- [AI operations](https://github.com/johnweslykurasa/event_manager/blob/main/server/src/controllers/aiController.ts): `server/src/controllers/aiController.ts`

### Platform services

- [Request validation](https://github.com/johnweslykurasa/event_manager/blob/main/server/src/middleware/validateMiddleware.ts): `server/src/middleware/validateMiddleware.ts`
- [Token and roles](https://github.com/johnweslykurasa/event_manager/blob/main/server/src/middleware/authMiddleware.ts): `server/src/middleware/authMiddleware.ts`
- [Ticket utilities](https://github.com/johnweslykurasa/event_manager/blob/main/server/src/utils/ticketGenerator.ts): `server/src/utils/ticketGenerator.ts`

### Data and AI

- [Database access](https://github.com/johnweslykurasa/event_manager/blob/main/server/src/config/db.ts): `server/src/config/db.ts`
- [In-memory fallback](https://github.com/johnweslykurasa/event_manager/blob/main/server/src/config/mockStore.ts): `server/src/config/mockStore.ts`
- [Gemini service](https://github.com/johnweslykurasa/event_manager/blob/main/server/src/config/gemini.ts): `server/src/config/gemini.ts`

### Other components

- **Attendee**
- **Organizer**

## Connections

- Attendee → Web app routes: uses (evidence: `client/src/App.tsx`)
- Organizer → Web app routes: uses (evidence: `client/src/App.tsx`)
- Web app routes → Event discovery: routes to (evidence: `client/src/App.tsx`)
- Web app routes → Event details: routes to (evidence: `client/src/App.tsx`)
- Web app routes → Ticket checkout: routes to (evidence: `client/src/App.tsx`)
- Web app routes → My tickets: routes to (evidence: `client/src/App.tsx`)
- Web app routes → Event creation: routes to (evidence: `client/src/App.tsx`)
- Web app routes → Organizer dashboard: routes to (evidence: `client/src/App.tsx`)
- Web app routes → Check-in console: routes to (evidence: `client/src/App.tsx`)
- Event discovery → Client API: requests data (evidence: `client/src/pages/EventListingPage.tsx`)
- Event details → Client API: requests data (evidence: `client/src/pages/EventDetailPage.tsx`)
- Ticket checkout → Client API: submits checkout (evidence: `client/src/pages/CheckoutPage.tsx`)
- My tickets → Client API: requests tickets (evidence: `client/src/pages/MyTicketsPage.tsx`)
- Event creation → Client API: submits event (evidence: `client/src/pages/EventCreatePage.tsx`)
- Event creation → AI event tools: opens generator (evidence: `client/src/pages/EventCreatePage.tsx`)
- Organizer dashboard → Client API: requests analytics (evidence: `client/src/pages/DashboardPage.tsx`)
- Check-in console → Client API: submits check-in (evidence: `client/src/pages/CheckInPage.tsx`)
- Session state → Client API: refreshes session (evidence: `client/src/context/AuthContext.tsx`)
- Client API → Auth routes: HTTP requests (evidence: `client/src/services/api.ts`)
- Client API → Event routes: HTTP requests (evidence: `client/src/services/api.ts`)
- Client API → Registration routes: HTTP requests (evidence: `client/src/services/api.ts`)
- Client API → AI routes: HTTP requests (evidence: `client/src/services/api.ts`)
- Auth routes → Account operations: dispatches (evidence: `server/src/routes/authRoutes.ts`)
- Event routes → Event operations: dispatches (evidence: `server/src/routes/eventRoutes.ts`)
- Registration routes → Registration operations: dispatches (evidence: `server/src/routes/registrationRoutes.ts`)
- AI routes → AI operations: dispatches (evidence: `server/src/routes/aiRoutes.ts`)
- Auth routes → Request validation: validates with (evidence: `server/src/routes/authRoutes.ts`)
- Event routes → Request validation: validates with (evidence: `server/src/routes/eventRoutes.ts`)
- AI routes → Request validation: validates with (evidence: `server/src/routes/aiRoutes.ts`)
- Auth routes → Token and roles: authenticates with (evidence: `server/src/routes/authRoutes.ts`)
- Event routes → Token and roles: authenticates with (evidence: `server/src/routes/eventRoutes.ts`)
- Registration routes → Token and roles: authenticates with (evidence: `server/src/routes/registrationRoutes.ts`)
- AI routes → Token and roles: authenticates with (evidence: `server/src/routes/aiRoutes.ts`)
- Account operations → Database access: queries (evidence: `server/src/controllers/authController.ts`)
- Event operations → Database access: queries (evidence: `server/src/controllers/eventController.ts`)
- Event operations → Ticket utilities: generates slugs (evidence: `server/src/controllers/eventController.ts`)
- Registration operations → Database access: reads and writes (evidence: `server/src/controllers/registrationController.ts`)
- Registration operations → Ticket utilities: uses ticket utilities (evidence: `server/src/controllers/registrationController.ts`)
- AI operations → Database access: loads event context (evidence: `server/src/controllers/aiController.ts`)
- AI operations → Gemini service: generates content (evidence: `server/src/controllers/aiController.ts`)
- Database access → In-memory fallback: falls back (evidence: `server/src/config/db.ts`)
