MoQ Open Communication & Hosting Architecture
Real-time communication over MoQ Transport — messaging, presence, media, and more.
This is a web implementation of the following IETF drafts:
| Draft | Description | Status |
|---|---|---|
| draft-jennings-moq-mocha-chat | Messaging over MoQ Transport | Implemented |
| draft-jennings-moq-mocha-meetings | Real-Time Conferencing over MoQ Transport | Implemented |
| draft-jennings-moq-mocha-mls-keying | End-to-End Encryption Key Management over MoQ | Implemented |
| draft-jennings-moq-mocha-identity | Authentication, Authorization, and Federation | Partial — auth implemented, federation not yet |
| draft-jennings-moq-mocha-reactions | Real-Time Reactions over MoQ Transport | Implemented |
| draft-jennings-moq-mocha-pab | Personal Address Book | Namespace only |
| Package | Path | Description |
|---|---|---|
@mocha/chat |
apps/chat |
Chat web application (React + Zustand) |
@mocha/protocol |
packages/protocol |
Protocol library — sessions, channels, auth |
@mocha/mls |
packages/mls |
MLS group key management (E2EE) over MoQ |
MOCHA is built on moq-web, a suite of npm packages that provide abstractions for MoQ Transport over WebTransport — including multi-version MOQT protocol support, pub/sub session management, media capture/playback, CAT token authorization, and crypto via secure objects. @mocha/protocol builds directly on these abstractions.
| npm Package | Used By | Purpose |
|---|---|---|
@moq-web/core |
@mocha/protocol |
MOQTransport — WebTransport connection + multi-version MOQT wire format |
@moq-web/session |
@mocha/protocol, @mocha/mls, @mocha/chat |
MOQTSession — publish/subscribe, track management, auth tokens |
@moq-web/cat |
@mocha/protocol |
COSE_Sign1/CWT token decoding for CAT (Common Access Token) auth |
@moq-web/media |
@mocha/chat |
Audio/video capture and playback over MoQ tracks |
@moq-web/secure-objects |
@moq-web/media |
Crypto primitives for secure object packaging |
pnpm install
pnpm dev:chatOpen the chat app at https://localhost:5173 (self-signed cert for WebTransport).
pnpm dev:chat # run chat app locally
pnpm build # build all packages
pnpm test # run all unit tests
pnpm bench # run performance benchmarks
pnpm lint # lint all packages┌─────────────────────────────────────────────────────────────────┐
│ apps/chat (React + Zustand) │
│ │ │
│ ▼ │
│ @mocha/protocol ── MochaSession → MochaChannel │
│ │ │ │
│ │ @mocha/mls (E2EE) │
│ ▼ │
│ moq-web (npm) │
│ @moq-web/core ── multi-version MOQT transport │
│ @moq-web/session ── pub/sub, track mgmt, auth │
│ @moq-web/media ── audio/video capture & playback │
│ @moq-web/cat ── CAT token authorization │
│ @moq-web/secure-objects ── crypto for secure packaging │
│ │ │
│ │ WebTransport (QUIC) │
└───────┼─────────────────────────────────────────────────────────┘
│
▼
MoQ Relay ── fan-out pub/sub, track routing, auth validation
│
▼
Moat (github.com/Quicr/moat) ── token minting (CAT), user auth, channel mgmt
cd docs/api
./serve.sh # serves on http://localhost:4000BSD-2-Clause — see LICENSE.