Back to blog
Engineering•June 20, 2026•4 min read

A real-time community without a realtime server

SentiKits is a social app - groups, threaded comments, a weekly song feed, DMs - with no sockets to scale and no realtime server to babysit. Firestore listeners and Cloud Functions cover it.

Let the database push

Live screens subscribe with onSnapshot and update as data changes - no polling, no socket layer. The discipline that makes it safe is unglamorous: every listener is torn down on unmount, so a user drifting through 45 routes doesn't leak a stack of open subscriptions.

Real-time is mostly a cleanup problem. The listeners are easy; remembering to close them is the whole job.

Trust only what the server wrote

Clients can read the feed, but they can't fake it:

  • Notifications and inbox items are written only by Firestore triggers, never by the client - so a notification is proof the server saw the event.
  • Block and report flows write to server-only collections; moderation runs through admin-gated functions.
  • Destructive deletes take a mandatory backup first, so closing a moderation case is never the same as losing the evidence.