Rust routing service for selecting a gateway from an eligible list and recording outcome feedback used by routing decisions.
Quick Start • Docs Map • Dashboard • Development • Contributing
- HTTP APIs for gateway selection, routing configuration, rule configuration, and merchant account configuration
- PostgreSQL and MySQL runtime tracks
- Docker Compose profiles for API-only, dashboard, docs, and monitoring flows
- Helm chart assets under
helm-charts/ - A React dashboard under
website/served at/dashboard/in thedashboard-*Compose profiles - Mintlify docs under
docs/served alongside the dashboard in thedashboard-*Compose profiles
| If you want to... | Open this first |
|---|---|
| Run the API locally | docs/local-setup.md |
| Understand configuration | docs/configuration.md |
| Browse the API surface | docs/api-reference.md |
| Use ready-made curl flows | docs/api-reference1.md |
| Inspect request and response schemas | docs/openapi.json |
| Bring up the dashboard | docs/dashboard.mdx |
| Inspect Kubernetes/on-prem assets | helm-charts/ |
git clone https://github.com/juspay/decision-engine.git
cd decision-engine
docker compose --profile postgres-ghcr up -d
curl http://localhost:8080/healthExpected response:
{"message":"Health is good"}docker compose --profile dashboard-postgres-ghcr up -dAvailable URLs:
- API:
http://localhost:8080 - Dashboard:
http://localhost:8081/dashboard/ - Docs:
http://localhost:8081/introduction
For source builds, Helm installs, and MySQL-specific flows, use docs/local-setup.md.
| Path | What it is for |
|---|---|
docs/introduction.mdx |
Product-level docs landing page |
docs/local-setup.md |
Canonical local, Compose, source-run, and Helm setup guide |
docs/configuration.md |
Config files, env overrides, and runtime config model |
docs/dashboard.mdx |
Dashboard routes, availability, and serving model |
docs/api-reference.md |
API overview grouped by endpoint family |
docs/api-reference1.md |
Local curl examples and smoke-test flows |
docs/openapi.json |
OpenAPI source consumed by the docs site |
docs/setup-guide-postgres.md |
PostgreSQL-focused setup commands |
docs/setup-guide-mysql.md |
MySQL-focused setup commands |
client or orchestrator
|
v
POST /decide-gateway
|
v
Decision Engine evaluates eligible gateways against merchant config,
routing rules, and stored score data
|
v
response with selected gateway and routing metadata
Related flows:
POST /update-gateway-scorerecords transaction outcomes used by routingPOST /routing/*manages routing algorithms and routing metadataPOST /rule/*manages service-level rule configurationPOST /merchant-account/*manages merchant account configuration
When the dashboard-* Compose profiles are running, Nginx serves:
- the React dashboard at
/dashboard/ - Mintlify docs at
/introduction - built frontend assets from
website/dist
Documented dashboard routes include:
/dashboard//dashboard/routing/dashboard/routing/sr/dashboard/routing/rules/dashboard/routing/volume/dashboard/routing/debit/dashboard/decisions
See docs/dashboard.mdx, website/src/App.tsx, and nginx/nginx.conf.
# lint
just clippy
# compile matrix checks
just check
# tests
cargo test
# postgres migrations
just migrate-pgCI-sensitive compile and lint coverage is driven by scripts/ci-checks.sh and .github/workflows/.
- Runtime entrypoint:
src/bin/open_router.rs - Router and middleware wiring:
src/app.rs - API handlers:
src/routes/ - Config loading:
src/config.rs - Tenant state wiring:
src/tenant.rs - Frontend dashboard:
website/ - Local deployment topology:
docker-compose.yaml - Kubernetes assets:
helm-charts/
See CONTRIBUTING.md for contribution workflow and expectations.
Licensed under GNU AGPL v3.0.