/ yap getyap.dev →

Yap technical documentation

The code-shaped half of Yap: the process layout, the clients, voice, what the server does internally, how memory is measured, and where the project is going. The wire contract, the encryption construction and the deployment steps have their own pages, so each one is a single thing you can read, link and search for.

Status: alpha. Protocol version 1, encryption version 1. Interfaces change without notice and the API documentation ships with the first stable release. Nothing here is a security guarantee for a hostile server — see the gaps.

1. Process shape

Client (single native process)                  Server (single Rust binary)
  UI: Slint, software renderer                    axum REST: history, uploads, export, delete
    virtualized ListView, models capped           WS gateway: Protobuf frames, reconnect refetch
  yap-core (Rust)                    TLS          auth: argon2id, opaque tokens, refresh rotation
    WS client, Protobuf, store       <------>    perms: u64 bitfield, roles + channel overrides
    OpenMLS, SQLCipher cache, FTS5                MLS delivery service (ciphertext only)
    image decode in Rust, LRU-capped              FTS5 search (public channels only)
    voice: str0m + Opus + cpal       <--UDP-->    link-preview proxy (SSRF-hardened)
                                                  SFU: str0m, one UDP port, Opus only
                                                  sqlx: SQLite default, Postgres feature

No webview, no JavaScript runtime, no remote code in the desktop client. All decoding (images, markdown) happens in Rust.

The official deployment is a different shape: a Cloudflare Worker (server/worker) speaks the same REST and gateway protocol over a SQLite-backed Durable Object, so there is no origin machine to break into. Both backends implement protocol v1; a change lands in both, plus docs/protocol.md.

2. Clients

ClientHow it runsWhat it does
Desktop (client/desktop)Native Slint app with a software renderer, one process, ~25 MB idleThe full client: chat, voice, encrypted spaces and DMs, roles, uploads
Browser (server/panel, at app.getyap.dev)Worker-served page; the token pair is sealed in an HttpOnly yap_app cookie, so the page never holds a tokenSign in, read, send, join voice. Chat arrives by polling GET /channels/{id}/messages?after= every 2.5 s; voice needs the gateway, bridged at /gateway and authenticated by the sealed cookie. Encrypted spaces and DMs are listed but not opened
Developer portal (developer.getyap.dev)Same Worker as the browser client, on its own hostSign-up, sign-in, bot applications with avatar, banner and bio, API keys with usage

The two hosts are custom domains on one Worker (server/panel/wrangler.toml): developer.getyap.dev and app.getyap.dev, each mounted at its own root. The static site is untouched, and the browser never needs CORS against the API because the Worker makes those calls itself.

Python bot library

The yapbot wrapper, prefix and slash commands, gateway events and its REST helpers now live on Write a bot in Python. It is published on PyPI (pip install yapbot, 0.1.1), and every class, decorator, event and REST method is documented in the yapbot API reference.

Protocol v1, auth and limits

The REST and gateway contract, login keys, rotating tokens and the sign-up cap moved to Protocol v1, auth and the limits.

Encryption (E2EE v1)

The envelope, the keys, what the server still sees and the accepted gaps are on Encryption: how it works and where it stops.

3. Voice

WebRTC mesh through str0m, Opus, capped at 8 people per channel. The clients carry and mix the audio; the server relays setup and the roster, never audio. The desktop and browser both support it. The Windows desktop can share a display or window: frames travel over a WebRTC data channel on the same peer connections, so the server never sees them. Calls that cross the internet need a relay: the official server mints Cloudflare TURN credentials from TURN_KEY_ID and TURN_KEY_API_TOKEN, and without those set a VoiceJoin is refused with FORBIDDEN. Self-hosted servers can run the embedded SFU instead: str0m, one UDP port, Opus only.

4. Server internals

Hosting and self-hosting

The three deployments, the Docker commands and flags, and the checks behind the verified list are on Hosting, self-hosting and the verified list.

5. Memory measurements

Windows 11, release builds, summed RSS across every process the app starts. client/tools/rss-probe measures it; CI fails the build above 300 MB.

ClientProcessesSummed RSSPrivate
Tauri 2 + Svelte, empty shell, defaults7352 MB144 MB
same, GPU + network in browser process5280 MB122 MB
same, software GPU in-process5272 MB81 MB
same, --single-process (unsandboxed)3210 MB58 MB
Slint, FemtoVG (OpenGL)186-121 MB~100 MB
Slint, software renderer125-32 MB7-11 MB

Milestone 1, same machine: idle at the login screen 25.3 MB summed RSS (6.8 MB private); signed in with 5 channels × 200 messages loaded, 30.1 MB (10.0 MB private). Reproduce with client/tools/bench.ps1, which refuses to report unless 1,000 messages actually loaded. spikes/tauri-shell reproduces the webview rows.

6. Roadmap detail

ItemStateWhat it means technically
Windows alpha builddoneManual download, unsigned; 25–30 MB enforced in CI
Accounts, spaces, channels, invitesdoneLive chat over the protobuf gateway; custom invite names never expire
Encrypted spacesdone, v1yap1: envelopes sealed on the client, no forward secrecy or signatures
Roles and permissionsdoneRoles plus category and channel overrides on a u64 bitfield
Voice channelsdone, betaWebRTC mesh, 8 per channel, TURN needed off-LAN
Screen sharingdone, desktopDisplay or window into a call over a peer-to-peer WebRTC data channel; no server media, no system audio, Windows capture only
Browser clientdoneapp.getyap.dev, polled chat, gateway bridged through the Worker
Encrypted DMsdoneE2EE v1 on every new DM, plus a ChaCha20/HMAC local history cache keyed from the identity
Files and link previewsdoneFiles up to 10 MiB in plaintext channels; previews fetched by an SSRF-hardened server, never in encrypted channels
Signed updatesdoneEd25519-signed manifest, verified download, applied at the next launch; unsigned installers still say so
Passkeyspost-MVPNative platform APIs

7. Repository layout

/server      yap-server (axum + SQLite), yap-proto (protobuf schema), yap-sfu, worker (Cloudflare), panel (portal + browser client)
/client      desktop (Slint), tools/rss-probe
/docs        protocol.md, ARCHITECTURE.md, E2EE.md, DESKTOP-WIRING.md
/deploy      Dockerfile, docker-compose.yml, Caddyfile
/site        the product site (separate repository: foreski/yap-site)
/spikes      tauri-shell (measurement reference, not built by default)

Read more: ARCHITECTURE.md, protocol.md, E2EE.md.

8. Licence

Not an open-source project. The server (server/) is AGPL-3.0-only. The desktop client, the Cloudflare Workers and the hosted service are proprietary. API documentation is open-sourced with the first stable release.

Updated . The protocol, encryption, self-hosting and bot sections moved to their own pages above; each of them carries the same date.