AI-Powered Family Expense Tracker That Actually Works
Built for families who are tired of spreadsheets, lost receipts, and "Wait, what did we spend on groceries again?" conversations.
Ever planned a family vacation, set a budget, and then watched it spiral out of control because someone forgot to log expenses? Yeah, us too.
We were planning a trip to Goa, carefully budgeted βΉ50,000 for the week. By day three, we'd somehow spent βΉ35,000, and nobody could figure out where it all went. Someone lost receipts, someone forgot to write down cash expenses, and someone conveniently "forgot" about that expensive restaurant bill.
That's when we decided enough was enough.
Sync-Spend was born from real frustration with real problems:
- π± Scattered tracking: Everyone using different apps, notebooks, or just... their memory
- π§Ύ Receipt chaos: Crumpled papers in wallets, photos lost in camera rolls
- πΈ Budget blindness: No idea where your money actually goes until it's gone
- π¨βπ©βπ§βπ¦ Family friction: "I thought YOU were tracking expenses!"
- π― Goal failure: Saving for that car/house/vacation feels impossible without visibility
We wanted something simple, smart, and actually designed for families. Not enterprise software. Not another budgeting lecture. Just a tool that makes tracking money as easy as spending it.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CLIENT SIDE β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β React Frontend (Vite + TailwindCSS) β β
β β ββββββββββββββ ββββββββββββββ βββββββββββββββββββ β β
β β β Dashboard β β Expense β β Family Mgmt β β β
β β β & Charts β β Pages β β & Settings β β β
β β ββββββββββββββ ββββββββββββββ βββββββββββββββββββ β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββ
β HTTPS/REST API
βββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββ
β SERVER SIDE β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Express.js Backend β β
β β ββββββββββββ ββββββββββββ ββββββββββββ βββββββββββ β β
β β β Auth β β Expense β β Family β β Goals β β β
β β βMiddlewareβ β Routes β β Routes β β Routes β β β
β β ββββββββββββ ββββββββββββ ββββββββββββ βββββββββββ β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββ¬βββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββ
β β
βΌ βΌ
βββββββββββββββββββββ βββββββββββββββββββββββββββ
β Firebase Auth β β MongoDB Atlas β
β βββββββββββββββ β β ββββββββββββββββββββ β
β β JWT Tokens β β β β Users Collection β β
β β User Mgmt β β β βExpense Collectionβ β
β βββββββββββββββ β β βFamily Collection β β
βββββββββββββββββββββ β β Goals Collection β β
β ββββββββββββββββββββ β
βββββββββββββββββββββββββββ
ββββββββββββββββββββββββ
β Google Gemini API β
β ββββββββββββββββββ β
β β Gemini 2.5 β β
β β Flash Model β β
β ββββββββββββββββββ β
ββββββββββββββββββββββββ
The Feature That Changes Everything
Snap a photo of any receipt, and watch the magic happen:
- Instant text extraction from crumpled, blurry, or folded receipts
- Smart parsing that understands bill formats (restaurant, grocery, retail)
- Auto-categorization using AI (no more manual dropdowns!)
- Merchant detection and total amount extraction
Tech: Google Gemini 2.5 Flash API analyzes receipt images, extracts structured data, and auto-fills expense forms.
Because Money Is A Team Sport
Create a family group and share everything:
- Real-time expense visibility across all family members
- Shared budgets and goals everyone can contribute to
- Family admin controls for managing members
- Individual + family expense views (your spending vs. household spending)
Tech: MongoDB family collections with member references, Express middleware for family-scoped queries.
See Where Your Money Actually Goes
Interactive dashboards powered by Chart.js:
- Category breakdown pie charts (Food, Transport, Entertainment, etc.)
- Spending trends over time (daily, weekly, monthly)
- Budget vs. actual comparisons with visual warnings
- Family leaderboard (who's the biggest spender? π)
Tech: Chart.js with dynamic data aggregation, MongoDB aggregation pipelines for analytics.
Make Saving Feel Like Winning
Set financial goals and watch progress bars fill:
- Custom goals (vacation fund, emergency savings, new gadget)
- Visual progress tracking with percentage indicators
- Contribution history showing who added what
- Goal completion celebrations π
Tech: Separate Goals collection with progress calculations, contribution tracking per family member.
Your Data, Locked Down
- Firebase Authentication with email/password
- JWT token verification on every request
- Password encryption with bcrypt
- CORS protection and secure headers
- Environment variable secrets (never committed to git)
# Required installed software:
- Node.js (v16 or higher)
- npm or yarn
- MongoDB (local or Atlas account)
- Firebase project (for authentication)
- Google Gemini API key (for AI receipt scanning)1. Clone the repository
git clone https://github.com/yourusername/Sync-Spend.git
cd Sync-Spend2. Setup Backend
cd backend
npm install
# Create .env file with:
MONGODB_URI=your_mongodb_connection_string
FIREBASE_TYPE=service_account
FIREBASE_PROJECT_ID=your_project_id
FIREBASE_PRIVATE_KEY_ID=your_private_key_id
FIREBASE_PRIVATE_KEY="your_private_key"
FIREBASE_CLIENT_EMAIL=your_client_email
FIREBASE_CLIENT_ID=your_client_id
FIREBASE_AUTH_URI=https://accounts.google.com/o/oauth2/auth
FIREBASE_TOKEN_URI=https://oauth2.googleapis.com/token
FIREBASE_AUTH_PROVIDER_CERT_URL=https://www.googleapis.com/oauth2/v1/certs
FIREBASE_CLIENT_CERT_URL=your_client_cert_url
GEMINI_API_KEY=your_gemini_api_key
# Start backend server
npm start3. Setup Frontend
cd ../frontend
npm install
# Create .env file with:
VITE_API_URL=http://localhost:5000
VITE_FIREBASE_API_KEY=your_firebase_api_key
VITE_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your_project_id
VITE_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
VITE_FIREBASE_APP_ID=your_app_id
# Start frontend dev server
npm run dev4. Open in browser
Navigate to http://localhost:5173
| Technology | Purpose |
|---|---|
| React 18 | UI framework with hooks |
| Vite | Lightning-fast build tool |
| TailwindCSS | Utility-first styling (glassy UI!) |
| Chart.js | Data visualization |
| React Router | Client-side routing |
| Firebase SDK | Authentication |
| Axios | API requests |
| Technology | Purpose |
|---|---|
| Node.js | JavaScript runtime |
| Express.js | REST API framework |
| MongoDB | NoSQL database |
| Mongoose | MongoDB ODM |
| Firebase Admin | Auth token verification |
| Google Gemini AI | Receipt text extraction & AI insights (Gemini 2.5 Flash) |
| bcrypt | Password hashing |
| JWT | Token-based auth |
| multer | File upload handling |
Sync-Spend/
β
βββ frontend/ # React frontend application
β βββ src/
β β βββ components/ # Reusable UI components
β β β βββ ProtectedRoute.jsx
β β β βββ charts/ # Chart components
β β βββ layouts/ # Layout wrappers
β β β βββ MainLayout.jsx # Main app layout with navbar
β β βββ pages/ # Route pages
β β β βββ Home.jsx # Dashboard
β β β βββ AddExpense.jsx # Expense entry + AI scanner
β β β βββ Goals.jsx # Goal management
β β β βββ FamilySetup.jsx # Create/join family
β β β βββ FamilyManagement.jsx
β β β βββ Settings.jsx
β β β βββ Login.jsx
β β βββ utils/ # Helper functions
β β β βββ firebase.js # Firebase config
β β βββ App.jsx # Main app component
β β βββ main.jsx # Entry point
β βββ public/ # Static assets
β βββ package.json
β
βββ backend/ # Express backend application
β βββ models/ # Mongoose schemas
β β βββ User.js
β β βββ Expense.js
β β βββ Family.js
β β βββ Goal.js
β βββ routes/ # API route handlers
β β βββ auth.js
β β βββ expenses.js
β β βββ families.js
β β βββ goals.js
β βββ middleware/
β β βββ auth.js # JWT verification
β βββ uploads/ # Temporary receipt storage
β βββ server.js # Express app entry
β βββ package.json
β
βββ README.md # You are here!
- Sign up with email/password on the login page
- Create or join a family (optional but recommended!)
- Add your first expense manually or scan a receipt
- Set financial goals to start tracking progress
- Invite family members to collaborate
Manual Entry:
- Click "Add Expense" from dashboard
- Fill in amount, category, description, date
- Submit to log instantly
AI Receipt Scan:
- Click "Scan Receipt" button
- Take/upload photo of receipt
- AI extracts details automatically
- Review and confirm
Creating a Family:
- Go to Family Setup
- Click "Create Family"
- Enter family name
- Share family code with members
Joining a Family:
- Get family code from admin
- Click "Join Family"
- Enter code and join instantly
- Navigate to Goals page
- Click "Create New Goal"
- Set target amount and deadline
- Add funds as you save
- All passwords hashed with bcrypt (salt rounds: 10)
- Authentication tokens expire after 1 hour
- Firebase Admin SDK verifies all auth tokens
- Environment variables protect API keys and secrets
- CORS configured to accept only authorized origins
- MongoDB connection uses encrypted TLS connection
- No sensitive data stored in localStorage (only auth tokens)
# Backend tests (if configured)
cd backend
npm test
# Frontend tests
cd frontend
npm test
# Run linters
npm run lint{
_id: ObjectId,
name: String,
email: String (unique),
firebaseUid: String (unique),
familyId: ObjectId (ref: Family),
createdAt: Date
}{
_id: ObjectId,
userId: ObjectId (ref: User),
familyId: ObjectId (ref: Family),
amount: Number,
category: String,
description: String,
date: Date,
receiptUrl: String,
createdAt: Date
}{
_id: ObjectId,
name: String,
code: String (unique, 6-digit),
adminId: ObjectId (ref: User),
members: [ObjectId] (ref: User),
createdAt: Date
}{
_id: ObjectId,
userId: ObjectId (ref: User),
familyId: ObjectId (ref: Family),
name: String,
targetAmount: Number,
currentAmount: Number,
deadline: Date,
contributions: [
{
amount: Number,
userId: ObjectId,
date: Date
}
],
createdAt: Date
}Current Production: https://sync-spend.netlify.app
-
Connect GitHub Repository
- Login to Netlify
- Import from GitHub
- Select
Sync-Spendrepository
-
Build Settings
Base directory: frontend Build command: npm run build Publish directory: frontend/dist
-
Environment Variables
VITE_API_URL=https://your-backend.onrender.com VITE_FIREBASE_API_KEY=your_firebase_api_key VITE_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com VITE_FIREBASE_PROJECT_ID=your_project_id VITE_FIREBASE_STORAGE_BUCKET=your_project.appspot.com VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id VITE_FIREBASE_APP_ID=your_app_id
-
Deploy
- Automatic deployments on
mainbranch push
- Automatic deployments on
Current Production: Deployed on Render
-
Create Web Service
- Login to Render
- New β Web Service
- Connect GitHub repository
-
Service Settings
Name: sync-spend-backend Root Directory: backend Build Command: npm install Start Command: npm start
-
Environment Variables (Critical!)
# Database MONGODB_URI=your_mongodb_atlas_connection_string # Authentication JWT_SECRET=your_production_jwt_secret FIREBASE_PROJECT_ID=your_project_id FIREBASE_CLIENT_EMAIL=your_service_account_email # AI Features GEMINI_API_KEY=your_gemini_api_key # Email Service (OPTIONAL - See troubleshooting below) SMTP_HOST=smtp.gmail.com SMTP_PORT=465 SMTP_USER=your_email@gmail.com SMTP_PASS=your_app_password SMTP_TIMEOUT=15000 EMAIL_FROM=Sync-Spend NODE_ENV=production # Optional: Enable email debugging DEBUG_EMAIL=false
-
Important Notes
- Use port 465 with SSL instead of 587 for better compatibility with Render
- Email service is optional - app works fine without it
- If email timeout persists, set
DEBUG_EMAIL=falseto silence errors
-
Setup
- Create free cluster at mongodb.com/cloud/atlas
- Add database user
- Whitelist IP:
0.0.0.0/0(for Render)
-
Get Connection String
mongodb+srv://username:password@cluster.mongodb.net/sync-spend -
Security
- Enable automated backups
- Use strong passwords
- Rotate credentials periodically
If you see email timeout errors in Render logs:
Option 1: Use Port 465 (Recommended)
SMTP_HOST=smtp.gmail.com
SMTP_PORT=465
SMTP_TIMEOUT=15000Update emailService.js:
port: parseInt(process.env.SMTP_PORT) || 465,
secure: process.env.SMTP_PORT === '465', // true for 465Option 2: Disable Email Temporarily
- Remove
SMTP_USERandSMTP_PASSfrom Render environment variables - App will work fine without email features
- Logs will show:
βΉοΈ Email service not configured (optional)
Option 3: Use SendGrid/Mailgun
- Many hosting platforms block direct SMTP
- Consider using SendGrid (free tier) or Mailgun
- Update emailService.js to use their SDK
To Debug:
# Enable verbose logging in Render
DEBUG_EMAIL=true- Recurring expenses (subscriptions, bills)
- Budget alerts (email/SMS when overspending)
- Export reports (PDF/CSV downloads)
- Multiple currencies support
- Bank account sync (Plaid integration)
- Mobile apps (React Native)
- Split expenses (who owes whom)
- Investment tracking (stocks, mutual funds)
We welcome contributions! Here's how:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Code Style:
- Use ESLint config provided
- Follow existing patterns
- Write meaningful commit messages
- Add comments for complex logic
This project is licensed under the MIT License - see the LICENSE file for details.
Built with β€οΈ by two developers who were tired of financial chaos:
π§ Focus: Frontend UI/UX, React components, glassy design system
π§ Contact: karrichanikya@gmail.com
π‘ "Making finance tracking beautiful, one glassy button at a time"
π§ Focus: Backend architecture, AI integration, MongoDB optimization
π§ Contact: charmiseera07@gmail.com
π‘ "Building systems that make money management actually manageable"
- Google for the powerful Gemini AI API
- Firebase for hassle-free authentication
- MongoDB for flexible data storage
- TailwindCSS for making CSS fun again
- Chart.js for beautiful visualizations
- Our families, for being the ultimate beta testers (and bug reporters!)
Found a bug? Have a feature request? Want to say hi?
- Issues: Open an issue on GitHub
- Email: charmiseera07@gmail.com or karrichanikya@gmail.com
- Discussions: Use GitHub Discussions for questions
β Star this repo if Sync-Spend helped you get your finances under control! β
Made with π° and β in India