# rishabh-rajput-rr/tickit-hub architecture

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

- Interactive diagram: https://gitdiagram.com/rishabh-rajput-rr/tickit-hub
- Repository: https://github.com/rishabh-rajput-rr/tickit-hub

## Overview

TicketHub is a ticketing platform split into Spring services for authentication, event/show catalog management, seat reservations, payments, and booking notifications. The main customer workflow is to authenticate, browse shows and seat maps, reserve seats, pay, and receive booking updates. Booking and payment also exchange internal HTTP requests; notification processing is event-driven. Source excerpts support several API and service interactions, but do not show gateway routing, most event-service internals, or Kafka wiring, so those relationships are left unverified rather than inferred.

Main entry points: [`TicketHubMicroservicesV1New/payment-service/TicketHub_Payment_Microservice_Phase1_MySQL/tickethub-payment-service/src/main/java/com/tickethub/payment/service/PaymentService.java`](https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/payment-service/TicketHub_Payment_Microservice_Phase1_MySQL/tickethub-payment-service/src/main/java/com/tickethub/payment/service/PaymentService.java) (Payment workflow), [`TicketHubMicroservicesV1New/booking-service/src/main/java/com/tp/snapseat/booking_service/service/BookingService.java`](https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/booking-service/src/main/java/com/tp/snapseat/booking_service/service/BookingService.java) (Booking workflow), [`TicketHubMicroservicesV1New/notification-service/notification-service/src/main/java/com/tp/snapseat/notification_service/service/NotificationService.java`](https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/notification-service/notification-service/src/main/java/com/tp/snapseat/notification_service/service/NotificationService.java) (Notification workflow), [`TicketHubMicroservicesV1New/payment-service/TicketHub_Payment_Microservice_Phase1_MySQL/tickethub-payment-service/src/main/java/com/tickethub/payment/client/BookingServiceClient.java`](https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/payment-service/TicketHub_Payment_Microservice_Phase1_MySQL/tickethub-payment-service/src/main/java/com/tickethub/payment/client/BookingServiceClient.java) (Booking service client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_edge["Entry and identity"]
  node_gateway["API gateway"]
  node_auth["JWT authentication<br/>[AuthService.java]"]
end

subgraph group_catalog["Event catalog"]
  node_events["Events and movies"]
  node_shows["Shows and seats"]
end

subgraph group_booking["Reservations"]
  node_booking_api["Booking API"]
  node_internal_api["Internal booking API"]
  node_booking_logic["Booking workflow"]
  node_booking_model["Booking state<br/>[Booking.java]"]
  node_booking_store[("Booking storage")]
end

subgraph group_payments["Payments"]
  node_payment_api["Payment API"]
  node_payment_logic["Payment workflow"]
  node_provider["Razorpay integration"]
  node_payment_store[("Payment storage")]
  node_booking_client["Booking service client"]
end

subgraph group_notify["Notifications"]
  node_consumer["Booking event consumer"]
  node_notification_logic["Notification workflow"]
  node_notification_store[("Notification records")]
  node_email["Email delivery<br/>[EmailService.java]"]
end

node_customer(("Customer"))
node_broker["Kafka broker"]
node_email_provider["Mail service"]

node_customer -.->|"requests APIs"| node_gateway
node_customer -.->|"requests login"| node_auth
node_gateway -.->|"routes requests"| node_auth
node_customer -.->|"browses shows"| node_shows
node_shows -.->|"loads catalog"| node_events
node_customer -->|"creates booking"| node_booking_api
node_booking_api -->|"calls"| node_booking_logic
node_booking_logic -.->|"manages state"| node_booking_model
node_booking_logic -.->|"persists bookings"| node_booking_store
node_payment_api -.->|"calls"| node_payment_logic
node_payment_logic -.->|"persists payments"| node_payment_store
node_payment_logic -.->|"initiates payment"| node_provider
node_payment_logic -->|"validates booking"| node_booking_client
node_payment_logic -->|"sends result"| node_booking_client
node_booking_client -->|"calls internal API"| node_internal_api
node_internal_api -->|"calls"| node_booking_logic
node_booking_logic -.->|"publishes updates"| node_broker
node_broker -.->|"delivers events"| node_consumer
node_consumer -.->|"processes event"| node_notification_logic
node_notification_logic -->|"records status"| node_notification_store
node_notification_logic -->|"dispatches email"| node_email
node_email -.->|"sends mail"| node_email_provider

click node_gateway "https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/api-gateway/src/main/java/com/tp/snapseat/api_gateway/ApiGatewayApplication.java"
click node_auth "https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/auth-service/auth-service/src/main/java/com/tp/snapseat/auth_service/service/AuthService.java"
click node_events "https://github.com/rishabh-rajput-rr/tickit-hub/tree/main/TicketHubMicroservicesV1New/event-service/event-service-updated-fixed/src/main/java/com/tp/snapseat/event_service/service/impl"
click node_shows "https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/event-service/event-service-updated-fixed/src/main/java/com/tp/snapseat/event_service/controller/ShowController.java"
click node_booking_api "https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/booking-service/src/main/java/com/tp/snapseat/booking_service/controller/BookingController.java"
click node_internal_api "https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/booking-service/src/main/java/com/tp/snapseat/booking_service/controller/InternalBookingController.java"
click node_booking_logic "https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/booking-service/src/main/java/com/tp/snapseat/booking_service/service/BookingService.java"
click node_booking_model "https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/booking-service/src/main/java/com/tp/snapseat/booking_service/entity/Booking.java"
click node_booking_store "https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/booking-service/src/main/java/com/tp/snapseat/booking_service/repository/BookingRepository.java"
click node_payment_api "https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/payment-service/TicketHub_Payment_Microservice_Phase1_MySQL/tickethub-payment-service/src/main/java/com/tickethub/payment/controller/PaymentController.java"
click node_payment_logic "https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/payment-service/TicketHub_Payment_Microservice_Phase1_MySQL/tickethub-payment-service/src/main/java/com/tickethub/payment/service/PaymentService.java"
click node_provider "https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/payment-service/TicketHub_Payment_Microservice_Phase1_MySQL/tickethub-payment-service/src/main/java/com/tickethub/payment/provider/PaymentProviderClient.java"
click node_payment_store "https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/payment-service/TicketHub_Payment_Microservice_Phase1_MySQL/tickethub-payment-service/src/main/java/com/tickethub/payment/repository/PaymentRepository.java"
click node_booking_client "https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/payment-service/TicketHub_Payment_Microservice_Phase1_MySQL/tickethub-payment-service/src/main/java/com/tickethub/payment/client/BookingServiceClient.java"
click node_consumer "https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/notification-service/notification-service/src/main/java/com/tp/snapseat/notification_service/kafka/BookingNotificationConsumer.java"
click node_notification_logic "https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/notification-service/notification-service/src/main/java/com/tp/snapseat/notification_service/service/NotificationService.java"
click node_notification_store "https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/notification-service/notification-service/src/main/java/com/tp/snapseat/notification_service/repository/NotificationRecordRepository.java"
click node_email "https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/notification-service/notification-service/src/main/java/com/tp/snapseat/notification_service/service/EmailService.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_gateway,node_auth toneBlue
class node_events,node_shows toneAmber
class node_booking_api,node_internal_api,node_booking_logic,node_booking_model,node_booking_store toneMint
class node_payment_api,node_payment_logic,node_provider,node_payment_store,node_booking_client toneRose
class node_consumer,node_notification_logic,node_notification_store,node_email,node_customer,node_broker,node_email_provider toneIndigo
```

## Components

### Entry and identity

- [API gateway](https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/api-gateway/src/main/java/com/tp/snapseat/api_gateway/ApiGatewayApplication.java): `TicketHubMicroservicesV1New/api-gateway/src/main/java/com/tp/snapseat/api_gateway/ApiGatewayApplication.java`
- [JWT authentication](https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/auth-service/auth-service/src/main/java/com/tp/snapseat/auth_service/service/AuthService.java): `TicketHubMicroservicesV1New/auth-service/auth-service/src/main/java/com/tp/snapseat/auth_service/service/AuthService.java`

### Event catalog

- [Events and movies](https://github.com/rishabh-rajput-rr/tickit-hub/tree/main/TicketHubMicroservicesV1New/event-service/event-service-updated-fixed/src/main/java/com/tp/snapseat/event_service/service/impl): `TicketHubMicroservicesV1New/event-service/event-service-updated-fixed/src/main/java/com/tp/snapseat/event_service/service/impl`
- [Shows and seats](https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/event-service/event-service-updated-fixed/src/main/java/com/tp/snapseat/event_service/controller/ShowController.java): `TicketHubMicroservicesV1New/event-service/event-service-updated-fixed/src/main/java/com/tp/snapseat/event_service/controller/ShowController.java`

### Reservations

- [Booking API](https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/booking-service/src/main/java/com/tp/snapseat/booking_service/controller/BookingController.java): `TicketHubMicroservicesV1New/booking-service/src/main/java/com/tp/snapseat/booking_service/controller/BookingController.java`
- [Internal booking API](https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/booking-service/src/main/java/com/tp/snapseat/booking_service/controller/InternalBookingController.java): `TicketHubMicroservicesV1New/booking-service/src/main/java/com/tp/snapseat/booking_service/controller/InternalBookingController.java`
- [Booking workflow](https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/booking-service/src/main/java/com/tp/snapseat/booking_service/service/BookingService.java): `TicketHubMicroservicesV1New/booking-service/src/main/java/com/tp/snapseat/booking_service/service/BookingService.java`
- [Booking state](https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/booking-service/src/main/java/com/tp/snapseat/booking_service/entity/Booking.java): `TicketHubMicroservicesV1New/booking-service/src/main/java/com/tp/snapseat/booking_service/entity/Booking.java`
- [Booking storage](https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/booking-service/src/main/java/com/tp/snapseat/booking_service/repository/BookingRepository.java): `TicketHubMicroservicesV1New/booking-service/src/main/java/com/tp/snapseat/booking_service/repository/BookingRepository.java`

### Payments

- [Payment API](https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/payment-service/TicketHub_Payment_Microservice_Phase1_MySQL/tickethub-payment-service/src/main/java/com/tickethub/payment/controller/PaymentController.java): `TicketHubMicroservicesV1New/payment-service/TicketHub_Payment_Microservice_Phase1_MySQL/tickethub-payment-service/src/main/java/com/tickethub/payment/controller/PaymentController.java`
- [Payment workflow](https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/payment-service/TicketHub_Payment_Microservice_Phase1_MySQL/tickethub-payment-service/src/main/java/com/tickethub/payment/service/PaymentService.java): `TicketHubMicroservicesV1New/payment-service/TicketHub_Payment_Microservice_Phase1_MySQL/tickethub-payment-service/src/main/java/com/tickethub/payment/service/PaymentService.java`
- [Razorpay integration](https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/payment-service/TicketHub_Payment_Microservice_Phase1_MySQL/tickethub-payment-service/src/main/java/com/tickethub/payment/provider/PaymentProviderClient.java): `TicketHubMicroservicesV1New/payment-service/TicketHub_Payment_Microservice_Phase1_MySQL/tickethub-payment-service/src/main/java/com/tickethub/payment/provider/PaymentProviderClient.java`
- [Payment storage](https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/payment-service/TicketHub_Payment_Microservice_Phase1_MySQL/tickethub-payment-service/src/main/java/com/tickethub/payment/repository/PaymentRepository.java): `TicketHubMicroservicesV1New/payment-service/TicketHub_Payment_Microservice_Phase1_MySQL/tickethub-payment-service/src/main/java/com/tickethub/payment/repository/PaymentRepository.java`
- [Booking service client](https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/payment-service/TicketHub_Payment_Microservice_Phase1_MySQL/tickethub-payment-service/src/main/java/com/tickethub/payment/client/BookingServiceClient.java): `TicketHubMicroservicesV1New/payment-service/TicketHub_Payment_Microservice_Phase1_MySQL/tickethub-payment-service/src/main/java/com/tickethub/payment/client/BookingServiceClient.java`

### Notifications

- [Booking event consumer](https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/notification-service/notification-service/src/main/java/com/tp/snapseat/notification_service/kafka/BookingNotificationConsumer.java): `TicketHubMicroservicesV1New/notification-service/notification-service/src/main/java/com/tp/snapseat/notification_service/kafka/BookingNotificationConsumer.java`
- [Notification workflow](https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/notification-service/notification-service/src/main/java/com/tp/snapseat/notification_service/service/NotificationService.java): `TicketHubMicroservicesV1New/notification-service/notification-service/src/main/java/com/tp/snapseat/notification_service/service/NotificationService.java`
- [Notification records](https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/notification-service/notification-service/src/main/java/com/tp/snapseat/notification_service/repository/NotificationRecordRepository.java): `TicketHubMicroservicesV1New/notification-service/notification-service/src/main/java/com/tp/snapseat/notification_service/repository/NotificationRecordRepository.java`
- [Email delivery](https://github.com/rishabh-rajput-rr/tickit-hub/blob/main/TicketHubMicroservicesV1New/notification-service/notification-service/src/main/java/com/tp/snapseat/notification_service/service/EmailService.java): `TicketHubMicroservicesV1New/notification-service/notification-service/src/main/java/com/tp/snapseat/notification_service/service/EmailService.java`

### Other components

- **Customer**
- **Kafka broker**
- **Mail service**

## Connections

- Customer → API gateway: requests APIs
- Customer → JWT authentication: requests login
- API gateway → JWT authentication: routes requests
- Customer → Shows and seats: browses shows
- Shows and seats → Events and movies: loads catalog
- Customer → Booking API: creates booking (evidence: `TicketHubMicroservicesV1New/booking-service/src/main/java/com/tp/snapseat/booking_service/controller/BookingController.java`)
- Booking API → Booking workflow: calls (evidence: `TicketHubMicroservicesV1New/booking-service/src/main/java/com/tp/snapseat/booking_service/controller/BookingController.java`)
- Booking workflow → Booking state: manages state
- Booking workflow → Booking storage: persists bookings
- Payment API → Payment workflow: calls (evidence: `TicketHubMicroservicesV1New/payment-service/TicketHub_Payment_Microservice_Phase1_MySQL/tickethub-payment-service/src/main/java/com/tickethub/payment/controller/PaymentController.java`)
- Payment workflow → Payment storage: persists payments (evidence: `TicketHubMicroservicesV1New/payment-service/TicketHub_Payment_Microservice_Phase1_MySQL/tickethub-payment-service/src/main/java/com/tickethub/payment/service/PaymentService.java`)
- Payment workflow → Razorpay integration: initiates payment (evidence: `TicketHubMicroservicesV1New/payment-service/TicketHub_Payment_Microservice_Phase1_MySQL/tickethub-payment-service/src/main/java/com/tickethub/payment/service/PaymentService.java`)
- Payment workflow → Booking service client: validates booking (evidence: `TicketHubMicroservicesV1New/payment-service/TicketHub_Payment_Microservice_Phase1_MySQL/tickethub-payment-service/src/main/java/com/tickethub/payment/service/PaymentService.java`)
- Payment workflow → Booking service client: sends result (evidence: `TicketHubMicroservicesV1New/payment-service/TicketHub_Payment_Microservice_Phase1_MySQL/tickethub-payment-service/src/main/java/com/tickethub/payment/service/PaymentService.java`)
- Booking service client → Internal booking API: calls internal API (evidence: `TicketHubMicroservicesV1New/payment-service/TicketHub_Payment_Microservice_Phase1_MySQL/tickethub-payment-service/src/main/java/com/tickethub/payment/client/BookingServiceClient.java`)
- Internal booking API → Booking workflow: calls (evidence: `TicketHubMicroservicesV1New/booking-service/src/main/java/com/tp/snapseat/booking_service/controller/InternalBookingController.java`)
- Booking workflow → Kafka broker: publishes updates
- Kafka broker → Booking event consumer: delivers events
- Booking event consumer → Notification workflow: processes event
- Notification workflow → Notification records: records status (evidence: `TicketHubMicroservicesV1New/notification-service/notification-service/src/main/java/com/tp/snapseat/notification_service/service/NotificationService.java`)
- Notification workflow → Email delivery: dispatches email (evidence: `TicketHubMicroservicesV1New/notification-service/notification-service/src/main/java/com/tp/snapseat/notification_service/service/NotificationService.java`)
- Email delivery → Mail service: sends mail
