Vaultme is a full-stack, local-first web application designed to store, manage, and audit your credentials securely. Built on a Zero-Knowledge Security Model, all cryptographic operations occur strictly client-side. The server and database only store fully encrypted blobs, ensuring your master password and credentials never leave your browser in plain text.
- Key Derivation (PBKDF2):
- When registering or logging in, the client retrieves a random, unique salt from the backend.
- Using
crypto-js, the client runs PBKDF2 (HMAC-SHA256, 10,000 iterations) on the master password and salt to derive:- An Encryption Key (256-bit): Kept strictly in-memory (React context state) and used for AES-256 vault encryption.
- An Auth Hash: Sent to the server as a master password validator.
- Authentication & Session Security (Argon2id & HttpOnly Cookies):
- The server receives the client's
Auth Hashand hashes it using Argon2id (GPU/ASIC-resistant) before storing it in the database. - The KDF salt is embedded directly within the Argon2id hash rather than using a separate column, and is extracted dynamically when requested.
- Session states are maintained via JWT (JSON Web Tokens) stored securely in HttpOnly, Secure, and SameSite cookies to prevent XSS-based token theft.
- A zero-downtime lazy-migration transparently verifies legacy accounts using bcrypt and upgrades them to Argon2id upon their next successful login.
- The server receives the client's
- Zero-Knowledge Vault Storage (AES-256):
- Every credential field (site name, username, URL, password, category, notes) is encrypted client-side using AES-256 (Cipher Block Chaining) before sending it to the server.
- Searching, filtering, duplicate audits, and strength scores are computed entirely in the browser memory after vault decryption.
- Auto-Lock Security:
- The React context monitors user activity (mouse moves, clicks, keystrokes).
- If inactivity exceeds the user-configured timer (1, 5, or 15 minutes), the in-memory
Encryption Keyis wiped, locking the vault.
- Clipboard Auto-Clear:
- Copied passwords are automatically overwritten and cleared from the system clipboard 30 seconds after copying to prevent visual/malware leakage.
- HaveIBeenPwned API Integration (K-Anonymity):
- To check if a password is leaked, the client hashes it locally using SHA-1.
- The client sends only the first 5 characters of the SHA-1 hash to the backend range proxy.
- The backend proxies the list of suffix matches from HaveIBeenPwned, and the client matches the suffix locally. This prevents your IP or full hash from ever being exposed online.
- Dark-Only Theme: Sleek deep dark palette:
#0a0a0f(bg),#12121a(cards),#1a1a2e(surfaces). - Glow Accents: Electric purple
#7c3aedand cyan glow#06b6d4with custom glassmorphic overrides. - Glassmorphism: Elegant cards styled using
backdrop-blur-mdand semi-transparent outlines. - Smooth Animations: Framer Motion transitions for modal sliding, page flips, and micro-interactions.
- Typography: Configured to load clean Google Font Inter.
- Interactive Score: SVG progress ring visually grading vault health.
Vaultme/
├── client/ # React Frontend (Vite)
│ ├── src/
│ │ ├── components/ # Navbar, PasswordCard, PasswordModal, StrengthMeter, Toast
│ │ ├── context/ # AuthContext (sessions, keys), VaultContext (decryption, audit)
│ │ ├── hooks/ # useAutoLock, useClipboard, useBreachCheck
│ │ ├── pages/ # Login, Dashboard, Vault, Generator, Audit, Settings
│ │ ├── utils/ # api.js, encryption.js, passwordStrength.js
│ │ ├── App.jsx # Routing & Keyboard shortcuts
│ │ └── index.css # Tailwind & Glassmorphic stylesheet
│ └── index.html # Font load & SEO setup
│
├── server/ # Express Backend
│ ├── middleware/ # JWT authMiddleware
│ ├── models/ # SQLite db.js schema loader
│ ├── routes/ # auth.js, passwords.js, audit.js routers
│ ├── utils/ # hibp.js Range query client
│ ├── .env # Server configurations
│ └── server.js # Express entry point
- Node.js (v18+ recommended)
- NPM (v9+ recommended)
- Open a terminal and navigate to
/server:cd server - Install dependencies:
npm install
- Run the development server:
The server starts on
npm run dev
http://localhost:5000and creates the SQLite database filevault.db.
If connecting to an external PostgreSQL database (like Neon) using DATABASE_URL, TLS certificate validation is strictly enforced by default. You can customize the TLS connection settings in your .env file using the following options:
DB_SSL_REJECT_UNAUTHORIZED: Set tofalseto disable SSL/TLS certificate verification (only recommended for local development or trusted private networks). Defaults totrue.PGSSLROOTCERT: Specify the path to a custom root CA certificate file if needed to verify your database connection.
- Open a new terminal and navigate to
/client:cd client - Install dependencies:
npm install
- Run the Vite development server:
Open
npm run dev
http://localhost:5173in your browser.
- Navigate to
/server:cd server - Run the native Node.js test runner to verify cryptographic hashing:
npm run test
Ctrl + L/Cmd + L: Instantly lock the vault, wiping keys from memory.Ctrl + K/Cmd + K: Focus the global vault search input from anywhere.