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.
- π 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
- π€ "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
- π "Forgot Password" screen to send Firebase reset link
- β³ Loader while waiting for Firebase response
- β 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)
- π‘ 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
- π Dark Theme toggle using Theme Reducer
- π₯ Download Expenses as CSV
- οΏ½ Theme toggle button for switching modes
- π§ͺ 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
- 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
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