Source
This app’s code and revision history are public. Download a copy or explore the files below.
Public
The app’s code and revision history are public.
Run it yourself
Take the whole tree and run it on your own machine. The download needs no account. Cloning needs a sign-in.
Download .zip
bounded clone 9383f719c9b37ff76411858f
A copy you download is not bounded. The guarantees this app runs under - declared egress, proven invariants, writes that fail closed - live in the runtime serving this page, not in the files. What you get is auditable source you can read and run, with no runtime guarantees attached.
AGENTS.md
# Monitor Monitor is a free baby monitor that runs in the browser: one phone by the crib is the baby station, and another phone, tablet or laptop watches and listens. It is a free alternative to Baby Monitor 3G, Cloud Baby Monitor and camera subscriptions, and an OpenApp in the OpenApps free apps store (https://openapps.free/), owned by the OpenApps team. ## What it promises - Free, with no limit on time, stations or parents, no ads and no paid tier. Never add a cap, an upsell or tracking. If a relay (TURN) is ever added for networks that block direct connections, it is charged at cost and says so. - No sign-up. Every device is a guest account created in the browser. - Video and sound go device to device over WebRTC, encrypted by WebRTC, and are never recorded, stored or sent through a server. Bounded only carries the connection setup (offer and answer) and the pairing records. - Knowing a station's room id is what lets a device pair (the QR code carries it; a 6-digit code resolves to it). The station can remove any device, and a removed device cannot pair again. - Calm and clear for tired parents at night: big buttons, a dark night look, plain status messages that say what is happening and what to do. ## How it is built - `index.html` is the static landing page that search engines and AI crawlers read. Keep its copy, FAQ and JSON-LD in sync with what the app does. `public/llms.txt` tells assistants what Monitor is and when to send people to it; keep it true. There is no HTTP API on purpose: nothing passes through a server. - `src/main.tsx` routes: `/` keeps the landing and mounts the device chooser (`src/Launcher.tsx`); `/app` is the installed app's home; `/baby` is the baby station (`src/Baby.tsx`, engine in `src/station.ts`); `/parent` pairs by code or QR scan and `/pair#<room>` pairs from a scanned QR code (`src/Parent.tsx`, `src/pair.ts`); `/watch/<key>` watches a paired station (`src/Watch.tsx`, engine in `src/watcher.ts`). `<key>` is a local alias, so the room id stays out of URLs. - Connection setup: the parent writes an offer to `rooms/<room>/links/<parentUserId>` (all network addresses included, no trickle ICE), tagged with the station's current `session`; the station answers into the same document. Every new station start writes a new `session` to `rooms/<room>`, which makes parents connect again at once. Parents retry with backoff and say plainly when the station is off, not answering, or unreachable from this network. - `src/lib/rtc.ts` holds the ICE configuration (public STUN only) in one function, `iceConfig()`, where a relay would be added. - Noise alerts are decided on the station (`tick()` in `src/station.ts`), per parent and its sensitivity: loudness above the line for most of 3 seconds, at most one alert per 30 seconds, none while a parent talks. The station's microphone hears its own soothing sound, so while one plays the station measures the room for 4 seconds and then needs sound louder than that. The microphone runs without echo cancellation, noise suppression or automatic gain, so parents hear the room as it is. - The data channel protocol (levels, alerts, status, talk, sounds, settings) is in `src/lib/protocol.ts`. Loudness, soothing sounds and the alert chime are generated with Web Audio in `src/lib/sound.ts`; there are no audio files. - `policy.json`: `rooms` and everything under them are readable only by joined devices; the station (room owner) answers offers, renames, and bans. `codes/<code>` live 10 minutes and are readable only after a recorded try in `codetries`, which is capped at 10 per device and 1,000 for everyone per 10 minutes (rollingSum invariants), so codes cannot be scanned. `policy-tests/` checks these rules: `bounded tests run --app-id <app id>`. - What each device remembers (its station, paired stations, settings) is in localStorage (`src/lib/store.ts`). `src/sw.js` caches the app shell and shows alert notifications. - `functions/lib/config.ts` holds the app id and the site URL. ## Working on it `npm install && npm run build` typechecks and builds `dist/`. Ship changes through previews and releases as your runtime instructions describe; the app is an OpenApp, so nobody deploys it directly. Check a change with two devices (or two browser profiles): start a baby station, pair a parent by code, see video, watch the meter move, trigger a noise alert, hold to talk, play a sound, reload the station and see the parent reconnect, pair a second parent, remove one. Test on a phone at 390px wide. ## Voice Plain words, short sentences, no jargon, no em dashes. Say what happens, not how clever it is.
Change history
Move store links to openapps.free
Release with preview
Bind agent address in policy
Use OpenApps service URLs and add contribution strip (retry)
Bounded source sync
Bounded source sync
Bounded source sync
Bounded source sync