People
Status: v1 primary
Packages: packages/domain/people, packages/application/people
Purpose
The People context is the authoritative source of identity for everyone associated with the organisation. All other contexts that reference a person (Scheduling, Training, Billing, Compliance) do so via the identifiers defined here.
Entities
Member (aggregate root)
The central entity. A Member represents a person formally associated with the organisation. Every other role (Student, Instructor, Staff) is a set of attributes overlaid on a Member — not a separate entity type.
Key attributes:
id— unique identifiername— full nameemail— contact email (unique within the organisation)phone— optional contact numberroles— set of active roles (student,instructor,staff)status—active|inactive
Value objects
- MemberId — typed identifier wrapping a UUID; prevents mixing up IDs across contexts.
- Email — validated email address; enforces format at construction.
- MemberRole — enum of
student | instructor | staff.
Domain rules
- A Member must have at least one contact method (email required).
- Email must be unique within the organisation.
- Roles are additive — a Member can hold multiple roles simultaneously.
- An inactive Member cannot be assigned to new Bookings.
- A Member cannot be hard-deleted if they have associated Bookings, Lessons, or Charge Items; deactivation is used instead.
Key use cases
registerMember— create a new Member with initial role assignment.updateMember— update profile details.assignRole— add a role to an existing Member.removeRole— remove a role (subject to constraint checks).deactivateMember— mark as inactive; prevents future bookings.
Cross-context relationships
| Context | Usage |
|---|---|
| Scheduling | References MemberId for booking owner and instructor assignment |
| Training | References MemberId for student and instructor on a Lesson |
| Billing | References MemberId as the invoice recipient |
| Compliance | References MemberId to track currency requirements |
| Notifications | Uses Member contact details (email, phone) for delivery |
The People context does not import from any other domain context. It owns identity; other contexts reference it.