Looking for a reliable way to manage web access on a Windows device? Guard offers a unique, cross-platform solution. It combines a sleek web dashboard with a native Windows client, providing granular control over online activity.
A Developer’s Solution to a Common Problem
Guard started as a personal project by a web developer preparing for job interviews. The goal was to build something practical, beyond the typical CRUD app, and to explore new technologies in the process. The added bonus? A real-world solution for managing screen time.
How Guard Works
Guard uses a two-part system:
- Web Dashboard (Next.js, Node.js, TypeScript, Prisma, PostgreSQL, Tailwind CSS, NextAuth): This intuitive interface lets you set a PIN, create custom rules and schedules, and block website categories (social media, gaming, etc.). It leverages server actions, secure API endpoints, and advanced state management for a smooth experience. Authentication supports both JWT and Google OAuth.
- Windows Client App (C#): Built with C#, this app syncs with the web dashboard and enforces the rules locally. It updates the hosts file and Windows firewall according to your schedules. It includes a two-process architecture for reliability, time integrity checks, secure uninstall with PIN, and event logging. The project is open source and available on GitHub.
A dedicated Express.js API endpoint connects the two components, allowing them to communicate seamlessly. The entire system has been rigorously tested and includes cleanup functions during uninstall to prevent any leftover files.
Beyond the Basics
Guard goes beyond simple website blocking. Its robust features include:
- Custom rules and schedules
- Category-based blocking
- Secure authentication
- Two-process architecture for reliability
- Time integrity checks
- Secure uninstall with PIN
- Event logging
Open Source and Available Now
The Windows client portion of Guard is open source and available on GitHub: https://github.com/ganjie/guard-windows-client/. You can try out the application itself at: https://guard.alexweb.app/. Feedback and contributions are welcome!