Skip to content

A modern, responsive web application to track personal expenses and income with real-time balance updates, monthly reports, and Firebase authentication.

License

Notifications You must be signed in to change notification settings

hemu0409/Expense-Tracker

Repository files navigation

πŸ’° Expense Tracker

A modern, user-friendly web application for tracking personal expenses and income in Indian Rupees (β‚Ή). Built with vanilla JavaScript and Firebase for real-time data synchronization.

Live Demo Firebase JavaScript


πŸ“Έ Screenshots

Authentication Page Dashboard View Monthly Data View


✨ Features

Core Functionality

  • Transaction Management – Add, view, and delete income/expense transactions
  • Real-time Balance – Automatic calculation of current balance
  • Category System – 16 predefined categories with emoji icons
  • Date Tracking – Record transactions with specific dates
  • Search & Filter – Find transactions by description or category
  • Export to CSV – Download transaction history for external analysis

Monthly Data View

  • Billing Cycle Customization – Set custom billing periods (1st, 5th, 10th, 15th, 20th, or 25th)
  • Period-based Reports – View income, expenses, and balance per billing period
  • Historical Overview – Browse past billing periods with breakdowns
  • Current Period Summary – Quick view of ongoing period’s financial status

User Experience

  • User Authentication – Secure login/signup with Firebase Authentication
  • Personal Data – Each user's transactions are private and isolated
  • Responsive Design – Works seamlessly on desktop and mobile devices
  • Real-time Sync – Changes reflect instantly across all devices
  • Statistics Dashboard – View total transactions and average transaction amounts

πŸš€ Live Demo

πŸ‘‰ Expense Tracker Web App


πŸ› οΈ Technology Stack

  • Frontend: HTML5, CSS3, JavaScript (ES6+)
  • Backend & Services: Firebase Authentication, Firestore Database, Firebase Hosting
  • Libraries: Font Awesome 6.4.0, Firebase SDK 9.22.0

πŸ“¦ Project Structure

expense-tracker/
β”œβ”€β”€ index.html              # Main dashboard
β”œβ”€β”€ app.js                  # Application logic
β”œβ”€β”€ styles.css              # Stylesheet
β”œβ”€β”€ auth.html               # Login/Signup page
β”œβ”€β”€ auth.js                 # Authentication logic
β”œβ”€β”€ auth-styles.css         # Auth page styles
β”œβ”€β”€ monthly-view.html       # Monthly data view
β”œβ”€β”€ monthly-view.js         # Monthly view logic
β”œβ”€β”€ monthly-styles.css      # Monthly view styles
β”œβ”€β”€ firebase-config.js      # Firebase config
β”œβ”€β”€ firebase.json           # Hosting config
β”œβ”€β”€ .firebaserc             # Firebase project settings
β”œβ”€β”€ assets/
β”‚   └── screenshots/
β”‚       β”œβ”€β”€ authentication.png
β”‚       β”œβ”€β”€ dashboard.png
β”‚       └── monthly-view.png

πŸ” Security Features

  • Firebase Authentication required
  • User isolation (private data per account)
  • Firestore security rules
  • HTTPS secure hosting

πŸ“± Responsive Design

Optimized for:

  • Desktop & laptops
  • Tablets
  • Mobile devices

🚦 Getting Started

Prerequisites

  • Modern web browser (Chrome, Firefox, Safari, Edge)
  • Firebase account (for deployment)

Local Development

  1. Clone the repository

    git clone <repository-url>
    cd expense-tracker
  2. Update Firebase credentials

    • Open firebase-config.js
    • Replace with your Firebase project credentials
  3. Run locally

    • Option 1: Open index.html directly in browser
    • Option 2: Use a local server
      python -m http.server 8000
    • Access at http://localhost:8000

Firebase Setup

  1. Create Firebase Project

  2. Enable Authentication

    • Navigate to Authentication β†’ Sign-in method
    • Enable Email/Password provider
  3. Create Firestore Database

    • Navigate to Firestore Database
    • Click "Create Database"
    • Start in production mode
    • Set up security rules
  4. Get Configuration

    • Go to Project Settings β†’ General
    • Scroll to "Your apps" section
    • Copy the Firebase config object
    • Paste into firebase-config.js

Deployment

# Install Firebase CLI
npm install -g firebase-tools

# Login to Firebase
firebase login

# Initialize project (first time only)
firebase init

# Deploy to Firebase Hosting
firebase deploy

Your app will be live at: https://your-project-id.web.app


🎯 Key Features Explained

πŸ“‚ Transaction Categories

  • πŸ” Food, πŸ›’ Groceries, 🏠 Utilities
  • πŸ’Š Health, πŸ›‘οΈ Insurance, $ EMI/Credit
  • πŸ’Ή Investment, πŸš— Transport, πŸ›οΈ Shopping
  • 🎬 Entertainment, πŸ’‘ Bills, πŸ’° Salary
  • 🎁 Gift, $ Loan, πŸ“Œ Other

πŸ” Filter Options

  • All Transactions – View complete transaction history
  • Income Only – Filter to show only income entries
  • Expense Only – Filter to show only expense entries

πŸ“Š Statistics Dashboard

  • Total Transactions – Count of all recorded transactions
  • Average Transaction – Mean value of all transactions
  • Balance – Current balance (Income - Expenses)
  • Total Income – Sum of all positive transactions
  • Total Expense – Sum of all negative transactions

πŸ“… Monthly Data Feature

The Monthly Data view provides comprehensive billing period analysis:

  • Custom Billing Cycles – Choose when your billing period starts (1st, 5th, 10th, 15th, 20th, or 25th)
  • Period Breakdown – See income, expenses, and balance for each period
  • Historical Data – Access all past billing periods
  • Quick Navigation – Click any period to view detailed transactions

Perfect for: Salary-based tracking, credit card bill management, and budget monitoring.


🎨 Design Highlights

  • Modern UI – Clean and intuitive interface
  • Color-coded Transactions – Green for income, red for expenses
  • Smooth Animations – Hover effects and transitions
  • Loading States – Visual feedback during data operations
  • Error Handling – User-friendly error messages

πŸ”„ Data Flow

User Authentication (Firebase Auth)
         ↓
Load User Transactions (Firestore)
         ↓
Real-time Listener (Auto-sync)
         ↓
User Actions (Add/Delete)
         ↓
Update Firestore
         ↓
Sync Across All Devices

🌐 Browser Support

Browser Support
Chrome/Edge βœ… Latest
Firefox βœ… Latest
Safari βœ… Latest
Mobile Browsers βœ… iOS Safari, Chrome Mobile

πŸš€ Future Enhancements

  • Budget setting and tracking
  • Recurring transactions
  • Data visualization with charts
  • Multi-currency support
  • Receipt attachment capability
  • Advanced reporting features
  • Dark mode theme
  • Expense categories customization

πŸ“ž Support

For issues or questions:

  1. Firebase Console – Check for errors in Firebase Console
  2. Browser Console – Press F12 to view debugging information 3.. Common Issues – See [Firebase Deployment Guide]

πŸ“ License

Β© 2025 Hemanth. MIT License


🀝 Contributing

This is a personal project. Feel free to fork and modify for your own use.


Built using Firebase and JavaScript

⬆ Back to Top

About

A modern, responsive web application to track personal expenses and income with real-time balance updates, monthly reports, and Firebase authentication.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published