Skip to main content

System Context & Logical Components

This is the selected proposal for the case study. Components are logical modules inside one backend, not twelve independently deployed services. Asynchronous ingestion and rules workers share versioned evidence contracts and a transactional database. See ADR-002.

Service map​

Logical componentOwnsCommunication boundary
Identity and tenancyUser, firm membership, scoped authorizationVerified API request and DB policy
Engagement/planningClient scope, risk/procedure plan, engagement revisionSame application transaction
Source ingestionSource version, scan, parser status and stagingEnqueue jobs only after durable commit
ReconciliationSource counts/totals, population suitability, reviewer acceptanceDataset snapshot contract
NormalizationMapping to explicit, versioned account taxonomyDataset/mapping revision
Deterministic checksCheck result, data coverage and candidate findingsDataset + approved pack versions
Findings/workpapersAssignment, note, evidence attachment, human dispositionAuthorization + version check
ReviewAtomic approval of a revision and a manifestState transition, no stale results
ReportingQuery letters, exports and integrity manifestBackground job and object store
NotificationsDelivery preferences, messages, retry statusOutbox dispatched events
Platform evidenceDomain audit record, outbox delivery and integrity checksTransactional journal and verification
Billing (future)Subscription, invoices, versioned entitlementsHosted billing provider and idempotent usage

Event catalogue​

EventProducerResult / contract
engagement.plan_changedEngagementBump revision; invalidate dependent work
source.uploadedIntakeSource version persisted; queue scanning
dataset.parsedWorkerTyped staging available; not complete by implication
dataset.reconciledReconciliationReviewed source scope and evidence references
mapping.updatedAuditor / normalizationBump revision; invalidate dependent checks
checks.finishedRule workerRun and candidates already durably committed, explicit coverage statuses
finding.reviewedWorkpapersReview action committed; event only notifies/projection
engagement.approvedReviewFrozen revision/manifest and reviewer ID committed
usage.recordedMetering (future)Idempotency key prevents billing duplicates

Events are effects of committed state changes, not the only source of audit truth. All carry stable event IDs, aggregate revisions, actor context and schema version.

DFD Level 2 — Cross-Service Event Flow​

Deployment shape​

One backend deployable, PostgreSQL with firm-scoped RLS policies and separate privileged migration roles, versioned object storage, queue/worker processes and observability. Worker scaling is independently configurable even when core domain modules share a process.

A request selects a firm only after global identity/membership and engagement authorization; tenant_id and PostgreSQL RLS are defense in depth, not authorization inferred from a client header. RLS requires dedicated negative security tests and careful DB ownership/role configuration.

Canonical Solution Architecture · Data Model · Architecture Trade-offs · Security Design · Story