The Password Breach Notification System helps users stay secure by notifying them if their credentials have been exposed in known data breaches. This system continuously monitors databases and alerts users in real-time.
β
Real-time Breach Detection π β Checks passwords against leaked databases.
β
Secure Hashing Mechanism π β Uses SHA-1 for privacy-preserving checks.
β
User Notifications π© β Sends alerts via email/SMS when a breach is detected.
β
Admin Dashboard π β Provides breach statistics and system monitoring.
β
Multi-Factor Authentication (MFA) Suggestion π‘οΈ β Encourages MFA when a breach is detected.
β
Dark Web Monitoring π΅οΈββοΈ β Optional feature to scan leaked credentials on dark web forums.
β
Secure API Access π β Uses JWT authentication for enhanced security.
β
Logging & Monitoring π β Keeps track of breach reports and system logs.
+----------------------+ +---------------------+ +----------------------+
| Client/API Calls | ---> | Log Ingestion Layer | ---> | Processing Engine |
+----------------------+ +---------------------+ +----------------------+
| |
v v
+----------------------+ +----------------------+
| Storage Layer | | Analysis & Alerts |
| (DB/File System) | | (ML/Rule-Based) |
+----------------------+ +----------------------+
| |
v v
+----------------------+ +----------------------+
| Search & Filtering | | Visualization |
| (Elasticsearch) | | (WebSockets/API) |
+----------------------+ +----------------------+
|
v
+----------------------+
| User Dashboard |
| (API/Grafana/Kibana) |
+----------------------+
Password-Breach-Notification-System/
βββ src/
β βββ controllers/ # Route logic (to be implemented)
β βββ models/ # Mongoose models (to be implemented)
β βββ routes/ # Express route definitions (to be implemented)
β βββ services/ # Business logic (to be implemented)
β βββ utils/ # Utility/helper functions (to be implemented)
β βββ app.js # Express app entry point (to be implemented)
βββ config/
β βββ db.js # Database connection (to be implemented)
βββ public/ # Static assets (optional)
βββ .env.example # Example environment variables
βββ package.json
βββ Readme.md
Create a .env file in the root directory. Example:
PORT=3000
MONGODB_URI=mongodb://localhost:27017/breachdb
JWT_SECRET=your_jwt_secret
HIBP_API_KEY=your_hibp_api_key
EMAIL_USER=your_email@example.com
EMAIL_PASS=your_email_password
SMS_API_KEY=your_sms_api_key
This repository currently contains only documentation and a project template. The actual backend code (controllers, models, routes, services, etc.) is not yet implemented.
To complete the project:
- Implement the backend logic in the
src/directory as described in the folder structure. - Create the necessary API endpoints as documented above.
- Add integration with MongoDB, Have I Been Pwned API, email/SMS notification services, and monitoring tools.
- See the API and feature documentation above for guidance.
| Component | Technology |
|---|---|
| Backend | Node.js (Express) |
| Database | MongoDB |
| Frontend (Optional) | React.js |
| Auth | JWT, bcrypt |
| Breach Check | Have I Been Pwned API |
| Notifications | Nodemailer, SMS APIs |
| Monitoring | Prometheus, Grafana |
| Security | Helmet.js, CORS, Rate Limiting |
π POST /api/auth/register β Register a new user.
π POST /api/auth/login β Authenticate a user.
πΉ POST /api/breach/check β Check if a password has been compromised.
πΉ GET /api/breach/history β Retrieve a user's breach history.
π GET /api/notifications β View breach alerts.
π POST /api/notifications/settings β Update alert preferences.
π GET /api/admin/dashboard β View breach statistics.
Request:
POST /api/breach/check
Content-Type: application/json
Authorization: Bearer <token>
{
"password": "user_password"
}Response:
{
"breached": true,
"sources": ["HaveIBeenPwned", "DarkWeb"],
"suggest_mfa": true
}β
Node.js
β
MongoDB
β
API Key for Have I Been Pwned
# Clone the repository
git clone https://github.com/yourrepo/password-breach-notification.git
# Navigate to the project
cd password-breach-notification
# Install dependencies
npm install
# Configure environment variables
cp .env.example .env # Add API keys & database URL
# Start the server
npm startdocker build -t breach-notifier .
docker run -p 3000:3000 breach-notifier- Deploy on AWS, Heroku, or DigitalOcean.
- Use GitHub Actions for automated deployments.
β
Rate Limiting β Prevent API abuse.
β
Data Encryption β Ensure passwords & sensitive data are secure.
β
Multi-Factor Authentication (MFA) β Encourage users to enable MFA.
β
Logging & Anomaly Detection β Detect suspicious activity.
- Grafana Dashboard π β Visualizes breach alerts and trends.
- Prometheus Metrics π β Tracks API performance and logs.
Want to contribute? Follow these steps:
- Fork the repository.
- Create a new branch.
- Commit your changes.
- Submit a pull request.
MIT License β Open-source and free to use! π
For questions or support, open an issue or contact maintainer@example.com.
π Star this repo if you found it helpful! β