JavaScript SDK · MIT · zero dependencies

FallEstateOnboard SDK

A JavaScript library with the checks behind FallEstateOnboard, the client-onboarding tool for UK estate and letting agents: the AML risk score for a client, the onboarding steps each kind of client needs, the document and Right to Rent tables, and 10 rules-based answers on AML, Right to Rent, deposits, referencing, redress, client money, tenant fees, vulnerable customers, EPCs and sanctions.

It is the FallEstateOnboard page's own code, taken out so a developer, or an AI agent, can call it directly. It supports your process; it is not legal advice, and the risk score is a heuristic your MLRO sets policy on, not a statutory test.

Start here

  1. Install it from GitHub (it is not on the npm registry):
    npm install github:sjgant80-hub/fallestateonboard-sdk
  2. Import what you need and call it:
    import { newClientRec, assessAmlRisk, getSteps, askT0 } from '@ai-native-solutions/fallestateonboard-sdk';
    
    const client = newClientRec({ clientType: 'buyer' });
    client.aml.pepStatus = true; client.aml.sourceOfFunds = 'overseas';
    assessAmlRisk(client);   // { grade: 'high', score: 6, reasons: ['PEP', 'sanctions unchecked', 'overseas source'] }
    getSteps(client);        // the six steps a buyer needs (tenants get ten)
    askT0('when do letting agents need to do CDD?');
  3. Or use it in a browser page with no install:
    import * as sdk from 'https://sjgant80-hub.github.io/fallestateonboard-sdk/src/index.js';
  4. Pin a commit for production (npm install github:sjgant80-hub/fallestateonboard-sdk#<commit>) so what you tested is what runs.

Try it

These panels run the SDK's own src/ in your browser: the same files the tests and the mutation gate prove. Nothing you type leaves this page.

Score a client

Result

Press Score.

Ask a rules question

Answer

Press Ask.

How it works

How the SDK and the live page stay one program The product page and this SDK carry the same code. Tests and a mutation gate prove that code; a parity check fails the build if the page and the SDK ever differ. Your code, or an AI agent, imports the proven module. FallEstateOnboard page the product people use fallestateonboard-sdk the same code, as modules your code · an agent import, call, get the answer parity import the gate, on every push tests · mutation gate must be clean · fuzz · parity
  1. Every block in src/onboard.js, the tables and the four functions, is lifted from the FallEstateOnboard page byte for byte, with only the word export added. scripts/parity.mjs reads the published page and fails the build if any block is no longer there.
  2. The AML score adds 3 for a politically exposed person, 1 if sanctions are not yet checked, 3 for a nationality on the page's high-risk list, 1 for rent over £5,000 a month, and 2 for a buyer with overseas funds. 5 or more is high, 2 or more is medium.
  3. A buyer, seller or landlord goes through six steps; a tenant also needs the tenancy, Right to Rent, referencing and deposit steps (ten).
  4. A question is answered by the first rule whose pattern it matches; otherwise there is no answer, rather than a guess.
  5. The tests pin every weight, both grade edges, the £5,000 boundary, every route and every table, and the mutation gate confirms each comparison in the code is tested (19 of 19).

API

ExportWhat it does
assessAmlRisk(client){ grade, score, reasons } for a client record. Never throws: anything that is not a record scores as an empty one.
getSteps(client)The onboarding steps for that client type.
askT0(question)The matching rules-based answer and its source, or null.
newClientRec({ id, ts, firmId, clientType })A blank client record in the page's exact shape (deterministic when you pass id and ts).
clientDisplayName(client)"Ms Emma Clarke", or "Unnamed".
CLIENT_TYPES · DOC_TYPES · RTR_DOCS · HIGH_RISK_JURIS · CMP_SCHEMES · WIZ_STEPS · T0_RULESThe page's tables: client types, document types with validity days, Right to Rent documents, the high-risk nationality list, deposit schemes, steps and answers.

Blueprint

FileWhat is in it
src/onboard.jsThe tables and the four functions, lifted from the page.
src/records.jsnewClientRec, the record factory.
test/onboard.test.js · scripts/parity.mjsThe tests and the byte-for-byte parity check.

For your business

For an agency group, a CRM vendor or a compliance team: the same onboarding checks your negotiators see in FallEstateOnboard, callable from your own systems, so the CRM, the portal and the app score a client the same way.

Managing director

One consistent onboarding check across branches and systems, without a per-branch compliance subscription for the basics.

Finance

MIT licence, no licence fee, nothing metered, no cloud bill: it runs where your software runs.

Technology and security

No dependencies, no network calls, no storage; client data you pass never leaves your process.

MLRO and compliance

The scoring is written out in full above and on the page, so you can set policy on it, change thresholds in your own code, and evidence what was used.

Lettings and sales teams

The steps each client type needs, and quick answers on the rules they are asked about.

What it costs, against what you pay now

No licence fee and nothing metered. Against an onboarding or AML platform charged per check or per seat, this covers the scoring, the step list and the rule answers; it does not do identity verification, sanctions screening or credit checks, which still need a provider.

Security and data protection

The functions take a record and return a result in memory: no network, no storage, no telemetry. Personal data stays in your process. Nothing here sends anything anywhere.

Compliance

The AML answer reflects the Money Laundering Regulations 2017: estate agents carry out CDD on both the buyer and the seller of every sale, whatever the price; letting agents where the monthly rent is €10,000 or more. The deposit answer reflects the Renters' Rights Act 2025 (England, from 1 May 2026). The score itself is a heuristic, not a test set by any regulation.

Deployment and roll-out

  1. Install from GitHub and pin a commit.
  2. Have your MLRO review the scoring and the high-risk list (see the risks below) before it drives any decision.
  3. Call assessAmlRisk when a record changes and store the grade and reasons with the record.
  4. Run npm run parity before each upgrade.

Support and ownership

Supplied by AI Native Solutions. Support, service levels, warranty and liability are agreed per deployment, in that deployment's agreement. The code is MIT-licensed: there is no licence fee, you hold a copy, and it keeps working without us.

The case for the board

A small, owned component that makes every system score clients the same way, with the method written out and the code proven on a public CI record. The decisions, and the policy behind the thresholds, stay with your MLRO.

Risks, answered straight

Proof

Every push runs the gate on GitHub's own machines: the run history is public, so you can check each claim below rather than trust it.

CheckResult at this release
Tests8 pass (node --test)
Mutation gate (witness v0.6)onboard.js 19/19: clean. records.js is a record template with no operators to flip, so it is covered by the tests only
FuzzassessAmlRisk, clientDisplayName, getSteps and askT0 never throw on garbage input
Parity with the live pageall 11 blocks of onboard.js appear in the page byte for byte
Dependencies · network callsnone · none

The explainer

The page and this SDK run one copy of the onboarding logic. To make that literally true, the page's functions were rewritten once in a form the mutation gate can test (spaced operators), and the SDK lifts those exact bytes. A parity check reads the published page on every push and every week; if anyone edits the page without the SDK, the build goes red.

Repairing the SDK also fixed the product. The page's AML answer said letting agents were in scope at "€10,000 a year" (it is a month); a risk reason read "high rent >TBAk", left by an old automated edit; and the functions threw on a missing record. All three are fixed on the page and here.

Two questions are left open, deliberately and visibly: the nationality list and the sanctions reporting line. They are legal judgments for the people who carry the regulatory responsibility, so they are written up above rather than silently changed.