Skip to content
harsh-foundPublic

About

πŸ”‘ Privacy-First Account Ledger, Sign-in Auditor & Security Vault built with React 19, TypeScript & Vite

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

1 Commit

Folders and files

Repository files navigation

πŸ”‘ KeyHold

Privacy-First Account Ledger, Sign-in Auditor & Security Vault

React TypeScript Vite Tailwind CSS Framer Motion Security Audit License: MIT

Never forget how you signed up. Never leave an account unshielded.
A zero-knowledge personal ledger for tracking authentication methods, auditing 2FA coverage, and generating cryptographically secure credentials entirely in your browser.

Core Problem β€’ Key Features β€’ Security Health Engine β€’ Directory Structure β€’ Getting Started β€’ Deployment β€’ Keyboard Shortcuts


🎯 The Problem KeyHold Solves

Modern web users hold hundreds of accounts across online services. The biggest point of friction and security vulnerability is authentication sprawl:

  • Did you sign up with Sign in with Google, your personal email, an Apple relay address, or a temporary disposable inbox?
  • Which critical services still lack Two-Factor Authentication (2FA)?
  • Where have you stored passwords that need rotation?
  • Cloud-based password managers are frequent targets of high-profile data breaches.

KeyHold solves this by acting as your offline-first personal authentication ledger. All data resides exclusively in your browser's local sandbox (localStorage). No servers, no tracking, no subscription fees.


✨ Key Features

1. πŸ›‘οΈ Identity & Sign-In Method Mapping

  • Authentication Method Tracking: Categorize accounts by sign-in type: Google / OAuth, Email & Password, Phone / SMS, Temporary Email, or Passkeys / WebAuthn.
  • Verification Vectors: Record verification types: OAuth, OTP, Password, Magic Link, and Passkey.
  • Provider Identity Badges: Auto-renders visual brand badges and icons for services like Google, GitHub, Apple, Discord, Twitter, and custom URLs.

2. πŸ₯ Security Health Engine

KeyHold runs continuous real-time diagnostic checks across your account ledger:

  • 2FA Audit: Highlights accounts without two-factor authentication enabled.
  • Vulnerability Scorer: Calculates an overall Health Percentage score based on 2FA adoption, password hygiene, and verification safety.
  • Duplicate Password Detection: Warns if the same password string is reused across multiple services.
  • Archival Status: Mark stale accounts as Active, Inactive, or Archived to keep your digital footprint tidy.

