Farfield Systems
A set of small, single-binary Go services. Each app is an HTML admin UI for writing and moderating content, plus a public JSON API the website reads. These apps provide the backends for various self hosted projects.
Stack
The standard library plus exactly one dependency:
modernc.org/sqlite, a pure-Go SQLite driver. No
cgo, so every build is a static binary. HTTP is
net/http, templates are
html/template, assets are embedded with
embed, logging is log/slog. No web
framework, no ORM, no router library.
Core Ideas
- Content-addressed. Every record carries a CID — a sha-256 hash of its content — for verification, change detection, and ETag caching.
- Self-migrating. A database migrates its own schema when it is opened; deploying new code is the migration step.
- One aesthetic. The admin UIs share a Braun × JPL × vintage-NASA instrument-panel look.
Services
Conventions
-
Reads are public — no auth — and send
Access-Control-Allow-Origin: *, so the browser can fetch them directly. -
Writes need a key — send
X-API-KeyorAuthorization: Bearer. - Every record has a stable key (its slug) and a CID (sha-256 hash). The key never changes; the CID changes when content changes.
-
Single-record endpoints send the CID as a strong
ETag. SendIf-None-Matchfor conditional GET. - Timestamps are RFC3339 UTC strings.
- The public API returns published entries only; drafts never appear.