https://password-checker-by-shakey0.onrender.com/
During week 7 of the Makers Academy bootcamp, I developed an intricate password checker as a day-long project. This utility enforces 9 rigorous validation steps to ensure password strength. The accompanying Dockerfile ensures smooth containerization for easy deployment and scaling.
In the following order:
-
Checks if the password is at least 20 characters long
-
Checks if the password contains nummbers
-
Checks if the password contains symbols
-
Checks if the password contains both uppercase and lowercase characters
-
Checks if the password contains an animal (from an extensive list of animals)
-
Checks if all the digits in the password add up to at least 60
-
Checks if the password contains a word to start a question (from a list of words)
-
Checks that any consecutive digits don't add to more than 16
-
Checks if the password contains the first name of an English monarch (from a list of English monarchs)
-
See password_checker.py for the code to check the password.
- Used Docker to containerise the app on my local machine.
- Created a script - main.yml - to build and test the app in GitHub Actions.
- Created a new web service in Render.
- Configured GitHub to give Render the necessary permissions on this repository, so each time a new push is made to the main branch, and the tests pass, the latest version of the app will be deployed to Render.
- Backend: Python, Flask
- Frontend: CSS, HTML
- Testing: Pytest, Playwright
- Deployment: Docker, GitHub Actions, Render
I have included a CI/CD pipeline in this project so that when the code is pushed to Github the tests will run and the code will be deployed to https://exoframe.xf.mkrs.link . However, my Exoframe token from Makers is no longer valid, and so the pipeline will fail in the CD part.
Run the following command to clone the repo:
git clone https://github.com/shakey0/PasswordChecker
cd PasswordChecker
Create your virtual environment:
pipenv install
pipenv shell
Install dependencies:
pip install -r requirements.txt
Create a .env file with the following:
SECRET_KEY=a_secret_key
Run the tests:
pytest
Start the server:
python app.py
Build a Docker image (image tag optional):
docker build -t password_checker .
Start the Docker container:
docker run -e PRODUCTION=True -e SECRET_KEY=a_secret_key -p 5000:5000 password_checker