How lhhuy02012005/cgv works
CineMatrix is a microservices movie-ticket booking platform. The main user journey is identity authentication, browsing movies and showtimes, temporarily holding seats, creating a booking, paying, and receiving a confirmed ticket; staff also manage check-in, refunds, and booking statistics. Catalog additionally covers cinemas, rooms, seats, articles, and events; identity includes membership tiers, while marketing, media, and notification services provide supporting capabilities. The README documents Kafka/outbox, Redis locking, and realtime updates. Several supporting service implementations and their wiring are not sampled, so those links are shown only where the tree or documentation supports them.
Main entry points: BookingService.java Booking Service · AuthenticationController.java Identity API · PaymentEventConsumer.java Payment Event Consumer · BookingController.java Booking API
Components 28
Identity and Membership
- Identity API
identityservice/src/main/java/com/cgv/identityservice/controller/AuthenticationController.java - Authentication
identityservice/src/main/java/com/cgv/identityservice/service/AuthenticationService.java - User API
identityservice/src/main/java/com/cgv/identityservice/controller/UserController.java - Membership Tiers
identityservice/src/main/java/com/cgv/identityservice/service/MemberShipTierService.java
Catalog and Scheduling
- Catalog APIs
catalogservice/src/main/java/com/cgv/catalogservice/controller/MovieController.java - Showtime API
catalogservice/src/main/java/com/cgv/catalogservice/controller/ShowtimeController.java - Showtime Queries
catalogservice/src/main/java/com/cgv/catalogservice/service/ShowtimeService.java - Catalog Storage
catalogservice/src/main/java/com/cgv/catalogservice/repository/ShowtimeRepository.java - Catalog Realtime
catalogservice/src/main/java/com/cgv/catalogservice/service/CatalogRealtimeService.java - Catalog Stream API
catalogservice/src/main/java/com/cgv/catalogservice/controller/CatalogRealtimeController.java
Booking and Tickets
- Booking API
bookingservice/src/main/java/com/cgv/bookingservice/controller/BookingController.java - Booking Service
bookingservice/src/main/java/com/cgv/bookingservice/service/BookingService.java - Seat Lock API
bookingservice/src/main/java/com/cgv/bookingservice/controller/SeatLockController.java - Seat Lock Service
bookingservice/src/main/java/com/cgv/bookingservice/service/SeatLockService.java - Booking Storage
bookingservice/src/main/java/com/cgv/bookingservice/repository/BookingRepository.java - Booking Realtime
bookingservice/src/main/java/com/cgv/bookingservice/service/BookingRealtimeService.java - Payment Event Consumer
bookingservice/src/main/java/com/cgv/bookingservice/consumer/PaymentEventConsumer.java - Booking Stream API
bookingservice/src/main/java/com/cgv/bookingservice/controller/BookingRealtimeController.java - Catalog gRPC Client
bookingservice/src/main/java/com/cgv/bookingservice/grpc/CatalogGrpcClient.java
Commerce Integrations
- Payment Service
paymentservice/src/main/java/com/cgv/paymentservice/service/PaymentService.java - Promotion Service
marketingservice/src/main/java/com/cgv/marketingservice/service/PromotionService.java - Media Service
mediaservice/src/main/java/com/cgv/mediaservice/service/MediaService.java - Email Service
notificationservice/src/main/java/com/cgv/notificationservice/service/impl/BrevoService.java
Shared Contracts
- Shared Event Contracts
commondto/src/main/java/com/cgv/commondto/event/PaymentCompletedEvent.java
Other components
- Customer
- Cinema Staff
- Brevo
- Kafka
Connections 30
- Customer → Identity API: authenticates
- Identity API → Authentication: delegates
- Customer → Catalog APIs: browses
- Customer → Showtime API: finds showtimes
- Showtime API → Showtime Queries: queries
- Showtime Queries → Catalog Storage: reads
- Customer → Seat Lock API: holds seats
- Seat Lock API → Seat Lock Service: delegates
- Customer → Booking API: books seats
- Booking API → Booking Service: delegates
- Booking Service → Booking Storage: reads/writes
- Booking Service → Catalog gRPC Client: requests catalog data
- Booking Service → Payment Service: starts payment
- Customer → Payment Service: pays
- Payment Service → Kafka: publishes events
- Kafka → Payment Event Consumer: dispatches events
- Payment Event Consumer → Shared Event Contracts: uses event contract
- Payment Event Consumer → Booking Service: confirms booking
- Booking Service → Booking Realtime: broadcasts updates
- Booking Stream API → Booking Realtime: subscribes
- Customer → Booking Stream API: watches booking
- Cinema Staff → Booking API: manages tickets
- Catalog Stream API → Catalog Realtime: subscribes
- Customer → Catalog Stream API: watches catalog
- Promotion Service → Booking Service: promotion support
- Media Service → Customer: provides upload URL
- Email Service → Brevo: sends email
- Authentication → Email Service: sends OTP
- Identity API → User API: supports account flows
- Membership Tiers → User API: membership management