A local build has no way for a kid's phone to ask a parent's phone for anything — the "Suggest a change" and "more time" flows only exist in the cloud build. For the case that actually matters, both phones at home on the same Wi-Fi, they don't need a server to talk.
Design
A nearby link: a 32-byte key the two phones agree in person, and messages sealed under it.
- Pairing — the parent's phone shows a QR carrying a fresh key; the kid's phone scans it once. A QR code is a private channel between two phones held by the same person in the same room, and it's the same shape of secret an end-to-end-encrypted cloud would need later.
- Messages —
MoreTimeRequest, LimitSuggestion, Answer. Deliberately tiny: no usage data crosses the link, only a request and its answer.
- Envelope — AES-GCM under the link key. Anyone else on the Wi-Fi can reach the same port, so a message that's tampered with or sent without the key must not open at all.
- Replay — ids are claimed once. Sealing proves who wrote a message, not when; without this, a captured "grant 15 minutes" could be replayed every evening.
- Discovery — mDNS/NSD, advertising a name derived from a hash of the key, so only the linked phone can find it and nobody can tell whose is whose.
What it cannot do, and must say so on screen
- Both phones must be on the same network — mobile data on one breaks it
- Guest Wi-Fi that isolates clients will never work, and nothing in an app can fix that
- The parent's phone must be awake and listening, so a request is kept and retried, never shown as delivered
- It does nothing when the kid is at school — that's what the cloud build is for
Done
The transport-independent layer, in :shared under nearby/, with 12 unit tests covering round trip, wrong key, a flipped bit, truncation, version skew, nonce freshness, replay and the QR payload. The Wi-Fi transport (LanNearbyTransport) is written but has not run on hardware.
Left to build
Design notes are in the KDoc of each file, and the wider context is in docs/LOCAL_AND_CLOUD.md.
A local build has no way for a kid's phone to ask a parent's phone for anything — the "Suggest a change" and "more time" flows only exist in the cloud build. For the case that actually matters, both phones at home on the same Wi-Fi, they don't need a server to talk.
Design
A nearby link: a 32-byte key the two phones agree in person, and messages sealed under it.
MoreTimeRequest,LimitSuggestion,Answer. Deliberately tiny: no usage data crosses the link, only a request and its answer.What it cannot do, and must say so on screen
Done
The transport-independent layer, in
:sharedundernearby/, with 12 unit tests covering round trip, wrong key, a flipped bit, truncation, version skew, nonce freshness, replay and the QR payload. The Wi-Fi transport (LanNearbyTransport) is written but has not run on hardware.Left to build
Answerto the local profileNearbyTransportinterfaceDesign notes are in the KDoc of each file, and the wider context is in
docs/LOCAL_AND_CLOUD.md.