System Design Atlas

Tax returns and assessment

06 / 10Worked example

The overall architecture

How are return management and external processing divided among modules and processes?

The local consistency rule defines the assessment API boundary. Calculation and delivery run as separate background processes. Return versions, evidence review, model calculation and assessment approval are modules inside the API. The tax filer submits information and evidence through the assessment API. A protected document store holds immutable evidence; a relational case store holds return revisions and review status. Calculation processing reads a frozen rule and return revision and produces a draft assessment notice. Approvers confirm the exact content; delivery processing sends its document hash to the external delivery service. Caseworkers review the technical acknowledgement and close the bounded workflow. Calculation and transmission use separate asynchronous paths.

Starting point Draft assessment notices remain immutable versions.

Assumptions for the example case

A fictional administrative workflow using an invented calculation model to bind return year, rule revision and draft assessment notice. The model uses an allowance of 100000 cents; only the excess is charged at 10 % and rounded to whole cents using round-half-up. All figures and test targets are illustrative assumptions.

Runtime components and datastores

Runtime topology

Tax filerInformation and supporting documents
Delivery serviceAcknowledge technical transmission

Bounded tax-assessment workflow

Tax assessment APIRevision and verification status
Protected document storeImmutable evidence
Relational case datastoreReturn and review status
Calculation processingCalculate frozen status
Delivery processingSend document hash
Tax filer → Tax assessment APITax return and evidence
Tax assessment API → Protected document storeImmutable proof
Tax assessment API → Relational case datastoreRevision and status
Relational case datastore → Calculation processingFrozen status
Calculation processing → Tax assessment APIDraft assessment notice
Tax assessment API → Delivery processingReleased document hash
Delivery processing → Delivery serviceTechnical receipt

Approval binds exactly one return revision and one rule revision from the same model year.

The tax filer submits information and evidence through the assessment API. A protected document store holds immutable evidence; a relational case store holds return revisions and review status. Calculation processing reads a frozen rule and return revision and produces a draft assessment notice. Approvers confirm the exact content; delivery processing sends its document hash to the external delivery service. Caseworkers review the technical acknowledgement and close the bounded workflow. Calculation and transmission use separate asynchronous paths.

Domain responsibilities within the API

Inner modules

Return revisionDeclaration and correction as separate revisions
Evidence verificationChecking missing evidence and origin
Calculation versionFreeze return and rule revision for calculation
Assessment approvalConfirm the exact document hash

Modules group responsibilities within the API process.

The assessment API contains return-version management, evidence review, model calculation and assessment approval. Arrows show domain calls; modules do not have separate server icons.

Map responsibilities to runtime components

Domain taskRuntimeResponsibility
Tax return versionsTax assessment APIBinds year, submitted data and corrections.
Evidence verificationTax assessment APITracks evidence requests and verified documents.
Model calculationTax assessment APICalculates the explicitly fictional model using the specified rule version.
Assessment approvalTax assessment APIBinds the decision and document to the reviewed return version.
Calculation and delivery processingSeparate background processProcesses stored work and external feedback.
Delivery serviceExternal boundaryProvides or confirms the evidence agreed for this case.

Tax return versions

Runtime
Tax assessment API
Responsibility
Binds year, submitted data and corrections.

Evidence verification

Runtime
Tax assessment API
Responsibility
Tracks evidence requests and verified documents.

Model calculation

Runtime
Tax assessment API
Responsibility
Calculates the explicitly fictional model using the specified rule version.

Assessment approval

Runtime
Tax assessment API
Responsibility
Binds the decision and document to the reviewed return version.

Calculation and delivery processing

Runtime
Separate background process
Responsibility
Processes stored work and external feedback.

Delivery service

Runtime
External boundary
Responsibility
Provides or confirms the evidence agreed for this case.

The calculation job and delivery use the same manifest

The calculation job and delivery use the same manifest

The calculation job and delivery use the same manifest.

An approved draft assessment notice binds exactly one return revision and one rule revision from the same model year; amendments require renewed review.

Tax return revisions, rule versions, evidence, and draft assessment notices must represent the same valid state. Your exercise identifies the input and expected result.

Alternative considered
A separate service for every module would distribute the guarantee of binding one return revision and one same-year rule revision, with renewed review after amendments, across additional network boundaries.
Trade-off
Common schema changes require coordinated releases.
Reassess
Substantially different calculation or delivery load, or independent ownership, justifies revisiting process boundaries.

Try it yourself

Classify return-version management, calculation/delivery processing and the delivery service as module, process or external system. Identify the authoritative datastore.

A hint for your attempt

A domain responsibility becomes a process only when it has its own execution unit.

Compare with a possible solution
Boundaries
Return-version management is a module in the assessment API; calculation and delivery processing are separate processes; the delivery service is external.
Storage
Return revisions, rules, evidence and draft notices hold the authoritative facts. An approved draft binds exactly one return revision and one rule revision from the same model year; amendments require renewed review. A shared transaction protects this relationship; external responses remain separate evidence.

Apply to your project

Which planned service boundary would distribute a currently local guarantee across the network?

Next: check amendments again before approval.