Skip to content

About

Expense Tracker is a responsive personal finance application that helps users manage expenses and income, analyze spending through interactive charts, securely store data with Firebase, and export financial reports to PDF and Excel.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

ย 

History

131 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ’ฐ Expense Tracker

A responsive personal finance web application for tracking expenses, managing income, analyzing financial activity, and exporting organized reports.

JavaScript Firebase Chart.js PWA Responsive

๐ŸŒ Live Demo โ€ข ๐Ÿ“‚ Repository


๐Ÿ“– Overview

Expense Tracker is a web-based personal finance management application designed to help users keep track of their everyday expenses and additional income in one place.

The application provides tools for recording transactions, organizing expenses into categories, searching and sorting records, analyzing financial activity through interactive charts, generating PDF and Excel reports, and recovering deleted records.

It also includes Firebase Authentication and Cloud Firestore for account-based data storage, along with Progressive Web App (PWA) support for an app-like experience.

The application is designed to be simple enough for everyday personal use while providing useful features for organized financial tracking.


๐ŸŒ Live Application

๐Ÿš€ Use the application:
https://abdurrahmancce.github.io/expense-tracker/

๐Ÿ“‚ GitHub Repository:
https://github.com/abdurrahmancce/expense-tracker


โœจ Features

๐Ÿ” Authentication

Users can create an account and access their personal financial records.

  • ๐Ÿ‘ค Create an account
  • ๐Ÿ”‘ Email/password login
  • ๐Ÿšช Logout
  • ๐Ÿ”„ Password reset
  • โš ๏ธ Authentication error messages
  • ๐Ÿ‘ฅ User-specific financial data

The application provides separate Login and Sign Up interfaces.


๐Ÿ’ธ Expense Management

Record and manage everyday expenses with detailed information.

Each expense can include:

  • ๐Ÿ“ Item name
  • ๐Ÿ’ฐ Amount
  • ๐Ÿท๏ธ Category
  • ๐Ÿ“… Date
  • ๐Ÿ—’๏ธ Optional note

Users can:

  • โž• Add expenses
  • โœ๏ธ Edit expenses
  • ๐Ÿ—‘๏ธ Delete expenses
  • ๐Ÿ”Ž Search expenses
  • ๐Ÿท๏ธ Filter by category
  • โ†•๏ธ Sort by date or amount
  • ๐Ÿ“… Filter by month

The updated interface includes category and note fields directly in the expense form.


๐Ÿท๏ธ Custom Expense Categories

Users can create and manage their own expense categories.

Features

  • ๐Ÿท๏ธ Add categories
  • โœ๏ธ Edit categories
  • ๐Ÿ—‘๏ธ Remove categories
  • ๐Ÿ”Ž Filter expenses by category
  • ๐Ÿ“Š Analyze spending by category

Default categories are available while users can also create categories according to their needs.


๐Ÿ“Œ Pinned Items

Frequently used expense names can be pinned for faster entry.

For example:

๐Ÿ“Œ Transport Cost
๐Ÿ“Œ Lunch
๐Ÿ“Œ Internet Bill
๐Ÿ“Œ Tuition Fee
๐Ÿ“Œ Mobile Recharge

Clicking a pinned item can help speed up repetitive expense entry.


๐Ÿ”Ž Search, Filter & Sort

The expense list includes tools for finding records quickly.

๐Ÿ” Search

Search expenses by item name.

๐Ÿท๏ธ Category Filter

Display expenses belonging to a specific category.

โ†•๏ธ Sorting

Available sorting options include:

  • ๐Ÿ“… Oldest โ†’ Newest
  • ๐Ÿ“… Newest โ†’ Oldest
  • ๐Ÿ’ฐ Lowest โ†’ Highest
  • ๐Ÿ’ฐ Highest โ†’ Lowest

These controls are available inside the All Expenses section.


๐Ÿ“… Monthly & Yearly Analysis

The application automatically organizes financial records into different time periods.

๐Ÿ“† Monthly Summary

View total spending for individual months.

๐Ÿ—“๏ธ Yearly Summary

Review spending across an entire year.

This makes it easier to understand how expenses change over time.


๐Ÿ“Š Financial Analytics

Interactive charts provide a visual overview of financial activity.

๐Ÿ’ธ Expense Charts

  • ๐Ÿ“Š Monthly expenses
  • ๐Ÿ“ˆ Yearly expenses
  • ๐Ÿท๏ธ Category-based expenses

๐Ÿ’ฐ Income Charts

  • ๐Ÿ“Š Monthly income
  • ๐Ÿ“ˆ Yearly income

The current application includes dedicated chart sections for both expenses and bonus/income.


