A step-by-step evolving project that begins as a simple CLI-based login/register app and gradually transforms into a fully secure, cloud-hosted authentication system with REST API and JWT.
🌿 Each phase lives in its own branch.
mainalways reflects the latest complete version.
| Branch | Description | Status |
|---|---|---|
v1-functional |
Original functional version (CLI + GUI) | ✅ Complete |
feature/oop |
OOP refactor with clean class structure | ✅ Complete |
feature/jwt |
REST API with FastAPI and JWT auth | 🔜 Coming Soon |
feature/aws |
Cloud deployment on AWS | 🔜 Coming Soon |
- CLI register, login, profile, change password
- JSON file storage
- Password hashing with
hashlib - Input validation
- GUI with
customtkinter
-
Userclass with properties and setters -
Validatorclass for all validation rules -
FileStorageclass for JSON read/write -
AuthManagerclass coordinating all logic - Rebuilt GUI with
tkinter
- FastAPI backend
- JWT authentication
- MySQL database with SQLAlchemy ORM
- Bcrypt password hashing
- Pydantic request validation
- CORS and environment variable configuration
- Dockerized application
- AWS EC2 + RDS (MySQL) deployment
- SSL certificate via ACM
- GitHub Actions CI/CD pipeline
| Phase | Tools |
|---|---|
| Phase 1 | Python, hashlib, json, customtkinter |
| Phase 2 | Python OOP, tkinter |
| Phase 3 | FastAPI, JWT, MySQL, SQLAlchemy, Bcrypt, PyMySQL |
| Phase 4 | Docker, AWS EC2, AWS RDS, GitHub Actions |
py-auth-system/
├── oop_version/
│ ├── auth_gui.py # tkinter GUI
│ ├── auth_manager.py # Register and login logic
│ ├── file_storage.py # JSON read/write
│ ├── user.py # User class with properties and setters
│ └── validator.py # All validation rules
├── screenshots/
│ ├── dashboard.png
│ ├── login.png
│ └── register.png
├── .gitignore
├── LICENSE
└── README.md
Prerequisites: Python 3.x — tkinter is included with Python by default, no installation needed.
1. Clone the repository
git clone https://github.com/asnaassalam/py-auth-system.git
cd py-auth-systemcd oop_version
python auth_gui.pySwitch to the v1-functional branch:
git checkout v1-functionalThen follow the instructions in that branch's README.
- Passwords are hashed before storing — never saved as plaintext
- Input validation enforced on both frontend and backend layers
- Clear separation of concerns — each class has one job
- Sensitive files like
users.jsonare excluded from version control
users.jsonis excluded from the repo via.gitignore— it is generated locally on first run
- File Handling and JSON Persistence
- Password Hashing and Security
- Object Oriented Programming
- GUI Development with tkinter
- REST API Design (coming Phase 3)
- JWT Authentication (coming Phase 3)
- Cloud Deployment on AWS (coming Phase 4)
This project is licensed under the MIT License.
Built as a part of my self-learning journey from beginner Python scripts to a full production-grade authentication system.


