- Go 42%
- JavaScript 22.4%
- Python 17.3%
- CSS 7.8%
- Go Template 4.7%
- Other 5.8%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
A first join to a fresh room sometimes failed with a bare "WebSocket connection failed" in the console, and pressing Join again worked. The page made that worse in two ways. It threw the reason away. The catch around room.connect() discarded err and always said the link may have expired, which was usually untrue and useless when it was true. connectProblem() now writes a sentence by failure reason and appends the client's own words, so an operator gets something to go on. Classification uses the numeric ConnectionErrorReason rather than reasonName, because the client wraps a failed signal connection in a ServerUnreachable error and then copies the inner reason over .reason, leaving the name describing the wrapper. And it made the person perform the retry. connectWithRetry() now attempts the join twice, with a fresh token and a fresh Room, which is what pressing the button again does and the only honest way to retry: a Room that died mid-handshake still holds the socket and peer connection it half-opened. A refusal is not retried -- a rejected token does not become true on the second attempt, and retrying only delays the message. Two things worth recording. Disconnect after a failed connect is not awaited: on a room that never finished connecting it can wait on a socket that is already gone, and the first version of this hung at "connecting" forever. And public/ is go:embed'd, so deploying this needs a rebuild rather than a file swap. Six checks in the smoke test pin the behaviour: a refused first attempt still joins, it takes exactly one retry, a failure says why, the message is not the old catch-all, it keeps the client's own words, and the button comes back. Four of them fail against the previous room.js. |
||
| deploy | ||
| public | ||
| templates | ||
| test/browser | ||
| .gitattributes | ||
| .gitignore | ||
| admin.go | ||
| adminhttp.go | ||
| app.go | ||
| config.go | ||
| Dockerfile | ||
| go.mod | ||
| go.sum | ||
| http.go | ||
| main.go | ||
| mojomeet_test.go | ||
| readme.md | ||
| rooms.go | ||
| slug.go | ||
| task.sh | ||
| token.go | ||
| web.go | ||
mojomeet
Video meetings on meet.mojosa.su, reached through an invitation link.
LiveKit carries the audio, video and screen sharing. This service is the part LiveKit deliberately leaves out: it decides who may join, and it serves the page people join from.
How it works, from the outside
There are no accounts. An operator signs into a small console and makes a link; anyone holding that link can join, pick a name and take part. Nobody generates or handles a token, and nothing needs installing to attend a meeting.
- Opening the service's root tells you to obtain a link.
- A meeting link goes straight to a join page, then to the room.
- The console lists meetings that are happening now and can close one.
Meetings are short-lived by design. A room exists while somebody is in it and disappears when the last person leaves; nothing is recorded, saved or listed afterwards.
Taking part
Follow a link, type a name, press Join. Or press Turn on camera first if you want to be seen.
- The camera is off by default. Nothing asks for camera permission until you press that button.
- The microphone is on, because a voice call with the microphone off is not a call.
- Names are not verified. Anyone with the link can call themselves anything.
- Chat is not saved. Someone who joins later sees none of it.
- You are told about messages you cannot see. If the chat panel is closed or
the tab is in the background, a message plays a short tone and puts a count in
the tab title —
(2) Join · mojomeet. A message already on screen makes no sound. - Desktop notifications are opt-in. Press Alerts in the chat header once to allow them; after that a message you cannot see also raises a notification. Nothing asks on page load. This works while the tab is open, including in the background — a tab the browser has frozen, or one that was closed, will not notify, since that would need a push server and this service has none.
- Screen sharing replaces the grid with the shared screen, and everyone else moves to a strip along the bottom.
- You choose what fills the main screen. With something shared, click any face or share in the strip to put it on the stage; the presentation is only the default. More than one person can share at once, and each share appears in the strip to be picked.
Running it locally
./task.sh secrets # writes deploy/secrets.env, once
./task.sh run # builds if needed, serves on 127.0.0.1:8080
Open http://127.0.0.1:8080/admin/, sign in with ADMIN_USER and the password
printed by task.sh secrets, and press New link. Open the link in two tabs,
with different names, to see a second participant.
The console reports that LiveKit did not answer, and that is expected: locally it has no way to reach LiveKit's administration interface. Joining, chat and screen sharing work regardless. To see the room list, point it at a LiveKit you run yourself:
./task.sh run --livekit-api-url http://localhost:7880
Tasks
./task.sh # list them
./task.sh run # serve locally
./task.sh check # vet and test, before a commit
./task.sh smoke # drive the room UI in a headless browser
./task.sh image # build and push the container image
./task.sh help names the rest. Options after the task name are passed through,
so ./task.sh run --addr 127.0.0.1:9000 works.
Deploying
./task.sh image # builds and pushes localhost:5000/mojomeet:<version>
# put that version in deploy/kustomization.yaml
kubectl apply -k deploy/
The manifests name no version. They carry v0.0.0, which is not a release: it
is there so that applying them without choosing one leaves the pod unable to
pull an image, instead of deploying whatever tag the repository happened to list
last. The version to use is the one ./task.sh image printed and pushed.
deploy/ is a kustomization in the same shape as the other services. It reads
deploy/secrets.env, which is gitignored: the repository describes the
deployment and the operator supplies the secret. ./task.sh secrets writes it,
copying the LiveKit key pair from LIVEKIT_ENV if you point at the cluster's
livekit secrets file.
The ingress puts this service on meet.mojosa.su for everything except /rtc,
which stays with LiveKit. Both must remain on that host: the browser reaches
media and the app on one origin, and splitting them breaks joining while the
pages keep working.
Configuration
Every setting has a flag and an environment variable of the same name; the Deployment uses the environment.
LIVEKIT_API_KEY,LIVEKIT_API_SECRET— required; the secret signs the tokens that let somebody join.LIVEKIT_URL— the browser's endpoint,wss://meet.mojosa.su.LIVEKIT_API_URL— the console's administration endpoint.CSRF_KEY— at least 32 bytes; protects the console's actions in the browser from being triggered by another site.ADMIN_USER,ADMIN_PASSWORD— the operator's initial credentials.DATA_DIR— where the operator credential is kept,/datain the cluster.TOKEN_TTL— how long a minted token stays usable.TRUSTED_PROXIES— whose forwarding headers may be believed. Behind the cluster's proxy this is what makes rate limiting see individual visitors.
The operator password
ADMIN_PASSWORD applies only until the console password is first changed; after
that the environment is ignored and the new password is what counts. If the
stored credential is ever unreadable the console refuses all sign-ins rather than
reverting to the earlier one.
Cluster access is the root of trust, so recovery needs nothing but kubectl:
kubectl -n mojomeet exec -it deploy/mojomeet -- ./mojomeet admin reset
kubectl -n mojomeet rollout restart deploy/mojomeet
That brings the original ADMIN_PASSWORD back. mojomeet admin set-password
reads one from standard input instead.
Limits worth knowing before relying on it
- A link cannot be revoked. Nothing records which links were issued, so closing a meeting ends it but does not disable its link. For short-lived meetings this is the intended trade.
- There is no room list outside a meeting. Rooms appear in the console only while somebody is in them; a link made but never used cannot be looked up.
- No accounts, no recording, no saved chat, no transcription. Each would mean storing something, which is what this service exists to avoid.