Skip to content

Understand

This section is for readers who want to know how Underwrite works before they write code. Architecture, lifecycle, runtime guarantees, compliance, and security.

Architecture

The full architecture overview — domain services, event runtime, control plane, operational layer, and the injection points where cross-cutting concerns enter the dispatch path.

Architecture →

Indian lending lifecycle

The full underwriting journey in twelve stages, with the service, event, and compliance responsibility at each transition.

Lifecycle →

Compliance

How RBI rate caps, all-in-cost APR, KFS cooling-off, DPDPA consent lifecycle, and DSR fulfillment are encoded as runtime defaults — not application-level conventions.

Compliance →

Security

Ed25519 signatures, replay window, PII-redacted audit, deterministic event records — the security posture of the runtime.

Security →

Runtime

The underwrite.runtime.Runtime orchestrator — service registration, dependency injection, identity creation, authz wiring, and lifecycle.

Runtime →

Events

The Message envelope, the canonical signing bytes, the Type enum of 132 event types, and the event lifecycle from create to replay.

Events →

Failure handling

DLQ, idempotency, sagas with compensating rollback, circuit breaking, supervisor auto-restart, and the rules of thumb for each.

Failure handling →

System design

End-to-end runtime behavior — bus dispatch, store writes, saga execution, traced and instrumented.

System design →

Directory structure

The full underwrite/ package layout — every module's purpose and what it depends on.

Directory structure →

Design decisions

The ADRs and design notes behind nano-service isolation, typed events, Ed25519 signatures, and saga orchestration.

Design decisions →

Domain model

Core entities — borrower, loan, mandate, KYC, KFS — and the invariants the runtime enforces.

Domain model →