Play 1 · Business Logic Centralization Banking & financial services XanoTS

Credit Decisioning Rules Engine

One governed loan-decision service every system calls, so credit rules live in a single versioned, auditable API layer instead of being copied into each app.

6 tables · 8 APIs · 1 shared function

View on GitHub Use this template
The Decision screen showing a governed outcome, the exact rule that fired, and the policy version it was pinned to.
The Decision screen: the governed outcome, the exact rule that fired, and the policy version it was pinned to.

What it demonstrates

Lenders duplicate credit rules across an origination tool, a mobile app, and a partner portal, and the copies drift. This backend centralizes the rule. The credit waterfall lives in one function both the API and the seed path call, so every consumer runs identical rules.

Versioned policy

Each policy is a row. Exactly one is active. Every decision is pinned to the version that produced it, so an old decision traces to the exact rule in force at the time.

Append-only audit trail

Every event on an application lands in the log with the actor and the policy version. Rows are never updated or deleted.

API-layer access control

An underwriter may run and override decisions. A reviewer is read-only. The role is checked in each endpoint, never with row-level security.

API surface

VerbPathEnforces
POSTauth/loginPublic. Mints a bearer token.
GETapplicationsSigned in. Applications with applicant and decision.
POSTapplications/submitUnderwriter only. Computes debt-to-income, opens the application.
POSTdecisions/runUnderwriter only. Runs the waterfall, pins the decision.
GETdecisions/{application_id}Signed in. The outcome, the rule that fired, the version.
GETaudit/{applicant_id}Signed in. The ordered event history for an applicant.
GETrule-setsSigned in. Every policy version, active one marked.
GETseedPublic. Idempotent demo reset.

Frontend screens

Use this template

Paste this to your coding agent to stand up your own live copy, then adapt it to your domain:

Use https://github.com/xano-scratch/credit-decisioning-rules-engine as a
starting template. Clone it, run `npm install`, then `npx xanots login`
and `npm run xano:deploy` to deploy your own live copy.

The backend is authored with @xanots/sdk in xano/ and the frontend in
frontend/. Read node_modules/@xanots/sdk/llms.txt first, then adapt the
tables, the evaluate_application function, and the endpoints to your own
domain, keeping the versioned-policy and audit-log patterns.

Or clone and deploy directly:

git clone https://github.com/xano-scratch/credit-decisioning-rules-engine
cd credit-decisioning-rules-engine
npm install
npx xanots login
npm run xano:deploy

About the live preview

Demo links are ephemeral. They expire, and each redeploy publishes a new address, so a link from an earlier run stops serving. The durable artifact is this repository. Anyone can clone it and run npm run xano:deploy for a fresh live copy in about a minute. The two demo accounts ship as seed data, and the app seeds its demo book on first open.