GeoIntel release gates / Compile, test, contracts and builds (push) Successful in 1m49s
GeoIntel release gates / Python and npm vulnerability policy (push) Successful in 21s
GeoIntel release gates / Production AI image, SBOM and container scan (push) Successful in 5m39s
GeoIntel release gates / Deploy exact gated revision to Unraid (push) Failing after 58m43s
1.3 KiB
1.3 KiB
Frontend State and API Client Specification
API client
Create a typed API client under:
frontend/src/services/api/
Suggested files:
client.ts: fetch wrapper with base URL and error handling.projects.tsareas.tsdatasets.tsanalysis.tsqa.tsexports.ts
Error handling
All API errors should be normalized to:
type ApiError = {
error: string;
message: string;
details?: unknown;
request_id?: string;
};
State model
Use TanStack Query for server state:
- projects list
- project detail
- datasets list
- analysis runs
- QA results
Use local state for UI only:
- selected map layer
- layer opacity
- active tool
- drawn geometry draft
- side panel state
Required page states
Every data-driven page must show:
- Loading state.
- Empty state.
- Error state.
- Success state.
Map state
Map state should not be embedded in every page component. Create reusable hooks/components:
MapCanvasLayerPanelDrawAreaToolGeoJsonLayerRasterLayerPlaceholderuntil real tile serving exists.
Frontend first-pass priority
Do not build a beautiful but disconnected UI. The first UI must connect to real foundation endpoints:
- Health check.
- Project list/create.
- Project detail.
- Area creation placeholder/drawn GeoJSON form.
- Dataset list.
- Capabilities panel.