# duymk123/eventhub architecture

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

- Interactive diagram: https://gitdiagram.com/duymk123/eventhub
- Repository: https://github.com/duymk123/eventhub

## Overview

EventHub is a microservices event-management and ticketing platform. Organizers create events and configure ticket types; admins review them before publication. Customers reserve tickets, place orders, and pay; after payment verification, tickets are issued with QR codes. Notifications and analytics consume business events, while gate scans update attendance. The README describes these cross-service flows, but also says several integrations and workflows remain under development; the graph reflects documented architecture, not verified end-to-end runtime behavior. Source excerpts are limited, so unsampled subsystem internals are represented at their existing service paths.

Main entry points: [`api-gateway/src/main/java/com/eventhub/gateway/ApiGatewayApplication.java`](https://github.com/duymk123/eventhub/blob/main/api-gateway/src/main/java/com/eventhub/gateway/ApiGatewayApplication.java) (API gateway), [`order-service/src/main/java/com/eventhub/order/service/OrderService.java`](https://github.com/duymk123/eventhub/blob/main/order-service/src/main/java/com/eventhub/order/service/OrderService.java) (Order management), [`ticket-service/src/main/java/com/eventhub/ticket/service/ReservationService.java`](https://github.com/duymk123/eventhub/blob/main/ticket-service/src/main/java/com/eventhub/ticket/service/ReservationService.java) (Reservations), [`front-end/src/components/features`](https://github.com/duymk123/eventhub/tree/main/front-end/src/components/features) (Web client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Client and access"]
  node_web["Web client"]
  node_gateway["API gateway"]
  node_identity["Identity service"]
  node_profiles["User profiles"]
end

subgraph group_catalog["Event catalog"]
  node_event_catalog["Event lifecycle"]
end

subgraph group_ticketing["Orders and tickets"]
  node_ticket_types["Ticket types"]
  node_reservations["Reservations"]
  node_orders["Order management<br/>[OrderService.java]"]
  node_qr_tickets["QR tickets"]
  node_gate_scanning["Gate scanning"]
end

subgraph group_insights["Notifications and analytics"]
  node_notifications["Notifications"]
  node_in_app["In-app notices"]
  node_analytics["Analytics projections"]
  node_reports["Reports and dashboards"]
  node_dashboard_push["Dashboard updates"]
end

node_customer(("Customer"))
node_organizer(("Organizer"))
node_admin(("Administrator"))
node_gate_device(("QR scanner"))
node_payment["Payment provider"]
node_kafka["Kafka event bus"]
node_email["SMTP mail"]

node_customer -->|"uses"| node_web
node_organizer -->|"uses"| node_web
node_admin -->|"uses"| node_web
node_gate_device -->|"submits scans"| node_gateway
node_web -->|"calls REST"| node_gateway
node_gateway -->|"routes requests"| node_identity
node_gateway -->|"routes requests"| node_event_catalog
node_gateway -->|"routes requests"| node_ticket_types
node_gateway -->|"routes requests"| node_reservations
node_gateway -->|"routes requests"| node_orders
node_gateway -->|"routes requests"| node_notifications
node_gateway -->|"routes requests"| node_reports
node_identity -->|"updates profiles"| node_profiles
node_organizer -->|"creates events"| node_event_catalog
node_admin -->|"reviews events"| node_event_catalog
node_customer -->|"selects tickets"| node_ticket_types
node_orders -->|"reserves tickets"| node_reservations
node_orders -.->|"requests payment"| node_payment
node_payment -.->|"sends webhook"| node_orders
node_orders -->|"confirms reservation"| node_reservations
node_reservations -->|"issues QR tickets"| node_qr_tickets
node_gate_device -->|"scans QR"| node_gate_scanning
node_gate_scanning -->|"publishes scans"| node_kafka
node_orders -->|"publishes order events"| node_kafka
node_reservations -->|"publishes ticket events"| node_kafka
node_kafka -->|"delivers events"| node_notifications
node_kafka -->|"delivers events"| node_analytics
node_notifications -->|"creates notices"| node_in_app
node_notifications -.->|"sends email"| node_email
node_analytics -->|"updates projections"| node_reports
node_analytics -->|"updates dashboards"| node_dashboard_push
node_dashboard_push -->|"pushes updates"| node_web

click node_web "https://github.com/duymk123/eventhub/tree/main/front-end/src/components/features"
click node_gateway "https://github.com/duymk123/eventhub/blob/main/api-gateway/src/main/java/com/eventhub/gateway/ApiGatewayApplication.java"
click node_identity "https://github.com/duymk123/eventhub/blob/main/auth-service/src/main/java/com/eventhub/auth/service/impl/AuthServiceImpl.java"
click node_profiles "https://github.com/duymk123/eventhub/blob/main/auth-service/src/main/java/com/eventhub/auth/service/impl/UserProfileServiceImpl.java"
click node_event_catalog "https://github.com/duymk123/eventhub/tree/main/event-service/src/main/java/com/eventhub/event"
click node_ticket_types "https://github.com/duymk123/eventhub/blob/main/ticket-service/src/main/java/com/eventhub/ticket/service/impl/TicketTypeServiceImpl.java"
click node_reservations "https://github.com/duymk123/eventhub/blob/main/ticket-service/src/main/java/com/eventhub/ticket/service/ReservationService.java"
click node_orders "https://github.com/duymk123/eventhub/blob/main/order-service/src/main/java/com/eventhub/order/service/OrderService.java"
click node_qr_tickets "https://github.com/duymk123/eventhub/blob/main/ticket-service/src/main/java/com/eventhub/ticket/service/impl/TicketQueryServiceImpl.java"
click node_gate_scanning "https://github.com/duymk123/eventhub/blob/main/ticket-service/src/main/java/com/eventhub/ticket/service/impl/GateServiceImpl.java"
click node_notifications "https://github.com/duymk123/eventhub/blob/main/notification-service/src/main/java/com/eventhub/notification/messaging/NotificationEventConsumer.java"
click node_in_app "https://github.com/duymk123/eventhub/blob/main/notification-service/src/main/java/com/eventhub/notification/service/NotificationBatchService.java"
click node_analytics "https://github.com/duymk123/eventhub/blob/main/analytics-service/src/main/java/com/eventhub/analytics/messaging/AnalyticsEventConsumer.java"
click node_reports "https://github.com/duymk123/eventhub/blob/main/analytics-service/src/main/java/com/eventhub/analytics/service/impl/AnalyticsQueryServiceImpl.java"
click node_dashboard_push "https://github.com/duymk123/eventhub/blob/main/analytics-service/src/main/java/com/eventhub/analytics/service/DashboardPushService.java"

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_web,node_gateway,node_identity,node_profiles toneBlue
class node_event_catalog toneAmber
class node_ticket_types,node_reservations,node_orders,node_qr_tickets,node_gate_scanning toneMint
class node_notifications,node_in_app,node_analytics,node_reports,node_dashboard_push toneRose
class node_customer,node_organizer,node_admin,node_gate_device,node_payment,node_kafka,node_email toneIndigo
```

## Components

### Client and access

- [Web client](https://github.com/duymk123/eventhub/tree/main/front-end/src/components/features): `front-end/src/components/features`
- [API gateway](https://github.com/duymk123/eventhub/blob/main/api-gateway/src/main/java/com/eventhub/gateway/ApiGatewayApplication.java): `api-gateway/src/main/java/com/eventhub/gateway/ApiGatewayApplication.java`
- [Identity service](https://github.com/duymk123/eventhub/blob/main/auth-service/src/main/java/com/eventhub/auth/service/impl/AuthServiceImpl.java): `auth-service/src/main/java/com/eventhub/auth/service/impl/AuthServiceImpl.java`
- [User profiles](https://github.com/duymk123/eventhub/blob/main/auth-service/src/main/java/com/eventhub/auth/service/impl/UserProfileServiceImpl.java): `auth-service/src/main/java/com/eventhub/auth/service/impl/UserProfileServiceImpl.java`

### Event catalog

- [Event lifecycle](https://github.com/duymk123/eventhub/tree/main/event-service/src/main/java/com/eventhub/event): `event-service/src/main/java/com/eventhub/event`

### Orders and tickets

- [Ticket types](https://github.com/duymk123/eventhub/blob/main/ticket-service/src/main/java/com/eventhub/ticket/service/impl/TicketTypeServiceImpl.java): `ticket-service/src/main/java/com/eventhub/ticket/service/impl/TicketTypeServiceImpl.java`
- [Reservations](https://github.com/duymk123/eventhub/blob/main/ticket-service/src/main/java/com/eventhub/ticket/service/ReservationService.java): `ticket-service/src/main/java/com/eventhub/ticket/service/ReservationService.java`
- [Order management](https://github.com/duymk123/eventhub/blob/main/order-service/src/main/java/com/eventhub/order/service/OrderService.java): `order-service/src/main/java/com/eventhub/order/service/OrderService.java`
- [QR tickets](https://github.com/duymk123/eventhub/blob/main/ticket-service/src/main/java/com/eventhub/ticket/service/impl/TicketQueryServiceImpl.java): `ticket-service/src/main/java/com/eventhub/ticket/service/impl/TicketQueryServiceImpl.java`
- [Gate scanning](https://github.com/duymk123/eventhub/blob/main/ticket-service/src/main/java/com/eventhub/ticket/service/impl/GateServiceImpl.java): `ticket-service/src/main/java/com/eventhub/ticket/service/impl/GateServiceImpl.java`

### Notifications and analytics

- [Notifications](https://github.com/duymk123/eventhub/blob/main/notification-service/src/main/java/com/eventhub/notification/messaging/NotificationEventConsumer.java): `notification-service/src/main/java/com/eventhub/notification/messaging/NotificationEventConsumer.java`
- [In-app notices](https://github.com/duymk123/eventhub/blob/main/notification-service/src/main/java/com/eventhub/notification/service/NotificationBatchService.java): `notification-service/src/main/java/com/eventhub/notification/service/NotificationBatchService.java`
- [Analytics projections](https://github.com/duymk123/eventhub/blob/main/analytics-service/src/main/java/com/eventhub/analytics/messaging/AnalyticsEventConsumer.java): `analytics-service/src/main/java/com/eventhub/analytics/messaging/AnalyticsEventConsumer.java`
- [Reports and dashboards](https://github.com/duymk123/eventhub/blob/main/analytics-service/src/main/java/com/eventhub/analytics/service/impl/AnalyticsQueryServiceImpl.java): `analytics-service/src/main/java/com/eventhub/analytics/service/impl/AnalyticsQueryServiceImpl.java`
- [Dashboard updates](https://github.com/duymk123/eventhub/blob/main/analytics-service/src/main/java/com/eventhub/analytics/service/DashboardPushService.java): `analytics-service/src/main/java/com/eventhub/analytics/service/DashboardPushService.java`

### Other components

- **Customer**
- **Organizer**
- **Administrator**
- **QR scanner**
- **Payment provider**
- **Kafka event bus**
- **SMTP mail**

## Connections

- Customer → Web client: uses (evidence: `README.md`)
- Organizer → Web client: uses (evidence: `README.md`)
- Administrator → Web client: uses (evidence: `README.md`)
- QR scanner → API gateway: submits scans (evidence: `README.md`)
- Web client → API gateway: calls REST (evidence: `README.md`)
- API gateway → Identity service: routes requests (evidence: `README.md`)
- API gateway → Event lifecycle: routes requests (evidence: `README.md`)
- API gateway → Ticket types: routes requests (evidence: `README.md`)
- API gateway → Reservations: routes requests (evidence: `README.md`)
- API gateway → Order management: routes requests (evidence: `README.md`)
- API gateway → Notifications: routes requests (evidence: `README.md`)
- API gateway → Reports and dashboards: routes requests (evidence: `README.md`)
- Identity service → User profiles: updates profiles (evidence: `auth-service/src/main/java/com/eventhub/auth/service/impl/AuthServiceImpl.java`)
- Organizer → Event lifecycle: creates events (evidence: `README.md`)
- Administrator → Event lifecycle: reviews events (evidence: `README.md`)
- Customer → Ticket types: selects tickets (evidence: `README.md`)
- Order management → Reservations: reserves tickets (evidence: `README.md`)
- Order management → Payment provider: requests payment (evidence: `README.md`)
- Payment provider → Order management: sends webhook (evidence: `README.md`)
- Order management → Reservations: confirms reservation (evidence: `README.md`)
- Reservations → QR tickets: issues QR tickets (evidence: `README.md`)
- QR scanner → Gate scanning: scans QR (evidence: `README.md`)
- Gate scanning → Kafka event bus: publishes scans (evidence: `README.md`)
- Order management → Kafka event bus: publishes order events (evidence: `README.md`)
- Reservations → Kafka event bus: publishes ticket events (evidence: `README.md`)
- Kafka event bus → Notifications: delivers events (evidence: `README.md`)
- Kafka event bus → Analytics projections: delivers events (evidence: `README.md`)
- Notifications → In-app notices: creates notices (evidence: `notification-service/src/main/java/com/eventhub/notification/service/NotificationBatchService.java`)
- Notifications → SMTP mail: sends email (evidence: `README.md`)
- Analytics projections → Reports and dashboards: updates projections (evidence: `README.md`)
- Analytics projections → Dashboard updates: updates dashboards (evidence: `README.md`)
- Dashboard updates → Web client: pushes updates (evidence: `README.md`)
