Files
EvolioHealth/docs/adr/ADR-001-private-pocketbase.md

1.1 KiB

ADR-001: Go application facade with private PocketBase

  • Status: Accepted

Decision

Run a public Go application container and a separate internal PocketBase container. Only the Go server is reachable through the reverse proxy. PocketBase has no host-published port and is attached only to an internal Docker network. Flutter clients call versioned Go business APIs exclusively.

The Go server accesses references.db directly but accesses PocketBase through its internal API, never by opening PocketBase's SQLite files.

Rationale

This creates an explicit security boundary, hides generic collection APIs and the technical dashboard, centralizes validation/authorization/encryption, and decouples clients from persistence schema. It remains lightweight: the PocketBase process would consume resources whether embedded or separate, while container overhead is small.

Consequences

The project must implement business endpoints and a service authentication mechanism. PocketBase convenience APIs cannot be exposed as shortcuts. Network topology and automated tests must continuously prove isolation.