Skip to content

nidhiii128/expense-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Š Expense Tracker & Receipt Scanner (GCP Powered)

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.


πŸ”§ Features

  • πŸ“· 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

☁️ Cloud Services Used (Google Cloud Platform)

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

βš™οΈ Tech Stack

  • 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

πŸ“ Folder Structure

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


πŸš€ How It Works

  1. User logs in via Firebase Auth
  2. Uploads a receipt (image)
  3. Image is stored in Google Cloud Storage
  4. A Cloud Function is triggered on file upload
  5. Function sends the file to Document AI
  6. Extracted fields are saved in Firestore with the user's UID
  7. React dashboard fetches and displays expenses filtered by UID

πŸ” Auth & Security

  • Authenticated users only can upload/view their receipts
  • All receipts tagged with UID
  • Firestore rules ensure data isolation per user

πŸ§ͺ Future Enhancements

  • Add manual expense input
  • Budget alerts & savings insights
  • Export data as CSV
  • PWA Support for mobile

πŸ‘©β€πŸ’» Author

Nidhi Bhawari
GitHub: @Anomaly28
Project developed as part of Cloud Computing learning on GCP.


πŸ“ License

MIT License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •