Skip to content

ankit-sengupta05/Smart-Budget-Manager

Repository files navigation


🌐 The Problem We Solve

You spend ₹850 on Swiggy.
Your bank sends an SMS.
SmartBudget reads it.
It's already categorized. Done.

No manual entry. No receipt scanning. No remembering.


⚡ Feature Showcase

🔍 Smart SMS Parser

Input SMS:
"Rs.1,250.00 debited from A/c
XX1234 at ZOMATO on 10-03-2026"

Output:
✅ Amount   → ₹1,250
✅ Merchant → Zomato
✅ Category → Food
✅ Date     → 10 Mar 2026

📊 Live Dashboard

💰 Total Spent    ₹24,890
📅 This Month     ₹8,340

🍕 Food           ₹3,200  ████████░░
🚗 Transport      ₹1,800  █████░░░░░
🛍️ Shopping       ₹2,100  ██████░░░░
⚡ Utilities      ₹1,240  ████░░░░░░

🔐 Bank-grade Security

🔒 Firebase Authentication
🗄️ Firestore encrypted storage
👤 Per-user data isolation
🚫 Zero data sharing
🛡️ Firestore security rules

🏷️ Auto-categorization

Zomato / Swiggy      → 🍕 Food
Uber / Ola / Metro   → 🚗 Transport
Amazon / Flipkart    → 🛍️ Shopping
Netflix / Spotify    → 🎬 Entertainment
Apollo / MedPlus     → 🏥 Health
Jio / Airtel / BSNL  → ⚡ Utilities
BigBasket / Blinkit  → 🛒 Groceries

🏗️ Architecture

┌─────────────────────────────────────────────────────────┐
│                   SmartBudget Manager                    │
├─────────────────┬───────────────────┬───────────────────┤
│   📱 UI Layer   │  ⚙️ Logic Layer   │  ☁️ Cloud Layer   │
│                 │                   │                   │
│  LoginScreen    │   smsParser.js    │  Firebase Auth    │
│  Dashboard      │   transactionStore│  Firestore DB     │
│  ImportScreen   │   AuthContext     │  Security Rules   │
│  Settings       │   AppNavigator    │  Cloud Backup     │
├─────────────────┴───────────────────┴───────────────────┤
│              🔐 Pre-commit Security Layer                │
│   mask_keys.py  │  compile_check.py │  GitHub Actions   │
└─────────────────────────────────────────────────────────┘

🛠️ Tech Stack

Layer Technology Purpose
📱 UI React Native Cross-platform mobile UI
🏗️ Build Expo Dev tooling & builds
🔐 Auth Firebase Secure login
🗄️ DB Firestore Cloud database
🧭 Nav React Navigation Tab routing
📈 Charts Chart Kit Pie chart visuals
🔑 Env dotenv Secret management
📅 Dates date-fns Date formatting

📋 Prerequisites

Make sure you have all of these before starting

node --version    # Need 18+
python --version  # Need 3.10+
git --version     # Any recent version

🚀 Quick Start

Step 1 — Clone

git clone https://github.com/ankit-sengupta05/SmartBudgetManager.git
cd SmartBudgetManager

Step 2 — Install

npm install
npx expo install expo-asset expo-font expo-secure-store expo-constants
npx expo install @react-native-async-storage/async-storage
npm install dotenv

Step 3 — Firebase Setup

1. 🔥 Go to console.firebase.google.com
2. ➕ Create project → "SmartBudgetManager"
3. 🔐 Authentication → Enable Email/Password
4. 🗄️ Firestore → Create database → Test mode
5. 📍 Region → asia-south1 (Mumbai)
6. ⚙️ Project Settings → Your Apps → Copy config

Step 4 — Environment Variables

Create .env in project root:

FIREBASE_API_KEY=******
FIREBASE_AUTH_DOMAIN=******
FIREBASE_PROJECT_ID=******
FIREBASE_STORAGE_BUCKET=******
FIREBASE_MESSAGING_SENDER_ID=******
FIREBASE_APP_ID=******

🚨 NEVER commit .env to git. Pre-commit hooks will auto-mask any leaked keys.

Step 5 — Firestore Security Rules

In Firebase Console → Firestore → Rules tab:

rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    match /transactions/{docId} {
      allow read, write: if request.auth != null
        && request.auth.uid == resource.data.userId;
      allow create: if request.auth != null
        && request.auth.uid == request.resource.data.userId;
    }
  }
}

