Platform architectureProposed

An architecture where every stage leaves evidence.

This page describes the intended technical design of CreditPilot. None of these components is deployed today, and the design will change as it is built and reviewed.

§01Principles

Five engineering principles.

Deterministic maths, probabilistic language
Numbers come from code. Models write words about numbers they are given, and their output is checked against those numbers.
Provenance is data
Each value stores its class, source references and review state in the database, not only on screen.
Authorisation on the server
Every request is checked against tenant, role, case relationship and action. Hiding a button is never the control.
Append-only history
Material changes are recorded as events that the application cannot edit or delete.
A modular monolith first
One application with clear internal modules and separate background workers. Services are split only when scaling or isolation requires it.
§02Logical architecture

From financial documents to audit records.

Eight stages, with access control, audit and the application API running across all of them.

Proposed architecture · not yet deployed
  1. A1

    Financial documents

    PDFs and scans uploaded by an analyst.

    Supported formats are scoped per phase; unsupported files are rejected with a reason.

  2. A2

    Secure document storage

    Private, encrypted storage reached only through short-lived signed links.

    Uploads land in quarantine, are type-checked and malware-scanned, then filed per tenant and case.

  3. A3

    Document processing

    Queued extraction of tables and fields, with page and region references.

    Asynchronous jobs with retries and a failure queue; low-confidence fields are flagged.

  4. A4

    Structured financial data

    Canonical line items per period, each with provenance and review state.

    Relational store with tenant isolation enforced in the application and in the database.

  5. A5

    Calculation and analysis services

    Deterministic ratios and versioned policy rules.

    Pure functions with a formula registry; results record their inputs and version.

  6. A6

    AI orchestration and evidence retrieval

    Grounded drafting over prepared data, with citation and number checks.

    Model and template versions logged; output that fails validation is withheld, not shown.

  7. A7

    Analyst review workspace

    Verification, challenges, information requests and human decisions.

    Permissions checked on the server for every action; four-eyes rule for decisions.

  8. A8

    Assessment reports and audit records

    Versioned Credit Assessment Notes and an append-only event history.

    Report snapshots are hashed; audit events cannot be edited by the application.

Access control

Role and tenant checks at every layer, not only in the interface.

Audit and monitoring

Every material change emits an audit event; pipelines report failures and latency.

Application API

One API serves the workspace and, later, integrations. Planned, not available.

§03Processing pipeline

Asynchronous, observable, and honest about failure.

Document states

Uploads land in a quarantine area, are validated by file signature and scanned, then queued for extraction. Each stage is a job with retries and a failure queue; failures surface to the analyst with a reason.

  1. Uploaded
  2. Queued
  3. Processing
  4. Extracted
  5. Needs review
  6. Completed

Any stage can end in Failed, with a specific reason and a next action.

Calculation service

A pure module with a versioned formula registry. It never imputes a missing input, guards against meaningless denominators, and records the inputs and formula version with every result.

compute(ratio, version, periods)
  inputs = resolve(line items, periods)
  if any input missing:
    return NotComputed(reason, missing)
  if denominator <= 0:
    return NotComputed(reason)
  value = formula(inputs)        // decimal arithmetic
  flags = inputs.unverified ? ["includes_unverified"] : []
  return { ratio, version, inputs, value, flags }

AI orchestration and evidence retrieval

The orchestrator prepares a bounded context of verified values, ratio results, indicators and retrieved source excerpts, each with a stable citation identifier. Document text is treated as untrusted data, never as instructions.

Output must follow a fixed schema. Validators check that citations resolve, that numbers match cited values and that no decision language appears. Failed output is withheld; one retry is allowed with validator feedback.

  • Model and prompt-template versions logged with every run
  • Timeouts, bounded retries and token-usage tracking
  • Evaluation datasets with known answers gate template and model changes
  • Analyst feedback stored as labelled data for evaluation
  • Model provider and region to be confirmed, with data-residency requirements in mind
§04Application API

One API for the workspace and, later, for integrations.

The endpoint groups below are a draft design. There is no public API today.

Draft · not available
Proposed API endpoint groups
GroupProposed operationsPermission
Credit casesCreate, read, list, update permitted metadata, assign an analystcase.*
DocumentsRequest a signed upload link, check processing status, list extracted fields, submit a correctiondocument.*, field.*
Financial analysisRetrieve statements and ratio results, compare periods, list data-quality issuescase.read
AI analysisStart an analysis run, check its status, list observations, submit analyst feedbackanalysis.*
ReviewsAdd review comments, request information, read review historyreview.*
DecisionsRecord an authorised human decision. Interactive sessions only; never available to API keyscase.decide
ReportsGenerate a report, check status, obtain a short-lived download linkreport.*
§05Integrations

Planned integrations.

No integrations are live. The first version is planned around manual upload.

Planned integrations and phases
IntegrationStatus
Manual document uploadPlanned · First version
REST APIPlanned · Later phase
Signed webhooksPlanned · Later phase
Single sign-on (OIDC, then SAML)Planned · Later phase
Loan origination system connectorsPlanned · Enterprise phase
§06Infrastructure

Infrastructure to be confirmed.

CreditPilot is intended to run on managed cloud services: containerised application compute, a managed PostgreSQL database, private object storage for documents, a message queue for processing, and managed key management and secrets.

The provider and hosting region have not been finalised. Data-residency expectations of lenders, and the regional availability of document-extraction and model services, will decide them. We will describe the infrastructure here only once it is chosen, and as proposed until it runs.

Review the architecture with us.

If your team evaluates vendors on architecture and data handling, we would value your questions early.