Skip to content
 
 

Repository files navigation

🪙 Spendify

Privacy-First AI-Powered Expense Tracker

Flutter FastAPI Llama 3 License

Spendify seamlessly merges real-time SMS ingestion, encrypted e-statement parsing, and Llama-3 AI categorization — all behind an on-device PII scrubber that ensures your financial data stays yours.


✨ What Makes Spendify Different

Feature Spendify Generic Apps
🔒 Local PII Scrubbing before AI ✅ Yes ❌ Raw data sent to cloud
📱 Real-time SMS auto-tracking ✅ Background listener ⚠️ Manual entry required
🤖 LLM-powered categorization ✅ Llama-3 via Groq ❌ Rule-based only
📄 Password-protected PDF support ✅ pikepdf decryption ❌ Rarely supported
🔁 SHA-256 deduplication ✅ Cross-source dedup ❌ Duplicates on import
📴 Full offline-first SQLite ✅ Local-first ⚠️ Requires connectivity

📱 App Walkthrough

0️⃣ First Launch — Intro Slides

The very first thing a new user sees — a beautiful 3-slide carousel that pitches Spendify's core value props before they create an account.


Slide 1 — Auto SMS Tracking
"Expenses tracked automatically"

Slide 2 — AI Insights
"Understand where your money goes"

Slide 3 — Smart Budgets
"Set budgets. Stay in control."

1️⃣ Onboarding — Understanding Spendify

A sleek 7-step onboarding introduces every core feature of the app — privacy, automation, and intelligence.


Step 1 — Welcome

Step 2 — SMS Tracking

Step 3 — AI Categorization

Step 4 — Privacy First

Step 5 — Statement Import

Step 6 — Budgets

Step 7 — You're Ready!

2️⃣ Authentication — Sign Up & Log In

Secure Firebase-backed authentication with a clean dark-mode UI.


Create Account

Log In

3️⃣ Profile Setup

Personalize your experience: set your name, financial goals, and monthly budget before diving in.

Profile Setup
Profile Setup — Name, Goals & Monthly Budget

4️⃣ Home Dashboard

The command center of Spendify. See your monthly spend overview, today's activity, quick-action buttons, and the AI chat entry point — all at a glance.

Home Dashboard
Home — Live Budget Overview, SMS Status & AI Chat Prompt

💵 Quick Add — Cash Payment

Track cash payments that SMS can't detect. Add amount, merchant, category, and date in seconds.

Add Cash Feature
Add Cash — Quick Entry Sheet for Off-Grid Payments

5️⃣ Statement Import — PDF & CSV Upload

Upload password-protected bank PDFs or CSV exports. Spendify's backend decrypts, parses, scrubs PII, and categorizes everything automatically.


Upload Screen — CSV or PDF

Statement Uploaded Successfully

🔁 Duplicate Detection

Spendify cross-checks every incoming transaction's SHA-256 fingerprint against both the backend DB and your local SQLite — no double entries, ever.

Duplicate Detection
Dedup Engine — Detects Exact & Near-Duplicate Transactions

6️⃣ Transactions — Full Ledger

Every transaction, beautifully organized. Filter by source (SMS / CSV / PDF / Cash), search by merchant or category, and view full details in an interactive sheet.


Transactions Feed

Post-Import State

7️⃣ Insights — AI-Powered Analytics

Visual breakdowns of your spending — category-wise donut charts, monthly trends, and top merchant rankings.


Category Breakdown

Monthly Trends & Top Merchants

8️⃣ Budget Management

Set monthly budgets per category. Live progress bars show exactly how much you've spent vs. what's left before the month ends.

Budget Screen
Budget — Category-Wise Goals with Live Progress

🔄 Recurring Subscriptions

Spendify auto-detects recurring charges in your transaction history and surfaces them in a clean subscription tracker.

Subscriptions
Subscriptions — Auto-Detected Recurring Payments

9️⃣ Profile & Settings

Manage your personal details, toggle SMS auto-tracking, control notification preferences, and review privacy settings.


Profile — User Info & Stats

Profile — Settings & Preferences

🏗️ System Architecture

graph TD
    A[User Transactions] --> B[SMS Messages / E-Statement PDF/CSV]

    subgraph Frontend["📱 Frontend (Flutter + SQLite)"]
        B --> C[another_telephony / File Picker]
        C --> D[Local SQLite DB]
        C --> E[Sync Request to Backend]
    end

    subgraph Backend["⚙️ Backend (FastAPI + Python)"]
        E --> F[SMS / PDF / CSV Parsers]
        F --> G[🔒 PII Scrubber — Presidio NER]
        G --> H[🔁 SHA-256 Deduplication Engine]
        H --> I[🤖 AI Categorization — Groq Llama-3]
        I --> J[SQLite Cache & Response]
    end

    J -->|Parsed & Categorized Transactions| D