Step 6 — Launch 🎉

npx expo start --clear

Scan the QR code with Expo Go and you're live!


📦 Build APK

# Install EAS CLI
npm install -g eas-cli

# Login to Expo
npx eas-cli login

# Build APK
npx eas-cli build --platform android --profile preview

Download from expo.dev dashboard → install on phone


📁 Project Structure

💳 SmartBudgetManager/
│
├── 📄 App.js                      # Root entry point
├── ⚙️  app.config.js               # Expo + env config
├── 🔧 babel.config.js
├── 🔒 .env                        # Secret keys (gitignored)
├── 📋 .env.example                # Safe template
│
├── 📜 scripts/
│   ├── 🔐 mask_keys.py            # Auto-masks leaked secrets
│   ├── 🔍 compile_check.py        # 15-language syntax checker
│   └── ✅ check_requirements.py
│
├── 📱 src/
│   ├── ⚙️  config/firebase.js      # Firebase initialization
│   ├── 🔑 context/AuthContext.js  # Auth state management
│   ├── 🧭 navigation/AppNavigator.js
│   └── 📺 screens/
│       ├── 🔐 LoginScreen.js
│       ├── 📊 DashboardScreen.js
│       ├── 📥 ImportScreen.js
│       └── ⚙️  SettingsScreen.js
│
└── 🤖 .github/workflows/ci.yml    # GitHub Actions CI

🔒 Security Architecture

Every git commit runs through:

📝 Code Staged
      ↓
🔍 trailing-whitespace check
      ↓
🔑 detect-private-key (blocks PEM/RSA)
      ↓
🛡️  mask-secrets (KEY=value → KEY=******)
      ↓
🔬 compile-check (syntax for 15+ languages)
      ↓
✅ Commit allowed  OR  ❌ Blocked + Fixed

Pre-commit Hook Summary

Hook Status Action
trailing-whitespace 🟢 Removes trailing spaces
end-of-file-fixer 🟢 Ensures newline at EOF
detect-private-key 🔴 Blocks raw PEM/RSA keys
check-merge-conflict 🔴 Blocks unresolved conflicts
no-commit-to-branch 🔴 Protects production branch
flake8 🟡 Python linting
mask-secrets 🛡️ Masks API_KEY=valueAPI_KEY=******
compile-check 🔬 Syntax for Py/JS/TS/Java/Go/Rust/C++

🏦 Supported Banks

Bank SMS Pattern Status
🏦 HDFC Bank debited from A/c
🏛️ SBI debited from SBI A/c
🏦 ICICI Bank UPI: Rs. paid to
🏦 Axis Bank debited INR
🏦 Kotak Mahindra debited from Kotak
🏦 Yes Bank debited from your A/c
🏦 IndusInd debited from A/c
🏦 Any Bank Generic debit pattern

🔐 Environment Variables

Variable Value Source
FIREBASE_API_KEY ****** Project Settings → General
FIREBASE_AUTH_DOMAIN ****** Project Settings → Your Apps
FIREBASE_PROJECT_ID ****** Project Settings → General
FIREBASE_STORAGE_BUCKET ****** Project Settings → Your Apps
FIREBASE_MESSAGING_SENDER_ID ****** Project Settings → Cloud Messaging
FIREBASE_APP_ID ****** Project Settings → Your Apps

🤝 Contributing

# 1. Fork the repo
# 2. Create your feature branch
git checkout -b feature/amazing-feature

# 3. Commit (hooks will run automatically)
git commit -m "Add amazing feature"

# 4. Push to branch
git push origin feature/amazing-feature

# 5. Open a Pull Request

⚠️ Direct commits to production are blocked by pre-commit hooks


📊 GitHub Actions CI

Every push triggers:

✅ Python syntax check
✅ JavaScript/TypeScript lint
✅ Secret key scan
✅ Pre-commit hook suite
✅ Build verification

📬 Links

Firebase Console Expo Dashboard Expo Docs Get Expo Go


Built with ❤️ by Ankit Sengupta

💳 Smart Budget Manager — Track every rupee, effortlessly

Visitor Count

About

Android expense tracker that auto-parses Indian bank SMS messages — zero manual entry. React Native + Expo SDK 52 + Firebase Auth + Firestore. Supports HDFC, SBI, ICICI, Axis & more.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors