flowchart TD
Start([User Launches App])
Start --> Auth{Is User Logged In?}
Auth -- No --> Login[Show Login/Register Page]
Login --> Auth
Auth -- Yes --> Dashboard[Dashboard]
Dashboard --> AddTrans[Add/Edit/Delete Transaction]
AddTrans --> Firestore[Sync with Firestore]
Firestore --> Dashboard
Dashboard --> ViewList[View Transactions]
ViewList --> EditOrDelete{Edit or Delete?}
EditOrDelete -- Yes --> AddTrans
EditOrDelete -- No --> Dashboard
Dashboard --> Export[Export CSV]
Export --> Dashboard
Dashboard --> Analytics[View Analytics]
Analytics --> Dashboard
Dashboard --> Settings[Profile/Settings]
Settings --> Dashboard
Dashboard --> Logout[Log Out]
Logout --> Start
A Smart Expense Tracker web app designed for real-world personal finance management with a modern, responsive UI tailored for Indian users. Built using React.js, TypeScript, Firebase (Authentication & Firestore), Tailwind CSS, and Recharts. Effortlessly track your income and expenses with real-time sync, beautiful analytics, and seamless user experience.
Live Demo:
π expense-tracker-saket.netlify.app
Smart Expense Tracker empowers users to:
- Securely log in and manage their own expenses and income.
- Instantly see insights and trends with interactive charts.
- Add, edit, and delete transactions, with all data safely stored in the cloud.
- Enjoy a mobile-first, dark-mode enabled, and visually appealing experience.
- Export transaction records for offline analysis.
Designed for simplicity, speed, and clarity, the app is built to be both beginner-friendly and production-ready, with a focus on Indian currency formatting and localized experience.
- Frontend: React.js (with TypeScript)
- Backend-as-a-Service: Firebase (Authentication & Firestore)
- Styling: Tailwind CSS
- Data Visualization: Recharts
- Routing: React Router
- State Management: React Context API
src/
β
βββ components/ # Modular UI building blocks
β βββ auth/ # Login/Register forms
β βββ dashboard/ # Dashboard cards, charts, analytics
β βββ layout/ # Navbar, Footer, Layout wrappers
β βββ transactions/ # Transaction form & transaction list
β βββ ui/ # Buttons, toggles, dialogs, etc.
β βββ utils/ # Higher-order components, guards
β
βββ contexts/ # Auth, Theme, Transaction Contexts
βββ firebase/ # Firebase config & integration
βββ pages/ # Main app pages (Dashboard, Profile, Analytics)
βββ types/ # Shared TypeScript types/interfaces
βββ utils/ # Formatters, helpers, data utilities
βββ App.tsx # App entry, routes, global providers
βββ main.tsx # Bootstrap & render root app
- Component-Driven: UI is broken into small, manageable, and reusable pieces.
- Context-Based State: Auth, user, and transaction data use React Context for easy and global state sharing.
- Full Firebase Integration: Secure, real-time CRUD operations with Firestore for transactions; Auth for user handling.
- Responsive Design: Layouts adapt seamlessly from desktop to mobile, and light to dark mode.
- Data Visualization: Analytics are instantly updated with every transaction using Recharts.
- Sign Up, Login, Logout: Secure and fast, powered by Firebase Auth (Email/Password)
- User Data Isolation: Each user's transactions are private and stored separately
- Add Income/Expense: Simple form for recording transactions with amount, type, category, note, and date
- Edit/Delete: Update or remove transactions anytime
- Cloud Sync: All data stored in Firestore, instantly synced across devices
- Overview Cards: Quick view of income, expenses, and balance for the current month
- Charts: Category-wise expense visuals (Pie & Bar charts with Recharts)
- Recent Transactions: List of latest activity for quick review
- Export as CSV: Download your transaction history for offline use
- (Planned) Export as PDF: Coming soon!
- Indian Rupee (βΉ): All values formatted with Indian numbering system
- Modern UI/UX: Clean, card-based layout with Poppins font
- Responsive & Accessible: Works beautifully on all devices
- Dark Mode: Toggle between light and dark themes
users (collection)
β
βββ {userId} (document)
β
βββ transactions (subcollection)
β
βββ {transactionId} (document)
βββ amount: number
βββ type: "income" | "expense"
βββ category: string
βββ note: string (optional)
βββ timestamp: Firestore timestamp
- Each user's data is private, secure, and only accessible after authentication.
Below are real screenshots showing different parts and features of the application:
Images represent login, dashboard, analytics, add/edit transaction, and other major UI sections.
-
Authentication:
New users register or existing users log in. Auth state is managed globally. -
Dashboard:
Users are greeted with a summary of their monthly financial activity and visual analytics. -
Add/Edit Transactions:
Users create or update transactions (income/expense). Data is validated and written to Firestore. -
View & Manage Transactions:
All transactions are listed by date, with options to edit or delete. Charts update live. -
Analytics:
Explore category-wise breakdowns and trends in income and spending. -
Export Data:
Users can download their transactions as CSV for records or tax purposes. -
Settings/Profile:
Update personal info, toggle dark mode, and view author credits.
-
Clone Repository
git clone https://github.com/sinha-19/smart-expense-tracker.git cd smart-expense-tracker -
Install Dependencies
npm install
-
Configure Firebase
-
Create a project in Firebase Console
-
Enable Authentication (Email/Password) and Firestore Database
-
Copy your Firebase config to
src/firebase/config.ts:// src/firebase/config.ts import { initializeApp, getApps } from "firebase/app"; import { getAuth } from "firebase/auth"; import { getFirestore } from "firebase/firestore"; const firebaseConfig = { apiKey: "...", authDomain: "...", projectId: "...", storageBucket: "...", messagingSenderId: "...", appId: "..." }; const app = getApps().length === 0 ? initializeApp(firebaseConfig) : getApps()[0]; export const auth = getAuth(app); export const db = getFirestore(app);
-
-
Start Development Server
npm run dev
-
Open App
- Visit http://localhost:5173 or the URL shown in your terminal.
Made with β€οΈ by Saket Kumar Sinha
Email: imsaket123@gmail.com
GitHub: sinha-19
Year: Β© 2025
This project is open source and free to use for learning and personal use.
Β© 2025 Saket Kumar Sinha. All rights reserved.
Beginners welcome!
- Fork the repo, create a feature branch, and submit a pull request.
- Open issues for bugs, ideas, or questions.
- Full-Stack, Real-Time: Modern React frontend with real-time Firebase backend.
- Type Safety: 100% TypeScript for safer, more maintainable code.
- Indian-first UX: All currency is βΉ, with Indian number formats and date styles.
- Analytics at a Glance: Instantly see where your money goes.
- Modern, Mobile-Ready: Responsive, beautiful, and dark-mode enabled.
- Beginner-Friendly: Clean folder structure, clear code comments, and extensible design.
βοΈ If you like this project, please star the repo and share it!
Live Demo: expense-tracker-saket.netlify.app