Build your first realtime chat
Connect a TypeScript client, authenticate, subscribe to a channel, and receive your first push.
View the repositoryDeveloper tutorials
Runnable, goal-based guides are on the way. Until they land, each path below takes you to the right repository README to start from.
Start here
Three paths into the stack. Each card links to the repository that owns that path — the full written guides will land here.
Connect a TypeScript client, authenticate, subscribe to a channel, and receive your first push.
View the repositoryUse TypeScript for web and desktop, Kotlin for mobile surfaces, and Rust for core or native integration.
View the repositoryBuild the Rust server, configure env, run migrations, and connect clients through WebSocket.
View the repositoryDeveloper experience
The snippets below show the real API shapes: connect, authenticate, subscribe. For a full build, start from each repository README.
$ # npm package coming soon — build from source: github.com/privchat/privchat-sdk-typescript
import { PrivchatClient } from "@privchat/sdk";
const client = new PrivchatClient({
url: "wss://im.example.com:9080/",
});
await client.connect();
await client.authenticate(userId, accessToken, deviceId);
await client.subscribeChannel("900710001", 1);
client.onPushMessage((message) => {
console.log("new message", message.server_message_id);
});Deep dives
Protocol docs explain channels, transfer RPC, reconnect, local caches, and server-authoritative sync with examples from the real application modules.
QUIC for modern low-latency paths, TCP for compatibility, WebSocket for browsers — native clients fail over between transports; the protocol never changes.
Messaging, presence, game events, bot replies, and business pushes all ride the same channel model. Learn it once.
Typed request-response routes over the live connection. Application modules add capabilities without touching the transport.
Message ids, sequence points, read cursors, and recovery stay server-authoritative. Client caches stay fast — and honest.