Offline-first. Encrypted. Intelligent. Beautiful.
XpensFlow is a next-generation progressive web app (PWA) that helps you track expenses, budgets, and insights β even without the internet.
Designed for privacy-first finance, it features zero-knowledge encryption, AI-powered insights, and a developer-grade debugging system.
β
Offline-First: Works without internet using IndexedDB
β
AES-256 Encryption: Zero-knowledge encryption model
β
PWA: Installable as a native app
β
Voice Input: Add expenses by voice
β
Dark Mode: Automatic theme switching
β
Analytics: Interactive charts with Recharts
β
Budget Tracking: Set and monitor budgets
β
Financial Score: Gamified financial health insights
β
Export/Import: Backup and restore securely
β
Responsive: Works seamlessly across all devices
- PBKDF2 with 310k iterations
- AES-GCM 256-bit encryption
- SHA-256 integrity checksums
- Auto-lock with configurable timeout
- PIN strength validation
(No plaintext data or keys ever leave the device.)
- Encrypted IndexedDB wrapper
- Versioned backups (keeps last 3)
- Automatic cleanup and compaction
- Storage usage tracking
- Data restore functionality
- 9 types of financial insights
- Statistical anomaly detection
- Month-over-month comparison
- Spending pattern recognition
- Budget compliance tracking
| File | Description |
|---|---|
ErrorBoundary.jsx |
Professional error handling and recovery UI |
DebugOverlay.jsx |
Live developer console with performance metrics |
InsightsDashboard.jsx |
Visualizes trends, anomalies, and savings |
OnboardingWizard.jsx |
Intuitive 4-step user onboarding |
KeyboardShortcutsHelp.jsx |
In-app modal listing available shortcuts |
| File | Description |
|---|---|
useKeyboardShortcuts.js |
15+ global shortcuts (Ctrl+K, Ctrl+D, etc.) |
| Integration Guide | Detailed developer setup and usage guide |
| Docs | Comprehensive documentation for all modules |
- Zero-knowledge encryption β only salt stored
- PBKDF2 key derivation (310,000 iterations)
- AES-GCM 256-bit encryption
- SHA-256 integrity checksums
- Auto-lock after inactivity
- PIN validation (must include letters + numbers)
- Spending pattern detection using z-score analysis
- Month-over-month comparisons
- Anomaly detection for unusual spending
- Budget compliance tracking
- Spending rhythm analysis (best/worst days)
- Savings potential calculator
- Smart recommendations powered by statistical models
- Real-time debug overlay with performance stats
- Error boundary with persistent logs
- 15+ keyboard shortcuts for power users
- Performance & memory monitoring
- Error tracking (last 10 exceptions)
- Auto-lock after inactivity
| Layer | Technology |
|---|---|
| Frontend | React + Vite + TailwindCSS |
| State | Zustand / Redux Toolkit |
| Storage | Encrypted IndexedDB |
| Encryption | WebCrypto API (AES-GCM + PBKDF2) |
| Charts | Recharts / Chart.js |
| PWA | Service Workers + Manifest |
| Voice Input | Web Speech API |
| Testing | Vitest / React Testing Library |
src/ βββ core/ β βββ SecurityManager.js β βββ DatabaseManager.js β βββ IntelligenceEngine.js βββ components/ β βββ ErrorBoundary.jsx β βββ DebugOverlay.jsx β βββ InsightsDashboard.jsx β βββ OnboardingWizard.jsx β βββ KeyboardShortcutsHelp.jsx βββ hooks/ β βββ useKeyboardShortcuts.js βββ assets/ βββ pages/ βββ utils/
-
Zero-Knowledge Encryption:
- All user data is encrypted locally before storage.
- Master key is derived from user PIN using PBKDF2 (310k iterations).
- AES-GCM ensures both confidentiality and integrity.
-
Smart Insights:
- The
IntelligenceEngineanalyzes patterns, flags anomalies, and generates month-over-month analytics. - All insights run client-side for privacy.
- The
-
Offline-First Database:
- The
DatabaseManageruses an encrypted IndexedDB layer. - Keeps 3 rolling backups with versioning.
- Tracks storage usage and cleans stale data.
- The
-
Auto-Lock:
- App locks automatically after inactivity or when tab is hidden.
- Requires PIN re-entry to decrypt data.
# Clone the repository
git clone https://github.com/mr-574rk/xpensflow.git
# Enter project directory
cd xpensflow
# Install dependencies
npm install
# Start development server
npm run dev
Then open http://localhost:5173 in your browser.
π§ͺ Testing
bash
Copy code
npm run test
Unit tests for core modules (SecurityManager, DatabaseManager, IntelligenceEngine)
Integration tests for encryption and error boundaries
π¦ Build for Production
bash
Copy code
npm run build
npm run preview
π‘οΈ Security Principles
Zero-knowledge: No sensitive data leaves the userβs device.
Immutable backups: Each backup version is integrity-checked via SHA-256.
Strong encryption: AES-GCM 256-bit + PBKDF2 (310k iterations).
Auto-lock: Session timeout + tab visibility lock.
PIN rules: Enforced strength validation and entropy checks.
π§ Roadmap
Stage Features
β
v1.0 Core encryption, insights, charts
π§ v1.1 Cloud sync (end-to-end encrypted)
π v2.0 Shared budgets + collaborative finance
π v3.0 AI-powered financial forecasting
π§βπΌ Contributing
We welcome PRs that:
Improve performance, security, or developer experience
Add new types of insights
Enhance accessibility or UX
Please run all tests and lint before submitting:
bash
Copy code
npm run lint && npm run test
π§Ύ License
This project is released under the MIT License.
See LICENSE for details.
π¬ Credits
Designed & Engineered by [Mr Stark]
π§ [gh0ztsurg3@gmail.com]
π [mr574rk.dev]
π‘ βTrack smarter. Spend wiser. Stay secure β even offline.β