๐Ÿ’ฐ Bonus / Income Tracker

The application also tracks money received from different sources.

Each income record can contain:

  • ๐Ÿ—“๏ธ Year
  • ๐Ÿ“… Month
  • ๐Ÿ“† Date
  • ๐Ÿ‘ค Giver name
  • ๐Ÿ’ต Amount

Users can:

  • โž• Add income
  • โœ๏ธ Edit income
  • ๐Ÿ—‘๏ธ Delete income
  • ๐Ÿ“… Filter income by month
  • ๐Ÿ“Š View income summaries
  • ๐Ÿ“ˆ Analyze income through charts

The dedicated Bonus/Income section is built into the main application.


๐Ÿ—‘๏ธ Trash & Recovery

Deleted financial records are not immediately removed from the application.

Instead, deleted records are placed in a Trash section.

๐Ÿ›ก๏ธ Recovery Features

  • ๐Ÿ—‘๏ธ Move deleted expenses to Trash
  • ๐Ÿ—‘๏ธ Move deleted income records to Trash
  • ๐Ÿ”„ Restore deleted records
  • โณ Keep deleted records for 7 days
  • ๐Ÿงน Permanently remove expired records

The application explicitly informs users that deleted entries remain in Trash for seven days before permanent deletion.


๐Ÿ“„ PDF Export

Generate a financial report in PDF format.

The export functionality is useful for:

  • ๐Ÿ“‹ Personal records
  • ๐Ÿ“Š Financial summaries
  • ๐Ÿ–จ๏ธ Printing
  • ๐Ÿ“ค Sharing reports

The application uses jsPDF and jsPDF AutoTable for PDF generation.


๐Ÿ“Š Excel Export

Export financial records to Excel for further analysis.

Excel export can be useful for:

  • ๐Ÿ“ˆ Data analysis
  • ๐Ÿงฎ Calculations
  • ๐Ÿ“Š Custom reports
  • ๐Ÿ’พ Offline backups

The application uses SheetJS / XLSX for spreadsheet generation.


๐ŸŒ™ Dark Mode

The application supports both light and dark themes.

  • โ˜€๏ธ Light Mode
  • ๐ŸŒ™ Dark Mode
  • ๐Ÿ’พ Theme preference persistence
  • ๐Ÿ“ฑ Responsive dark-mode interface

๐Ÿ“ฑ Progressive Web App

The updated project includes PWA support.

The application contains a web app manifest with:

  • ๐Ÿ“ฑ Standalone display mode
  • ๐Ÿ“ฒ Installable app experience
  • ๐ŸŽจ Custom theme color
  • ๐Ÿ–ผ๏ธ 192ร—192 application icon
  • ๐Ÿ–ผ๏ธ 512ร—512 maskable icon
  • ๐Ÿ“ Portrait orientation

The manifest defines the application as Expense Tracker with the short name Expenses and a standalone display mode.

A service worker is also included to cache core application resources and provide better resilience when network connectivity is unavailable.


โ˜๏ธ Firebase Integration

The application uses Firebase for authentication and cloud data storage.

๐Ÿ” Firebase Authentication

Used for:

  • Account creation
  • Login
  • Logout
  • Password recovery

โ˜๏ธ Cloud Firestore

Used for storing user-specific financial information.

Conceptually, the application organizes data around the authenticated user:

users/
โ””โ”€โ”€ USER_UID/
    โ”œโ”€โ”€ expenses
    โ”œโ”€โ”€ salamis
    โ”œโ”€โ”€ categories
    โ”œโ”€โ”€ pinnedItems
    โ”œโ”€โ”€ trash
    โ””โ”€โ”€ darkMode

๐Ÿ”’ Security: Firebase client configuration is not itself an authorization mechanism. Firestore Security Rules should enforce which authenticated users can read and modify their own records.


๐Ÿ”„ Legacy Data Migration

The project supports migration of older data stored in browser localStorage.

If previous data is detected on the device, the application can provide an option to import the old records into the Firebase-backed account.

This helps users move from an older local-storage version to the newer cloud-based application.


๐ŸŽจ User Interface

The application focuses on a clean and practical interface.

UI elements include:

  • ๐Ÿ’ณ Modern authentication card
  • ๐Ÿ”˜ Interactive buttons
  • ๐Ÿ“‚ Expandable dropdown sections
  • ๐Ÿ“Š Financial charts
  • ๐Ÿ“‹ Responsive tables
  • ๐Ÿ” Search controls
  • ๐Ÿท๏ธ Category chips
  • ๐Ÿ“Œ Pinned-item chips
  • ๐Ÿ”” Toast notifications
  • โณ Loading overlay
  • ๐ŸŒ™ Dark mode
  • ๐Ÿ“ฑ Mobile-friendly layout

