Skip to content

πŸ’° Expense Tracker App A modern React-based Expense Tracker with Firebase integration for real-time data storage and authentication. Users can sign up, log in, manage profiles, track and categorize expenses, and unlock premium features like dark mode and CSV export. Built with Context API, useReducer and tested using React Testing Library and Jest.

Notifications You must be signed in to change notification settings

MdAbdullahAnwar/Expense-Tracker-Site

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’° Expense Tracker App

A full-featured React-based Expense Tracker application built with Firebase Authentication and Realtime Database. It allows users to register, log in, manage their profile, track expenses, activate premium features, and switch between light and dark themes. Designed with modern development practices including context, reducers, and test-driven development.

πŸ”— Live Demo

Visit Expense Tracker

πŸš€ Features & Deliverables

βœ… 1. User Authentication

  • πŸ” Signup screen with email, password, confirm password validation
  • πŸ” Login functionality with token management and redirection
  • ⚠️ Error handling with user-friendly alerts
  • πŸ‘‹ Welcome screen after successful login
  • πŸ”“ Logout functionality clears token and redirects to login

βœ… 2. Profile Management

  • πŸ‘€ "Complete your profile" prompt post-login
  • πŸ“ Editable profile form with prefilled user details using Firebase GET API
  • πŸ“© Email verification with one-click Firebase verification email trigger

βœ… 3. Password Recovery

  • πŸ”‘ "Forgot Password" screen to send Firebase reset link
  • ⏳ Loader while waiting for Firebase response

βœ… 4. Expense Management

  • βž• Add daily expenses with:
    • Amount
    • Description
    • Category dropdown (Food, Petrol, Salary, etc.)
  • πŸ“‹ List of expenses shown below the form
  • πŸ”„ Realtime sync with Firebase (POST/GET)
  • πŸ—‘οΈ Delete expenses (DELETE request)
  • ✏️ Edit expenses with form prefill and update (PUT request)

βœ… 5. Redux Integration (Best Practices)

  • πŸ’‘ Auth Reducer to manage token, user ID, login status
  • 🧾 Expense Reducer to manage expense list and state sync
  • πŸ“Š Trigger Premium Mode when expenses > β‚Ή10,000

βœ… 6. Premium Features

  • πŸŒ‘ Dark Theme toggle using Theme Reducer
  • πŸ“₯ Download Expenses as CSV
  • οΏ½ Theme toggle button for switching modes

βœ… 7. Testing (TDD)

  • πŸ§ͺ 30+ Unit & Integration Test Cases
  • Covers authentication, expense addition, deletion, editing
  • Includes async behavior using mocked Firebase APIs
  • Built using React Testing Library and Jest

πŸ› οΈ Tech Stack

  • Frontend: React, Context API, Reducers
  • Authentication: Firebase Email/Password Auth
  • Database: Firebase Realtime Database (REST API)
  • Testing: React Testing Library, Jest
  • State Management: useReducer, Context API
  • Theming: CSS Modules with Light/Dark Mode

πŸ“ Project Structure (Suggested)

Expense-Tracker-Site/
β”œβ”€β”€ public/
β”‚   └── index.html
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ Auth/
β”‚   β”‚   β”‚   β”œβ”€β”€ Signup.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Login.jsx
β”‚   β”‚   β”‚   └── ForgotPassword.jsx
β”‚   β”‚   β”œβ”€β”€ Profile/
β”‚   β”‚   β”‚   β”œβ”€β”€ ProfileForm.jsx
β”‚   β”‚   β”‚   └── ProfileHeader.jsx
β”‚   β”‚   β”œβ”€β”€ Expenses/
β”‚   β”‚   β”‚   β”œβ”€β”€ AddExpense.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ExpenseList.jsx
β”‚   β”‚   β”‚   └── ExpenseItem.jsx
β”‚   β”‚   β”œβ”€β”€ Premium/
β”‚   β”‚   β”‚   β”œβ”€β”€ ActivatePremium.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ DownloadCSV.jsx
β”‚   β”‚   β”‚   └── ThemeToggle.jsx
β”‚   β”‚   β”œβ”€β”€ Layout/
β”‚   β”‚   β”‚   β”œβ”€β”€ Header.jsx
β”‚   β”‚   β”‚   └── Footer.jsx
β”‚   β”‚   β”œβ”€β”€ UI/
β”‚   β”‚   β”‚   β”œβ”€β”€ Loader.jsx
β”‚   β”‚   β”‚   └── Notification.jsx
β”‚   β”œβ”€β”€ context/
β”‚   β”‚   β”œβ”€β”€ AuthContext.jsx
β”‚   β”‚   β”œβ”€β”€ ExpenseContext.jsx
β”‚   β”‚   └── ThemeContext.jsx
β”‚   β”œβ”€β”€ reducers/
β”‚   β”‚   β”œβ”€β”€ authReducer.js
β”‚   β”‚   β”œβ”€β”€ expenseReducer.js
β”‚   β”‚   └── themeReducer.js
β”‚   β”œβ”€β”€ firebase.js
β”‚   β”œβ”€β”€ App.jsx
β”‚   └── index.js
β”œβ”€β”€ .gitignore
β”œβ”€β”€ package.json
└── README.md

About

πŸ’° Expense Tracker App A modern React-based Expense Tracker with Firebase integration for real-time data storage and authentication. Users can sign up, log in, manage profiles, track and categorize expenses, and unlock premium features like dark mode and CSV export. Built with Context API, useReducer and tested using React Testing Library and Jest.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published