Most JavaScript screen lock libraries simply hide the UI.
If someone removes an overlay through DevTools or tampers with the DOM, the "security" often disappears. That approach isn't enough for applications handling sensitive enterprise data.
I wanted to build something significantly more resilient.
🚀 Today I'm excited to release KD Screen Guard on npm.
It's a zero-dependency, tamper-resistant screen security library for Vanilla JavaScript, React, and Vue 3, designed to protect sensitive user sessions during inactivity.
Some of the engineering behind it:
🔐 PBKDF2 (100,000 iterations) for secure key derivation.
👆 Native WebAuthn authentication (Touch ID, Face ID, Windows Hello & YubiKey).
📷 Automatic WebRTC intruder snapshots when security violations are detected.
⚡ Cryptographic operations running inside Web Workers to keep the UI responsive.
🛡️ Self-healing DOM MutationObserver protection against overlay tampering.
Building this project required combining browser cryptography, WebAuthn, WebRTC, Web Workers, accessibility, and client-side security mechanisms into a single lightweight package with zero external dependencies.
If you're building enterprise dashboards, admin panels, healthcare, finance, or any application where unattended sessions are a security concern, I'd love to hear your feedback.
🔗 Live Demo:
https://khvichadev.github.io/kd-screen-guard/demo/
📦 npm:
https://www.npmjs.com/package/kd-screen-guard
🐙 GitHub:
https://github.com/KhvichaDev/kd-screen-guard
Feedback, ideas, and contributions are always welcome.
Top comments (0)