A privacy-first password security analyzer built with React, Vite, and Node.js for a Web Security & Compliance (WSC) educational project.
KeyShield estimates password strength entirely in your browser. Your password is never transmitted to the backend, stored in a database, or sent to external password-analysis services.
Privacy First ยท Client-Side Analysis ยท Keyboard Accessible
- Live Password Analysis: Evaluate password length, character diversity, repeated characters, common passwords, and predictable sequences.
- Five-Level Strength Meter: View an estimated strength rating from Very Weak to Very Strong, with actionable recommendations.
- Keyboard Friendly: Press
Enterto analyze your password. Use keyboard navigation to access interactive controls. - Show/Hide Password: Toggle password visibility whenever needed.
- Responsive Interface: A modern dark-themed interface designed for desktop, tablet, and mobile devices.
- Privacy by Design: Password analysis runs locally in your browser.
- Accessible Feedback: Visible focus indicators, screen-reader announcements, and support for reduced motion.
- Secure Express API: A minimal health-check endpoint protected with Helmet, CORS allowlisting, and rate limiting.
KeyShield is designed to minimize the exposure of sensitive information.
| Security Measure | Implementation |
|---|---|
| Client-side password analysis | Passwords are evaluated locally in the browser |
| No password storage | No database, cookies, local storage, or session storage |
| No password transmission | The Express API does not receive password input |
| HTTP security headers | Helmet |
| CORS protection | Configurable frontend-origin allowlist |
| Rate limiting | Express rate-limit middleware |
| Safe rendering | React rendering without unsafe HTML injection |
| Error handling | Centralized API error handling |
Important: KeyShield provides an educational estimate of password strength. It does not guarantee that a password is secure or uncompromised.
- React 19
- Vite
- Tailwind CSS
- Lucide React
- JavaScript
- Node.js
- Express 5
- Helmet
- CORS
- express-rate-limit
- npm
- Git
- GitHub
KeyShield provides a streamlined interface for entering a password, reviewing its estimated strength, and receiving recommendations to improve it.
The interface includes a password input, strength meter, requirements checklist, and privacy notice.
KeyShield/
โโโ client/
โ โโโ src/
โ โ โโโ components/
โ โ โโโ hooks/
โ โ โโโ utils/
โ โ โโโ App.jsx
โ โ โโโ index.css
โ โโโ package.json
โโโ server/
โ โโโ routes/
โ โโโ middleware/
โ โโโ app.js
โ โโโ server.js
โ โโโ package.json
โ โโโ .env.example
โโโ package.json
โโโ package-lock.json
โโโ .gitignore
โโโ LICENSE
โโโ README.md
The exact directory contents may vary slightly depending on the current implementation.
Install the following before running the project:
- Node.js 20.19+ or 22.12+
- npm
- Git
Check your installed versions:
node --version
npm --version
git --versiongit clone https://github.com/iamsachinG/KeyShield.gitcd KeyShieldnpm install
npm --prefix client install
npm --prefix server installCopy the example environment file:
Copy-Item server/.env.example server/.envAdjust the values only when necessary.
npm run devIf the root development script starts both services, the application should be available at:
- Frontend:
http://127.0.0.1:5173 - Backend Health Check:
http://127.0.0.1:4000/api/health
Use Ctrl + C to stop the development processes.
Start the backend in one terminal:
npm --prefix server run devStart the frontend in another terminal:
npm --prefix client run devThe backend uses environment variables defined in server/.env.example.
| Variable | Default | Purpose |
|---|---|---|
PORT |
4000 |
Backend port |
NODE_ENV |
development |
Application environment |
CLIENT_ORIGIN |
http://127.0.0.1:5173 |
Allowed frontend origin |
The backend exposes a health-check endpoint and does not provide a password-analysis endpoint.
Never commit real secrets or your local .env file to GitHub.
Run the production build:
npm run buildRun the available tests:
npm testThe project tests cover password-strength heuristic behavior, API health responses, security headers, and the absence of an analysis endpoint.
| Action | Expected Behavior |
|---|---|
Enter in the password input |
Analyze the password |
Tab |
Move between interactive controls |
| Show/Hide button | Toggle password visibility |
| Clear button | Clear the input and analysis state |
Escape |
Dismiss the analysis result without clearing the password |
The application should preserve normal browser keyboard behavior and provide visible focus indicators.
KeyShield uses a lightweight JavaScript heuristic to estimate password strength.
The analyzer considers:
- Password length
- Uppercase and lowercase characters
- Numeric and special characters
- Common passwords
- Repeated characters
- Predictable sequences and patterns
The application displays a strength category and recommendations based on the analysis.
This is an educational estimator, not a formal password-security assessment.
It does not perform a formal entropy calculation, query breached-password databases, or guarantee resistance to every guessing technique.
For better account security:
- Use a unique password for every account.
- Prefer long, randomly generated passwords or unique passphrases.
- Use a reputable password manager.
- Enable multifactor authentication when available.
- Never reuse a password simply because KeyShield rates it highly.
This project demonstrates practical concepts related to Web Security & Compliance:
- Privacy by design and data minimization
- Authentication security and password-strength policies
- HTTP security headers
- CORS configuration
- API rate limiting
- Secure handling of user input
- Accessibility and keyboard navigation
- Security testing and threat awareness
- Limitations of heuristic security analysis
Potential enhancements include:
- A larger locally bundled common-password dataset
- Improved password predictability analysis
- Additional accessibility testing
- More detailed security recommendations
- Deployment-specific security configuration
- Expanded unit and integration test coverage
Any future breach-checking feature should preserve the principle that the entered password must not be transmitted to an external service.
This project is licensed under the MIT License. See the LICENSE file for details.
Sachin Gupta
GitHub: @iamsachinG
Repository: KeyShield
Built for learning, security awareness, and Web Security & Compliance.