Design & Architecture

Domain Modelling & Boundaries

Intermediate

Software is easiest to understand when its structure matches the real business. Domain modelling means using the language and concepts the business actually uses, and drawing clear boundaries between distinct areas (onboarding, screening, payments) so each can evolve on its own. Good boundaries keep a growing system from turning into one tangled mess.

Ideas from Domain-Driven Design help here, without the extra process. Use a shared, precise vocabulary (the same words in code, conversation, and the UI), and identify bounded contexts: areas of the system with their own model and clear edges. Inside a context the model is consistent. Between contexts, you translate at the boundary instead of sharing one giant model that everyone fights over.

This is the higher-level companion to Separation of Concerns (within code) and Data Modelling (the data). For us, the natural boundaries match the business: KYC and onboarding, screening and AML, payments, customers. Each has its own rules and changes at its own pace.

Model the business honestly

One model for everything // a single giant Customer object used by onboarding, screening,
// payments and support — every team edits it, nobody owns it

Every area is coupled to one bloated model. A change for payments breaks screening, and the shared object gathers fields nobody fully understands. The boundaries have collapsed.

Bounded contexts with contracts // Onboarding has its CustomerProfile; Screening has its ScreeningSubject;
// Payments has its Payer — each focused, owned, and connected via
// explicit APIs/events, mapping at the boundary

Each area models what it needs, owns its own changes, and integrates through clear contracts. So teams can move independently without breaking each other.

Keep boundaries clean

Self-review checklist

Why it matters: Clear domain boundaries let a system, and the teams building it, grow without grinding to a halt. When the model matches the business and contexts have clean edges, changes stay local and the code is understandable. When everything shares one tangled model, every change is risky and slow. Getting boundaries roughly right is one of the most valuable design decisions you can make.