Skip to content
VAIBHAV7848Public

About

Sleek personal finance and budget tracking dashboard with interactive analytics and offline data synchronization.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

💰 ExpenseIQ — Smart Financial Management Platform

Offline-First Personal Finance Dashboard with Real-Time Analytics & Cloud Sync

Award Live Demo JavaScript PWA Ready IndexedDB Supabase License: MIT

ExpenseIQ is a high-performance, offline-first personal budgeting and expense management web application. Built natively with Vanilla JavaScript ES Modules, HTML5, and CSS3 Glassmorphism, it delivers fluid 60fps animations and instant local interactions without heavy framework bundle overhead.

🏆 Award: Won the 1st Prize / Best Project Award in College for the Web Technology (WebTech) course for exceptional UI craftsmanship, offline-first architecture, and secure cloud synchronization.

Key Features • Offline-First Architecture • AI & Edge Services • Project Structure • Setup & Installation


🌟 Key Features

  • ⚡ Zero-Latency Local Operations: All transactions, budget updates, and category changes execute instantly against client-side IndexedDB, guaranteeing flawless offline usage.
  • 🔄 Resilient Cloud Synchronization: Multi-device cloud sync powered by Supabase PostgreSQL with automated conflict resolution, exponential retry queues, and network state detection.
  • 📊 Interactive Financial Analytics: Visual balance trends, spending breakdowns, and month-over-month comparisons powered by Chart.js.
  • 🧾 AI Receipt Vision Scanner: Automated receipt image extraction parsing date, merchant, total amount, and category mapping (js/receiptScanner.js, js/services/scannerService.js).
  • 💬 AI Financial Advisor: Integrated conversational assistant providing spending insights and budget recommendations (js/ai.js, js/components/aiChat.js).
  • 🎯 Budgets, Goals & Debt Management:
    • Dynamic category budgets with real-time percentage indicators and overspend alerts.
    • Savings goals with target deadlines and automated progress calculations.
    • Dedicated debt tracker for loans, borrowing, and repayment schedules.
  • 📱 PWA & Offline Support: Progressive Web App with Web App Manifest (manifest.json) and Service Worker (sw.js) for full home-screen installation and offline asset caching.
  • 🔔 Notifications & Edge Alerts:
    • Twilio SMS alerts for budget threshold breaches via Supabase Edge Functions (supabase/functions/send-sms/).
    • Web Push notifications via VAPID standard (supabase/functions/send-push/).
  • 🛡️ Secure Multi-User Auth: Google OAuth and Email sign-in backed by Supabase with Row Level Security (RLS) guaranteeing tenant isolation.

🏛️ Offline-First Architecture

                  +--------------------------------+
                  |     ExpenseIQ Web App (UI)     |
                  +---------------+----------------+
                                  |
                   read / write   | (zero latency)
                                  v
                  +--------------------------------+
                  |  IndexedDB Local Store         |
                  |  (offlineStore.js)             |
                  +---------------+----------------+
                                  |
              Network Status      | (networkDetector.js)
              +-------------------+-------------------+
              |                                       |
       [Online: Connected]                   [Offline: Disconnected]
              |                                       |
              v                                       v
    +--------------------+                  +--------------------+
    | Sync Engine        |                  | Retry Queue        |
    | (syncEngine.js)    |                  | (retryQueue.js)    |
    +---------+----------+                  +--------------------+
              |
              | 2-Way Sync & Conflict Resolution (conflictResolver.js)
              v
    +--------------------+
    | Supabase Postgres  |
    | (PostgreSQL + RLS) |
    +--------------------+

🤖 AI & Edge Services

  1. Receipt Vision Scanner (js/services/):
    • scannerService.js: Processes receipt camera uploads or files.
    • extractionValidator.js: Validates extracted currency values, ISO dates, and merchant strings.
    • categoryMapper.js: Maps detected merchant keywords to predefined user categories.
  2. AI Financial Advisor (js/components/aiChat.js):
    • Analyzes real-time user spending distributions and generates actionable saving suggestions via the AI proxy (api/ai-proxy.js).
  3. Supabase Edge Functions (supabase/functions/):
    • send-sms: Dispatches real-time SMS notifications via Twilio when monthly category budget thresholds are crossed.
    • send-push: Dispatches background Web Push notifications for periodic budget check-ins.

📁 Project Structure

├── api/                     # Serverless proxy endpoints (ai-proxy.js, send-sms.js)
├── css/                     # Glassmorphic component styles
│   ├── animations.css       # Keyframes & transitions
│   ├── dashboard.css        # Metric cards & summary layout
│   ├── layout.css           # Shell, header, and sidebar styling
│   └── sync.css             # Sync indicator & offline banner styles
├── js/
│   ├── app.js               # Application bootstrap & event orchestration
│   ├── auth.js              # Supabase authentication handling
│   ├── router.js            # Client-side hash router
│   ├── store.js             # Global state controller
│   ├── components/          # Reusable UI components (charts.js, aiChat.js, etc.)
│   ├── pages/               # Page controllers (dashboard, budgets, transactions, debts)
│   ├── services/            # Receipt OCR and validation services
│   └── sync/                # Offline sync engine
│       ├── offlineStore.js  # IndexedDB CRUD operations
│       ├── syncEngine.js    # Remote Supabase synchronization coordinator
│       ├── conflictResolver.js # Last-write-wins & merging rules
│       └── retryQueue.js    # Queued writes during disconnection
├── supabase/
│   ├── functions/           # Edge Functions (send-sms, send-push)
│   └── migrations/          # PostgreSQL schema & RLS policies
├── build.js                 # Image optimization build script
├── manifest.json            # PWA manifest
├── sw.js                    # Service Worker caching engine
└── supabase_schema.sql      # Database initialization DDL

⚙️ Environment Variables

Create a .env file in the project root based on .env.example:

# ============================================================
# Supabase Configuration
# ============================================================
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_ANON_KEY=your_publishable_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key

# ============================================================
# Twilio Configuration (Edge Functions)
# ============================================================
TWILIO_ACCOUNT_SID=your_twilio_account_sid
TWILIO_AUTH_TOKEN=your_twilio_auth_token
TWILIO_PHONE_NUMBER=+1234567890

# ============================================================
# AI & Push Notifications
# ============================================================
GROQ_API_KEY=your_groq_api_key
VAPID_PUBLIC_KEY=your_vapid_public_key
VAPID_PRIVATE_KEY=your_vapid_private_key

🚦 Setup & Installation

1. Clone the Repository

git clone https://github.com/VAIBHAV7848/ExpenseIQ.git
cd ExpenseIQ

2. Configure Database

  1. Create a project at supabase.com.
  2. Run the SQL script supabase_schema.sql in your Supabase SQL Editor to initialize tables and Row Level Security policies.
  3. Copy .env.example to .env and fill in your Supabase keys.

3. Run Locally

Because ExpenseIQ uses standard ES6 modules, it can be served using any static HTTP server:

# Using Python
python3 -m http.server 8080

# Or using npx serve
npx serve .

Navigate to http://localhost:8080 in your web browser.

4. Build Assets (Optional)

npm install
npm run build

📄 License

Distributed under the MIT License. See LICENSE for more information.

About

Sleek personal finance and budget tracking dashboard with interactive analytics and offline data synchronization.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages