Anacom Earth · Architecture
Local application architecture
A small native shell supervises a loopback-only server. Python holds the logic; React and MapLibre draw the workspace. Nothing listens beyond the machine, and there is no telemetry.
Bundle layout
Anacom Earth.app/Contents
MacOS/AnacomEarth native shell (Swift): window, WKWebView locked to its loopback origin
Resources/runtime/ standalone CPython 3.12 (pruned) and locked, hash-verified dependencies
Resources/app/ application and CLI code, build-info.json, precompiled web assets
Resources/bin/perichora CLI wrapper using the bundled Python
Resources/legal/ third-party notices, CycloneDX SBOM, release allowlistThe bundle needs no developer toolchain on the user’s Mac: no system Python, Node.js, Git or Xcode. The Swift shell uses the system WebKit, so there is no bundled Chromium. Everything inside the bundle is replaceable; everything outside it is user data.
Components and trust boundaries
| Boundary | Inputs and authority | Enforcement |
|---|---|---|
| Swift shell → launcher → WKWebView | Bundled Python, private runtime home, per-start pairing code | Instance lock, literal loopback listener (listening before readiness is announced), ephemeral browser store, navigation delegate |
| React / MapLibre → research API | Local read requests; bundled catalogue and provenance documents | Loopback Host and Origin checks, GET only, resource limits, pinned catalogue digest; missing evidence stays unknown |
| Browser or CLI → management API | Single-use pairing code minted from a private owner secret; expiring session; CSRF token | Separate /manage/v1 gate, exact routes and methods, origin and fetch-metadata policy, one operation at a time, audit log |
| Management → distribution → registry | Owner-pinned publisher key; expiring, sequenced, signed catalogue; exact signed manifest and payload | Consent bound to the manifest digest, revocation checked before publication, no implicit activation |
| CLI → scheduler → worker | Authenticated, bounded job; independently pinned model; declarative numeric adapter | Private scratch, process groups, time and memory limits, cancellation, bounded queue |
| Owner → application updater | Explicit target; signed application-purpose manifest; pinned or independently supplied key; ZIP | Platform, sequence, bundle and archive verified before activation; journaled atomic exchange; recoverable after a crash |
Data location
Runtime and scientific data live in the Perichora home, by default ~/.local/share/perichora (override with PERICHORA_HOME): models, publishers, catalogues, jobs and datasets. The application adds an earth/ folder there for its instance record, per-start management secret, audit log and release state.
Updates replace only the bundle. Uninstalling moves the bundle to the Trash and never deletes models, datasets, trust or settings.
Why this shape
The engineering team evaluated Electron, Tauri, PyInstaller-style freezers, a .pkg installer and a plain browser launch. The chosen design adds no second runtime, no extra unlocked build dependency, no administrator rights, and keeps every shipped file auditable against the release allowlist.