Central API Gateway for the SIT POS microservices architecture.
- Request routing and proxying
- Authentication and authorization
- Rate limiting
- Circuit breaker pattern
- Service health monitoring
- Request/response logging
- CORS handling
- Request ID tracking
- Node.js 18+
- Redis 7+
- Install dependencies:
npm install- Copy environment variables:
cp .env.example .env-
Update
.envwith service URLs -
Start the gateway:
npm run devAll routes are prefixed with /api/v1/
/auth/*→ Auth Service (port 3001)/merchant/*→ Merchant Service (port 3002)/catalog/*→ Catalog Service (port 3003)/cart/*→ Cart Service (port 3004)/payment/*→ Payment Service (port 3005)/reports/*→ Reporting Service (port 3006)
GET /health- Gateway and services healthGET /api/v1/services- Service discoveryGET /api/v1/status/circuit-breakers- Circuit breaker status
Build and run:
docker-compose up --buildProprietary