Environment & Service Endpoints
Service URLs and health.
Service endpoints
Loading…
.env.example
Copy to .env.local
CDS_BASE_URL=http://localhost:3000/api/mock/cds CRM_BASE_URL=http://localhost:3000/api/mock/crm ONESOCIETY_BASE_URL=http://localhost:3000/api/mock/onesociety HRMS_BASE_URL=http://localhost:3000/api/mock/hrms GATEAPI_BASE_URL=http://localhost:3000/api/mock/gate EVENTBUS_BASE_URL=http://localhost:3000/api/mock/events TENANT_ID=nouvel ONESSO_ACCESS_TOKEN= API_TIMEOUT_MS=15000
Cross-cutting contract (Sprint Group 0)
What every call through the gateway carries
- Canonical IDs — CDS IDs (CLT-, SITE-, LOC-) everywhere; names are display-only.
- Tenant —
X-Tenant-IdfromTENANT_ID; backends reject a mismatch with 403 TENANT_MISMATCH. - Correlation —
X-Correlation-Idper request, copied into every event it causes. - Idempotency —
Idempotency-Keyon every write; a repeat returns the stored response. - Error schema —
{ error: { code, message, details, correlationId } } - Event envelope — eventId, type, version, source, tenantId, correlationId, occurredAt, payload.
- Auth —
Authorization: BearerfromONESSO_ACCESS_TOKENwhen set (onesso / Keycloak via Kong).
Shared Definition of Done
Product owner / system-of-record documentedDB migrationAPI implementationOpenAPI specificationKong routeonesso / Keycloak authorizationTenant-isolation testsRequest validationRabbitMQ event where applicableEvent schema / versionConsumer idempotencyRetry / dead-letter handlingAudit logUnit testsIntegration testsContract testsEnd-to-end testMetricsStructured logsTrace / correlation IDTechnical documentation
The built-in demo backends implement the contract-level items (validation, tenant handling, idempotency, correlation, event envelope and versioning, idempotent consumers, retry and DLQ). Persistence, Kong routes and Keycloak live with each product team.