How luongquockhang/bookingsystem works
Project type and purpose
• It’s a full-stack, microservices-based booking system.
• Components include:
– React single-page app (“webapp”)
– API Gateway (Ocelot)
– Identity Server for authentication/authorization
– Microservices: Stay, Promotion (API + gRPC), Cars, Flight, Booking, Experiences, Payment (API + background processor), Trips
– Databases (SQL Server, PostgreSQL, EF Core contexts, Redis TODO)
– Cross-cutting infra: centralized logging (ELK), health checks, resilience (Polly), Docker Compose
Main components
A. User-facing clients
– React Webapp
B. Edge services
– API Gateway (Ocelot)
– Identity Server (Duende IdentityServer + ASP.NET Core)
C. Microservices (each shown as its own container)
– Stay Management (REST + gRPC)
– Promotion Management (REST + gRPC)
– Cars Management (REST + GraphQL)
– Flight Management
– Booking Management
– Experiences Management
– Payment Management + Payment Processor (background worker)
– Trips Management
D. Data stores
– SQL Server (Identity, Booking, Stay, Trips, etc.)
– PostgreSQL (Promotion)
– Redis cache (future)
E. Cross-cutting/DevOps
– ELK stack
– HealthCheck/Watchdog monitoring
– Docker Compose
Relationships & data flows
• Browser → React Webapp
• Webapp → API Gateway (HTTPS REST calls)
• API Gateway → Identity Server (JWT validation)
• API Gateway → REST endpoints of each microservice
• Services may call one another via:
– HTTP (Booking → Stay gRPC via a gRPC‐to‐HTTP bridge)
– gRPC (Promotion and Stay expose gRPC endpoints)
• Microservices → their own database contexts (direct EF Core access)
• Payment Processor worker consumes events or scheduled tasks and writes to Payment DB
• All services push logs to ELK via Serilog sink
• HealthCheck endpoints polled by Watchdog service
Architectural patterns & principles
• Microservices—each service owns its data/schema
• API Gateway pattern for request routing & security
• CQRS/MediatR within services (separate Application, Domain, Infrastructure layers)
• gRPC for high-performance internal calls (Stay & Promotion)
• Resilience patterns: Retry, Circuit Breaker via IHttpClientFactory + Polly
• Centralized logging & monitoring
Final checklist
– All components are labeled
– Important technology stacks noted (React, .NET Core, EF Core, gRPC, PostgreSQL, Ocelot)
– Architectural patterns highlighted (API Gateway, microservices, CQRS, resilience, centralized logging)