0005 — MongoDB for the hosted service
Status: accepted (supersedes the blueprint’s PostgreSQL suggestion, by founder decision)
Decision
The private ASP.NET Core service persists to MongoDB. Ids are stored as UUID v4 with the standard GUID representation. Storage sits behind repository interfaces, with an in-memory implementation for tests. Per-document transaction ordering uses conditional updates on the document head (compare-and-swap), so several service instances can’t fork a log. Multi-document transactions require a replica set and are used only where necessary.
Consequences
Referential integrity across collections is enforced in the service layer rather than by foreign keys. The authorization test matrix and unique indexes (membership, seat counters) carry that responsibility explicitly.