A privacy-preserving web app that checks whether an email or password has appeared in known breach datasets.
- Next.js + React frontend
- Vercel-compatible API routes under
src/pages/api/* - npm workspaces
- XposedOrNot for email breach checks
- Have I Been Pwned Pwned Passwords for password checks
Install dependencies:
npm installRun the app locally:
npm run devBuild for production:
npm run buildThis project uses the official XposedOrNot free email breach endpoint:
GET https://api.xposedornot.com/v1/check-email/[email]According to the XposedOrNot API documentation, most endpoints are public, email breach checks return JSON, and the public API limit is 1 request per second. Domain breach endpoints are the ones that require an x-api-key header.
The app already calls XposedOrNot from the server-side Vercel Function at /api/check, so the key is not exposed in browser code.
If you have a XposedOrNot API key for authenticated/domain features, keep it in this server-side environment variable:
XPOSEDORNOT_API_KEY=your_key_hereFor local development, copy .env.example to .env.local and fill in the value.
For Vercel:
- Open your Vercel project.
- Go to Settings -> Environment Variables.
- Add
XPOSEDORNOT_API_KEY. - Redeploy the project.
The app can still call XposedOrNot without a key, but adding the key is better for reliability.
API reference: https://xposedornot.com/api_doc
This repo includes vercel.json, so Vercel can build it from the repo root.
Use these settings when importing the GitHub repository into Vercel:
- Framework Preset:
Next.js - Root Directory: repo root
- Install Command:
npm install - Build Command:
npm run build - Output Directory: auto-detected by Next.js
Optional environment variables:
XPOSEDORNOT_API_KEYHIBP_API_KEYRESEND_API_KEYRESEND_FROM_EMAIL
Create a new empty repository in your own GitHub account first. Do not initialize it with a README, .gitignore, or license because this project already has those files.
Then connect this local project to your new repo:
git remote add origin https://github.com/YOUR_USERNAME/YOUR_REPO_NAME.git
git push -u origin mainIf GitHub asks for a password, use a GitHub personal access token instead of your account password.