System Design Atlas

Social benefits with eligibility checks and appeals

06 / 10Worked example

The overall architecture

Decision support and payments run separately. Which conditions ensure the result?

Rule calculation must not trigger payment.

Starting point A separate review path ends with reasoned confirmation or amendment.

Assumptions for the example case

A fictional municipal training example with a fixed grant of 300 euros. Caseworkers make the decision; a rules checker provides reasoned guidance. The design specifies no real eligibility requirements. All quantities, thresholds and operational targets are illustrative assumptions.

Decision support and payments

Decision support and payments

Applicant portal and caseworker interfaceRequest + human decision
Benefits case APICase + decision + appeal
Relational case datastoreA-43 · B-43 · Z-43 · Inbox
Evidence storeN-43
Rules workerDecision support
Payment workerZ-43 to be delivered
Rule versionsfreigegeben
Payment serviceExternal
Appeals interfaceseparately entitled
Applicant portal and caseworker interface → Benefits case APIApplication / decision
Benefits case API → Relational case datastoreA-43 + B-43 + Z-43 + Inbox
Benefits case API → Evidence storeN-43
Relational case datastore → Rules workerReview task
Rule versions → Rules workerApproved rules
Rules worker → Relational case datastoreDecision support
Relational case datastore → Payment workerCommitted Z-43
Payment worker → Payment service30,000 cents
Payment service → Benefits case APIPayment evidence
Appeals interface → Benefits case APIW-43 / new decision

The API and workers share the case datastore; evidence documents are stored separately; external payment responses enter the inbox through the API.

API, rules worker and payment worker share a case datastore; evidence storage is separate; the provider is external.

Responsibilities within the application

Benefits case modules

Application managementSubmissions + evidence requests
Rule checkingVersioned assistance
Decision noticesreasoned decision
Payment coordinationZ-43 once
AppealContest + Amendment

Applications, decision support, decision notices, payments and appeals have separate responsibilities.

Internal modules: application management tracks submissions and requests; rule checking produces versioned decision support; decision notices record reasoned decisions; payment coordination tracks instructions that take effect once; appeals link challenges to resulting decisions. The overall architecture maps these responsibilities to processes and storage.

Runtime components and authoritative data

Runtime boundary
Applicant portal and caseworker interface → benefit case API → relational case datastore. Evidence storage holds documents; the rules worker reads approved rule versions and writes decision support. Payment worker → external payment service, using committed instructions; feedback → API → the same case. The appeals team uses separately authorised case access.
Module responsibilities
Application management tracks submissions and evidence requests. Rule checking produces versioned decision support. Decision notices record reasoned decisions. Payment coordination tracks instructions that take effect once. Appeals connect challenges to resulting decisions.

Decision support and payments run separately.

Decision support and payments run separately.

Only a committed approval opens a payment instruction.

Rule calculation must not trigger payment.

Application management and decision-notice management belong to the API. The rules worker calculates; the payment worker transports commands; both use the case data store.

Alternative considered
Calling the payment worker before commit could pay without a committed decision.
Trade-off
Outbox processing is deferred.
Reassess
Higher load can deepen worker separation.

Try it yourself

Assign modules and processes.

A hint for your attempt

Rule calculation must not trigger payment.

Compare with a possible solution
Modules
Application and decision-notice modules run inside the API.
Processes
The rules worker calculates; the payment worker sends instructions; both use the case datastore.

Apply to your project

How does this principle apply in your own project: Decision support and payments run separately.

Step 7: The decision commit resolves concurrency. Which conditions ensure the result?