Files
vantablackTea 6fc6d977bf
CI / Go (build + vet + test) (push) Canceled after 0s
CI / Web (build + lint) (push) Canceled after 0s
added media fixes, search, push updates, pwa, metrics. preparing release 1.0
2026-09-27 23:26:15 +03:00

871 B

ADR 0001: Monolith over microservices

  • Status: accepted
  • Date: 2026-09

Context

The messenger serves a single family (tens of users) on a home-lab mini PC with ~8 GB RAM. A microservice split would add operational overhead (networking, service discovery, per-service containers) with zero benefit at this scale.

Decision

Build a single Go process exposing REST, WebSocket, media serving and static files, with PostgreSQL as the only external state. Internal packages (store, auth, realtime, api, media) are cleanly separated with explicit interfaces, so extraction later is mechanical.

Consequences

  • One container, trivial docker compose up.
  • In-process WebSocket hub gives O(1) presence checks for push decisions.
  • If the service ever needs horizontal scaling, realtime and store already hide their implementations behind interfaces.