A robust and user-friendly password and passphrase generation tool with a modern web stack (React frontend, FastAPI backend) and enhanced features for customization, security, and user experience.
- Password Generation:
- Customizable length (8-64 characters).
- Toggles for uppercase, lowercase, numbers, and symbols.
- Real-time password strength estimation using
zxcvbn.
- Passphrase Generation:
- Customizable word count (3-10 words).
- Separator options (hyphen, underscore, space, period, comma).
- Optional trailing number and symbol.
- Parallel API requests for faster generation.
- Offline fallback using the EFF Large Wordlist.
- Phonetic (Pronounceable) Password Generation:
- Generates pronounceable, nonsensical passwords.
- Customizable length.
- Options to capitalize the first letter and include a trailing number.
- User Interface & Experience:
- Modern, dark-themed UI built with React and Tailwind CSS.
- Tabbed interface for easy switching between generators.
- QR Code generation for easy sharing/scanning of long passwords.
- One-click "Copy to Clipboard" with visual feedback.
- Graceful error handling and fallback mechanisms.
- Frontend: React, Tailwind CSS, Lucide React,
zxcvbn,react-qr-code. - Backend: FastAPI,
uvicorn,requests,python-dotenv,concurrent.futures. - External APIs: API Ninjas (for random words).
- Node.js (v18+)
- Python (3.9+)
- Navigate to the
backenddirectory:cd backend - Install the required Python packages:
pip install -r requirements.txt
- Create a
.envfile in thebackenddirectory and add your API Ninjas key:(Note: The application includes an offline fallback, so it will still work without an API key, but using the API provides a wider variety of words.)API_NINJA=your_api_key_here
- Start the FastAPI server:
The backend will be available at
uvicorn main:app --reload --host 0.0.0.0 --port 8000
http://localhost:8000.
- Navigate to the root directory (or
frontendif applicable). - Install the required npm packages:
npm install
- Start the Vite development server:
The frontend will be available at
npm run dev
http://localhost:3000(or the port specified by Vite).
The backend includes comprehensive unit and integration tests using pytest.
- Navigate to the
backenddirectory:cd backend - Install the test dependencies:
pip install pytest httpx
- Run the tests:
pytest
You can containerize the application using Docker.
- Create a
Dockerfilefor the backend and aDockerfilefor the frontend. - Use
docker-composeto orchestrate the containers.
Set up a CI/CD pipeline (e.g., GitHub Actions, GitLab CI) to automate testing and deployment.
- Testing: Run
pytestfor the backend andnpm test(if applicable) for the frontend on every push. - Deployment: Deploy the backend to a platform like Heroku, Render, or AWS, and deploy the frontend to Vercel, Netlify, or AWS S3/CloudFront.
For production, do not commit your .env file to version control. Use secure secret management solutions provided by your hosting platform (e.g., AWS Secrets Manager, HashiCorp Vault, or environment variables in your deployment dashboard).
The application has been designed with accessibility in mind, but a thorough review using tools like Lighthouse or axe DevTools is recommended before production deployment. Ensure sufficient color contrast, keyboard navigability, and proper ARIA labels where necessary.