# lukasondiek/eventpulse-app architecture

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

- Interactive diagram: https://gitdiagram.com/lukasondiek/eventpulse-app
- Repository: https://github.com/lukasondiek/eventpulse-app

## Overview

EventPulse is a Next.js event-discovery and ticketing application, with attendee authentication, seat reservations, M-Pesa payment endpoints, ticket pages, and organizer/admin areas. The likely attendee journey spans event discovery, event details, reservation, checkout, payment, and confirmation; sampled source confirms the reservation and payment API behavior but does not show how the screens invoke them. The README is a generic Next.js template, so product capabilities are inferred from the source tree. In-memory/domain-store internals and UI wiring are only represented where sampled code supports them.

Main entry points: [`src/lib/events.ts`](https://github.com/lukasondiek/eventpulse-app/blob/master/src/lib/events.ts) (Event catalog), [`src/lib/auth-store.ts`](https://github.com/lukasondiek/eventpulse-app/blob/master/src/lib/auth-store.ts) (Users and sessions), [`src/app/api/events/[slug]/reserve/route.ts`](https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/api/events/%5Bslug%5D/reserve/route.ts) (Seat reservation API), [`src/lib/payment-store.ts`](https://github.com/lukasondiek/eventpulse-app/blob/master/src/lib/payment-store.ts) (Payment intents)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_home["Home<br/>[page.tsx]"]
  node_event_list["Event listing<br/>[page.tsx]"]
  node_event_detail["Event details<br/>[page.tsx]"]
  node_checkout_page["Checkout<br/>[page.tsx]"]
  node_confirmation["Confirmation<br/>[page.tsx]"]
  node_tickets_page["My tickets<br/>[page.tsx]"]
  node_travel_widget["Travel widget<br/>[TravelWidget.tsx]"]
  node_origin_city["Origin detection<br/>[useOriginCity.ts]"]
end

subgraph group_events["Event services"]
  node_events_api["Event API<br/>[route.ts]"]
  node_event_api["Event detail API<br/>[route.ts]"]
  node_attendees_api["Attendee list API<br/>[route.ts]"]
  node_event_catalog["Event catalog<br/>[events.ts]"]
end

subgraph group_commerce["Ticket commerce"]
  node_reserve_api["Seat reservation API<br/>[route.ts]"]
  node_reservation_state[("Reservation state")]
  node_payment_api["M-Pesa API<br/>[route.ts]"]
  node_payment_status["Payment status API<br/>[route.ts]"]
  node_payment_state[("Payment intents<br/>[payment-store.ts]")]
end

subgraph group_identity["Identity and operations"]
  node_auth_page["Sign in and signup<br/>[page.tsx]"]
  node_auth_api["Authentication API<br/>[route.ts]"]
  node_admin_login["Admin login API<br/>[route.ts]"]
  node_session_api["Session APIs<br/>[route.ts]"]
  node_logout_api["Logout API<br/>[route.ts]"]
  node_auth_state[("Users and sessions<br/>[auth-store.ts]")]
  node_admin["Admin area<br/>[page.tsx]"]
  node_organizer["Organizer area<br/>[page.tsx]"]
end

node_attendee(("Attendee"))

node_attendee -->|"opens"| node_home
node_attendee -->|"browses"| node_event_list
node_attendee -->|"authenticates"| node_auth_page
node_attendee -->|"checks out"| node_checkout_page
node_attendee -->|"views tickets"| node_tickets_page
node_origin_city -->|"supplies origin"| node_travel_widget
node_events_api -->|"reads events"| node_event_catalog
node_event_api -->|"reads event"| node_event_catalog
node_attendees_api -->|"validates event"| node_event_catalog
node_reserve_api -->|"checks event and tier"| node_event_catalog
node_reserve_api -->|"reserves or releases"| node_reservation_state
node_payment_api -->|"creates intent"| node_payment_state
node_payment_status -->|"reads intent"| node_payment_state
node_auth_api -->|"creates or looks up session"| node_auth_state
node_admin_login -->|"authenticates admin"| node_auth_state
node_session_api -->|"resolves session"| node_auth_state
node_logout_api -->|"destroys session"| node_auth_state

click node_home "https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/page.tsx"
click node_event_list "https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/events/page.tsx"
click node_event_detail "https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/events/%5Bslug%5D/page.tsx"
click node_checkout_page "https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/checkout/page.tsx"
click node_confirmation "https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/confirmation/page.tsx"
click node_tickets_page "https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/tickets/page.tsx"
click node_travel_widget "https://github.com/lukasondiek/eventpulse-app/blob/master/src/components/TravelWidget.tsx"
click node_origin_city "https://github.com/lukasondiek/eventpulse-app/blob/master/src/hooks/useOriginCity.ts"
click node_events_api "https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/api/events/route.ts"
click node_event_api "https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/api/events/%5Bslug%5D/route.ts"
click node_attendees_api "https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/api/events/%5Bslug%5D/attendees/route.ts"
click node_event_catalog "https://github.com/lukasondiek/eventpulse-app/blob/master/src/lib/events.ts"
click node_reserve_api "https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/api/events/%5Bslug%5D/reserve/route.ts"
click node_reservation_state "https://github.com/lukasondiek/eventpulse-app/blob/master/src/lib/reservation-store.ts"
click node_payment_api "https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/api/payments/mpesa/route.ts"
click node_payment_status "https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/api/payments/mpesa/status/%5BtxId%5D/route.ts"
click node_payment_state "https://github.com/lukasondiek/eventpulse-app/blob/master/src/lib/payment-store.ts"
click node_auth_page "https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/auth/page.tsx"
click node_auth_api "https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/api/auth/route.ts"
click node_admin_login "https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/api/admin/login/route.ts"
click node_session_api "https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/api/auth/me/route.ts"
click node_logout_api "https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/api/auth/logout/route.ts"
click node_auth_state "https://github.com/lukasondiek/eventpulse-app/blob/master/src/lib/auth-store.ts"
click node_admin "https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/admin/page.tsx"
click node_organizer "https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/organizer/page.tsx"

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_home,node_event_list,node_event_detail,node_checkout_page,node_confirmation,node_tickets_page,node_travel_widget,node_origin_city toneBlue
class node_events_api,node_event_api,node_attendees_api,node_event_catalog toneAmber
class node_reserve_api,node_reservation_state,node_payment_api,node_payment_status,node_payment_state toneMint
class node_auth_page,node_auth_api,node_admin_login,node_session_api,node_logout_api,node_auth_state,node_admin,node_organizer toneRose
class node_attendee toneIndigo
```

## Components

### Web experience

- [Home](https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/page.tsx): `src/app/page.tsx`
- [Event listing](https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/events/page.tsx): `src/app/events/page.tsx`
- [Event details](https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/events/%5Bslug%5D/page.tsx): `src/app/events/[slug]/page.tsx`
- [Checkout](https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/checkout/page.tsx): `src/app/checkout/page.tsx`
- [Confirmation](https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/confirmation/page.tsx): `src/app/confirmation/page.tsx`
- [My tickets](https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/tickets/page.tsx): `src/app/tickets/page.tsx`
- [Travel widget](https://github.com/lukasondiek/eventpulse-app/blob/master/src/components/TravelWidget.tsx): `src/components/TravelWidget.tsx`
- [Origin detection](https://github.com/lukasondiek/eventpulse-app/blob/master/src/hooks/useOriginCity.ts): `src/hooks/useOriginCity.ts`

### Event services

- [Event API](https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/api/events/route.ts): `src/app/api/events/route.ts`
- [Event detail API](https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/api/events/%5Bslug%5D/route.ts): `src/app/api/events/[slug]/route.ts`
- [Attendee list API](https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/api/events/%5Bslug%5D/attendees/route.ts): `src/app/api/events/[slug]/attendees/route.ts`
- [Event catalog](https://github.com/lukasondiek/eventpulse-app/blob/master/src/lib/events.ts): `src/lib/events.ts`

### Ticket commerce

- [Seat reservation API](https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/api/events/%5Bslug%5D/reserve/route.ts): `src/app/api/events/[slug]/reserve/route.ts`
- [Reservation state](https://github.com/lukasondiek/eventpulse-app/blob/master/src/lib/reservation-store.ts): `src/lib/reservation-store.ts`
- [M-Pesa API](https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/api/payments/mpesa/route.ts): `src/app/api/payments/mpesa/route.ts`
- [Payment status API](https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/api/payments/mpesa/status/%5BtxId%5D/route.ts): `src/app/api/payments/mpesa/status/[txId]/route.ts`
- [Payment intents](https://github.com/lukasondiek/eventpulse-app/blob/master/src/lib/payment-store.ts): `src/lib/payment-store.ts`

### Identity and operations

- [Sign in and signup](https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/auth/page.tsx): `src/app/auth/page.tsx`
- [Authentication API](https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/api/auth/route.ts): `src/app/api/auth/route.ts`
- [Admin login API](https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/api/admin/login/route.ts): `src/app/api/admin/login/route.ts`
- [Session APIs](https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/api/auth/me/route.ts): `src/app/api/auth/me/route.ts`
- [Logout API](https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/api/auth/logout/route.ts): `src/app/api/auth/logout/route.ts`
- [Users and sessions](https://github.com/lukasondiek/eventpulse-app/blob/master/src/lib/auth-store.ts): `src/lib/auth-store.ts`
- [Admin area](https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/admin/page.tsx): `src/app/admin/page.tsx`
- [Organizer area](https://github.com/lukasondiek/eventpulse-app/blob/master/src/app/organizer/page.tsx): `src/app/organizer/page.tsx`

### Other components

- **Attendee**

## Connections

- Attendee → Home: opens
- Attendee → Event listing: browses
- Attendee → Sign in and signup: authenticates
- Attendee → Checkout: checks out
- Attendee → My tickets: views tickets
- Origin detection → Travel widget: supplies origin
- Event API → Event catalog: reads events
- Event detail API → Event catalog: reads event
- Attendee list API → Event catalog: validates event
- Seat reservation API → Event catalog: checks event and tier
- Seat reservation API → Reservation state: reserves or releases
- M-Pesa API → Payment intents: creates intent
- Payment status API → Payment intents: reads intent
- Authentication API → Users and sessions: creates or looks up session
- Admin login API → Users and sessions: authenticates admin
- Session APIs → Users and sessions: resolves session
- Logout API → Users and sessions: destroys session
