Sub-Domain Blueprint: Community Properties
Domain: Community (governance, occupancy, registry, financials)
Logical Sub-Domain: Properties (Assets & Occupancy)
Physical Packages: @sd/mod-community/assets, @sd/mod-community/occupancy
Related Documents: Data Definition
Context: This document defines the Physical Inventory of the community and the Human Occupancy of those spaces.
Status: Stable (v2.5)
1. Mandate
The Properties Sub-Domain maps the physical world (Units, Amenities) and manages the complex relationships of people living within them (Occupancy). It is the source of truth for "Who lives where?" and "What do we own?".
2. Capabilities
| Capability | Description | Component |
|---|---|---|
| Asset Registry | Hierarchical catalog of all physical spaces (Buildings, Floors, Units). | AssetService |
| Occupancy Tracking | Managing the lifecycle of Residents (Owners, Tenants) in Units. | OccupancyService |
| Move-In/Move-Out | Automating the provisioning of access and digital workspaces upon residency changes. | addOccupant / removeOccupant |
| Digital Keys | Defining accessLevel for physical security integration. |
Occupancy |
3. Process Models
A. Move-In (Occupancy Creation)
Happy Path: A new Long-Term Tenant moves in.
sequenceDiagram
participant Admin
participant Service as OccupancyService
participant Workspace as GoogleWorkspace
participant DB as Firestore
Admin->>Service: addOccupant(unit="101", user="tenant@email.com", role="tenant_long")
Service->>DB: create({ unit: "101", identity: "tenant...", start: NOW, status: "active" })
par Digital Access
Service->>Workspace: addGroupMember("residents@...", "tenant@...")
and Physical Access
Service->>DB: updateAccessLevel("restricted")
end
Service-->>Admin: Success
B. Move-Out (Termination)
Happy Path: End of Lease.
sequenceDiagram
participant Admin
participant Service as OccupancyService
participant Workspace as GoogleWorkspace
Admin->>Service: removeOccupant(unit="101", user="tenant@...")
Service->>DB: update({ status: "historic", end: NOW })
Service->>Workspace: removeGroupMember("residents@...", "tenant@...")
4. State Machines
Asset Hierarchy
graph TD
Complex[Singular Dream Complex] --> B1[Building A]
Complex --> B2[Building B]
B1 --> F1[Floor 1]
F1 --> U101[Unit 101]
F1 --> U102[Unit 102]
U101 --> R1[Master Bedroom]
U101 --> R2[Kitchen]
5. Interface Definitions
AssetService
createAsset(asset): Promise<Asset>getHierarchy(rootId): Promise<AssetNode>
OccupancyService
addOccupant(unitId, userId, role): Promise<Occupancy>removeOccupant(unitId, userId): Promise<void>getActiveOccupanciesForUnit(unitId): Promise<Occupancy[]>
6. Changelog
| Date | Author | Description | Reference |
|---|---|---|---|
| 2026-01-24 | Antigravity | Initial creation | Implementation Plan |