|
| 1 | +# mesh-caption-clash |
| 2 | + |
| 3 | +[](https://baditaflorin.github.io/mesh-caption-clash/) |
| 4 | +[](https://github.com/baditaflorin/mesh-caption-clash/blob/main/package.json) |
| 5 | +[](./LICENSE) |
| 6 | + |
| 7 | +> A shared caption contest with one entry and independent votes per peer. |
| 8 | +
|
| 9 | +**Live → https://baditaflorin.github.io/mesh-caption-clash/** |
| 10 | + |
| 11 | +**Source → https://github.com/baditaflorin/mesh-caption-clash** |
| 12 | + |
| 13 | +**Tip the dev (buy a coffee) → https://www.paypal.com/paypalme/florinbadita** |
| 14 | + |
| 15 | +--- |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | +> Two peers, side-by-side, in the same room. Drop a `tests/demo/scenario.mjs` |
| 20 | +> exporting `default async (a, b) => …` and run `npm run demo` to regenerate |
| 21 | +> `docs/preview.png` plus `docs/demo-a.webm` / `docs/demo-b.webm` clips. |
| 22 | +
|
| 23 | + |
| 24 | + |
| 25 | +## What it is |
| 26 | + |
| 27 | +A **rootless-computing** peer-to-peer browser app. No backend of its own beyond the self-hosted WebRTC stack listed below. State lives in a Yjs mesh shared by everyone in the same room. |
| 28 | + |
| 29 | +Read the principles → **https://baditaflorin.github.io/rootless-computing/principles.html** |
| 30 | + |
| 31 | +## Quickstart |
| 32 | + |
| 33 | +Open the live URL on two devices in the same room (set in ⚙ settings, or scan the room QR). Everything else is in-app. |
| 34 | + |
| 35 | +For local hacking: |
| 36 | + |
| 37 | +```bash |
| 38 | +git clone https://github.com/baditaflorin/mesh-common |
| 39 | +git clone https://github.com/baditaflorin/mesh-caption-clash |
| 40 | +cd mesh-caption-clash |
| 41 | +npm install |
| 42 | +npm run dev |
| 43 | +``` |
| 44 | + |
| 45 | +`mesh-common` must sit as a **sibling** directory because `package.json` references it via `file:../mesh-common`. |
| 46 | + |
| 47 | +## Self-hosted infrastructure |
| 48 | + |
| 49 | +| Repo | Endpoint | Purpose | |
| 50 | +| ------------------------------------------------- | -------------------------------------- | --------------------------- | |
| 51 | +| https://github.com/baditaflorin/signaling-server | `wss://turn.0docker.com/ws` | y-webrtc signaling fan-out | |
| 52 | +| https://github.com/baditaflorin/turn-token-server | `https://turn.0docker.com/credentials` | HMAC TURN creds, 1-hour TTL | |
| 53 | +| https://github.com/baditaflorin/coturn-hetzner | `turn:turn.0docker.com:3479` | TURN relay | |
| 54 | + |
| 55 | +## Settings overrides |
| 56 | + |
| 57 | +The settings drawer lets the user override signaling and TURN endpoints. localStorage keys: |
| 58 | + |
| 59 | +- `mesh-caption-clash:signalingUrl` |
| 60 | +- `mesh-caption-clash:turnTokenUrl` |
| 61 | +- `mesh-caption-clash:iceServers` |
| 62 | +- `mesh-caption-clash:room` |
| 63 | + |
| 64 | +If endpoints are blank or unreachable, the app falls back to STUN-only. |
| 65 | + |
| 66 | +## Version + commit on every screen |
| 67 | + |
| 68 | +The bottom-right footer on every screen of the live app shows: |
| 69 | + |
| 70 | +- `source` → this repo |
| 71 | +- `tip ♥` → PayPal |
| 72 | +- `vX.Y.Z · <short-sha>` — version from `package.json` plus the build-time git commit |
| 73 | + |
| 74 | +## Build & deploy |
| 75 | + |
| 76 | +GitHub Pages serves the committed `docs/` directory on the `main` branch. There is no GitHub Actions build workflow; local Husky-style hooks gate formatting / typecheck / smoke build before each push. |
| 77 | + |
| 78 | +```bash |
| 79 | +npm run smoke # build + sanity-check docs/ |
| 80 | +bash ../mesh-common/scripts/screenshot-app.sh # regenerate docs/screenshot.png |
| 81 | +``` |
| 82 | + |
| 83 | +## Privacy |
| 84 | + |
| 85 | +<!-- mesh:privacy-section:start --> |
| 86 | + |
| 87 | +Everything you publish to a room is visible to every peer in that room. Your local device's name, key, and choices stay local. Cryptographic signatures prove **who** wrote each entry; they do **not** prevent peers from reading or copying entries. The room URL is the access control — share it deliberately. |
| 88 | + |
| 89 | +See `docs/privacy.md` for the full threat model — capabilities used, what other peers in the mesh see, what the self-hosted infra sees, what stays local. |
| 90 | +<!-- mesh:privacy-section:end --> |
| 91 | + |
| 92 | +## License |
| 93 | + |
| 94 | +MIT — see `LICENSE`. |
0 commit comments