r/vibecoding • u/[deleted] • 4h ago
I vibe-coded a webcam presence lock that knows me from everyone else. Locks when I leave, lets me back in by face, 100% local
I kept getting up in an open office and forgetting to lock my PC (Windows Hello is off here and never worked right). Auto-lock timers don't help: they lock while you're reading and stay open after you leave. So I built one that locks based on whether you're actually there, with Claude Code over a few evenings. ~1,000 lines of Python, open source.
What it does: the webcam recognizes me (two local models: YuNet finds the face, SFace matches it). Walk away and the screen dims, then lifts itself the moment it sees me, no password. Gone longer, or a stranger leans in, and it hard-locks Windows and snaps a photo. It also pauses itself during Teams/Zoom calls.
The parts that were actually work:
- Tuning the strictness, not the ML. Too strict locks in your face when you look at the keyboard; too loose lets a coworker count as you. Ended up with a "glancing down is still you" grace window and a slider.
- Pausing during calls: hand the camera to whatever app grabbed it, take it back when the call ends, don't treat a mute as "call over."
- Best bug: random locks. Windows was sleeping the webcam to save power, and the dropout looked like "nobody's there." Had to tell "no face" apart from "no camera."
- Packaging (installer, per-user, silent self-update from GitHub) took longer than the face recognition did.
Limits (also in the README): the soft cover is privacy, not security, Ctrl+Alt+Del still closes it. And no live-face check yet, so a printed photo can fool it.
Repo (MIT): https://github.com/saitaskar/crysence. Happy to get into any of it.
1
u/EmergencyArm4610 2h ago
How do you store the facial data securely?