A minimalist, secure password generator built with Python Flask following Clean Architecture principles, featuring a clean dark theme with orange/red accents and no external dependencies.
- Clean Architecture: Follows SOLID principles with clear separation of concerns
- Minimalist Design: Clean, dark interface with orange/red accents
- Theme Toggle: Switch between dark and light modes
- Customizable Password Generation: Configure length, character types, and advanced options
- Real-time Strength Analysis: Visual feedback on password security
- Multiple Password Generation: Generate several passwords at once
- Copy to Clipboard: One-click password copying with notifications
- Responsive Design: Works on desktop and mobile devices
- No External Dependencies: Pure Python implementation
- Testable Code: Unit tests for all business logic
- Python 3.7+
- pip (Python package manager)
-
Clone the repository:
git clone https://github.com/your-username/password-generate.git cd password-generate -
Install dependencies:
pip install -r requirements.txt
-
Run the application:
python main.py
-
Access the application:
http://localhost:3000
This project follows Clean Architecture principles with clear separation of concerns:
- Entities: Core business objects (
Password,PasswordConfig,PasswordStrengthAnalysis) - Repositories: Abstract interfaces for data access
- Services: Domain-specific business logic (
PasswordStrengthService)
- Use Cases: Application-specific business rules
- Interfaces: Contracts for external dependencies
- Repositories: Concrete implementations of domain repositories
- Web Services: External service implementations
- Configuration: Application settings and configuration
- Web: Flask web application and controllers
- CLI: Command-line interface (future enhancement)
- Testability: Each layer can be tested independently
- Maintainability: Clear separation of concerns
- Flexibility: Easy to swap implementations
- SOLID Principles: Follows all SOLID design principles
- Framework: Python Flask
- Language: Python 3.7+
- Architecture: Clean Architecture
- Dependencies: Flask, Flask-CORS
- Testing: pytest (for unit tests)
- Framework: Flask with embedded HTML/CSS/JavaScript
- Styling: Custom CSS with dark theme
- Interactivity: Vanilla JavaScript
- Responsive: Mobile-first design
password-generate/
├── src/
│ ├── domain/ # Domain layer (business logic)
│ │ ├── entities/ # Business entities
│ │ ├── repositories/ # Repository interfaces
│ │ └── services/ # Domain services
│ ├── application/ # Application layer (use cases)
│ │ ├── use_cases/ # Business use cases
│ │ └── interfaces/ # Application interfaces
│ ├── infrastructure/ # Infrastructure layer
│ │ ├── repositories/ # Repository implementations
│ │ ├── web/ # Web service implementations
│ │ └── config/ # Configuration
│ └── presentation/ # Presentation layer
│ └── web/ # Web interface (Flask)
├── tests/ # Unit tests
├── requirements.txt # Python dependencies
├── main.py # Application entry point
└── README.md
- Configure length: Use the slider to set password size (4-50 characters)
- Select character types:
- ✅ Uppercase Letters (A-Z)
- ✅ Lowercase Letters (a-z)
- ✅ Numbers (0-9)
- ✅ Symbols (!@#$%^&*)
- Advanced options:
- Exclude similar characters (0, O, 1, l, I)
- Exclude ambiguous characters ({ } [ ] ( ) / \ ' " ` ~ , ; . < >)
- Click "Generate Single Password" or "Generate 5 Passwords"
- Enter a password in the "Password Strength Checker" field
- View detailed analysis with color-coded feedback and suggestions
- Click the sun/moon icon in the top-right corner
- The theme will automatically detect your system preference
- Toggle between light and dark modes
Generates a new password based on provided parameters.
Request Body:
{
"length": 12,
"use_uppercase": true,
"use_lowercase": true,
"use_numbers": true,
"use_symbols": true,
"exclude_similar": false,
"exclude_ambiguous": false
}Response:
{
"success": true,
"password": "Kx9#mP2$vL8@",
"strength": {
"score": 8,
"level": "Good",
"percentage": 80,
"feedback": [],
"has_upper": true,
"has_lower": true,
"has_digit": true,
"has_symbol": true,
"length": 12
}
}Checks the strength of an existing password.
Request Body:
{
"password": "mypassword123"
}Response:
{
"success": true,
"strength": {
"score": 4,
"level": "Fair",
"percentage": 40,
"feedback": ["Avoid sequential numbers", "Consider adding symbols"],
"has_upper": false,
"has_lower": true,
"has_digit": true,
"has_symbol": false,
"length": 13
}
}# Start development server
npm run dev
# Build for production
npm run build
# Start production server
npm start
# Run linting
npm run lint# Start Flask development server
cd backend
python app.py
# Install new dependencies
pip install package-name
pip freeze > requirements.txtThe project uses shadcn/ui components. To add new components:
npx shadcn-ui@latest add component-nameThe frontend can be deployed to:
- Vercel (recommended for Next.js)
- Netlify
- AWS Amplify
- Any static hosting service
The backend can be deployed to:
- Heroku
- Railway
- AWS EC2
- Google Cloud Run
- Any Python hosting service
Create a Dockerfile for the backend:
FROM python:3.9-slim
WORKDIR /app
COPY backend/ .
RUN pip install -r requirements.txt
EXPOSE 5000
CMD ["python", "app.py"]- Passwords are generated using Python's
randommodule with secure algorithms - No passwords are stored or transmitted to external servers
- All password generation happens on the backend
- CORS is properly configured for secure cross-origin requests
- Code is open source and can be audited
- Fork the project
- Create a feature branch (
git checkout -b feature/lorem) - Commit your changes (
git commit -m 'Add some lorem') - Push to the branch (
git push origin feature/lorem) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues or have suggestions:
- Open an issue
- Contact via email: norbiato.dev@gmail.com