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.
Level 1: system context
Section titled “Level 1: system context”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.
| 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 |
Level 2: containers
Section titled “Level 2: containers”- Customers and branch staff use the same web app; underwriters use the workbench. All calls pass through the gateway.
- When an application is complete, the application service asks the decision service for a decision.
- Every decision, with its inputs, rule and model versions and reason codes, is written to the write-once decision log.
- Decisions and other business events are published through a transactional outbox to the event stream.
- 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.
- The API accepts a decision request with an idempotency key, so a retry never creates a second decision.
- The bureau adapter fetches the credit report and normalizes it.
- Policy rules check eligibility; the scorecard produces a score from points per attribute.
- The attributes that cost the most points become reason codes, mapped to plain-language reasons.
- 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
Section titled “Deployment”| 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 |
Related pages
Section titled “Related pages”- Decision log
- Data and events
- Threat model, drawn from these views
- Documenting architecture with C4
Written and edited by Abhinav Taduka, enterprise software architect.
New pages are added regularly. Follow Abhinav on LinkedIn to see them first.