Cross-cutting Concepts
Architecture Decision Records (ADRs)
Architecture Decision Records (ADRs) are a way to document important architectural decisions in a structured manner. They help in maintaining a record of the rationale behind decisions, alternatives considered, and the implications of those decisions. For more information see adr.github.io.
Modular Monolith (Modulith)
A modular monolith, or "modulith", is an architectural style where the application is structured into distinct modules within a single deployable unit. Each module encapsulates specific functionality and can interact with other modules through well-defined interfaces. This approach combines the benefits of modularity with the simplicity of a monolithic deployment. For more information see the Spring Modulith blog post or this german Entwickler.de article about moduliths.
Authentication and Authorization
Authentication and authorization are treated as a cross-cutting concern rather than a bounded context in Chapter 5: they have no ubiquitous language relevant to household members and exist purely to support every other module, not to model household business. Concretely, this has two consequences for how the code is structured:
-
No dedicated "Authentication" module in the building block view. Framework-level building blocks (password hashing, session/token issuance, security filters) are infrastructure, documented here rather than listed as a fachliches module alongside
TasksorExpenses. -
Framework/utility types are injected directly, not wrapped in a Named Interface. A generic Spring bean type such as
PasswordEncoderis not a module-owned construct, so any module may inject it directly — the same wayApplicationEventPublisheris already used directly across modules. Introducing acoreNamed Interface (e.g. aPasswordEncodingabstraction) purely to let another module reuse a framework type would add anApplicationModuledependency (verified by Spring Modulith) for no domain benefit and is deliberately avoided. Named Interfaces (ADR 011) are reserved for genuine domain operations of a module — such asAccountRegistrationinHousehold— not for technical helpers.
The one genuine domain operation in this area, registering an account as part of a household membership, is therefore not part of an "auth module" at all — it lives in Household, where the 1:1 account-household relationship was decided in ADR 012.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.