All projects

Junto

Self-hosted team chat and calls

Side project by Luiz Consalter.

Overview

Junto is a self-hosted application for team text chat, voice and video calls, screen sharing, and call recording with transcripts. It has a server written in Rust with PostgreSQL, a native desktop client built with gpui for macOS, Windows and Linux, LiveKit as the media server, a recorder and a transcription worker.

Every feature in the first-version scope is built, and continuous integration builds and tests the project on the three systems. There is no public release yet; a server is installed from the repository with Docker Compose.

Over 20 friends use it daily, and it has had almost perfect uptime.

The design is recorded in 225 architecture decision records. Eight technical tests ran before product code started, and their measurements are part of the records.

Architecture

Desktop client Rust, gpui LiveKit Rust SDK macOS, Windows, Linux one device key per server Junto server Rust, axum REST API, WebSocket events permissions, audit log PostgreSQL File storage attachments, media Media server LiveKit SFU, Redis Recorder LiveKit Egress one file per track Transcription worker Python: Silero VAD, faster-whisper, sherpa-onnx speaker separation, glossary HTTPS, WebSocket WebRTC media call tokens jobs, layout page writes files audio files
The server is the only component that enforces permissions. The media server admits a participant on a token that the server issues.

Decisions and features

Recording with transcripts and speaker separation

A recording is a tracked job on the server. It has a state (starting, recording, processing, then ready, partly failed or failed) and one segment for each audio track. The recorder writes one video for the recording and one audio file for each track, and a participant who reconnects gets a new track and a new segment. Every participant sees an indicator while a recording runs, and the server reserves disk space before it starts.

The transcription worker finds speech with Silero VAD, cuts the speech clips itself and sends only those clips to faster-whisper with the large-v3-turbo model. It detects the language of each clip, so a call that mixes English and Portuguese is transcribed in both. In the step-0 tests, with synthetic speech, detection per clip gave a word error rate of 0.9 to 1.4 % on mixed speech; one detection per block of joined speech gave 49 to 52 %.

Each microphone has its own audio file, so a line from a microphone carries the member's name. Voices inside shared screen sound are separated into Speaker 1, Speaker 2 and so on with sherpa-onnx speaker embeddings and clustering. A workspace glossary guides the spelling of names and terms. A person who can see a recording can correct a line or rename a speaker, and the original text stays viewable.

Device-key login

There are no passwords. The client generates a separate Ed25519 device key for each server, so two server operators cannot recognize the same person by comparing keys. To log in, the device signs a challenge from the server. A challenge is used once, expires quickly, and names the server, the account, the device and the operation.

A person who loses a device adds a new device from one that is still linked, or asks the server owner for a recovery.

Roles and permissions

Permissions have two levels. Server roles cover administration, workspaces, invites, bans and the audit log. Workspace roles cover channels, messages, calls and recordings, with overrides per category, per channel and per person in the order that Discord uses.

One function evaluates every permission check, for the API, events, downloads, search, exports and calls. Direct messages are closed to everyone except their two participants, administrators included. Administrative changes are written to an audit log.

Self-hosting

All data stays on the hardware of the person who operates the server, and the application sends no telemetry. Servers are independent and do not communicate with each other; one client keeps a list of servers and connects to several.

Connections use TLS and LiveKit encrypts media. There is no end-to-end encryption, because the server reads messages for history, search, export and the API.

Each component runs in its own container with Docker Compose. A deployment runs on one host, or on two hosts when the data must stay on a machine that cannot receive inbound connections. The repository contains backup, restore and upgrade scripts with tests.

Public API and native client

The client uses only the public REST and WebSocket API. The OpenAPI document and the event schema are generated from the server's code with utoipa. An event gets its position when its change commits, and it is authorized again when it is delivered.

The desktop client is one Rust application built with gpui and the LiveKit Rust SDK, with no browser client. Call audio goes through cpal with noise suppression, and a screen share sends sound with an explicit choice of which sound it includes.

Stack

Server
Rust, Tokio, axum, sqlx, PostgreSQL 17, utoipa (OpenAPI), ed25519-dalek, rustls
Client
Rust, gpui, LiveKit Rust SDK, WebRTC, cpal, nnnoiseless
Media
LiveKit server, LiveKit Egress, Redis
Recording layout
TypeScript, livekit-client
Transcription
Python, Silero VAD, faster-whisper, CTranslate2, sherpa-onnx, ONNX Runtime
Deployment
Docker Compose; packages for macOS, Windows and Linux
Licence
Apache-2.0

Walkthrough

1:29 · The desktop client: a live conversation, a call with a screen share and a recording, then the transcript of the recording and a search that finds it. It has the sound of the call and starts muted. Every name and line is invented.

Videos and screenshots