Skip to content

Architecture views

These views follow the C4 model: one level of detail per diagram, every element named with its technology, every arrow labeled by what it carries. The decision records that explain each choice are linked in the tables.

The origination platform is everything Example Lending built in this program. It sits between the people who use it and the systems it depends on.

System context: the origination platform Applicantapplies online Branch staffapply for customers Underwritersreview exceptions Identity vendorexternal Originationthe platform we built Credit bureauexternal E-signature vendorexternal Partner bankACH payments Servicing systemexisting, unchanged
System context: the origination platform Three groups of people and six external systems. Every arrow out of the platform is a contract someone has to agree, test and support.
External system What flows Contract Decision
Identity vendor Applicant identity data out; match result and risk signals back Vendor API, architecture contract with data-handling and exit terms ADR-006
Credit bureau Consumer report request out; report back Bureau API under a permissible-purpose agreement ADR-005
E-signature vendor Loan agreement out; signed agreement and audit trail back Vendor API and webhooks ADR-006
Partner bank ACH credit entries out; settlement and return files back Bank payment API and daily files ADR-010
Servicing system New funded loans in Existing SOAP interface, called only by an adapter ADR-009
Email and print vendor Approval letters and adverse action notices Vendor API ADR-004
Containers: inside the origination platform1. Customers and branch staff use the same web app; underwriters use the workbench. All calls pass through the gateway. 2. When an application is complete, the application service asks the decision service for a decision. 3. Every decision, with its inputs, rule and model versions and reason codes, is written to the write-once decision log. 4. Decisions and other business events are published through a transactional outbox to the event stream. 5. The funding service sends ACH credits to the partner bank and publishes the result. Customer web appReact, TypeScriptAPI gatewaymanaged; auth, limits Review workbenchReact, TypeScript Application serviceJava, PostgreSQL Decision serviceJava, PostgreSQL Decision logobject storage, WORM Notice serviceJava, templates Event streammanaged, Kafka API Funding serviceJava, PostgreSQL Servicing adapterJava, SOAP client Data platformwarehouse, reporting Partner bankexternal12345
Containers: inside the origination platform Each service owns its data. Synchronous calls only where an answer is needed now; everything else travels as events.
  1. Customers and branch staff use the same web app; underwriters use the workbench. All calls pass through the gateway.
  2. When an application is complete, the application service asks the decision service for a decision.
  3. Every decision, with its inputs, rule and model versions and reason codes, is written to the write-once decision log.
  4. Decisions and other business events are published through a transactional outbox to the event stream.
  5. The funding service sends ACH credits to the partner bank and publishes the result.
Container Owner Technology Data it owns Talks to
Customer web app Journey team React, TypeScript; served from a CDN None (session only) API gateway
API gateway Platform team Cloud provider’s managed gateway Rate-limit counters All services
Application service Journey team Java 21, Spring Boot; managed PostgreSQL Applications, applicants, documents metadata Identity vendor, decision service, event stream
Decision service Decisioning team Java 21, Spring Boot, rules engine; managed PostgreSQL Decisions, rule and model versions, pricing Credit bureau, decision log, event stream
Decision log Decisioning team Object storage with write-once retention lock Immutable decision records Written by the decision service only
Review workbench Decisioning team React, TypeScript None; reads and writes through the decision service API gateway
Notice service Decisioning team Java 21; template engine Notices sent, delivery status Event stream, email and print vendor
Funding service Payments team Java 21, Spring Boot; managed PostgreSQL Disbursements, ledger entries, reconciliation results Partner bank, event stream
Servicing adapter Payments team Java 21; SOAP client Delivery log Event stream, servicing system
Event stream Platform team Managed, Kafka-compatible Events, kept 14 days All services
Data platform Data team Cloud data warehouse, fed from the event stream Reporting copies only, never a system of record Event stream

Level 3: components of the decision service

Section titled “Level 3: components of the decision service”

The decision service is the heart of the platform and the part regulators care about most, so it’s the one container drawn at component level.

Components: the decision service1. The API accepts a decision request with an idempotency key, so a retry never creates a second decision. 2. The bureau adapter fetches the credit report and normalizes it. 3. Policy rules check eligibility; the scorecard produces a score from points per attribute. 4. The attributes that cost the most points become reason codes, mapped to plain-language reasons. 5. The recorder writes the decision, inputs, versions and reasons to the log and the outbox in one step. Decision APIREST, idempotent Orchestratorruns the strategy Bureau adapterreport, parse, cache Policy ruleseligibility, pricing Scorecard modelpoints-based Reason-code mappertop factors to codes Strategy registryversioned rules, models Decision recorderlog + outbox12345
Components: the decision service Rules and models are versioned data, not code, and every decision is recorded with the exact versions that produced it.
  1. The API accepts a decision request with an idempotency key, so a retry never creates a second decision.
  2. The bureau adapter fetches the credit report and normalizes it.
  3. Policy rules check eligibility; the scorecard produces a score from points per attribute.
  4. The attributes that cost the most points become reason codes, mapped to plain-language reasons.
  5. The recorder writes the decision, inputs, versions and reasons to the log and the outbox in one step.
Component Responsibility Why it’s separate
Orchestrator Runs the active decision strategy: policy rules, then score, then pricing Strategy changes without code changes (ADR-005)
Strategy registry Stores rule sets, scorecards and pricing grids as versioned, approved artifacts Credit and compliance approve versions; the decision references them (ADR-005)
Reason-code mapper Turns the scorecard’s biggest point losses and failed policy rules into the principal reasons required by Regulation B Reasons are produced at decision time, never reconstructed later (ADR-004)
Decision recorder Writes the decision to its database, the write-once log and the outbox in one transaction-backed step No decision exists without its record (ADR-007, ADR-008)
Deployment: one primary region, a warm standbyPrimary region (3 zones)Standby region Usersweb, branch, staff CDN and firewallstatic app, WAFAPI gatewayregional, managed Managed containersservices, 3 zones Managed PostgreSQLone per service Event streammanaged, 3 zones Object storagedecision log, WORM Secrets, identityworkload identityObservabilityOpenTelemetry Standby servicesscaled to zero Database replicasasynchronous Replicated logcross-region copy
Deployment: one primary region, a warm standby Everything runs on managed services across three availability zones; a second region holds replicas and can take over within an hour.
Concern How it’s handled Decision
Availability Every tier spans three availability zones; services run at least three instances ADR-002
Disaster recovery Warm standby region: database replicas and log copies, services deployable from the same pipeline. Targets RTO 1 hour, RPO 5 minutes (QS-06) ADR-002
Identity and secrets Workload identity for service-to-service access; secrets manager; no shared service accounts ADR-014
Infrastructure All of it defined as code, applied by pipeline, inside the company’s landing zone ADR-002
Observability OpenTelemetry in every service; traces from web app to bank ADR-015

Written and edited by Abhinav Taduka, enterprise software architect.