Context
Every territory today is building-based. TerritoryKind (schema.prisma:18-24) has Classical, Univ, Commerces, Phone, Hotel; each maps to an EntranceKind (buildings.server.ts:8-14). Some territory types don't fit this model: markets, taxi areas, book-sharing boxes, boat docks, beaches — anywhere addresses don't apply. Currently they can only be tracked as fake-address buildings or unattached overlays on the assembly map.
Per-congregation polygons exist (TerritoryPerimeter for the assembly perimeter, TerritoryCardOverlay for card overlays) but neither attaches a polygon to a specific territory.
Proposal
Add a mode on each territory, orthogonal to TerritoryKind, that controls how it is managed:
- Buildings mode (current): addresses, entrances, prospection per building. Used for doors-to-door, commerce, hotels, campus.
- Zone mode (new): a polygon drawn on the map plus notes. No buildings, no entrances. Used for markets, taxis, book boxes, beaches — anything without a stable address.
A congregation can mix the two: most territories continue in buildings mode, niche ones use zone mode. The choice is made when creating a territory.
Acceptance criteria
Data model
Authoring
Reading / display
Existing flows (must keep working)
Out of scope
- New
TerritoryKind values — kinds stay as-is; mode is orthogonal
- Migrating an existing buildings territory to zone (or vice versa) post-creation
- Mixed mode (a territory with both buildings and a polygon)
Files
app/database/schema.prisma — Territory.mode + per-territory polygon (extend TerritoryPerimeter or sibling model)
app/features/territories/routes/territory/new.tsx, edit.tsx, view.tsx
app/features/territories/server/buildings.server.ts — zone territories skip building/entrance work
- PDF generation — alternate template for zone territories
- Per-territory perimeter editor (variant of the assembly map editor)
Context
Every territory today is building-based.
TerritoryKind(schema.prisma:18-24) hasClassical,Univ,Commerces,Phone,Hotel; each maps to anEntranceKind(buildings.server.ts:8-14). Some territory types don't fit this model: markets, taxi areas, book-sharing boxes, boat docks, beaches — anywhere addresses don't apply. Currently they can only be tracked as fake-address buildings or unattached overlays on the assembly map.Per-congregation polygons exist (
TerritoryPerimeterfor the assembly perimeter,TerritoryCardOverlayfor card overlays) but neither attaches a polygon to a specific territory.Proposal
Add a mode on each territory, orthogonal to
TerritoryKind, that controls how it is managed:A congregation can mix the two: most territories continue in buildings mode, niche ones use zone mode. The choice is made when creating a territory.
Acceptance criteria
Data model
mode: TerritoryMode { Buildings | Zone }, defaultBuildings)BuildingsmodeAuthoring
Buildings)Reading / display
Existing flows (must keep working)
Out of scope
TerritoryKindvalues — kinds stay as-is; mode is orthogonalFiles
app/database/schema.prisma—Territory.mode+ per-territory polygon (extendTerritoryPerimeteror sibling model)app/features/territories/routes/territory/new.tsx,edit.tsx,view.tsxapp/features/territories/server/buildings.server.ts— zone territories skip building/entrance work