This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Hang is a real-time communication platform that combines closed-source application logic with open-source media streaming libraries:
- Frontend: SolidJS + Vite + Tailwind CSS v4 + Tauri (desktop)
- Backend: Cloudflare Workers + Hono + tRPC + Drizzle ORM
- Real-time: WebTransport + MOQ (Media over QUIC)
- Package Manager: bun with workspaces
- Closed Source: The
hangapplication (opinionated conferencing UI and business logic) - Open Source: moq (generic media streaming libraries, consumed as npm packages)
# Development
just dev
# Build & Deploy
just build
just deploy live
# Code Quality
just check
just fixPublished npm packages from moq:
- Packages:
@moq/lite,@moq/hang,@moq/signals,@moq/publish,@moq/watch,@moq/token - Relay:
moq-relaybinary provided via nix flake for local development (dev/)
Hang-specific conferencing UI and application logic:
- Entry:
src/index.tsx - Routing: SPA with
@solidjs/router - State: SolidJS signals, backed by
@kixelated/signals - API Client: RPC client using Hono RPC in
@hang/api/client - Room Logic: Core application logic in
room/folder
Desktop application using Tauri:
- Framework: Tauri v2 with Rust backend
- Frontend: Uses the same web app from
/app
Hang-specific server and business logic:
- Entry:
src/index.ts- Hono app - Routes: RPC endpoints using Hono RPC
- Auth: JWT with OAuth providers in
src/auth.ts - Environment: Cloudflare Workers with D1 database and R2 storage
- Type-safe RPC: Backend and frontend share types
- WebTransport Rooms: Real-time media streaming via MOQ protocol
- OAuth Flow: Authentication with Google/Discord through popup windows
- Edge-first: All backend services run on Cloudflare's edge network
- MOQ Libraries: Published npm packages from the open-source moq project
just devruns the API server, app web server, and native Tauri app in paralleljust checkruns linting, TypeScript, and Rust checksjust fixfixes formatting and linting issues across all languages
- MOQ libraries are installed from npm (
@moq/*packages) - Hang-specific integration in
app/room/folder - Local relay server config in
dev/(usesmoq-relayfrom nix flake) - Uses WebTransport and QUIC under the hood
- Formatting: Biome with tabs, 120 line width, double quotes
- Components: PascalCase for components, camelCase for functions
- Imports: Always use ESM, prefer
import * asfor namespacing. - Async: Use async/await over promises
- TypeScript: Explicitly type variables to avoid
anyinference. Never useas anyor similar type escape hatches unless explicitly prompted. - Ask me if you want to try any functionality, and please don't run
just devunprompted.