Network
Git plus a schema can store a mailbox. A messenger also needs routes, session checks, and a path that does not wait on the next poll. api is that logic layer. webrtc is the live path, with git as the connection broker.
This page is those two crates and how the product wires them. The mailbox send/poll story is Git as your mailbox. Delivery ticks and latency are on Why not always instant.
It is research and development — subject to change. These crates are closed-source. Galleries are the public surface.
api
api-core is an in-process messaging API: REST-style routes and middleware over db-core git storage. Router::from_schema reads the messaging schema and registers /resources/* endpoints — list, get, create, update, delete — from each document and collection type. Hand-written routes sit beside those: connect, profile, contacts, groups, send, poll, seal/unseal.
Middleware such as require_session and require_profile runs before a handler. That is how a peer poll is authenticated without a Glitr account server.
glitr-client is the shared session, snapshot, poll, send, and UI adapter. Both whatsup and the api-gallery story use it. The product shell on UI/UX mounts chrome; this crate is what the chrome talks to.
The git path is push, fetch, and poll. Messages arrive when the other person next fetches your outbound. That is reliable offline and slower than a popular messenger. Delivery names the ticks.
Open the e2e messaging gallery
The gallery home is positive-intentions.github.io/api. Two browser tabs can connect remotes and send on the same client the product uses.
webrtc
Git is a mailbox. When both people are at the keyboard, Glitr wants a direct data channel. webrtc-core treats each person’s repository as a signaling bulletin board: publish an offer or answer (already cascaded to the contact), complete ICE, then carry chat frames on the channel.
The isolated gallery is a two-browser QR or paste handshake. Each side prepares a bundled offer (wu1: payload). Scanning produces a reply; scanning the reply finishes the connection. No git remotes are required in that demo.
The gallery home is positive-intentions.github.io/webrtc. Try path: Live link.
How the product joins them
For git-URL contacts, glitr-client starts establishing a WebRTC connection in the background while git remains the offline path. Signaling rows live on each repo. When the channel is up, new 1:1 text and files ride it — the same recipient cascade as outbound. Groups stay on git. If the channel drops, the next text send is git again; files wait for Live.
Pair now is a separate product path: a plaintext QR or paste bundle exchanged out of band, with no git mailbox fallback. Details of both paths: Direct live links.
Git and live share one protocol session per contact so the ratchet does not fork. That record is on Data structures.
Next: Data structures — the records in a mailbox, what is public vs sealed, and what sits inside a ciphertext field.
