This is a cloud-based smart expense tracker that uses OCR and AI to scan receipts (paper or digital), extract key data (amount, date, merchant, etc.), and store everything in a centralized dashboard for analytics and budgeting.
π Built as a full-stack cloud-native project using Google Cloud Platform (GCP) services.
- π· Upload receipts (JPG, PNG, PDF)
- π§ Automatically extract data using Google Document AI
- βοΈ Store receipt files in Google Cloud Storage
- π User authentication with Firebase Authentication
- π View structured expense data in real-time using Firestore
- π Visualize monthly spending, category-wise charts (coming soon)
- π Frontend built with React + Tailwind CSS
- π§© Backend on Cloud Run using Express.js
- βοΈ Auto-trigger backend via Cloud Functions
| GCP Service | Purpose |
|---|---|
| Cloud Storage (GCS) | Store uploaded receipt images |
| Document AI | OCR + entity extraction from receipts |
| Firestore | Real-time NoSQL database for structured expense data |
| Cloud Functions | Trigger on new file in GCS, extract + process using Document AI |
| Cloud Run | Host Express.js backend API for frontend |
| Firebase Authentication | Handle user sign up/login & restrict access |
- Frontend: React
- Backend: Node.js + Express
- Cloud Deployment: Google Cloud Run
- OCR & Parsing: Document AI (pre-trained receipt model)
- Database: Firestore
- Storage: Google Cloud Storage
- Authentication: Firebase Auth (email/password or Google login)
- Misc: Git, GitHub, VS Code, Google Cloud Shell
receipt-dashboard/ βββ backend/ # Cloud Run Express backend β βββ index.js # Main Express app logic (APIs, uploads) β βββ package.json # Backend dependencies β βββ .env # (Optional) API keys, config variables β βββ README.md # Backend instructions (optional)
βββ cloud-function/ # Cloud Function triggered on receipt upload β βββ index.js # GCS trigger β Document AI β Firestore β βββ package.json # Cloud Function dependencies β βββ .gcloudignore # Files to ignore during deploy
βββ src/ # React Frontend (Vite + Tailwind) β βββ components/ # Reusable UI components β β βββ Login.jsx # Login component β β βββ Dashboard.jsx # Displays expenses β β βββ UploadReceipt.jsx # Upload interface β β βββ ChartAnalytics.jsx # (Optional) Charts for analytics β βββ firebase.js # Firebase config (auth + firestore) β βββ App.jsx # Main app β βββ main.jsx # ReactDOM render β βββ routes.jsx # Routing configuration β βββ index.css # Tailwind global styles
βββ public/ # Public assets β βββ index.html # HTML template
βββ .gitignore # Git ignore file βββ README.md # β Main README (this file) βββ package.json # React app dependencies βββ yarn.lock / package-lock.json # Dependency lock file
- User logs in via Firebase Auth
- Uploads a receipt (image)
- Image is stored in Google Cloud Storage
- A Cloud Function is triggered on file upload
- Function sends the file to Document AI
- Extracted fields are saved in Firestore with the user's UID
- React dashboard fetches and displays expenses filtered by UID
- Authenticated users only can upload/view their receipts
- All receipts tagged with UID
- Firestore rules ensure data isolation per user
- Add manual expense input
- Budget alerts & savings insights
- Export data as CSV
- PWA Support for mobile
Nidhi Bhawari
GitHub: @Anomaly28
Project developed as part of Cloud Computing learning on GCP.
MIT License