-
No new module:
AccountRegistrationstays a natural part of thehouseholdmodule’s membership lifecycle -
System-wide e-mail uniqueness falls out for free — one e-mail identifies exactly one account/household, no per-household scoping logic needed
-
Simplest possible model for the current product scope
ADR 012: Account-Household cardinality (1:1)
Context
Implementing authentication requires a decision about the relationship between an account (login identity: e-mail + password) and a household. Real-world usage patterns exist where a person is part of more than one household at the same time (moving between a shared flat and a family home, a second residence, …), which would argue for an account that can belong to several households independently.
This decision also determines module boundaries: if an account can belong to multiple households, it is an independent concept that outlives any single household membership and arguably deserves its own module. If an account is scoped to exactly one household, it is just an attribute of a membership and can stay inside the household module, where AccountRegistration/MemberManagementService already live.
The decision was deferred as an open question (see AGENTS.md, "Account & Email Model") until authentication needed to be implemented.
Considered Options
Option A: 1 Account : 1 Household; Option B: 1 Account : N Households
Decision Outcome
Option A is chosen: an account is scoped to exactly one household. There is no cross-household login; a person who is active in two households needs two separate accounts.
This keeps AccountRegistration where it already is — inside the household module, as part of the membership lifecycle — instead of introducing a separate Account/Identity module purely to support a scenario the product does not need yet (QG4 - Maintainable). It follows the same KISS/YAGNI reasoning already applied in ADR 011: build for the multi-household case when it is actually required, not speculatively.
Pros and Cons of the Options
| Pros | Cons |
|---|---|
Option A: 1 Account : 1 Household (chosen) |
|
|
|
Option B: 1 Account : N Households |
|
|
|
Consequences
Positive:
-
householdremains the single place responsible for account registration and membership — no premature Account/Identity module. -
E-mail uniqueness stays a simple system-wide UNIQUE constraint on
member.email. -
The setup wizard and registration flow have an unambiguous rule: an e-mail with an existing account can never start a second household — this must be rejected with a clear, actionable error instead of a generic 409 (see
AGENTS.md, "Missing endpoint").
Negative:
-
Multi-household usage by a single person is explicitly out of scope; users must register a distinct account per household.
-
If multi-household support is ever required, this is a breaking model change: Account needs to be extracted from
householdinto its own concept, and every place that currently treats "account" and "household member" as the same thing needs to be revisited.
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.