How hcmus-project/servicebooking works
Main System Components
a) API Layer:
• gRPC Service Endpoints (shown in /src/proto folder)
• Controllers (booking, employee, services, voucher, review)
b) Core Services:
• Database Services (Prisma + MongoDB)
• Cache Service
• Logger Service
• Queue Service
• External Services Integration
c) Feature Modules:
• Booking System
• Employee Management
• Services Management
• Review System
• Voucher System
Architecture Representation
┌─────────────────────────────────────────────────────────────┐
• gRPC API Gateway │
• ┘
• ↓
┌─────────────────────────────────────────────────────────────┐
• NestJS Core Layer │
• ┌─────────────┐ ┌─────────────┐ ┌─────────────────────┐ │
• Guards │ │Interceptors │ │ Exception Filters │ │
• ┘ └─────────────┘ └─────────────────────┘ │
• ┘
• ↓
┌─────────────────────────────────────────────────────────────┐
• Feature Modules │
• ┌─────────────┐ ┌─────────────┐ ┌─────────────────────┐ │
• Booking │ │ Employee │ │ Services │ │
• ┘ └─────────────┘ └─────────────────────┘ │
• ┌─────────────┐ ┌─────────────┐ │
• Review │ │ Voucher │ │
• ┘ └─────────────┘ │
• ┘
• ↓
┌─────────────────────────────────────────────────────────────┐
• Core Services │
• ┌─────────────┐ ┌─────────────┐ ┌─────────────────────┐ │
• Cache │ │ Logger │ │ Queue │ │
• ┘ └─────────────┘ └─────────────────────┘ │
• ┘
• ↓
┌─────────────────────────────────────────────────────────────┐
• Data Layer │
• ┌─────────────┐ ┌─────────────┐ │
• Prisma │ │ MongoDB │ │
• ┘ └─────────────┘ │
• ┘
Connection Types
→ Synchronous calls
⇢ Asynchronous calls
⇄ Two-way communication
Additional Details
Annotations for:
• Environment configurations
• Authentication flow
• Error handling
• Logging mechanisms
• Cache strategies
• Queue processing