A secure password and passphrase generator with a clean, responsive web interface.
Generate random passwords with configurable options:
- Length: 8 to 64 characters
- Character types: Toggle uppercase (A-Z), lowercase (a-z), numbers (0-9), and symbols (!@#$%^&*)
- At least one character type must be selected
Generate memorable word-based passphrases:
- Word count: 3 to 8 words
- Separator: Choose from hyphen, underscore, period, space, or none
- Capitalize words: Title-case each word for readability
- Include number: Append a random number (0-99) at the end
- Uses the EFF wordlist (~1,700 common words)
All random generation uses crypto.getRandomValues() for cryptographically secure randomness.
- One-click copy: Copy generated output to clipboard instantly
- Strength indicator: Visual feedback showing password/passphrase strength
- Settings persistence: Your preferences are saved in browser localStorage
- Shake to generate: On mobile devices, shake your phone to generate a new password/passphrase
- Changelog popup: View release notes when a new version is detected (click the version number to open manually)
- Download the latest
password-generator-deploy.zipfrom Releases - Extract to your desired location
- Install production dependencies:
npm install
- Start the server:
npm start
- Access at
http://localhost:6100
The default port is 6100. To change it:
Option 1: Edit the .env file in the extracted folder:
PORT=8080
Option 2: Set an environment variable:
PORT=8080 npm startBuild and run with Docker:
docker build -t password-generator .
docker run -d -p 6100:6100 password-generatorTo use a different port:
docker run -d -p 8080:8080 -e PORT=8080 password-generatorOr use Docker Compose (create docker-compose.yml):
services:
password-generator:
build: .
ports:
- "6100:6100"
restart: unless-stoppedThen run:
docker compose up -d- Extract the deployment ZIP to your desired location
- Run
npm installin that folder - Create a new Generic module instance in AMP
- Set the start command to:
node server.js - Set the working directory to the extracted folder
- The port is pre-configured in
.env(default: 6100)
server {
listen 80;
server_name passwords.example.com;
location / {
proxy_pass http://localhost:6100;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}- Node.js 18+
- npm
Clone the repository and install dependencies:
git clone https://github.com/Tdue21/password-generator.git
cd password-generator
npm installRun the Vite development server with hot reload:
npm run devAccess at http://localhost:5173
Build for production:
npm run buildThis compiles TypeScript, bundles the Vue app, and outputs to the dist/ folder.
Build and start the Express server:
npm startOr run the server after building:
npm run serverRun the test suite (Vitest):
npm testRun tests in watch mode during development:
npm run test:watchRun the deployment script to create a production-ready ZIP:
.\build\deploy.ps1The script:
- Installs dependencies
- Runs tests (aborts if any fail)
- Builds the Vue frontend
- Compiles the TypeScript server to JavaScript
- Creates a minimal
deploy/folder with only production files - Generates a
.envfile with the configured port - Creates
password-generator-deploy.zip
├── src/
│ ├── components/ # Vue components
│ │ └── PasswordGenerator.vue
│ ├── utils/ # Generation logic
│ │ └── generator.ts
│ ├── tests/ # Test files
│ ├── wordlist.ts # EFF wordlist
│ ├── App.vue # Root component
│ └── main.ts # Entry point
├── build/
│ └── deploy.ps1 # Deployment script
├── server.ts # Express server (TypeScript)
├── vite.config.ts # Vite configuration
├── tsconfig.json # TypeScript config
└── package.json # Dependencies and scripts
| Script | Description |
|---|---|
npm run dev |
Start Vite dev server with hot reload |
npm run build |
Build for production |
npm run preview |
Preview production build locally |
npm run server |
Run Express server (serves built files) |
npm start |
Build and run server |
npm test |
Run test suite |
npm run test:watch |
Run tests in watch mode |
- Frontend: Vue 3 (Composition API), TypeScript
- Build: Vite
- Server: Express.js
- Testing: Vitest, @vue/test-utils
- Styling: Scoped CSS