docs + fix: eTerra health check keywords from real maintenance page
- Added real eTerra maintenance keywords observed 2026-03-08: 'serviciu indisponibil', 'activități de mentenanță sunt în desfășurare' - Extract actual maintenance message from HTML response for UI display - Updated CLAUDE.md: ParcelSync module #15, Visual Copilot #16, eTerra/PostGIS integrations, TS strict gotchas, eTerra API rules - Updated ROADMAP.md: Phase 7B (ParcelSync) with 5 completed tasks - Updated SESSION-LOG.md: full session entry with bugs/learnings
This commit is contained in:
+48
-1
@@ -46,8 +46,10 @@
|
||||
| 12 | Dashboard | 0.1.0 | COMPLETE | — | Custom dashboards per role |
|
||||
| 13 | AI Chat | 0.2.0 | COMPLETE | Needs API key env vars for real AI | Streaming, model selector, conversation templates |
|
||||
| 14 | Hot Desk | 0.1.0 | COMPLETE | — | — |
|
||||
| 15 | ParcelSync | 0.5.0 | COMPLETE | Needs real-world UAT testing at scale | Map visualization, batch enrichment, export tools |
|
||||
| 16 | Visual Copilot | 0.1.0 | STUB | Placeholder only | AI image analysis integration |
|
||||
|
||||
**Phases 1–3 COMPLETE (all 42 tasks).** Next: Phase 4 (Quality & Testing).
|
||||
**Phases 1–3 COMPLETE (all 42 tasks).** Phase 7B (ParcelSync) COMPLETE. Next: Phase 4 (Quality & Testing) or module hardening.
|
||||
|
||||
---
|
||||
|
||||
@@ -644,6 +646,51 @@ Env vars (hardcoded in docker-compose.yml for Portainer CE):
|
||||
|
||||
---
|
||||
|
||||
## PHASE 7B — ParcelSync / eTerra Module (NEW — 2026-03)
|
||||
|
||||
> GIS integration with Romania's national eTerra/ANCPI cadastral system.
|
||||
|
||||
### 7B.01 ✅ `[HEAVY]` ParcelSync Core — eTerra Client + Layer Sync (2026-03)
|
||||
|
||||
**What:** eTerra API client with form-post auth, JSESSIONID cookie jar, session caching, paginated layer fetching. 23-layer catalog. Background sync with progress polling. PostGIS storage with GisFeature model.
|
||||
**Status:** ✅ Done. `eterra-client.ts` (~1000 lines), `sync-service.ts`, `eterra-layers.ts`, `session-store.ts`. Pagination with `maxRecordCount=1000` + page size fallbacks (500, 200). Default timeout 120s. Background sync via server singleton.
|
||||
|
||||
---
|
||||
|
||||
### 7B.02 ✅ `[HEAVY]` ParcelSync — Enrichment Pipeline (2026-03)
|
||||
|
||||
**What:** Per-parcel enrichment via eTerra `/api/immovable/list`. Extracts NR_CAD, NR_CF, PROPRIETARI, SUPRAFATA, INTRAVILAN, CATEGORIE_FOLOSINTA, HAS_BUILDING, etc.
|
||||
**Status:** ✅ Done. `enrich-service.ts` with `FeatureEnrichment` type. JSONB storage in `enrichment` column.
|
||||
|
||||
---
|
||||
|
||||
### 7B.03 ✅ `[STANDARD]` ParcelSync — Owner Search (2026-03)
|
||||
|
||||
**What:** Search by owner name. DB-first (ILIKE on enrichment JSON PROPRIETARI) with eTerra API fallback.
|
||||
**Status:** ✅ Done. `/api/eterra/search-owner`, `searchImmovableByOwnerName()` in client. Mode toggle in Search tab UI.
|
||||
|
||||
---
|
||||
|
||||
### 7B.04 ✅ `[STANDARD]` ParcelSync — Per-UAT Analytics Dashboard (2026-03)
|
||||
|
||||
**What:** Visual dashboard per UAT with KPIs, area stats, intravilan/extravilan donut, land use bars, top owners, fun facts. CSS-only (no chart libraries).
|
||||
**Status:** ✅ Done. `/api/eterra/uat-dashboard` with SQL aggregates. `uat-dashboard.tsx` component. Dashboard button on each UAT card in DB tab.
|
||||
|
||||
---
|
||||
|
||||
### 7B.05 ✅ `[STANDARD]` ParcelSync — Health Check + Maintenance Detection (2026-03)
|
||||
|
||||
**What:** Ping eTerra every 3min, detect maintenance by keywords in HTML, block login when down, show amber "Mentenanță" state.
|
||||
**Status:** ✅ Done. `eterra-health.ts` singleton, `/api/eterra/health` endpoint, session route blocks login, UI shows amber pill with message extraction.
|
||||
|
||||
**Bugs found & fixed during ParcelSync development:**
|
||||
- Timeout 40s too low for geometry pages → increased to 120s
|
||||
- `arr[0]` access fails TS strict even after length check → assign to const
|
||||
- `?? ""` on `{}` typed field produces `{}` → use `typeof` check
|
||||
- Prisma `$queryRaw` result needs explicit cast + guard
|
||||
|
||||
---
|
||||
|
||||
## PHASE 8 — Advanced Features
|
||||
|
||||
> Cross-cutting features that enhance the entire platform.
|
||||
|
||||
Reference in New Issue
Block a user