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.
|
|
|
|
┌─────────────────────────────────────────────────────────┐
│ 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 │
└─────────────────────────────────────────────────────────┘
Make sure you have all of these before starting
node --version # Need 18+
python --version # Need 3.10+
git --version # Any recent version- 📱 Expo Go app on your Android phone — Play Store
- 🔥 Firebase account — console.firebase.google.com
git clone https://github.com/ankit-sengupta05/SmartBudgetManager.git
cd SmartBudgetManagernpm install
npx expo install expo-asset expo-font expo-secure-store expo-constants
npx expo install @react-native-async-storage/async-storage
npm install dotenv1. 🔥 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
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
.envto git. Pre-commit hooks will auto-mask any leaked keys.
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;
}
}
}npx expo start --clearScan the QR code with Expo Go and you're live!
# Install EAS CLI
npm install -g eas-cli
# Login to Expo
npx eas-cli login
# Build APK
npx eas-cli build --platform android --profile previewDownload from expo.dev dashboard → install on phone
💳 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
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
| 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=value → API_KEY=****** |
compile-check |
🔬 | Syntax for Py/JS/TS/Java/Go/Rust/C++ |
| 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 | ✅ |
| 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 |
# 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 toproductionare blocked by pre-commit hooks
Every push triggers:
✅ Python syntax check
✅ JavaScript/TypeScript lint
✅ Secret key scan
✅ Pre-commit hook suite
✅ Build verification