feat: implement spatial boundary checks for Bari municipal area in GeoJSON handling
This commit is contained in:
+12
-3
@@ -40,9 +40,10 @@ public revocable link generated by operator/admin.
|
||||
### Citizen flow
|
||||
1. Register/login.
|
||||
2. `POST /reports` with category, coordinates, address, description, optional media array.
|
||||
3. Backend infers `area_id` by GeoJSON polygon match when possible.
|
||||
4. Report starts `OPEN`, status history row inserted.
|
||||
5. Citizen can:
|
||||
3. Backend first rejects coordinates outside Bari municipal boundary.
|
||||
4. Backend infers `area_id` by GeoJSON polygon match when possible.
|
||||
5. Report starts `OPEN`, status history row inserted.
|
||||
6. Citizen can:
|
||||
- list own reports
|
||||
- read detail/history/media
|
||||
- chat on own report
|
||||
@@ -72,6 +73,7 @@ public revocable link generated by operator/admin.
|
||||
|
||||
### Admin flow
|
||||
- Create/update categories, areas, teams
|
||||
- Area GeoJSON must stay inside Bari municipal boundary
|
||||
- List users, edit roles, ban/unban
|
||||
- Read stats
|
||||
- Review moderation queue and resolve/dismiss flags
|
||||
@@ -89,6 +91,13 @@ public revocable link generated by operator/admin.
|
||||
- `GET /interventions/{token}` returns public summary for field team:
|
||||
report data, location, media, assigned team, masked citizen identity, phone.
|
||||
|
||||
## Spatial Boundary Rule
|
||||
- `allowed_boundaries` stores active municipal allowed area.
|
||||
- Current seed uses `BARI`.
|
||||
- Report coordinates outside boundary are rejected.
|
||||
- Admin area polygons outside boundary are rejected.
|
||||
- Open data output is filtered again by same boundary.
|
||||
|
||||
## Current Notifications / Rewards / Moderation
|
||||
- Notifications: local in-app only.
|
||||
- Reward points: awarded once per `(report_id, reason)`.
|
||||
|
||||
Reference in New Issue
Block a user