System Design Atlas

Insurance claims with documents and payouts

06 / 10Worked example

The overall architecture

Which boundary separates stored files from a verified document version?

The data contract leads to this topology: policyholder portal and claims interface → claims API → relational case datastore. Uploads → quarantine process → verified document object store; the claims API references immutable files. The payout worker reads approved commands → payment service → durable result inbox in the case datastore. Internal modules define domain code boundaries; a separate process has its own operational lifecycle.

Starting point Track immutable document versions and the decisions based on them.

Assumptions for the example case

Fictitious example design: a simple property claim under one policy; manual coverage decision based on a fixed document version; one full payout in EUR; reasoned rejection and a later reassessment as a separate process. Figures and quality targets are illustrative test assumptions. Automatic claim rejection by AI, fraud investigation, partial payments and comprehensive statutory deadline calculation are outside scope.

Runtime architecture

Runtime architecture · separate file storage and payout processing

PortalsPolicyholders + claims handlers
UploadsFiles

Claims platform

Claims APIProcess
Case data storeDecisions + Inbox
Quarantine processFile verification
Document object storeUnchangeable files
Payout workerApproved commands
Payment serviceExternal effects
Portals → Claims APINotification / claim handling
Claims API → Case data storeClaim + command
Uploads → Quarantine processCheck the file
Quarantine process → Document object storeChecked file
Claims API → Document object storeReference the Hash
Case data store → Payout workerApproved command
Payout worker → Payment serviceZ-31
Payment service → Claims APIauthenticated feedback
Claims API → Case data storeCommit inbox record

The case datastore owns decision records; object storage holds verified files; the payment service remains external.

Large uploads can delay claim decisions. Store document objects separately and keep only verified references in the case. Quarantine failure leaves the evidence request open and blocks approval based on unchecked documents.

Domain modules within the application

Inside the claims API · five domain modules

Notification and policyAssign P-31
Document versionFile versions + requests
Coverage decisionRationale + approvals
PaymentsTransfer 45,000 cents
ClarificationTrack unresolved payment

The coverage decision binds approvals to D-3; payout uses only the approved amount.

Notification and policy associates the loss with the insurance relationship. Document version tracks verified files and open requests. Coverage decision binds rationale and approvals to the reviewed version. Payout transmits only the approved amount. Investigation assigns ownership for uncertain payments and reassessments.

Operational boundaries

Runtime
Policyholder portal and claims interface → claims API → relational case datastore. Uploads → quarantine process → verified document object store; the claims API references immutable files. The payout worker reads approved commands → payment service → durable result inbox in the case datastore.
Persistence
Transactional store for claim S-31, document version D-3 and decision E-31. Authoritative changes and retry results are persisted together; external effects require separate evidence.

Move files outside the core processing path

Move files outside the core processing path

Store document objects separately and keep only verified references in the case.

Large uploads can delay claim decisions.

Quarantine failures leave the request for additional documents open and prevent approval based on unchecked information.

Alternative considered
Including binaries in every case response increases load and exposure.
Trade-off
File upload and domain acceptance have separate states.
Reassess
The file size is permanently very small.

Terms in this step

Move files outside the core processing path
Quarantine failures leave the request for additional documents open and prevent approval based on unchecked information.

Try it yourself

An upload is stored, but quarantine validation fails. Determine the visible document and approval states.

A hint for your attempt

Use the specific entities and conditions from this step. The two solution parts distinguish the decision from its evidenced outcome.

Compare with a possible solution
First part of the solution
The object may exist in storage while remaining unverified for the case. Show the outstanding document request or validation failure.
Second part of the solution
The decision must not treat the document version as fully verified. Case metadata and binary storage remain separate responsibilities.

Apply to your project

Which corresponding assumption would you check first in your project when files remain consistently very small?

Step 7 examines: Protect a payout already started.