Skip to content
QuicrPublic

About

Implementation of Mocha protocol and end to end messaging application

Resources

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

MOCHA

MOCHA

MoQ Open Communication & Hosting Architecture

CI MOQT License


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

Packages

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

Built on moq-web

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

Quick Start

pnpm install
pnpm dev:chat

Open the chat app at https://localhost:5173 (self-signed cert for WebTransport).

Scripts

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

Architecture

┌─────────────────────────────────────────────────────────────────┐
│  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

API Docs

cd docs/api
./serve.sh    # serves on http://localhost:4000

License

BSD-2-Clause — see LICENSE.

About

Implementation of Mocha protocol and end to end messaging application

Resources

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages