Legacy Datastore Architecture
Last updated: March 11, 2026
This page is archival context only. Freeboard release runtime is Postgres-only.
Previous MongoDB Architecture Snapshot
Before Phase 31 hard cutover, Freeboard used a MongoDB-first datastore path:
- API runtime supported
DB_BACKEND=mongo|postgres. - Mongo runtime relied on Mongoose models and repository adapters.
- Operational helpers included Mongo compose/bootstrap artifacts and optional Ansible preload tooling for Raspberry Pi paths.
- Several one-off migration scripts existed to bridge schema and visibility transitions.
Why MongoDB Was Removed
MongoDB support was removed because this project is unreleased and had no production users, so a hard cutover had lower risk than preserving long-term dual-backend complexity.
The old dual-path shape imposed ongoing cost:
- More runtime branching and test matrix surface.
- More environment and deployment permutations.
- More CI/docs maintenance and operator ambiguity.
- More platform-specific fragility on constrained ARM targets.
Raspberry Pi Limitations and Workarounds
Platform limitations
- Reliable MongoDB support on Raspberry Pi varied by board generation, OS image, architecture, and Mongo release line.
- Pi 4 and mixed 32-bit environments frequently depended on non-official image/binary paths.
- Operational behavior and support expectations were inconsistent compared to mainstream amd64/arm64 server targets.
Brittle/community workarounds previously used
- Pinning community-maintained Raspberry Pi Mongo images/tarballs.
- Keeping separate profile toggles and preload automation for ARM-specific bootstrapping.
- Maintaining fallback notes and manual operator playbooks outside normal production flow.
Operational risks introduced by those workarounds
- Supply and maintenance risk when community artifacts changed, lagged, or disappeared.
- Upgrade risk from pinned artifact drift and manual validation overhead.
- Incident response complexity due to target-specific behavior differences.
- Higher onboarding burden for contributors and operators.
Final Postgres-Only Rationale
Postgres is the long-term release datastore because it reduces runtime branches, simplifies operations, and aligns better with deterministic CI/testing and supported deployment targets.
This repository intentionally removed Mongo runtime/ops paths to keep one durable architecture:
- Single backend contract.
- Single schema lifecycle toolchain.
- Single release-readiness path.
- Lower long-term maintenance overhead.