How shinjon101/ticketing-system works
The product is a five-service event-ticketing platform. A customer authenticates, discovers an event, submits an idempotent booking, and proceeds through payment; seat allocation and payment outcomes are coordinated asynchronously by Kafka rather than a central saga orchestrator. The graph preserves the documented outbox, concurrency-safety, and observability capabilities. Some cross-service event links are documented only at the architecture level, so those links are dashed; unsampled internals are not inferred.
Main entry points: booking.service.ts Booking workflow · consumer.ts Kafka event bus · payment.service.ts Payment workflow · auth.routes.ts Auth API
Components 21
Identity
- Auth API
services/auth-service/src/auth/auth.routes.ts - Identity logic
services/auth-service/src/auth/auth.service.ts - Auth data
services/auth-service/src/auth/auth.repository.ts
Events
- Event API
services/event-service/src/events/events.routes.ts - Event management
services/event-service/src/events/event.service.ts - Event data
services/event-service/src/events/events.repository.ts
Booking
- Booking API
services/booking-service/src/booking/booking.routes.ts - Booking workflow
services/booking-service/src/booking/booking.service.ts - Booking data
services/booking-service/src/booking/booking.repsoitory.ts - Booking outbox
services/booking-service/src/outbox/outbox.poller.ts
Inventory
- Seat allocation
services/inventory-service/src/seats/seat.service.ts - Seat data
services/inventory-service/src/seats/seat.repository.ts - Availability cache
services/inventory-service/src/redis/seat-counter.ts
Payments and infrastructure
- Payment API
services/payment-service/src/payment/payment.routes.ts - Payment workflow
services/payment-service/src/payment/payment.service.ts - Payment data
services/payment-service/src/payment/payment.repository.ts - Kafka event bus
packages/kafka-client/src/consumer.ts - Metrics and telemetry
packages/common/src/metrics/registry.ts
Other components
- Customer
- Razorpay
- Prometheus and dashboards
Connections 22
- Customer → Auth API: authenticates
- Auth API → Identity logic: routes to
- Identity logic → Auth data: reads and writes
services/auth-service/src/auth/auth.service.ts - Customer → Event API: browses events
README.md - Event API → Event management: routes to
- Event management → Event data: uses repository
services/event-service/src/events/event.service.ts - Customer → Booking API: requests booking
README.md - Booking API → Booking workflow: routes to
- Booking workflow → Booking data: uses repository
services/booking-service/src/booking/booking.service.ts - Booking workflow → Booking outbox: publishes events
README.md - Booking workflow → Kafka event bus: dispatches events
README.md - Kafka event bus → Seat allocation: delivers events
README.md - Seat allocation → Seat data: locks and updates
services/inventory-service/src/seats/seat.service.ts - Seat data → Availability cache: seeds availability
services/inventory-service/src/app.ts - Customer → Payment API: submits payment
README.md - Payment API → Payment workflow: routes to
- Payment workflow → Payment data: uses repository
services/payment-service/src/payment/payment.service.ts - Payment workflow → Razorpay: handles gateway payment
- Payment workflow → Kafka event bus: dispatches outcomes
README.md - Kafka event bus → Booking workflow: delivers outcomes
README.md - Kafka event bus → Metrics and telemetry: exports telemetry
README.md - Metrics and telemetry → Prometheus and dashboards: scrapes metrics
README.md