System Design Atlas

Social benefits with eligibility checks and appeals

10 / 10Worked example

Final design

The end-to-end test ends with a reasoned outcome. Which conditions ensure the result?

An approval demo does not cover objections.

Starting point The payments team checks the same payment instruction.

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.

Benefits case with test markers

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.

Topology from step 6 with concurrency at the decision, replay at the payment instruction and appeal closure; links back to 4, 5 and 9.

Test plan with expected outcomes

Input and initial stateExpected resultReturn to an earlier step
A-43 decision ready version 3 → Grant/Reject in both ordersExactly one status; payment order only in case of grant winning.Step 5
DecisionKey committed → Identical; then change outcomeOriginal decision; changed retry causes a conflict.Step 4
Z-43 open → 59,999/60,000/60,001 msClarification signal from 60,000; still unknown.Step 9
Approved and paid out → receive appeal; then amend the decisionReceiving the appeal leaves payment unchanged; amendment opens reconciliation of differences and closes the appeal with a new decision notice.Step 5/10

A-43 decision ready version 3 → Grant/Reject in both orders

Expected result
Exactly one status; payment order only in case of grant winning.
Return to an earlier step
Step 5

DecisionKey committed → Identical; then change outcome

Expected result
Original decision; changed retry causes a conflict.
Return to an earlier step
Step 4

Z-43 open → 59,999/60,000/60,001 ms

Expected result
Clarification signal from 60,000; still unknown.
Return to an earlier step
Step 9

Approved and paid out → receive appeal; then amend the decision

Expected result
Receiving the appeal leaves payment unchanged; amendment opens reconciliation of differences and closes the appeal with a new decision notice.
Return to an earlier step
Step 5/10

End-to-end test and unresolved agreements

First end-to-end path
Examine application with proof, secure competing decisions, clarify lost payment response and conclude objection by reasoned change.
Clarify before real use
Right of claim, deadlines, remedies, signature and recovery are specified separately for real-world proceedings.

The end-to-end test ends with a reasoned outcome.

The end-to-end test ends with a reasoned outcome.

Connect the decision, payment and appeal.

An approval demo does not cover objections.

The decision commit admits one winner; revisit 5. Appeal receipt leaves payment unchanged; a new decision ends review; revisit 5 and 9.

Alternative considered
Only forms do not prove a conclusion.
Trade-off
Tests require simulated cash responses.
Reassess
Real legal requirements require separate approval.

Try it yourself

Assign concurrency and appeal tests to the steps they may require revisiting.

A hint for your attempt

An approval demo does not cover objections.

Compare with a possible solution
Concurrency
The decision commit admits one winner; revisit 5.
Appeal
Appeal receipt leaves payment unchanged; a new decision ends review; revisit 5 and 9.

Apply to your project

How does this principle apply in your own project: The end-to-end test ends with a reasoned outcome.

Transfer the decisions and their counterexamples to the editable design template.

Start your own design

Choose a small case from your project. The template collects the ten design tasks and leaves space for your sketches, decisions, and open assumptions. You can edit it in your text editor or note-taking app.

Download design template (.md)
Compare the ten tasks with the example case
  1. Purpose and boundary

    How does this principle apply in your own project: People are accountable for the decision.

    In the example: The caseworker signs off the decision version.

  2. Requirements

    How does this principle apply in your own project: Approval binds the evidence.

    In the example: Approval checks the evidence hash.

  3. Scale estimates

    How does this principle apply in your own project: Payment volume follows approvals.

    In the example: The number of approvals determines the payment volume.

  4. Interfaces

    How does this principle apply in your own project: One key identifies one decision.

    In the example: The key binds outcome and the rationale.

  5. Data and states

    How does this principle apply in your own project: An appeal has its own resolution.

    In the example: A separate review path ends with reasoned confirmation or amendment.

  6. Overall architecture

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

    In the example: Only a committed approval opens a payment instruction.

  7. Critical flow

    How does this principle apply in your own project: The decision commit resolves concurrency.

    In the example: Exactly one decision increments the version.

  8. Bottlenecks and trade-offs

    How does this principle apply in your own project: Outstanding evidence explains processing time.

    In the example: Measure waiting reasons separately.

  9. Operations and security

    How does this principle apply in your own project: A timer creates a follow-up task.

    In the example: The payments team checks the same payment instruction.

  10. Final design

    How does this principle apply in your own project: The end-to-end test ends with a reasoned outcome.

    In the example: Connect the decision, payment and appeal.