๐Ÿ“ฑ Responsive Design

The application is designed for multiple screen sizes.

Device Support
๐Ÿ–ฅ๏ธ Desktop โœ…
๐Ÿ’ป Laptop โœ…
๐Ÿ“ฑ Mobile โœ…
๐Ÿ“ฒ Tablet โœ…

On smaller screens, forms, filters, charts, and other interface elements adapt to the available screen width.


๐Ÿ› ๏ธ Technology Stack

Technology Purpose
๐ŸŒ HTML5 Application structure
๐ŸŽจ CSS3 UI design and responsive layout
โšก JavaScript ES6+ Application logic
๐Ÿ”ฅ Firebase Authentication User authentication
โ˜๏ธ Cloud Firestore Cloud data storage
๐Ÿ“Š Chart.js Financial data visualization
๐Ÿ“„ jsPDF PDF generation
๐Ÿ“‹ jsPDF AutoTable PDF table generation
๐Ÿ“Š SheetJS / XLSX Excel export
๐Ÿ’พ LocalStorage Legacy data migration
๐Ÿ“ฑ Web App Manifest PWA configuration
โš™๏ธ Service Worker Asset caching and PWA support
๐ŸŒ GitHub Pages Web hosting

๐Ÿ“‚ Project Structure

expense-tracker/
โ”‚
โ”œโ”€โ”€ ๐Ÿ“„ index.html
โ”œโ”€โ”€ ๐ŸŽจ style.css
โ”œโ”€โ”€ โšก script.js
โ”œโ”€โ”€ ๐Ÿ“ฑ manifest.json
โ”œโ”€โ”€ โš™๏ธ sw.js
โ”‚
โ”œโ”€โ”€ ๐Ÿ”„ restore.html
โ”œโ”€โ”€ ๐Ÿงน dedupe.html
โ”œโ”€โ”€ ๐Ÿ’พ Expense_Tracker_Recovery.html
โ”‚
โ”œโ”€โ”€ ๐Ÿ“œ LICENSE
โ”œโ”€โ”€ ๐Ÿ“– README.md
โ”‚
โ””โ”€โ”€ ๐Ÿ–ผ๏ธ docs/
    โ””โ”€โ”€ screenshots/

๐Ÿ“„ index.html

Main application interface containing:

  • ๐Ÿ” Authentication
  • ๐Ÿ’ธ Expense form
  • ๐Ÿท๏ธ Category management
  • ๐Ÿ“Œ Pinned items
  • ๐Ÿ“‹ Expense tables
  • ๐Ÿ“Š Financial summaries
  • ๐Ÿ“ˆ Charts
  • ๐Ÿ’ฐ Income tracker
  • ๐Ÿ—‘๏ธ Trash
  • ๐Ÿ“ค Export controls

The current interface includes all of these major sections in the main application screen.

โšก script.js

Contains the application's core JavaScript logic, including:

  • ๐Ÿ” Firebase Authentication
  • โ˜๏ธ Firestore operations
  • ๐Ÿ’ธ Expense management
  • ๐Ÿ’ฐ Income management
  • ๐Ÿท๏ธ Categories
  • ๐Ÿ“Œ Pinned items
  • ๐Ÿ”Ž Search and filtering
  • ๐Ÿ“Š Charts
  • ๐Ÿ“„ PDF generation
  • ๐Ÿ“Š Excel generation
  • ๐ŸŒ™ Theme management
  • ๐Ÿ—‘๏ธ Trash and recovery
  • ๐Ÿ”„ Data migration

๐ŸŽจ style.css

Controls:

  • ๐ŸŽจ Visual design
  • ๐Ÿ“ฑ Responsive layouts
  • ๐ŸŒ™ Dark mode
  • ๐Ÿ” Authentication UI
  • ๐Ÿ“‹ Tables
  • ๐Ÿ“Š Charts
  • ๐Ÿ”˜ Buttons
  • ๐Ÿท๏ธ Category chips
  • ๐Ÿ“Œ Pinned items
  • ๐Ÿ”” Toast notifications

๐Ÿ“ฑ manifest.json

Defines the PWA metadata and installation behavior.

โš™๏ธ sw.js

Provides service-worker functionality for:

  • ๐Ÿ’พ Caching application assets
  • โšก Faster repeat loading
  • ๐Ÿ“ด Better resilience during temporary network problems
  • ๐Ÿ“ฑ PWA support

๐Ÿ”„ restore.html

