A step-by-step evolving project that begins as a simple CLI-based login/register app using Python dictionaries and gradually transforms into a secure, GUI-based user authentication system using file storage and password hashing.
- Register new users
- Login existing users
- View user profile
- Change/reset Password
- Basic CLI interface
- Save user data in JSON file
- Load data at startup
- Prevent duplicate registrations
- Secure password storage using
hashlib
- Password verification during login
- Validate username
- Enforce password strength
- Meaningful error messages
- Register/Login screens with modern UI
- Message boxes for success/failure feedback
- Password masking
- Separate windows for Register, Login, and Welcome
- Navigation between Register and Login screens
- Change/reset password
- Logout functionality
- Python 3.x
hashlib
– for password hashingjson
– for user data persistencecustomtkinter
– for modern and themed GUI components
py-auth-system/
├── cli-version/
│ └── main.py # CLI-based logic
│
├── gui-version/
│ ├── register.py # GUI Register window
│ ├── login.py # GUI Login window
│ └── welcome.py # GUI Welcome window after login
│
├── UI-Screenshots/ # UI previews
│ ├── login_window.png
│ ├── register_window.png
│ ├── reset_password.png
│ └── welcome_window.png
│
├── LICENSE # MIT License
├── users.json # Shared user data file
└── README.md # Project overview
- Navigate to the
cli-version
folder:cd cli-version python main.py
🛑 Requires
customtkinter
. Install it first:
pip install customtkinter
- Navigate to the
gui-version
folder:cd gui-version python register.py
🔄 Users can switch between Register and Login windows using clickable links.
✅ On successful login, a Welcome window will appear with a Reset Password and Logout button.
- Passwords are hashed before storing
- Plaintext passwords are never saved
- Includes input validation and error handling
- Clear separation between CLI and GUI components
- GUI code uses modular window design
- The
users.json
file stores hashed passwords only. No plaintext passwords are stored. - For demo/testing, use this default test account:
- Username:
demo_user
- Password:
Demo@123
- Username:
- File Handling
- Password Hashing & Security
- JSON-based Data Persistence
- GUI Development with customtkinter
- Modular Python Code
This project is licensed under the MIT License.
This project was built as part of my self-learning journey to apply and strengthen my understanding of Python through hands-on practice.