This is a Flask web application that lets users check whether their email address has been involved in a data breach using an external API.
-
Set up your
.envfile:-
Create a
.envfile in the root directory. -
Add your API key:
RAPIDAPI_KEY=your_rapidapi_key_here
-
-
Install dependencies:
pip install -e . -
(Optional) Create and activate a virtual environment:
python -m venv venv venv\Scripts\activate # For Windows source venv/bin/activate # For Mac/Linux -
Run the app:
python run.py
-
Email Breach Search API
- Provided by RapidAPI
- Link: https://rapidapi.com/databreach-com-databreach-com-default/api/email-breach-search
- Used to check if a submitted email address has appeared in known data breaches
-
Clean and modular Flask app structure using
src/layout -
__init__.pyused for proper package initialization -
Dynamic HTML rendering using Jinja2
-
Static webpage displaying breach info for each email
-
.envsupport for secure API key management -
pyproject.tomlused for dependency and path configuration -
Input validation using regular expressions
-
Two client-side alert popups:
- One for invalid email format
- One when no breach data is found
-
Three manual test cases using
print()to simulate test validation logic -
Scalable design that supports expanding with more Flask Blueprints