6. Architecture
What are the moving parts and how are they connected?
Common Room is a modular monolith. One Spring Boot application holds all the features, organised into packages, in front of one PostgreSQL database. This keeps the system simple to run, test and deploy.
- Clients: the Android and iOS app, the website, and the admin console.
- Front door: Traefik terminates HTTPS and forwards to the API container. Cloudflare sits in front of the domain.
- API: Spring Boot, with feature packages for the feed, Faceless, chats, groups, notifications, marketplace, profiles, ads, payments, moderation and admin.
- Database: PostgreSQL. The API runs each request as the signed-in user, so row-level security rules apply to every read and write.
- Storage: media goes to Cloudflare R2 and is served by address.
- Workers: scheduled jobs (digests, ranks, cleanup) run on exactly one API instance, controlled by a setting, so jobs never run twice.
- Caches and limits: small in-memory caches and rate limiters on each API instance.
Responses are compressed with gzip, which makes a feed page about 82 percent smaller on the wire. The feed is read from a prepared pool of ranked posts so a feed request is a quick lookup, not a heavy query.
Last updated 30 November 2026.
