Developer tutorials

Start from the right path, then go deeper.

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

Choose the path that matches your build stage.

Three paths into the stack. Each card links to the repository that owns that path — the full written guides will land here.

01

Build your first realtime chat

Connect a TypeScript client, authenticate, subscribe to a channel, and receive your first push.

View the repository
02

Choose the right SDK

Use TypeScript for web and desktop, Kotlin for mobile surfaces, and Rust for core or native integration.

View the repository
03

Run the server locally

Build the Rust server, configure env, run migrations, and connect clients through WebSocket.

View the repository

Developer experience

Connect, authenticate, subscribe — the core loop.

The snippets below show the real API shapes: connect, authenticate, subscribe. For a full build, start from each repository README.

TypeScript API overview
$ # 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

Learn the architecture, not only the API surface.

Protocol docs explain channels, transfer RPC, reconnect, local caches, and server-authoritative sync with examples from the real application modules.

Multi-transport

QUIC for modern low-latency paths, TCP for compatibility, WebSocket for browsers — native clients fail over between transports; the protocol never changes.

Channels first

Messaging, presence, game events, bot replies, and business pushes all ride the same channel model. Learn it once.

Transfer RPC

Typed request-response routes over the live connection. Application modules add capabilities without touching the transport.

Server authority

Message ids, sequence points, read cursors, and recovery stay server-authoritative. Client caches stay fast — and honest.