3. 🎲 Cryptographically Secure Password Generator

  • Built on the native Web Crypto API (window.crypto.getRandomValues), avoiding predictable pseudorandom math.
  • Configurable character sets: Uppercase (A-Z), Lowercase (a-z), Digits (0-9), and Special Symbols (!@#$%^&*).
  • Avoid ambiguous characters (l, 1, I, O, 0) with 1-click preset lengths (12 to 64 characters).

4. πŸ”’ Zero-Trust Privacy Safeguards

  • Auto-Masking: Passwords and sensitive identifiers are masked by default. Reveal them with a momentary click.
  • Clipboard Auto-Purge: Automatic background timer purges copied passwords from your operating system clipboard after 15, 30, or 60 seconds.
  • 100% Offline-First: Zero network requests are made. Inspect the network tabβ€”KeyHold functions seamlessly completely disconnected from the internet.

5. πŸ—‚οΈ Flexible View Layouts & Ergonomics

Switch between 3 distinct presentation modes depending on your workflow:

  • Card (Grid) Mode: Rich cards with category badges, security tags, notes, and visual actions.
  • List (Table) Mode: Compact table view with sortable columns for fast scanning.
  • Compact (Dense) Mode: Ultra-dense list layout ideal for large collections of 200+ accounts.

6. 🎨 Multi-Palette Theme Engine

Choose from curated themes tailored for day and night:

  • Themes: Slate, Obsidian, Midnight, Forest, and Amber.
  • System-aware automatic dark/light theme switching.
  • Font scaling adjustments: Small, Medium, and Large.

7. ⌨️ Global Command Palette (⌘K / Ctrl+K)

  • Instant keyboard-driven lookup across service names, usernames, tags, and categories.
  • Trigger quick actions: Create new account, toggle dark mode, export backup, or audit security health.

8. πŸ’Ύ Portable Backup & Restore

  • Full JSON Export / Import functionality.
  • Easily migrate your encrypted ledger between browsers, machines, or cold storage drives.

πŸ—οΈ Architecture & Data Model

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                       Client Browser                        β”‚
β”‚                                                             β”‚
β”‚   [User Input] ──► [Input Sanitation & Normalization]        β”‚
β”‚                           β”‚                                 β”‚
β”‚                           β–Ό                                 β”‚
β”‚        [Security Health Auditor & Strength Evaluator]       β”‚
β”‚                           β”‚                                 β”‚
β”‚          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                β”‚
β”‚          β–Ό                                 β–Ό                β”‚
β”‚   [State Dispatcher]              [Web Crypto Generator]    β”‚
β”‚          β”‚                                                  β”‚
β”‚          β–Ό                                                  β”‚
β”‚   [Local Storage Adapter] (Encrypted JSON payload)          β”‚
β”‚          β”‚                                                  β”‚
β”‚          β–Ό                                                  β”‚
β”‚   [Command Palette (⌘K) & Responsive Multi-Layout Views]    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Account Schema (src/lib/types.ts)

export interface Account {
  id: string;
  service: string;
  url?: string;
  iconUrl?: string;
  signInMethod: 'gmail' | 'email' | 'phone' | 'tempmail' | 'other';
  identifier?: string;
  verification: 'oauth' | 'otp' | 'password' | 'magiclink' | 'passkey';
  password?: string;
  savePassword: boolean;
  category: string;
  tags: string[];
  notes?: string;
  twoFactor: boolean;
  favorite: boolean;
  status: 'active' | 'inactive' | 'archived';
  username?: string;
  recoveryEmail?: string;
  backupCodes?: boolean;
  createdAt: string;
  updatedAt: string;
}

πŸ“ Directory Structure

web/KeyHold/
β”œβ”€β”€ public/                       # Static web icons and manifest assets
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/               # Accessible modular UI components
β”‚   β”‚   β”œβ”€β”€ AccountCard.tsx       # Grid card with interactive actions & 2FA badge
β”‚   β”‚   β”œβ”€β”€ AccountListItem.tsx   # Row item for table and compact view modes
β”‚   β”‚   β”œβ”€β”€ AccountModal.tsx      # Comprehensive account creation & edit form
β”‚   β”‚   β”œβ”€β”€ CommandPalette.tsx    # ⌘K instant search & global action dispatcher
β”‚   β”‚   β”œβ”€β”€ ConfirmDialog.tsx     # Modal confirmation for destructive deletes
β”‚   β”‚   β”œβ”€β”€ Field.tsx             # Accessible form input & validation wrapper
β”‚   β”‚   β”œβ”€β”€ SecurityHealth.tsx    # Real-time health scoring & vulnerability report
β”‚   β”‚   β”œβ”€β”€ ServiceIcon.tsx       # Dynamic brand icon generator with fallbacks
β”‚   β”‚   β”œβ”€β”€ SettingsPage.tsx      # Theme selector, font scaling, clipboard settings
β”‚   β”‚   β”œβ”€β”€ StatsBar.tsx          # Quick stat chips (Total, 2FA %, Passwords, Favs)
β”‚   β”‚   └── Toast.tsx             # Micro-interaction notifications
β”‚   β”œβ”€β”€ lib/                      # Core ledger logic, storage & encryption
β”‚   β”‚   β”œβ”€β”€ hooks.ts              # Custom React hooks (settings, keyboard listeners)
β”‚   β”‚   β”œβ”€β”€ meta.tsx              # Icons & metadata for sign-in methods & categories
β”‚   β”‚   β”œβ”€β”€ store.ts              # LocalStorage CRUD, export/import & password generator
β”‚   β”‚   β”œβ”€β”€ themes.ts             # Palette definitions (Slate, Midnight, Forest, Amber)
β”‚   β”‚   β”œβ”€β”€ types.ts              # Strong TypeScript interfaces and schemas
β”‚   β”‚   └── utils.ts              # Styling helpers (clsx/cn) and sanitizers
β”‚   β”œβ”€β”€ App.tsx                   # Main layout coordinator, filter pipeline & hotkeys
β”‚   β”œβ”€β”€ index.css                 # Tailwind CSS v4 design tokens and theme variables
β”‚   └── main.tsx                  # React 19 entry point
β”œβ”€β”€ eslint.config.js              # ESLint 9 configuration
β”œβ”€β”€ index.html                    # Single Page Application HTML5 entry point
β”œβ”€β”€ package.json                  # Dependencies and build scripts
β”œβ”€β”€ tsconfig.json                 # TypeScript compiler configuration root
β”œβ”€β”€ tsconfig.app.json             # App-specific TS rules
β”œβ”€β”€ tsconfig.node.json            # Vite/Node configuration
└── vite.config.ts                # Vite 7 build configuration with Tailwind plugin

πŸš€ Getting Started

Prerequisites

  • Node.js: v20.x or later
  • Package Manager: npm, pnpm, or bun

Installation

  1. Navigate to the project directory:

    cd /home/code/projects/web/KeyHold
  2. Install dependencies:

    npm install
  3. Start the development server:

    npm run dev

    Open http://localhost:5173 in your browser.


πŸ› οΈ Build & Scripts

Command Description
npm run dev Runs the Vite local development server with HMR.
npm run build Validates TypeScript types and compiles static bundle into dist/.
npm run preview Runs a local web server to preview the production build.
npm run lint Runs ESLint across all TypeScript and React components.

☁️ Deployment

KeyHold is a completely static, zero-backend Single Page Application (SPA). It can be deployed to any static host or CDN in seconds.

Deploy to Cloudflare Pages via Wrangler

# Build the project
npm run build

# Deploy to Cloudflare Pages
npx wrangler pages deploy dist --project-name keyhold

Deploy to GitHub Pages / Vercel

Simply link the repository to Vercel or GitHub Pages:

  • Framework: Vite
  • Build Command: npm run build
  • Output Directory: dist

⌨️ Keyboard Shortcuts

Key Description
⌘K / Ctrl+K Open / Close Command Palette
N Open "Add New Account" modal
/ Focus search bar
Esc Close active modal, drawer, or clear search
? Toggle keyboard shortcuts guide

πŸ” Threat Model & Security Principles

  • Zero Network Footprint: KeyHold does not possess an external API client or analytics beacon. Your credentials never touch the wire.
  • Local Sandboxing: Data is bound to your browser's origin. Extensions without storage permissions cannot access the ledger.
  • Browser Storage Advisory: Because data is kept in localStorage, clearing your browser history or site data will delete your vault. Always maintain an exported JSON backup in a secure location.

Take back control of your digital identities with KeyHold.

About

πŸ”‘ Privacy-First Account Ledger, Sign-in Auditor & Security Vault built with React 19, TypeScript & Vite

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages