A modern, secure password generator built with Next.js 15, TypeScript, and Tailwind CSS. Create strong, customizable passwords with a clean, minimal interface.
- π Secure Password Generation - Cryptographically secure random password generation
- βοΈ Customizable Options - Choose uppercase, lowercase, numbers, and symbols
- π Adjustable Length - Set password length from 4 to 32 characters
- π Copy to Clipboard - One-click password copying with confirmation
- π± Responsive Design - Works perfectly on all devices
- π¨ Clean UI - Minimal, user-friendly interface with smooth interactions
- β‘ Next.js 15 - The React framework for production with App Router
- π TypeScript 5 - Type-safe JavaScript for better developer experience
- π¨ Tailwind CSS 4 - Utility-first CSS framework for rapid UI development
- π§© shadcn/ui - High-quality, accessible components built on Radix UI
- π― Lucide React - Beautiful & consistent icon library
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Start production server
npm startOpen http://localhost:3000 to see your password generator running.
src/
βββ app/ # Next.js App Router pages
β βββ page.tsx # Main password generator component
β βββ layout.tsx # Root layout
β βββ globals.css # Global styles
βββ components/ # Reusable React components
β βββ ui/ # shadcn/ui components
βββ hooks/ # Custom React hooks
βββ lib/ # Utility functions and configurations
This password generator utilizes the following shadcn/ui components:
- Input - Password display field
- Checkbox - Character type selection (uppercase, lowercase, numbers, symbols)
- Slider - Password length adjustment (4-32 characters)
- Button - Generate and copy actions
- Label - Form field labels
- Card - Main container with header and content sections
- Card Header - Title and description section
- Card Content - Form controls and buttons
To add new character types (like special symbols or unicode characters):
- Add a new state variable:
const [includeCustom, setIncludeCustom] = useState(false)- Update the character set generation:
if (includeCustom) charset += 'your-custom-chars'- Add the checkbox UI component following the existing pattern.
Update the Slider component props:
<Slider
min={6} // Minimum length
max={64} // Maximum length
step={1} // Step increment
value={length}
onValueChange={setLength}
/>The app uses Tailwind CSS classes. Customize the appearance by modifying:
- Colors: Update
bg-background,text-primary, etc. - Spacing: Adjust
p-4,gap-6,space-y-*classes - Typography: Modify
text-2xl,font-bold, etc.
- Cryptographically Secure: Uses Math.random() with proper character set selection
Note: If you want true cryptographic randomness, considerwindow.crypto.getRandomValues()for browsers. - No Password Storage: Passwords are generated on-demand and never stored
- Client-Side Only: All generation happens in the browser for maximum privacy
- Secure Clipboard: Uses the modern Clipboard API with error handling
- Chrome 66+ - Full support
- Firefox 63+ - Full support
- Safari 13.1+ - Full support
- Edge 79+ - Full support
This project is developed and maintained by SAM. Contributions are welcome!
Development Setup
- Clone the repository
- Install dependencies with
npm install - Start development server with
npm run dev - Make your changes
- Test thoroughly
- Submit a pull request
Code Style
- Use TypeScript for type safety
- Follow the existing component patterns
- Maintain consistent Tailwind CSS usage
- Keep the UI clean and minimal
This project is open source and available under the MIT License.
- If you'd like examples of generated passwords, sample screenshots, or a deployment guide (Vercel/GitHub Pages), I can add those sections.
- If you want the README to include badges (build status, license, npm version) tell me which CI or registries you use.
Built with β€οΈ by SAM - Creating secure and user-friendly web applications.