Provides a recovery interface for restoring stored financial data.

๐Ÿงน dedupe.html

Provides a utility for identifying and removing duplicate financial records.

๐Ÿ’พ Expense_Tracker_Recovery.html

Provides additional recovery and maintenance functionality.


๐Ÿš€ Getting Started

1๏ธโƒฃ Clone the Repository

git clone https://github.com/abdurrahmancce/expense-tracker.git

Move into the project:

cd expense-tracker

2๏ธโƒฃ Run Locally

Because the project is a client-side web application, you can run it using a local development server.

๐Ÿ’ป VS Code

Install the Live Server extension and open:

index.html

Then:

Right Click โ†’ Open with Live Server

A static HTTP server is recommended instead of opening the file directly with file://.


๐Ÿ”ฅ Firebase Configuration

To use authentication and cloud storage:

Step 1: Create a Firebase Project

Create a project from the Firebase Console.

Step 2: Enable Authentication

Enable the authentication provider required by the application.

Step 3: Create Firestore

Create a Cloud Firestore database.

Step 4: Configure the Application

Add the Firebase web configuration to the project.

Step 5: Configure Security Rules

Configure Firestore Security Rules so that users can only access records belonging to their authenticated account.

โš ๏ธ Never use client-side JavaScript as the only layer of authorization.


โ–ถ๏ธ How to Use

๐Ÿ” 1. Create an Account

Open the application and select:

Sign Up

Enter your email and password.


๐Ÿ”‘ 2. Login

Use your registered credentials to access the application.


๐Ÿ’ธ 3. Add an Expense

Enter:

Item Name
Amount
Category
Date
Optional Note

Then select:

Save Expense

๐Ÿ“Œ 4. Use Pinned Items

Pin frequently used expense names to speed up repeated entries.


๐Ÿท๏ธ 5. Manage Categories

Create categories that match your personal spending habits.

For example:

๐Ÿ” Food
๐ŸšŒ Transport
๐ŸŽ“ Education
๐Ÿฅ Medical
๐Ÿ  Family Cost
๐Ÿ’ป Technology

๐Ÿ”Ž 6. Search & Filter

Open All Expenses and use:

  • ๐Ÿ” Search
  • ๐Ÿท๏ธ Category filter
  • ๐Ÿ“… Month filter
  • โ†•๏ธ Sort options

๐Ÿ“Š 7. Analyze Your Finances

Review:

  • ๐Ÿ“… Monthly summaries
  • ๐Ÿ—“๏ธ Yearly summaries
  • ๐Ÿ“ˆ Expense charts
  • ๐Ÿ’ฐ Income charts
  • ๐Ÿท๏ธ Category analysis

๐Ÿ’ฐ 8. Track Income

Use the Bonus/Income Tracker to record money received from different sources.


๐Ÿ—‘๏ธ 9. Recover Deleted Records

Open:

๐Ÿ—‘๏ธ Trash

Restore records within the available recovery period.


๐Ÿ“ค 10. Export Reports

Generate:

๐Ÿ“„ PDF
๐Ÿ“Š Excel

for record keeping or further analysis.


๐Ÿ”„ Application Workflow

                    ๐Ÿ‘ค User
                       โ”‚
                       โ–ผ
               ๐Ÿ” Authentication
                       โ”‚
                       โ–ผ
                ๐Ÿ“Š Main Dashboard
                       โ”‚
          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
          โ”‚            โ”‚            โ”‚
          โ–ผ            โ–ผ            โ–ผ
       ๐Ÿ’ธ Expenses   ๐Ÿ’ฐ Income   ๐Ÿท๏ธ Categories
          โ”‚            โ”‚            โ”‚
          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                       โ”‚
                       โ–ผ
              ๐Ÿ“Š Search & Analysis
                       โ”‚
              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
              โ”‚        โ”‚        โ”‚
              โ–ผ        โ–ผ        โ–ผ
           ๐Ÿ“… Monthly ๐Ÿ“ˆ Charts ๐Ÿ—‘๏ธ Trash
           /Yearly
              โ”‚
              โ–ผ
          ๐Ÿ“ค Export Reports
           โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”
           โ–ผ             โ–ผ
        ๐Ÿ“„ PDF        ๐Ÿ“Š Excel

๐ŸŽฏ Use Cases

๐Ÿ‘ค Personal Finance

Track everyday spending and income.

๐ŸŽ“ Students

Manage:

  • ๐Ÿ” Food expenses
  • ๐ŸšŒ Transportation
  • ๐ŸŽ“ Tuition
  • ๐Ÿ“š Study materials
  • ๐Ÿ“ฑ Mobile expenses

