An Enterprise-Grade Microservices Reference Implementation. Demonstrating scalable architecture, gateway aggregation, and robust end-to-end validation strategies.
Data Flow Overview:
User → Frontend UI → API Gateway → Microservices Cluster
- Frontend UI: The user interacts with the web interface.
- API Gateway: All requests go through this single entry point.
- Microservices Cluster: The gateway routes requests to the specific service:
- User Service
- Order Service
- Product Service
- Payment Service
- Review Service
- (Scalable to add more services...)
- Gateway Pattern: Aggregates data from multiple sources (Users, Orders, Products) into a single response.
- Microservices Proper: Independent Node.js services running on dedicated ports.
- Resilient Frontend: Decoupled UI with CORS-enabled secure communication.
- Enterprise Testing: Validated with a multi-layer Playwright suite (E2E, API, Mock, Perf).
| Service | Port | Description |
|---|---|---|
| API Gateway | 3000 |
Aggregation layer; Single Entry Point. |
| User Service | 3001 |
Manages user identities. |
| Order Service | 3002 |
Tracks customer orders. |
| UI | 3003 |
Customer-facing Dashboard. |
| Product Service | 3004 |
Product catalog management. |
| Payment Service | 3008 |
Tracks transaction statuses. |
| Review Service | 3006 |
Manages customer feedback. |
Employed a Test Pyramid approach to ensure quality at speed. Full details available in Test Cases Documentation.
Directly validates microservice responses and schemas.
- File:
tests/api.spec.ts - Coverage: Json Schema Validation, Data Integrity.
Ensures system stability under failure conditions.
- File:
tests/api-negative.spec.ts - Coverage: 404 Handling, Response Time SLAs (<200ms).
Tests UI logic without backend dependencies.
- File:
tests/ui-mock.spec.ts - Coverage: Edge cases, Empty States, Backend Outages.
Validates the complete flow from User -> UI -> Gateway -> Services.
- File:
tests/e2e-ui.spec.ts - Coverage: Full system integration check.
Bring up the entire stack (Gateway + 3 Microservices + UI) in one command.
# 1. Install Dependencies
npm install
# 2. Launch Ecosystem
npm startAccess the UI at: http://localhost:3003
Execute the full regression suite:
npx playwright test