This adds typed asset APIs to the geo client, covers the 3D/image upload-share flow in integration tests, and introduces a simple Leaflet web demo that places objects on map features and manages sharing visibility via backend links. Made-with: Cursor
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
This document explains how frontend developers should integrate with the backend through the reusable TypeScript client at `libs/geo-api-client`.
|
||||
|
||||
> **See also:** [Frontend Development](frontend-development.md) — demo app (`web/`), local dev, build steps.
|
||||
>
|
||||
> **Asset docs:** [Assets Storage and Sharing](assets-storage-and-sharing.md) and [Docker MinIO Local Development](docker-minio-local-dev.md).
|
||||
|
||||
Primary backend URL for integration:
|
||||
|
||||
@@ -76,6 +78,16 @@ Key methods:
|
||||
- [`createPointFeature(collectionId, lon, lat, properties)`](https://git.produktor.io/momswap/backend/src/branch/main/libs/geo-api-client/src/GeoApiClient.ts#L156) — Add a Point. lon ∈ [-180,180], lat ∈ [-90,90]. Returns feature id.
|
||||
- [`deleteFeature(featureId)`](https://git.produktor.io/momswap/backend/src/branch/main/libs/geo-api-client/src/GeoApiClient.ts#L172) — Delete a feature.
|
||||
|
||||
## Asset API integration note
|
||||
|
||||
Asset endpoints are currently available at backend API level (`/v1/assets...`) and can be called from frontend apps directly with authenticated `fetch` requests.
|
||||
|
||||
Current frontend contract points:
|
||||
|
||||
- Feature list responses include linked media under `feature.properties.assets`.
|
||||
- Each asset includes a backend-relative download path (`link`) like `/v1/assets/{id}/download`.
|
||||
- Frontend should use this relative path and avoid constructing direct S3 URLs.
|
||||
|
||||
## Recommended integration flow
|
||||
|
||||
1. Create one `GeoApiClient` instance per backend base URL.
|
||||
|
||||
Reference in New Issue
Block a user