Skip to content

ShankarSinghC/decision-engine

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

378 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Decision Engine

Rust 1.85+ AGPL v3 PostgreSQL and MySQL Docker Compose profiles React dashboard

Rust routing service for selecting a gateway from an eligible list and recording outcome feedback used by routing decisions.

Quick StartDocs MapDashboardDevelopmentContributing

What Ships In This Repository

  • 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 the dashboard-* Compose profiles
  • Mintlify docs under docs/ served alongside the dashboard in the dashboard-* Compose profiles

Start Here

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/

Quick Start

API Only

git clone https://github.com/juspay/decision-engine.git
cd decision-engine
docker compose --profile postgres-ghcr up -d
curl http://localhost:8080/health

Expected response:

{"message":"Health is good"}

Dashboard + Docs

docker compose --profile dashboard-postgres-ghcr up -d

Available 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.

Docs Map

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

Runtime Shape

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-score records transaction outcomes used by routing
  • POST /routing/* manages routing algorithms and routing metadata
  • POST /rule/* manages service-level rule configuration
  • POST /merchant-account/* manages merchant account configuration

Dashboard & Docs

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.

Development Commands

# lint
just clippy

# compile matrix checks
just check

# tests
cargo test

# postgres migrations
just migrate-pg

CI-sensitive compile and lint coverage is driven by scripts/ci-checks.sh and .github/workflows/.

Repository Pointers

Contributing

See CONTRIBUTING.md for contribution workflow and expectations.

License

Licensed under GNU AGPL v3.0.

About

open-source routing system designed for payment processing

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Rust 85.5%
  • TypeScript 8.9%
  • JavaScript 1.8%
  • Shell 1.7%
  • Groovy 0.8%
  • Go Template 0.3%
  • Other 1.0%