Socrits overview
Socrits is real-time video, voice and chat that you own. One SDK for calls, chat, live streaming and recording — running on your own cloud, on an open WebRTC core (LiveKit). This is the drop-in alternative to traditional CPaaS providers.
You integrate Socrits in three moving parts. Your backend holds a secret API key and mints short-lived tokens; your app uses a client SDK to join a room and stream media; Socrits runs the media server (SFU) and an optional real-time signalling layer for call invitations and chat.
11. Your backend ── POST /v1/token (x-api-key) ──▶ Socrits → { token, url, room }22. Your app ── join(url, token) ─────────────────▶ LiveKit SFU ↔ audio / video33. (optional) signalling socket rings the other user, offline → FCM pushCore concepts
Account, project & API key
You sign up for an account, create a project (one per app or environment), and generate an API key (sk_live_…). The key is shown once and stored hashed — it lives on your server only and is used to mint tokens. Every room is namespaced to your project, so two projects can use the same room name without ever colliding.
Rooms & identities
A room is a call. Everyone who should be in the same call joins the same room name. Each participant has an identity (your user id). Two people with tokens for the same room meet; the SFU forwards their audio and video.
Tokens (the security model)
- Room token — a short-lived credential to join one specific room, minted by your backend via
POST /v1/token. Never ship your API key to the app; ship a room token. - Session token — lets a user connect to the signalling socket (call invites + chat), minted via
POST /v1/session. - API key — your project secret. Server-side only. It creates the two tokens above.
Two channels: media and signalling
A call is really two things, and you can use either independently:
- Media — the actual audio/video, over WebRTC to the Socrits SFU. You only need a room token for this.
- Signalling — “ring/accept/reject/hang-up”, presence and chat, over a socket. Socrits can ring the callee (and push-notify them via FCM when their app is closed) and mint the room tokens automatically on accept. This is what the client SDK’s call methods use.
What you get
- 1:1 and group audio/video calls (SFU, adaptive bitrate).
- Call invitations with online + offline (push) ringing.
- A prebuilt call UI ("UI-Kit") — or bring your own with the raw room object.
- 1:1 and group chat with history, typing, read receipts.
- Cloud recording (MP4) and RTMP live streaming / ingest.
- Usage metering per project (participant-minutes).