DRIFTGATE is an API contract governance and runtime reliability platform built around a single pipeline:
flowchart TD
A["Angular 20 UI"] --> B["Node.js/Fastify webhook gateway"]
B --> C["FastAPI runtime guard"]
C --> D["PostgreSQL contract registry + outbox"]
D --> E["MongoDB raw payload / document history"]
E --> F["LangGraph review workflow"]
F --> G["Azure Service Bus-compatible delivery adapter"]
G --> H["Prometheus / Grafana metrics + k6 benchmarks"]
- Angular 20 UI for the operator console
- Node.js and Fastify for HMAC-verified webhook ingress and idempotency
- FastAPI runtime guard for live payload tracking and drift classification
- PostgreSQL for the contract registry, version history, subscriptions, and transactional outbox
- MongoDB for raw payload captures, diff evidence, validation errors, and document history
- LangGraph for grounded contract review workflows
- Azure Service Bus-compatible delivery adapter for drift-event delivery
- Prometheus and Grafana for metrics and dashboards
- k6 for load and benchmark runs
frontend/: Angular 20 control roomgateway/: Node.js/Fastify webhook gatewayapp/: FastAPI runtime guard, review workflow, event publishing, and document-store integrationbackend/: scheduled monitor and changelog service
docker compose up -d --build
curl -X POST http://localhost:8301/api/monitor/run-once \
-H "X-DRIFTGATE-ADMIN-SECRET: dev-secret"- Frontend:
http://localhost:5173/ - Monitor API:
http://localhost:8301 - Runtime guard API:
http://localhost:8302 - Gateway:
http://localhost:8303
- Webhook ingress is verified with HMAC and idempotency checks in the gateway.
- The runtime guard records payload snapshots, schema diffs, validation failures, and review evidence.
- PostgreSQL stores registry metadata and outbox state.
- MongoDB stores raw payload documents and history.
- LangGraph powers the contract review workflow.
- The delivery adapter can target an Azure Service Bus-compatible sender.
- Metrics are exposed for Prometheus and visualized in Grafana.
- k6 benchmarks are captured as JSON artifacts under
docs/benchmarks/.
docker compose up -d --buildUseful environment defaults:
EVENT_BACKEND=noopfor local developmentEVENT_BACKEND=azure_service_buswhen an Azure Service Bus sender is injectedDOCUMENT_STORE_BACKEND=memoryfor tests and minimal local modeDOCUMENT_STORE_BACKEND=mongowithDOCUMENT_STORE_URI=mongodb://mongo:27017for local MongoDB
- The repository uses the
DRIFTGATEproject name throughout the codebase. - Benchmarks, simulations, and generated artifacts live in JSON or code form instead of markdown docs.
- The architecture is designed to be local-first and cloud-compatible without requiring cloud deployment.