Skip to content

versatiles-frontend

Version 2026.144.1443
Repo superproject

VersaTiles frontend SPA served by a permissive-CORS static server on port 8002 (host 28002), re-exporting the style/fonts/styler bundles single-origin The pre-built versatiles-org/versatiles-frontend TypeScript SPA (the frontend full-feature release variant) unpacked at /opt/versatiles-frontend/ with index.html at the root — same family as the upstream pmtiles.io viewer but for the VersaTiles tile-server ecosystem. It is served by a custom permissive-CORS python-stdlib static server on port 8002 (host 28002), mirroring the sibling maputnik (8000) and pmtiles-viewer (8001) static-SPA services. The same server re-exports the sibling layers’ bundles under /style/ (versatiles-style), /fonts/ (versatiles-fonts SDF glyphs) and /styler/ (maplibre-versatiles-styler) so the notebook’s MapLibre iframe loads every asset single-origin without a CDN. Verifiable: the SPA index, the CORS server script and the three re-exported bundles land at their paths, and the live service answers GET / with 200 plus an Access-Control-Allow-Origin header (the reason this layer ships a custom server instead of plain python -m http.server).

  • versatiles-frontend

This candy’s plan: — the runnable spec charly check executes against a live deployment. check: steps are idempotent probes; run: steps change state.

Intent Step
run mkdir=/opt/versatiles-frontend
run command=set -euo pipefail ASSET=$(curl -fsSL “https://api.github.com/repos/versatiles-org/versatiles-frontend/releases/latest” \ | jq -r ‘.assets[].browser_download_url’ \ | grep -E ‘/frontend.tar.gz$’ \ | head -1) if [ -z “$ASSET” ]; then echo “ERROR: could not find frontend.tar.gz on versatiles-frontend latest release” >&2 curl -fsSL “https://api.github.com/repos/versatiles-org/versatiles-frontend/releases/latest” \ | jq -r ‘.assets[].name’ >&2 exit 1 fi TMPDIR=$(mktemp -d) cd “$TMPDIR” curl -fsSL “$ASSET” -o frontend.tar.gz # The tarball expands directly at the layer root (index.html # at top-level), per the upstream packaging. tar -xzf frontend.tar.gz -C /opt/versatiles-frontend cd / rm -rf “$TMPDIR”
run command=set -euo pipefail mkdir -p /opt/versatiles-frontend/style \ /opt/versatiles-frontend/fonts \ /opt/versatiles-frontend/styler cp -r /opt/versatiles-style/. /opt/versatiles-frontend/style/ cp -r /opt/versatiles-fonts/. /opt/versatiles-frontend/fonts/ cp -r /opt/maplibre-versatiles-styler/. /opt/versatiles-frontend/styler/
run write=/opt/versatiles-frontend-cors-server.py
check the pre-built frontend SPA is unpacked with its index.html at the layer root
check the CORS-enabled static server script is installed and executable
check the versatiles-style bundle is co-located under the http.server root at /style/
check the SDF font glyphs are re-exported under /fonts/
check the maplibre-versatiles-styler bundle is re-exported under /styler/
check the running versatiles-frontend service answers GET / with HTTP 200
check every response carries an Access-Control-Allow-Origin header so browser map clients fetch the re-exported /style/, /fonts/ and /styler/ assets cross-origin
check service=versatiles-frontend
check addr=127.0.0.1:${HOST_PORT:8002}
check http=http://127.0.0.1:${HOST_PORT:8002}/
check command=curl -fsS http://localhost:8002/style/ | grep -qi ’versatiles\