A polished WebRTC learning demo with a Go signaling server and a vanilla JavaScript client.
English | 简体中文 | Docs Site | OpenSpec Hub
LessUp WebRTC is designed for people who want a small, readable codebase that still covers the core moving parts of real-time browser communication:
- WebSocket signaling with identity binding and room management
- peer-to-peer media and DataChannel chat
- screen sharing and browser-side recording
- a framework-free frontend served directly by Go
- Docker-ready deployment and a public docs site
| Area | Status |
|---|---|
| Signaling server | Go + Gorilla WebSocket |
| Browser client | Vanilla JavaScript ES modules |
| Call model | 1:1 and small-room mesh |
| Media controls | Mute, camera toggle, screen share |
| Recording | Local MediaRecorder export |
| Docs and specs | GitHub Pages + OpenSpec |
git clone https://github.com/LessUp/webrtc.git
cd webrtc
go run ./cmd/serverOpen http://localhost:8080, join the same room in two browser windows, and start a call.
make check
cd web && npm testdocker build -f deploy/docker/Dockerfile -t webrtc .
docker run --rm -p 8080:8080 webrtcBrowser UI
└─ web/src/core/app.js
├─ controllers/media.js
├─ controllers/peers.js
├─ controllers/signaling.js
├─ controllers/stats.js
└─ controllers/ui.js
Go server
├─ cmd/server/main.go
└─ internal/signal/
The server exposes:
GET /— static frontendGET /config.js— runtime RTC configGET /healthz— health probeGET /ws— signaling socket
This repository uses OpenSpec as its only planning and requirements system.
- Main specs:
openspec/specs/ - Active changes:
openspec/changes/ - Public spec guide:
docs/specs.md
Typical flow:
- propose or update an OpenSpec change
- implement against
proposal.md,design.md, andtasks.md - validate with repo checks
- review before merge
cmd/server/ application entrypoint
internal/signal/ signaling hub and tests
web/ static frontend
docs/ public documentation
openspec/ specs and change artifacts
deploy/ Docker, Caddy, and deployment assets
Start with CONTRIBUTING.md and the active OpenSpec change. This repo prefers focused, low-noise contributions that keep the implementation, docs, and repo metadata aligned.