A Local-First, Modular Gateway for Sovereign Operations
Designed for engineers who value zero-bloat binaries, standard library idioms, and complete ownership of their data layer.
1. The Master Gateway & Sub-Mux Plugin Pattern
MARS is anchored by a lightweight Go master router (mars.go). Abandoning heavy frameworks and microservice sprawl, every applet implements a single uniform Go interface—exposing a self-contained http.Handler with its own templates, routes, and static file server.
// Uniform MARS Microapp Contract
plannerHandler := planner.NewHandler("planner.db")
mux.Handle("/planner/", plannerHandler)
watchlistHandler := watchlist.NewHandler("watchlist.db")
mux.Handle("/watchlist/", watchlistHandler)
propertyHandler := property.NewHandler("./property.db")
mux.Handle("/property/", http.StripPrefix("/property", propertyHandler))
Because each module encapsulates its own attachment file server (e.g., /watchlist/attachments/{SYMBOL}/), adding or removing an applet requires zero global route pollution.
2. The Data Layer & tinybd
For developers who treat SQLite as a Swiss-army knife, tinybd occupies a complementary niche: it strips away relational schemas, SQL parsing overhead, and CGO bindings in favor of an ultra-lean, pure-Go embedded document store.
- Schema-Less Agility: Operates directly on JSON payloads and raw YAML manifests (
StoredRecord), making structural iteration instantaneous. - Sovereign File Trees: Binary documents (PDFs, CSVs, inspection photos) live directly on disk in predictable directories rather than opaque database BLOBs.
- Instant Search: Sub-millisecond prefix and keyword scanning across local records without external indexing daemons.
3. Cryptographic Isolation & Encryption at Rest
Every tinybd vault is initialized with a domain-specific cryptographic key at the microapp boundary. Writes use authenticated symmetric encryption (AES-256-GCM variant): structured payloads are serialized, paired with a cryptographically random nonce, and sealed before touching disk.
Even if a backup archive or physical drive is misplaced, the underlying *.db files remain opaque ciphertext at rest—while remaining effortlessly portable when paired with your recovery key.
4. Open-Core & Three-Tier Distribution Roadmap
How MARS scales from a single personal workstation to a shareable open ecosystem.
The Sovereign Capsule
Zip the complete directory tree—compiled binary, encrypted *.db vaults, and attachment folders—to hand off an entire estate or project archive to a trusted family member.
Open Modular Core
Publish the core MARS gateway and plugin specification under an open license so developers can roll their own constellations or contribute community microapps.
Surgical Data Exchange
Share individual YAML records, ticker dossiers, or clean-formatted notes between independent MARS nodes—or into standard editors via Copy Clean.