A secure, modern web application for managing your personal banking credentials with AES-256 encryption. Built with Next.js 15, TypeScript, and Tailwind CSS.
Lockbox is a comprehensive personal banking credential management system that allows users to securely store, manage, and access their banking information. All sensitive data is encrypted using AES-256-CBC encryption before storage, ensuring your banking credentials remain protected.
- AES-256 Encryption: All sensitive banking data is encrypted using AES-256-CBC encryption before storage
- Multi-user Support: Create separate accounts for different users, each with their own master password
- Secure Authentication: User authentication with master password protection
- OTP Verification: Optional OTP (One-Time Password) verification for viewing bank details via Twilio SMS integration
- Add Bank Accounts: Store multiple bank accounts with comprehensive details
- Edit Bank Information: Update bank credentials securely
- Delete Banks: Remove bank accounts with confirmation dialogs
- View Bank Details: Securely view decrypted bank information with OTP verification
- Custom Fields: Add custom fields for additional bank-specific information (SWIFT codes, routing numbers, etc.)
- Search & Filter: Real-time search by bank name or account number
- Sort Banks: Sort banks by name (A-Z, Z-A) or account number (ascending/descending)
- Bank Count Badge: View total number of banks in the header
- CSV Export: Export bank list to CSV format with proper formatting
- User Registration: Create new user accounts with unique usernames
- Password Management: Change master password securely
- User Profile: View and manage user information
- Dark Mode: Switch between light, dark, and system themes
- Responsive Design: Fully responsive interface built with Tailwind CSS
- Modern UI: Built with ShadCN UI components for a polished, professional look
- Toast Notifications: User-friendly feedback for all actions
- Loading States: Visual feedback during data operations
- Copy to Clipboard: One-click copy for passwords and usernames in bank details view
- Next.js 15.3.3 - React framework with App Router
- React 18 - UI library
- TypeScript 5 - Type-safe development
- Tailwind CSS 3.4 - Utility-first CSS framework
- ShadCN UI - High-quality React component library
- React Hook Form - Form state management
- Zod - Schema validation
- Lucide React - Icon library
- next-themes - Theme management
- Next.js Server Actions - Server-side operations
- Node.js Crypto - Encryption/decryption
- Twilio (optional) - SMS OTP delivery
- MongoDB - User data stored in MongoDB database
- Connection string configured via
MONGODB_URIenvironment variable
- Connection string configured via
- Node.js 18+
- npm or yarn package manager
- (Optional) Twilio account for SMS OTP functionality
-
Clone the repository
git clone <repository-url> cd Lockbox-main
-
Install dependencies
npm install
-
Set up environment variables
Create a
.env.localfile in the root directory:# Encryption key (must be exactly 32 characters) ENCRYPTION_KEY=your-super-secret-32-character-key # MongoDB Connection String # Get your connection string from MongoDB Atlas or your local MongoDB instance # Format: mongodb://username:password@host:port/database # Example: mongodb+srv://username:password@cluster.mongodb.net/ MONGODB_URI=your_mongodb_connection_string_here # MongoDB Database Name (optional, defaults to 'lockbox') MONGODB_DB_NAME=lockbox # Optional: Twilio credentials for SMS OTP TWILIO_ACCOUNT_SID=your_twilio_account_sid TWILIO_AUTH_TOKEN=your_twilio_auth_token TWILIO_PHONE_NUMBER=your_twilio_phone_number
Important:
- The
ENCRYPTION_KEYmust be exactly 32 characters long. Generate a strong, random key for production use. - The
MONGODB_URIis required. You can get a free MongoDB Atlas cluster at mongodb.com/cloud/atlas
- The
-
Run the development server
npm run dev
-
Open your browser
Navigate to http://localhost:3000
Lockbox-main/
βββ src/
β βββ app/ # Next.js app directory
β β βββ layout.tsx # Root layout
β β βββ page.tsx # Home page
β β βββ globals.css # Global styles
β βββ components/ # React components
β β βββ banks/ # Bank-related components
β β β βββ BankCard.tsx
β β β βββ BankFormDialog.tsx
β β β βββ BankList.tsx
β β β βββ DeleteBankDialog.tsx
β β β βββ DeleteConfirmationDialog.tsx
β β β βββ OtpDialog.tsx
β β β βββ ViewBankDetailsDialog.tsx
β β βββ ui/ # ShadCN UI components
β β βββ ChangePasswordDialog.tsx
β β βββ Header.tsx
β β βββ HomePage.tsx
β β βββ LoginScreen.tsx
β β βββ SignUpDialog.tsx
β β βββ ThemeProvider.tsx
β β βββ ThemeToggle.tsx
β βββ data/ # Data storage (legacy - migrated to MongoDB)
β β βββ users.json # User and bank data (legacy JSON file)
β βββ hooks/ # Custom React hooks
β β βββ use-mobile.tsx
β β βββ use-toast.ts
β βββ lib/ # Core utilities
β βββ actions.ts # Server actions
β βββ db.ts # MongoDB connection utilities
β βββ encryption.ts # Encryption utilities
β βββ otp.ts # OTP generation and verification
β βββ types.ts # TypeScript types
β βββ utils.ts # Utility functions
βββ package.json
βββ tsconfig.json
βββ tailwind.config.ts
βββ next.config.ts
- All sensitive banking data (passwords, PINs, custom fields) is encrypted using AES-256-CBC
- Each encryption uses a unique initialization vector (IV) for enhanced security
- Encryption key is stored in environment variables (never in code)
- Master passwords are stored in plain text (for demo purposes)
- Note: In production, use bcrypt or similar for password hashing
- Bank credentials are never stored in plain text
- Decrypted data is only available in memory during viewing
- Optional OTP verification for viewing bank details
- OTPs expire after 5 minutes
- Single-use OTPs (deleted after successful verification)
- SMS delivery via Twilio (optional)
- Click "Sign Up" on the login screen
- Enter a unique username (minimum 3 characters)
- Enter a master password (minimum 8 characters)
- Click "Create Account"
- Log in with your credentials
- Click "Add Bank" in the header
- Fill in the bank details:
- Bank name
- Phone number for OTP
- Account number
- Net banking username and password
- Mobile banking username and password
- ATM PIN (optional)
- Custom fields (optional)
- Click "Save"
- Click "View" on any bank card
- Enter OTP if OTP verification is enabled
- View decrypted bank information
- Click "Edit" on any bank card
- Update the information
- Click "Save"
- Click "Delete" on any bank card
- Confirm deletion in the dialog
- Click your username in the header
- Select "Change Password"
- Enter current password and new password
- Confirm the new password
- Use the search box above the bank list
- Type bank name or account number to filter
- Results update in real-time as you type
- Click the X button to clear the search
- Use the "Sort by" dropdown above the bank list
- Choose from:
- Name (A-Z) - Alphabetical ascending
- Name (Z-A) - Alphabetical descending
- Account (Asc) - Account number ascending
- Account (Desc) - Account number descending
- Sorting works in combination with search filters
- Click "Export CSV" button above the bank list
- The filtered and sorted bank list will be exported
- File downloads as
lockbox-banks-YYYY-MM-DD.csv - Includes bank name and account number
- Can be opened in Excel, Google Sheets, or any CSV viewer
# Start development server
npm run dev
# Build for production
npm run build
# Start production server
npm start
# Run type checking
npm run typecheck
# Run linting
npm run lint-
Database: The application now uses MongoDB for data storage. Ensure your MongoDB instance is properly secured and backed up.
-
Password Hashing: Master passwords are currently stored in plain text. Implement bcrypt or Argon2 for password hashing in production
-
Encryption Key Management: Use a proper secrets management system (AWS Secrets Manager, HashiCorp Vault, etc.) instead of environment variables
-
HTTPS: Always use HTTPS in production to protect data in transit
-
Rate Limiting: Implement rate limiting for login attempts and OTP generation
-
Audit Logging: Add logging for security events (login attempts, data access, etc.)
-
Backup Strategy: Implement regular backups of the data file/database
Contributions are welcome! Please feel free to submit a Pull Request.
This project is private and proprietary.
Disclaimer: This application is for educational and personal use. Ensure you comply with all applicable laws and regulations regarding data protection and privacy in your jurisdiction.