Welcome to the comprehensive API documentation for the Modern Reservation System.
ποΈ Architecture
Our system follows a microservices architecture with:
- Hybrid Technology Stack: Node.js + Java services
- Event-Driven Communication: Apache Kafka
- Service Discovery: Eureka Server
- API Gateway: GraphQL Federation + REST
π Service Categories
π’ Business Services (Java Spring Boot)
Core business logic and domain services:
- Business Services Overview - Complete business services documentation
- Analytics Engine - Real-time analytics and reporting
- Availability Calculator - Room availability computation
- Payment Processor - Secure payment handling
- Rate Management - Dynamic pricing engine
- Reservation Engine - Core booking logic
π API Services (Node.js)
High-performance I/O services:
- GraphQL Gateway - Unified data graph and federation
- WebSocket Service - Real-time communication
- Notification Service - Multi-channel messaging
ποΈ Infrastructure Services
Platform and infrastructure:
- Eureka Server - Service discovery and registration
- Config Server - Centralized configuration management
π Getting Started
Quick Start
# Start all infrastructure
./dev.sh docker-start
# Start business services
./dev.sh start-business-services
# Check service health
./dev.sh status
Service URLs
| Service | URL | Health Check | |βββ|ββ|βββββ| | Eureka Dashboard | http://localhost:8761 | β Active | | GraphQL Playground | http://localhost:4000/graphql | β Active | | API Gateway | http://localhost:3001 | β Active |
π Observability
Monitoring Stack
- Jaeger Tracing: http://localhost:16686
- Prometheus Metrics: http://localhost:9090
- Grafana Dashboards: http://localhost:3000 (admin/admin123)
OpenTelemetry
All services include distributed tracing with automatic instrumentation.
π Authentication
JWT Authentication
# Get JWT token
curl -X POST http://localhost:3001/auth/login \
-H "Content-Type: application/json" \
-d '{"username": "admin", "password": "admin123"}'
# Use token in requests
curl -H "Authorization: Bearer <jwt-token>" \
-H "X-Tenant-ID: <tenant-id>" \
http://localhost:8080/api/v1/analytics/overview
π‘ GraphQL Federation
Unified Schema
Access all services through a single GraphQL endpoint:
query GetReservationWithAnalytics($id: ID!) {
reservation(id: $id) {
id
guestName
checkIn
checkOut
status
analytics {
revenue
nights
averageRate
}
}
}
π Event-Driven Architecture
Kafka Topics
| Topic | Purpose | Schema |
|ββ-|βββ|βββ|
| reservation.created
| New reservations | Avro Schema |
| payment.processed
| Payment confirmations | Avro Schema |
| availability.updated
| Room availability changes | Avro Schema |
π Additional Resources
Generated: $(date -u +β%Y-%m-%d %H:%M:%S UTCβ) Version: $(git rev-parse βshort HEAD)