๐Ÿ  Household Tracking

Keep track of recurring personal or family expenses.

๐Ÿ“Š Financial Analysis

Review monthly and yearly spending patterns.

๐Ÿ“ Record Keeping

Export financial information into PDF or Excel for documentation.


๐Ÿ”ฎ Future Improvements

Planned or potential improvements include:

  • ๐ŸŽฏ Budget limits
  • ๐Ÿ”” Budget notifications
  • ๐Ÿ“Š Advanced dashboard KPIs
  • ๐Ÿ“… Calendar-based transactions
  • ๐Ÿ” Recurring expenses
  • ๐Ÿ“ค CSV import/export
  • ๐Ÿ“ˆ Advanced category analytics
  • ๐Ÿ’ณ Multiple account/payment tracking
  • ๐Ÿ” More advanced search
  • ๐Ÿ“ด Improved offline functionality
  • โ˜๏ธ Automated backup and restore
  • ๐Ÿ“Š Custom date-range reports
  • ๐Ÿ“ฑ Further PWA improvements
  • ๐Ÿงช Automated testing
  • ๐Ÿงฉ Modular JavaScript architecture

๐Ÿค Contributing

Contributions and suggestions are welcome, subject to the project's license terms.

Development Workflow

# Fork the repository

# Clone your fork
git clone https://github.com/your-username/expense-tracker.git

# Create a feature branch
git checkout -b feature/your-feature

# Make your changes

# Stage changes
git add .

# Commit
git commit -m "feat: add your feature"

# Push
git push origin feature/your-feature

Then create a Pull Request.

๐Ÿ“ Commit Convention

Recommended prefixes:

feat:      New feature
fix:       Bug fix
docs:      Documentation
style:     Styling/UI
refactor:  Code restructuring
perf:      Performance improvement
security:  Security improvement
chore:     Maintenance

๐Ÿ› Issues & Feedback

If you find a problem or have an improvement idea, open a GitHub Issue.

Please include:

  • ๐Ÿ“ Problem description
  • ๐Ÿ” Steps to reproduce
  • ๐ŸŒ Browser information
  • ๐Ÿ’ป Device/OS information
  • ๐Ÿ“ธ Screenshot if applicable
  • ๐Ÿ’ก Suggested solution if available

๐Ÿ“ธ Screenshots

Add application screenshots under:

docs/screenshots/

Recommended screenshots:

docs/screenshots/
โ”œโ”€โ”€ ๐Ÿ” authentication.png
โ”œโ”€โ”€ ๐Ÿ“Š dashboard.png
โ”œโ”€โ”€ ๐Ÿ’ธ expenses.png
โ”œโ”€โ”€ ๐Ÿท๏ธ categories.png
โ”œโ”€โ”€ ๐Ÿ“ˆ analytics.png
โ”œโ”€โ”€ ๐Ÿ’ฐ income.png
โ”œโ”€โ”€ ๐Ÿ—‘๏ธ trash.png
โ”œโ”€โ”€ ๐ŸŒ™ dark-mode.png
โ””โ”€โ”€ ๐Ÿ“ฑ mobile.png

๐Ÿ“ธ Preview

image

โš–๏ธ License

๐Ÿ”’ Permission Required License

Copyright ยฉ 2026 Abdur Rahman Akash

This project and its source code are not licensed for free reuse, redistribution, modification, deployment, or commercial use.

Viewing and studying the source code for educational purposes is permitted.

Any other use requires prior written permission from the author.

For complete terms, see:

๐Ÿ“„ LICENSE

๐Ÿ“ฉ Permission Requests

Abdur Rahman Akash

๐Ÿ“ง akash.abdur.2002@gmail.com

๐Ÿ™ https://github.com/abdurrahmancce


๐Ÿ‘จโ€๐Ÿ’ป Author

Abdur Rahman Akash

๐ŸŽ“ Computer & Communication Engineering Student
๐Ÿ’ป Developer
๐Ÿค– AI & Technology Enthusiast
๐Ÿ“š Research & Software Development Learner

๐Ÿ”— Connect


โญ Support

If you find this project useful:

โญ Star the repository
๐Ÿด Fork the project
๐Ÿ› Report bugs
๐Ÿ’ก Suggest improvements
๐Ÿค Contribute where permitted


๐Ÿ’ฐ Track Better. ๐Ÿ“Š Understand Better. ๐Ÿš€ Manage Better.

Built with โค๏ธ by Abdur Rahman Akash

About

Expense Tracker is a responsive personal finance application that helps users manage expenses and income, analyze spending through interactive charts, securely store data with Firebase, and export financial reports to PDF and Excel.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages