Skip to content
moq-devPublic

About

hang.live

Resources

Contributing

Stars

27 stars

Watchers

1 watching

Forks

Latest commit

 

History

483 Commits

Folders and files

Repository files navigation

Hang

Real-time communication platform built on Media over QUIC.

Try it at hang.live.

Architecture

Hang is a web application built on the open-source MoQ media streaming library:

  • app — Web frontend built with SolidJS, Vite, and Tailwind CSS v4
  • api — Backend running on Cloudflare Workers with Hono and Drizzle ORM

The frontend and backend share types via Hono RPC. Real-time media is streamed over WebTransport using the MoQ protocol, through moq.pro relays in production and a local relay in development.

Project Structure

app/        Web frontend (SolidJS + Vite)
api/        Backend API (Cloudflare Workers + Hono)
dev/        Local relay and auth service config
moq/        Pinned MoQ submodule, consumed as Bun workspaces
quest/      Planned work (see quest/README.md)

Getting Started

Install Nix with the nix-command and flakes experimental features enabled, and direnv; the dev shell in flake.nix provides every tool, including the moq-relay and moq binaries just dev runs. The shell supports Linux and Apple Silicon macOS. Without Nix, put the tools that dev shell lists on your PATH yourself.

git clone --recurse-submodules https://github.com/moq-dev/hang.live.git
cd hang.live
direnv allow
git lfs pull
just install
just dev

In an existing checkout, run git submodule update --init first. git lfs pull fetches the media assets a clone leaves as pointers when Git LFS is only in the dev shell.

just dev starts these processes concurrently:

  • api — Cloudflare Workers dev server (via wrangler) on port 3000
  • app — Vite dev server on port 1420
  • types — Watch API declarations for frontend RPC types
  • relay — MoQ relay server on port 4443
  • auth — Local token verification service

Commands

Command Description
just install Install workspaces, decoder assets, and API declarations
just dev Run all dev servers
just check Run quest validation, the unused-code and export-comment checks, type checks, linting, and tests
just fix Auto-fix formatting and lint issues
just build Build all packages
just deploy <env> Deploy the API and app to staging or live by hand, then check the site

just --list shows the rest.

MoQ (Media over QUIC)

Hang uses moq, an open-source library for real-time media streaming over WebTransport and QUIC. The @moq/* packages resolve from the pinned moq/ submodule as Bun workspaces, and the Nix flake builds moq-relay, moq, and the @moq/libav decoder from the same revision. Without Nix, the decoder build downloads that version's published npm tarball instead. See moq.dev for full documentation.

Contributing

See CONTRIBUTING.md for setup, checks, and the Quest workflow. The quest backlog tracks planned bugs and improvements.

License

Dual-licensed under MIT or Apache 2.0, at your option.

About

hang.live

Resources

Contributing

Stars

27 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages