Commit Graph
4 Commits
Author SHA1 Message Date
Harmon fdd5e4b4e2 Add a task-oriented usage guide
docs/GUIDE.md walks through the jobs people actually do, rather than listing
routes: minting a token and fetching a first tile, wiring the tile template into
Leaflet and OpenLayers, accumulating drone imagery across several flights and
deciding when a mosaic rebuild is worth it, integrating a downstream system, a
symptom-to-cause troubleshooting table, and the day-to-day console actions.

API.md stays the reference; the README points at both.
2026-10-16 10:48:11 +08:00
Harmon 46d83145d9 Keep the admin surface local while serving tiles on the LAN
Binding to 0.0.0.0 used to demand credentials because the admin console and
the tile routes shared one listener. That forced a choice between keeping the
console off the network and letting other machines fetch tiles.

Admin routes are now loopback-only by default: the service can bind 0.0.0.0 so
/tiles, /vectors, the catalog and the probes reach the LAN, while /admin and
/api/v1/admin answer 403 to anything arriving from another host. Credentials
are only required when ADMIN_ALLOW_REMOTE=true actually opens the console up,
which is the case worth guarding.

Tests cover both sides: a remote admin request is refused, a remote tile
request still reaches the token check.
2026-10-16 10:41:32 +08:00
Harmon 93bfd406ba Add a calling guide for the API
docs/API.md covers authentication (admin credentials vs service tokens and
their scopes), every public endpoint grouped by purpose, the slicing request
and job shape, the completion callback, error codes, and the checklist for
exposing the console to the LAN.
2026-10-16 10:38:32 +08:00
Harmon 747eed63b0 Basemap Pusher: catalog and distribution gateway for existing tiles
A Go service that scans existing basemap tile directories and vector files,
catalogues them in SQLite, issues scoped access tokens, and serves tiles and
downloads to downstream systems. It deliberately does not generate or process
raster data: GIS software produces the tiles, this service catalogues,
authorises and distributes them.

Capabilities
- scans basemap tile directories (manifest-based or raw z/x/y) and vector
  assets (.geojson, .json, .zip, shapefiles with sidecars)
- token auth with per-resource grants, expiry and coarse scopes (read, slice)
- resource health inspection flags a moved or deleted tile root before a client
  hits a 404
- downstream push with exponential-backoff retries and manual re-queue
- image slicing jobs driven by the GDAL bundled with QGIS, including VRT
  mosaicking so successive drone flights accumulate into one seamless layer
- a narrow, non-admin slicing API for external callers: submit, poll,
  idempotent by job code, completion callback
- ops console covering health, ledger, tokens, pushes, scans, slicing and
  service info
- native Windows service install/start/stop with crash recovery, auto-start and
  a rotating log file, so no NSSM or WinSW wrapper is needed

Verified with 49 tests plus live runs against real tile data and real GDAL.
2026-10-16 10:36:12 +08:00