{"id":35150678,"url":"https://github.com/pgibler/videochat","last_synced_at":"2026-04-15T19:41:58.217Z","repository":{"id":328088142,"uuid":"1114068416","full_name":"pgibler/videochat","owner":"pgibler","description":"WebRTC client and server using Go + SolidJS","archived":false,"fork":false,"pushed_at":"2025-12-16T06:06:21.000Z","size":125,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-16T11:04:22.437Z","etag":null,"topics":["coturn","go","golang","redis","solidjs","webrtc"],"latest_commit_sha":null,"homepage":"https://videochat.vc","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pgibler.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-10T21:19:24.000Z","updated_at":"2025-12-16T06:06:25.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/pgibler/videochat","commit_stats":null,"previous_names":["pgibler/webrtc-go-spa","pgibler/videochat"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/pgibler/videochat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgibler%2Fvideochat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgibler%2Fvideochat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgibler%2Fvideochat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgibler%2Fvideochat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pgibler","download_url":"https://codeload.github.com/pgibler/videochat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgibler%2Fvideochat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31857623,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coturn","go","golang","redis","solidjs","webrtc"],"created_at":"2025-12-28T15:34:18.094Z","updated_at":"2026-04-15T19:41:58.209Z","avatar_url":"https://github.com/pgibler.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# videochat\n\nA WebRTC application built with a Go signaling server and a SolidJS single-page app. Uses Redis to track connected peers and who is currently broadcasting.\n\n## Stack\n- Go HTTP/WebSocket server (Gorilla WebSocket)\n- Redis for lightweight presence state\n- SolidJS + Vite frontend\n- Optional TURN relay (coturn) for fallback when STUN/host fails\n\n## Prerequisites\n- Go 1.21+ (tested with recent Go releases)\n- Bun for the frontend build\n- Redis running and reachable (defaults to `localhost:6379`)\n\n## Quick Start\n```bash\n# 1) Install frontend deps\ncd frontend\nnpm install          # or bun install\n\n# 2) Build the frontend assets\nnpm run build        # emits dist/ consumed by the Go server\n\n# 3) Run Redis (if not already running)\nredis-server \u0026\n\n# 4) Start the Go backend (serves the built frontend and /ws)\ncd ../backend\ngo run main.go\n```\n\nThen open http://localhost:8080 in multiple tabs to see peers join and start/stop broadcasting.\n\n## Rooms\n- Rooms are private and created on demand. Use the landing page “Create private room” button or `POST /api/rooms` to get a `{code, url}`.\n- Share the room URL (e.g., `/rooms/{code}`) so peers can join and enter a display name.\n- WebSocket connections must include the room code (`/ws?room={code}`); presence and broadcasts are isolated per room using Redis.\n\n## Configuration\nEnvironment variables (optional):\n- `ADDR` - HTTP listen address (default `:8080`)\n- `REDIS_ADDR` - Redis address (default `localhost:6379`)\n- `STATIC_DIR` - Path to the frontend `dist/` (default `../frontend/dist`)\n- `WS_PUBLIC_URL` - Optional; explicit WebSocket URL to advertise to clients (defaults to request host/proto and `/ws`)\n- `STUN_URLS` - Comma-separated STUN URLs (default `stun:stun.l.google.com:19302`)\n- `TURN_URLS` - Comma-separated TURN URLs (e.g., `turn:TURN_HOST:3478?transport=udp,turn:TURN_HOST:3478?transport=tcp`)\n- `TURN_USERNAME` / `TURN_PASSWORD` - Credentials for TURN servers (if required)\n- `ICE_MODE` - Optional; `stun-turn` (default) keeps both STUN+TURN, `turn-only` drops STUN and forces relay, `stun-only` skips TURN.\n\n`.env` files are loaded from the project root, `backend/.env`, or `../.env`.\nCopy `.env.example` to `.env` and adjust TURN host/credentials to match your coturn config.\nDebug ICE config at runtime with `curl http://localhost:8080/debug/ice` (shows servers and mode).\nClient settings (WebSocket URL, ICE mode/servers) are available at `GET /api/settings`; the WS URL defaults to the incoming request host unless `WS_PUBLIC_URL` is set.\n\n## Development\n- Frontend: `npm run dev -- --host` from `frontend/` for hot reload; the app reads the signaling URL from `/api/settings` (set `WS_PUBLIC_URL` on the backend if the public host differs).\n- Backend: `go run main.go` from `backend/`. The server resets Redis presence sets on startup to avoid stale peer lists after restarts.\n\n## TURN (coturn)\n- Coturn config lives in `coturn/`. Copy `coturn/turnserver.conf.example` to `coturn/turnserver.conf` and adjust `realm`, `external-ip`, ports, and credentials.\n- Start coturn:\n  - Native: `turnserver -c coturn/turnserver.conf` (stop via service manager or `pkill turnserver`).\n  - Docker: `cd coturn \u0026\u0026 ./run-docker.sh` (stop with `./stop-docker.sh`, container name defaults to `webrtc-coturn`).\n- Ensure TURN creds match `TURN_USERNAME` / `TURN_PASSWORD` envs. When TURN is configured, the backend passes both STUN and TURN entries to the frontend via the WebSocket welcome message; ICE will try host/STUN first and fall back to TURN.\n- Deployment runbook and pricing analysis live in `docs/TURN_DEPLOYMENT_GUIDE.md` and `docs/TURN_HOSTING_PRICE_ANALYSIS.md`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgibler%2Fvideochat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpgibler%2Fvideochat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgibler%2Fvideochat/lists"}