Giter VIP home page Giter VIP logo

passwordchecker's Introduction

Password Checker

https://password-checker-by-shakey0.onrender.com/

Introduction

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.

Features

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.

Deployment & CI/CD Pipeline Process

  1. Used Docker to containerise the app on my local machine.
  2. Created a script - main.yml - to build and test the app in GitHub Actions.
  3. Created a new web service in Render.
  4. 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.

Key Technologies

  • Backend: Python, Flask
  • Frontend: CSS, HTML
  • Testing: Pytest, Playwright
  • Deployment: Docker, GitHub Actions, Render

CI/CD Pipeline

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.

Installation & Setup

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

Run with Docker

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.