Architecture · Reference

Meratyn System Overview

One React app, three shells. The webview owns state through disposable project sessions; renderers and hosts stay swappable subscribers of the same document.

Meratyn system overview Architecture of Meratyn showing the React UI driving ApplicationRuntime and project sessions, whose document and capability stores feed MapController and MapLibre GL JS, with plugins and processing inside the webview and the Tauri host plus an optional Python sidecar outside it. WEBVIEW · REACT APP USER MACHINE OPTIONAL SIDECAR COMMANDS TAURI TOOLS UI React UI panels · views CORE ApplicationRuntime app-lifetime runtime SESSION ProjectSession Document store · Travels Capability stores SYNC MapController syncLayers PROC Processing Turf.js algorithms PLUGINS Built-in plugins controls → commands GL MapLibre GL JS + deck.gl overlays TAURI Tauri desktop host FS · dialogs · mTLS SIDECAR FastAPI sidecar optional · conversion · Whitebox Cesium globe panes are just another subscriber of the same session — no engine abstraction layer. LEGEND SOLID · DATA / CONTROL DASHED · OPTIONAL / HOST BOUNDARY FOCAL · PROJECT SESSION HUB

Packages

  • @mappview/core — types, project schema, runtime, sessions, commands
  • @mappview/map — MapLibre lifecycle, layer sync, styling
  • @mappview/ui — shadcn-style primitives
  • @mappview/plugins — plugin interface + built-ins
  • @mappview/processing — client-side algorithm registry
  • mappview-desktop — shell layout, Tauri I/O, composition

One-way state flow

  • Add Data → conversion → createGeoJsonLayer / MappViewLayer
  • MapCanvas subscribes; syncLayers reconciles MapLibre
  • Panels invoke document commands — never mutate MapLibre directly
  • Desktop save snapshots the document to .mappview.json

Engines & fallbacks

  • DuckDB-WASM Spatial converts what MapLibre can't render
  • Vector tools: Turf.js client-side; GeoPandas via sidecar or Pyodide
  • Sedona SQL: sidecar when reachable, CereusDB WASM otherwise
  • Whitebox + raster tools always run on the sidecar