How hushhq/hush works
1. What this repository is
- hush is not the runtime product codebase. It is the public coordination and entry-point repo for the Hush platform.
- Its main responsibilities are: user triage, architectural documentation, self-hosting entry points, contributor bootstrap scripts, and issue routing.
2. Where the real system lives
- The actual implementation is split across sibling repositories:
- hush-web for the browser client
- hush-desktop for the Electron desktop client
- hush-mobile for the planned React Native client
- hush-server for backend relay/storage/admin and media integration
- hush-crypto for the MLS cryptography core
- hush-directory for planned discovery/federation-adjacent work
- This repo documents the boundaries between them rather than implementing them.
3. Top-level product architecture
- The platform is built around end-to-end encrypted messaging, voice, and video.
- Clients produce and consume MLS ciphertext; the server moves encrypted bytes and does not have decryption keys.
- The architecture diagram in the README is the canonical cross-repo view: clients on top, hush-server in the middle, hush-crypto underneath as shared client-side state machinery, and hush-directory as a future discovery layer.
4. Client boundary
- hush-web is the primary user-facing client and is the base bundle reused by hush-desktop.
- The client boundary is where encryption happens, where MLS group state is maintained, and where the user experiences messaging and calls.
- The repo notes that the same web bundle is wrapped by Electron for desktop, so the desktop app is not a separate backend architecture.
5. Crypto boundary
- hush-crypto is the shared cryptography subsystem.
- It owns MLS group state and is compiled from Rust to WASM for use in clients.
- This is the trust boundary that protects message, voice, and video keys from server access.
6. Server boundary
- hush-server is the backend relay and storage plane.
- It provides the API, PostgreSQL, Redis, instance administration, and integration with LiveKit for media signaling and transport.
- Its architectural role is infrastructure mediation: authentication/session handling, message relay, state persistence, and media coordination, not content inspection.
7. Media flow
- Voice and video are handled through a LiveKit-based SFU path.
- The README states that voice/video keys are derived from the channel’s MLS exporter secret, so the SFU only sees opaque encrypted media payloads.
- This means the media stack is part of the transport plane, not the trust plane.
8. Self-hosting path
- The production self-hosting entry point is hush-server, not this repo.
- This repo links to the operational docs and explains that a self-hosted deployment includes the API, Postgres, Redis, LiveKit, Caddy, and storage where applicable.
- The public web client is external by default, so self-hosting focuses on the backend/media plane rather than rebuilding the entire product stack.
9. Local development workspace
- scripts/bootstrap.sh is the main contributor convenience script in this repo.
- It clones the sibling component repos side by side and starts the development compose stack from hush-server/docker-compose.yml.
- This is a local development orchestration aid, distinct from the production self-hosting flow.
10. Documentation as architecture governance
- docs/CORE-INVARIANTS.md is the cross-repo product contract: it defines the invariants that must not break across auth, vault, device linking, MLS, messaging, voice, identity labels, desktop runtime, deploy, and release flows.
- docs/ARCHITECTURE-BOUNDARIES.md defines ownership boundaries such as state ownership, query usage, runtime schemas, cross-device tests, and telemetry.
- These docs function as architecture guardrails for all component repositories.
11. Issue and security workflow
- User-facing bugs and feature requests are intentionally centralized here, while component repos are for implementation-level issues and pull requests.
- docs/TRIAGE.md separates public issue handling from security disclosure; security reports are not handled through public GitHub issues.
- This repo is therefore the front door for product feedback, not the code review home for the runtime components.
12. CI and repository hygiene
- The GitHub workflow validate.yml and the scripts/check-doc-links.mjs script indicate a lightweight validation layer focused on documentation integrity.
- The repo’s tooling is about keeping public docs, links, and routing accurate rather than building or deploying application code.
Main entry points: README.md README · TRIAGE.md Triage · bootstrap.sh Bootstrap · REPOSITORY-OPERATIONS.md Repo ops
Components 16
Docs & governance
Cross-repo architecture rules, triage, and operating guidance
- README · Canonical cross-repo overview of the Hush platform and this repo's coordination role
README.md - Triage · Public issue intake and routing rules for bugs, features, and security reports
docs/TRIAGE.md - Core invariants · Cross-repo product contract covering auth, vault, device linking, MLS, messaging, calls, identity, desktop, deploy, and release flows
docs/CORE-INVARIANTS.md - Boundaries · Defines subsystem ownership, state/query boundaries, schemas, tests, and telemetry rules across repos
docs/ARCHITECTURE-BOUNDARIES.md - Repo ops · Repository workflows, contributor guidance, and public coordination practices
docs/REPOSITORY-OPERATIONS.md - Bug reporting · User-facing bug report workflow and intake guidance
docs/BUG-REPORTING.md - Security · Security disclosure guidance and private reporting path
SECURITY.md
Bootstrap & validation
Local setup and lightweight repository checks
- Bootstrap · Clones sibling component repos and starts the local development stack
scripts/bootstrap.sh - Link check · Checks documentation links and repository references for integrity
scripts/check-doc-links.mjs - Validate CI · Repository validation workflow focused on documentation and link hygiene
.github/workflows/validate.yml
Other components
- Web client · Primary browser client where encrypted messaging and calls are experienced
- Desktop app · Desktop runtime that wraps the shared web bundle
- Mobile app · Planned React Native client for the platform
- Server plane · API, relay, storage, admin, and LiveKit integration for encrypted messaging and media transport
- Crypto core · Shared Rust-to-WASM MLS state and key management used by clients
- Directory · Planned discovery and federation-adjacent layer
Connections 21
- README → Web client: describes · Canonical architecture view places the browser client at the top of the product stack
- README → Server plane: describes · Documents the backend relay/storage plane as the production self-hosting entry point
- README → Crypto core: describes · Explains MLS cryptography as the shared trust boundary below clients
- README → Directory: describes · Shows planned discovery/federation work as a future layer
- Web client → Desktop app: shared bundle · Desktop is an Electron wrapper around the same web client bundle
- Web client → Crypto core: uses · Client-side MLS state and encryption rely on the shared crypto core
- Desktop app → Crypto core: uses · Desktop client inherits the same crypto boundary through the shared bundle
- Mobile app → Crypto core: planned use · Planned mobile client is expected to reuse the shared cryptography core
- Server plane → Crypto core: opaque media · Server transports encrypted bytes but does not hold decryption keys
- Server plane → Web client: serves · Backend plane supports the browser client with API, relay, and persistence
- Server plane → Desktop app: serves · Backend plane supports the desktop wrapper through the same API and media path
- Server plane → Directory: future integration · Directory is positioned as an adjacent future service boundary
- Bootstrap → Server plane: starts stack · Local bootstrap launches the development compose stack from the server repo
- Bootstrap → Web client: clones · Contributor bootstrap pulls sibling repos side by side for local work
- Validate CI → Link check: runs · CI validation includes repository documentation link checking
- Validate CI → Core invariants: guards · Validation supports keeping architectural contracts and docs consistent
- Triage → Security: routes away · Security reports are kept out of public issue handling
- Triage → Bug reporting: separates · Public bug handling is distinct from security disclosure
- Core invariants → Boundaries: refined by · Architecture boundaries operationalize the core product invariants
- Repo ops → Bootstrap: documents · Repository operations guide the local contributor bootstrap path
- Repo ops → Triage: documents · Operating guidance covers public issue intake and routing