A small Tauri v2 + SvelteKit desktop app for authoring and updating GeoContext repositories per FORMAT.md.
Every command runs inside Docker so the host doesn't need Rust / Node / webkit2gtk-4.1 installed.
- Open / clone / new — open a local folder, clone a GitHub repo, or
seed a fresh
geocontext.json+datasets/. Recent repositories are remembered between sessions (workspace registry). - Forms for the top-level fields, datasources (geojson / csv, inline or
HTTP), and layers (features / markers / raster-tiled / vector-tiles /
raster-dem) with the
style.optionsshorthand and a rawstyle.maplibreescape hatch. detail.title+detail.media[]editor, including thecsv-rowmedia kind (join an external CSV to features by id).- Backgrounds — single basemap or a
backgrounds[]selector withbackground-colorandimage-overlay(georeferenced raster) types. - Import local GeoJSON, or a Shapefile reprojected to WGS84
(proj4rs, EPSG auto-detected from the
.prj). - Content tab — manage
chcx-static.jsonstatic pages (markdown / HTML) and editREADME.md/CITATION.cff. - Assets tab — repo file inventory with referenced/orphan analysis,
plus one-click Frictionless
datapackage.jsongeneration (CSV schemas inferred, hand-authored metadata preserved). - GitHub — sign in (OAuth device flow or PAT), pull, sync (commit + push), and publish a new repo.
- Live MapLibre preview that re-renders as you edit, using the §9
asset-path rewrite when you supply
user/project/refcoords. - Inline validation against the FORMAT.md required fields, and a raw JSON tab for advanced edits.
make build # build the docker image (one-time, ~2 GB)
make install # npm install inside the container
make check # cargo check the Rust side (slow first time)
make dev # SvelteKit dev server only — open http://localhost:1420
make tauri-dev # full Tauri shell (needs a DISPLAY / X server)make tauri-dev only opens a window when an X server is reachable. On a
headless host you can use the dev target to exercise the UI in a
browser, then build the binary on a desktop machine with
make tauri-build.
src/ SvelteKit frontend (routes/, lib/)
lib/types.ts GeoContext TS types
lib/validate.ts validator → flat issue list keyed by path
lib/assetPath.ts §9 path rewrite (jsDelivr)
lib/tauri.ts thin wrapper around Tauri commands
lib/components/ TopLevelForm, DatasourcesEditor, LayersEditor,
MapPreview, JsonView
src-tauri/ Rust crate (load_geocontext, save_geocontext,
create_geocontext_repo, list_assets)
Dockerfile Ubuntu 24.04 + Rust stable + Node 20 +
webkit2gtk-4.1-dev
docker-compose.yml mounts the project; persistent volumes for
node_modules + cargo target
Makefile convenience targets, all routed through Docker
- The Tauri commands do plain filesystem I/O on a folder path the user
picks via the dialog, so there are no scoped
fs:ACL entries to maintain. - The application icon set in
src-tauri/icons/is generated fromassets/logo.png(a square PNG, ≥ 512 px) withmake icons(tauri icon). Re-run it after changing the logo. - GitHub sign-in has three tiers, picked automatically by what's
configured at build time:
- Seamless browser flow (recommended) — the loopback
Authorization Code flow: the app opens your browser, you approve,
and you're bounced straight back, no code to copy. GitHub OAuth
Apps don't support PKCE, so this needs both
GEOCONTEXT_OAUTH_CLIENT_IDandGEOCONTEXT_OAUTH_CLIENT_SECRETat build time. GitHub matches the callback URL exactly (host and port), so the redirect is a fixed loopback URL, not an ephemeral port: registerhttp://127.0.0.1:8765/callbackas the OAuth App's Authorization callback URL. To use a different port/path, setGEOCONTEXT_OAUTH_REDIRECTat build time to the exact URL you registered (the app binds the port parsed from it). If that port is busy at sign-in time the app reports it and you can retry. Note the embedded secret is not truly confidential in a desktop binary — the blast radius is limited to consent-screen phishing, which is the accepted trade-off for this flow on native apps. - Device flow — set only
GEOCONTEXT_OAUTH_CLIENT_ID; the app shows a short code to type on GitHub's device page. No secret. - Personal access token — always available as a manual fallback.
Set the build env in
release.yml(and locally beforemake tauri-build) to bake the credentials in.
- Seamless browser flow (recommended) — the loopback
Authorization Code flow: the app opens your browser, you approve,
and you're bounced straight back, no code to copy. GitHub OAuth
Apps don't support PKCE, so this needs both
- CSV preview isn't parsed into points inside the embedded preview — the GeoContext front-end is the source of truth there. The editor treats CSV datasources as schema-only.