A modern, secure, and self-hosted password management solution built with Next.js 15, TypeScript, and PostgreSQL.
- π End-to-End Encryption: AES-256-GCM encryption for all sensitive data
- π Secure Credential Storage: Store passwords, usernames, and account details with confidence
- π³ Payment Card Management: Securely store credit/debit card information
- π€« Secret Notes: Encrypted storage for sensitive notes and information
- π Password History Tracking: Automatic tracking of password changes with timestamps
- π Secure Authentication: Built with BetterAuth for robust user authentication
- π¨ Modern UI: Beautiful, responsive interface built with Tailwind CSS and shadcn/ui
- π Smart Search: Quickly find credentials with powerful search and filtering
- π± Mobile-Friendly: Fully responsive design for all devices
- π Dark Mode: Built-in dark/light theme support
- π Self-Hosted: Full control over your data with Docker deployment
- π¦ Easy Migration: Import credentials from text files
- π Real-time Sync: Instant updates across all your sessions
Before you begin, ensure you have the following installed:
Run these commands to verify everything is installed correctly:
# Check Node.js version
node --version
# Expected: v18.x or higher
# Check pnpm version (install with: npm install -g pnpm)
pnpm --version
# Expected: v8.x or higher
# Check Docker is installed and running
docker --version
# Expected: Docker version 20.x or higher
docker compose version
# Expected: Docker Compose version v2.x or higher
# If Docker commands fail, make sure Docker Desktop is runningπ‘ Note: If Docker is not installed, download it from docker.com/products/docker-desktop and make sure Docker Desktop is running (look for the π³ icon).
git clone https://github.com/findmalek/zero-locker.git
cd zero-lockerpnpm installThis will install all required packages including:
- Next.js and React
- Prisma ORM
- oRPC for API routes
- UI component libraries
- And many more...
Create a .env file in the root directory:
# Copy the example environment file
cp .env.example .env # Or create manuallyAdd the following variables to your .env file:
# Database Configuration
DATABASE_URL=postgresql://postgres:password@localhost:5432/zerolocker
# Application Configuration
NODE_ENV=development
NEXT_PUBLIC_APP_URL=http://localhost:3000
# Authentication (IMPORTANT: Change this in production!)
BETTER_AUTH_SECRET=your-secret-key-minimum-32-characters-for-production
# Optional: Logo.dev API (for fetching website logos)
LOGO_DEV_TOKEN=your-logo-dev-token
NEXT_PUBLIC_LOGO_DEV_TOKEN=your-public-logo-dev-token
β οΈ Security Note: TheBETTER_AUTH_SECRETshould be a strong, random string (minimum 32 characters) in production. Generate one using:openssl rand -base64 32
Zero Locker uses Docker to run PostgreSQL locally for development.
# Pull the official PostgreSQL 15 Alpine image
pnpm docker:pull
# Or manually:
docker pull postgres:15-alpine# Start PostgreSQL in detached mode
pnpm docker:up
# This will:
# - Create a PostgreSQL 15 container
# - Expose it on port 5432
# - Create a database named 'zerolocker'
# - Set up with username: postgres, password: password# Check container status
pnpm docker:status
# View logs
pnpm docker:logs:tail
# You should see:
# β
database system is ready to accept connections# Generate Prisma Client and run migrations
pnpm db:migrate
# This will:
# - Create all necessary tables
# - Set up relationships
# - Apply any pending migrations# Populate with sample data
pnpm db:reset-and-seed
# β οΈ Warning: This will delete all existing data# View container status
pnpm docker:status
# View real-time logs
pnpm docker:logs
# View last 100 log lines
pnpm docker:logs:tail
# Restart the database
pnpm docker:restart
# Stop the database
pnpm docker:down
# Reset database (deletes all data and volumes)
pnpm docker:reset
# Clean up (removes containers, volumes, and images)
pnpm docker:clean# Start Next.js development server with Turbopack
pnpm dev
# Server will start at: http://localhost:3000The development server includes:
- β‘οΈ Turbopack for fast HMR (Hot Module Replacement)
- π Auto-reloading on file changes
- π Detailed error messages
- π React Query DevTools (bottom-left corner)
This project is licensed under the MIT License - see the LICENSE.md file for details.
