Architecture

What runs where, where your data lives, and what happens when you sign in, send a message, join a call or share a file.

One app, one server

Your device

Desktop app or browser

React and TypeScript, packaged with Tauri for macOS, Windows and Linux. Your server can also serve the same app to browsers.

Your server · one Docker Compose stack

core-api.NET
The front door: sign-in and sessions, tokens for chat and calls, file permissions and the admin panel.
SpacetimeDBRust module
The chat database: spaces, channels, messages, friends and presence. Every change passes a permission check in the chat module.
PostgreSQLSQL
Accounts and password hashes, file records, and an archive copy of all chat data.
MinIOS3 storage
Files, avatars and space icons. Private: every link is signed and expires.
LiveKitWebRTC
Forwards voice, video and screen shares between the people in a call.
Archive worker.NET
Copies chat data into PostgreSQL as it changes, so the chat database can be rebuilt from it.

Four paths through the stack

Each step is checked by the server, never by the app.

Signing in

core-apiPostgreSQLSpacetimeDB

  1. The app reads your server's discovery file to find its addresses.
  2. core-api checks your password against PostgreSQL and returns a session and a token for the chat database. The chat database never sees your password.
  3. The chat connection runs through core-api's gateway, which rechecks your account every few seconds, so a suspended account is cut off at once.

Sending a message

SpacetimeDBArchive workerPostgreSQL

  1. The app asks the chat module to post the message.
  2. The module checks that you may post there, then saves it.
  3. Everyone viewing the channel receives it over their live connection, and the archive worker copies it into PostgreSQL.

Joining a call

SpacetimeDBcore-apiLiveKit

  1. The chat module records you as present in the call.
  2. core-api issues a call token only once it sees that presence.
  3. Audio and video then flow through LiveKit. Anyone who is kicked or no longer present is removed from the call within a minute.

Sharing a file

core-apiMinIOSpacetimeDB

  1. core-api checks the file against your upload limits and hands out a signed upload link.
  2. The app uploads straight to MinIO, so files never pass through core-api.
  3. The message refers to the file. Viewers get a short-lived download link only after core-api checks they can see that channel or DM.

Where your data lives

Everything stays on the server you run. The app sends no analytics; apart from your servers, it only contacts GitHub to check for desktop updates.

DataStored inNotes
Accounts, email addresses, password hashes, sessionsPostgreSQLPasswords are hashed with Argon2id.
Spaces, channels, messages, DMs, friends, presenceSpacetimeDBWith an archive copy in PostgreSQL.
Files, avatars, space iconsMinIOPrivate. Links are signed and expire.
Voice, video, screen sharesNowhereLiveKit relays them live. Nothing is recorded.
Audio devices, volumes, notification settingsYour deviceKept by the app, not sent to the server.

With the Cloudflare Tunnel path, Cloudflare decrypts web traffic at its edge before passing it to your server. With Caddy, HTTPS ends on your own server. Call audio and video reach LiveKit directly either way.

Rules the system keeps

The app is never trusted

Hiding a button is only a convenience. core-api or the chat module checks every action again on the server.

One identity authority

core-api issues the tokens the chat database accepts. Your chat identity is derived from it, so it survives a rebuild of the chat database.

A small public surface

The chat address accepts only token exchange and the live connection. The raw database API stays private, and the admin panel listens only on the server itself, for an SSH tunnel.

Not end-to-end encrypted yet

Traffic is encrypted in transit, but the server stores messages readably, so whoever runs it can read them. End-to-end encryption is on the roadmap.

Go deeper

Ready to run it? Follow the self-hosting guide.