๐Ÿ” OneLock Project Overview

โœจ Inspiration

OneLock was inspired by the need for a simple, secure, and user-friendly file protection solution. Many users struggle with overly complex encryption tools, which led us to create a tool that empowers users to safeguard sensitive files with minimal effort. Our mission: protect privacy in an age of rising digital threats with zero friction.


โš™๏ธ What It Does

OneLock is a PyQt5-based desktop application that enables users to lock and unlock files using a 6-digit PIN.

  • ๐Ÿ”’ Locked files are moved to a hidden directory
  • ๐Ÿ“„ Replaced with harmless placeholder files
  • ๐Ÿ–ฑ๏ธ Features a drag-and-drop interface for file locking
  • ๐Ÿ”‘ PIN-protected unlocking with custom dialogs
  • ๐Ÿงฐ System tray access for smooth background operation

๐Ÿ—๏ธ How We Built It

๐Ÿงช Tech Stack

  • Language: Python
  • GUI Framework: PyQt5
  • UI Design: Qt Designer (file_locker.ui)
  • Styling: External stylesheet (styles.qss)

๐Ÿงฑ Architecture

  • UniversalFileLocker: Main GUI class using Qt .ui file
  • LoginDialog & UnlockDialog: Custom PIN input dialogs
  • pickle: Persistent storage for PIN & metadata
  • shutil: File movement operations
  • QSystemTrayIcon: System tray integration
  • ctypes: Hidden file attributes (Windows)

๐Ÿ› ๏ธ Development Process

  • Designed UI in Qt Designer
  • Built modular Python code for logic
  • Moved all styles to a .qss file for clean separation

๐Ÿšง Challenges We Ran Into

  • ๐Ÿงฉ UI Mapping: Converting code-based UI to .ui files
  • ๐ŸŽจ Styling: Achieving consistency across dialogs
  • ๐Ÿ—‚๏ธ File Security: Managing safe file transfers & hidden paths
  • ๐Ÿ–ฑ๏ธ Drag-and-Drop: Handling MIME data for file URLs
  • ๐Ÿ” PIN Storage: Pickle is fast but not secure enough

๐Ÿ† Accomplishments We're Proud Of

  • โœ… Clean, modern UI with Qt Designer integration
  • โœ… External styling for scalable GUI management
  • โœ… System tray support for background file protection
  • โœ… Intuitive UX: Drag-and-drop + PIN = smooth operation
  • โœ… Robust error handling with logs and dialogs

๐Ÿ“š What We Learned

  • ๐Ÿ’ก Qt Designer workflow + signal mapping
  • ๐Ÿ’ก Styling best practices using .qss files
  • ๐Ÿ’ก Secure file operations across OS platforms
  • ๐Ÿ’ก Importance of user-centric, intuitive design
  • ๐Ÿ’ก Value of modular architecture for maintainability

๐Ÿš€ What's Next for OneLock

  • ๐Ÿ” Encrypted PIN storage instead of pickle
  • ๐Ÿงช Cross-platform support (macOS, Linux compatibility)
  • ๐Ÿ”’ File encryption layer to protect file contents
  • โ˜๏ธ Cloud sync for locked file backup
  • ๐ŸŽจ UI themes and accessibility improvements
  • ๐Ÿ“‹ Project templates for knowledge transfer & documentation

๐Ÿงฎ Bonus: Math in OneLock (LaTeX Examples)

We used LaTeX-style math for planning security formulas and design algorithms:

  • Area of secure block:

$$ A = \pi r^2 $$

  • Encryption strength (illustrative formula):

$$ S = 2^k \quad \text{where } k = \text{key length} $$

  • Access threshold condition:

$$ \text{Access Granted} \iff \text{Input PIN} = \text{Stored PIN} $$


โœ… Task Checklist

  • [x] Drag-and-drop interface
  • [x] PIN-based file locking
  • [x] System tray operation
  • [x] External .qss styles
  • [ ] Replace pickle with encrypted storage
  • [ ] Add file encryption
  • [ ] Cloud storage sync

Built With

Share this project:

Updates

Submission history