Loading

🛠️ Technology Stack

Frontend

Layer Technology
Framework Flutter (Dart 3)
Local Storage sqflite — offline-first SQLite
SMS Listener another_telephony
State Management ChangeNotifier + custom AnimatedBuilder
Auth Firebase Auth
Charts Custom canvas painters + fl_chart

Backend

Layer Technology
Framework FastAPI (Python 3.11+)
PDF Parser pdfplumber + pikepdf (password-decryption)
CSV Parser pandas + numpy
PII Scrubbing presidio-analyzer + presidio-anonymizer (SpaCy NER)
AI Categorization Groq SDK → llama-3.3-70b-versatile
Deduplication SHA-256 fingerprint hashing
Database SQLite via sqlite3

🚀 Installation & Setup

Prerequisites


Step 1 — Backend Setup

# Navigate to backend
cd backend

# Create & activate virtual environment
python -m venv venv
.\venv\Scripts\activate        # Windows
source venv/bin/activate       # macOS / Linux

# Install all dependencies
pip install -r requirements.txt

# Configure your API key
cp .env.example .env
# → Edit .env and add: GROQ_API_KEY="your_key_here"

# Start the FastAPI server (from project root)
cd ..
python -m uvicorn backend.main:app --host 0.0.0.0 --port 8001 --reload

Server runs at http://localhost:8001 · Auto-reloads on file changes


Step 2 — Flutter Frontend

# Install Flutter dependencies
flutter pub get

# Run on connected device / emulator
flutter run

Physical device? Update getBackendUrl() in lib/services/api_service.dart with your machine's local IP (e.g. http://192.168.1.50:8001)


🔒 Privacy & Security Architecture

SMS / Statement Data
        │
        ▼
┌─────────────────────────────┐
│  🔒 PII Scrubber (Local)    │  ← presidio-analyzer strips:
│  Account numbers, UPI IDs,  │    names, phone nos., card digits
│  Phone numbers, Names       │
└──────────────┬──────────────┘
               │  Clean, anonymized data only
               ▼
┌─────────────────────────────┐
│  🔁 SHA-256 Dedup Engine    │  ← Fingerprint: Amount|Date|Desc|Type
│  Exact + Near-duplicate     │    Skips if hash already exists
│  detection across sources   │
└──────────────┬──────────────┘
               │
               ▼
┌─────────────────────────────┐
│  🤖 Groq Llama-3 API        │  ← Only anonymized descriptions sent
│  11-category classifier     │    No PII ever leaves your device
└──────────────┬──────────────┘
               │
               ▼
      Local SQLite (on-device)
      Full offline capability

📁 Project Structure

Spendify/
├── lib/                          # Flutter frontend
│   ├── main.dart
│   ├── screens/
│   │   ├── home/home_screen.dart # Dashboard + all bottom sheets
│   │   ├── transactions/
│   │   ├── insights/
│   │   ├── budget/
│   │   └── profile/
│   ├── services/
│   │   ├── api_service.dart      # FastAPI client
│   │   └── app_state.dart        # Global state
│   └── widgets/
│
├── backend/                      # FastAPI Python backend
│   ├── main.py                   # App entrypoint
│   ├── upload.py                 # Statement + SMS endpoints
│   ├── categorizer.py            # Groq Llama-3 integration
│   ├── pii_scrubber.py           # Presidio PII removal
│   ├── csv_parser.py             # Pandas CSV parser
│   ├── pdf_parser.py             # pdfplumber + pikepdf
│   ├── database.py               # SQLite ORM
│   ├── services/
│   │   ├── fingerprint_service.py
│   │   ├── duplicate_detector.py
│   │   └── normalization_service.py
│   ├── sms_parsers/              # Bank-specific SMS regex
│   │   ├── hdfc_parser.py
│   │   ├── sbi_parser.py
│   │   ├── icici_parser.py
│   │   └── upi_parser.py
│   ├── requirements.txt
│   └── .env.example
│
└── app_v1_images/                # App screenshots

Built with 💚 by iDEA ClUB Amrita

Spendify — because your money deserves intelligence, not just spreadsheets.

About

Spendify is an AI-powered personal finance and expense tracking App developed by the iDEA Club, Amrita Vishwa Vidyapeetham. It helps users monitor spending, analyze financial habits, gain AI-driven insights, and make smarter budgeting decisions through an intuitive cross-platform experience.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages