Looking for a fully working, production-ready financial dashboard with Sankey diagrams and anomaly detection? Check out Ledger Sync -- Transform messy Excel bank statements into beautiful financial dashboards.
A comprehensive, modern financial dashboard built with React that provides powerful analytics, AI-style insights, and visualizations for personal finance management. Upload your financial data and gain deep insights into your spending patterns, income sources, financial health, investments, tax planning, and lifestyle optimization.
Quick Start: Just export your Money Manager backup to Excel and upload it on this link UI - you'll get comprehensive financial insights instantly!
Upload your financial data and watch your dashboard come to life with interactive charts, smart insights, and comprehensive analytics.
- Full TypeScript Support: Enhanced type safety and developer experience
- Strict Mode: Robust error checking and improved code quality
- Modern Architecture: Updated codebase using latest React patterns
- Zero Runtime Errors: Significantly improved stability and reliability
- Clean Folder Structure: Modular organization by feature and concern
- Single Source of Truth: All financial calculations centralized in
lib/calculations - No Duplicates: Clean, maintainable codebase with zero duplicate calculation logic
- SonarQube Compliant: All code quality warnings resolved
- Optimized Performance: Efficient calculations reused across all components
- Easy to Extend: Add new features in isolated, focused modules
- π Investment Performance Tracker: Stock market P&L, brokerage fees, returns, and actionable insights
- π Tax Planning Dashboard: Income tax calculations, deductions (80C, HRA), tax slab breakdown, saving recommendations
- π¨βπ©βπ§ Family & Housing Manager: Family expenses, rent payments, utilities, HRA benefits
- π³ Lifestyle Optimizer: Credit card analytics, cashback tracking, food spending, commute cost analysis
- KPI Overview: Total income, expenses, net balance, transaction counts, and advanced financial health metrics
- Account Balances: Real-time view of all account balances
- Transfer Tracking: Monitor internal money movements between accounts
- Advanced Metrics: Savings rate, spending velocity, burn rate, and category concentration
- Income vs Expense Breakdown (Doughnut Chart)
- Top Expense Categories (Bar Chart) - with time filtering
- Income Sources Analysis (Bar Chart) - with time filtering
- Spending by Account (Doughnut Chart)
- Monthly Trends (Line Chart) - with time filtering
- Daily Spending Patterns (Bar Chart)
- Subcategory Analysis with drill-down capabilities
- Investment P&L Charts: Cumulative profit/loss tracking over time
- Tax Breakdown: Visual representation of tax slabs and deductions
- Food & Transport Trends: Monthly spending patterns and optimization opportunities
- Enhanced Top Categories: Monthly, yearly, and all-time views for expenses and income
- Enhanced Monthly Trends: Yearly, last 12 months, and all-time views
- Enhanced Subcategory Breakdown: Monthly, yearly, and decade views
- Multi-Category Time Analysis: Compare spending across categories over time
- Interactive Navigation: Navigate through different time periods
- Trend Identification: Spot patterns and seasonal variations
- CSV & Excel Upload: Easy data import functionality for both CSV and Excel files (.xlsx, .xls)
- Smart Parsing: Handles quoted fields and various file formats
- Data Filtering: Search and filter transactions
- Sorting & Pagination: Organized transaction table with sorting capabilities
- Export Charts: Download visualizations as PNG images
- Income: Track all income sources
- Expenses: Monitor spending across categories
- Transfers: Handle internal account transfers
- Categorization: Organize transactions with categories and subcategories
src/
βββ app/
β βββ App.js # Main application component
βββ pages/ # Page-level components
β βββ OverviewPage/
β βββ AdvancedAnalyticsPage/
β βββ CategoryAnalysisPage/
β βββ IncomeExpensePage/
β βββ PatternsPage/
β βββ TransactionsPage/
β βββ TrendsForecastsPage/
βββ features/ # Feature modules
β βββ analytics/ # Advanced analytics components
β β βββ components/
β β βββ hooks/
β βββ budget/ # Budget & goals features
β β βββ components/
β β βββ utils/
β βββ charts/ # Chart components & logic
β β βββ components/
β β βββ hooks/
β βββ kpi/ # KPI cards & metrics
β β βββ components/
β β βββ hooks/
β βββ transactions/ # Transaction management
β βββ components/
βββ components/ # Shared UI components
β βββ data-display/ # Charts, health scores, calendars
β βββ errors/ # Error boundaries
β βββ import-export/ # CSV/Excel import
β βββ layout/ # Header, footer
β βββ ui/ # Reusable UI elements
βββ lib/ # Core libraries
β βββ calculations/ # Financial calculation engine
β β βββ aggregations/ # Averages, totals, categories
β β βββ financial/ # Financial calculations
β β βββ time/ # Date range calculations
β β βββ index.js # Main calculation exports
β β βββ legacy.js # Backward compatibility
β βββ analytics/ # Analytics utilities
β β βββ forecasts.js
β β βββ insights.js
β β βββ trends.js
β β βββ healthScore.js
β βββ charts/ # Chart utilities
β βββ data/ # Data processing & validation
βββ contexts/ # React contexts
β βββ DataContext.js
βββ hooks/ # Custom React hooks
β βββ useDataProcessor.js
β βββ useDebouncedValue.js
βββ utils/ # General utilities
β βββ accessibility.js
β βββ localStorage.js
β βββ logger.js
β βββ performance.js
βββ config/ # Configuration files
β βββ overview.js
β βββ tabs.js
βββ constants/ # App constants
β βββ index.js
βββ styles/ # Global styles
βββ index.css
- β Feature-Based Structure: Organize code by feature, not by file type
- β Separation of Concerns: Pages, features, components, and libraries are clearly separated
- β Single Responsibility: Each module and function does one thing well
- β No Duplicates: Same calculation or component never written twice
- β Easy to Test: Pure functions with predictable outputs
- β Easy to Extend: Add new features without breaking existing ones
- β Code Quality: SonarQube compliant with proper error handling and logging
Comprehensive stock market analysis:
-
P&L Tracking
- Total deposits and withdrawals
- Realized profits and losses
- Net profit/loss with return percentage
- Cumulative P&L chart over time
-
Brokerage Analysis
- Total fees paid
- Fee percentage of invested amount
- Optimization recommendations
-
Investment Insights
- Win/loss ratio calculation
- Tax loss harvesting opportunities
- Strategy recommendations based on performance
- Recent transaction history
Complete income tax planning (FY 2025-26):
-
Income Analysis
- Salary, bonus, and other income breakdown
- Gross vs taxable income comparison
- Visual income distribution
-
Deductions Tracking
- 80C investments (βΉ1.5L limit) with progress bar
- HRA exemption calculation
- Standard deduction (βΉ50,000)
- Professional tax
-
Tax Calculation
- New tax regime slab-wise breakdown
- Effective tax rate calculation
- Post-tax income projection
- Year-end tax estimate
-
Recommendations
- Tax-saving investment suggestions
- Unutilized deduction alerts
- Optimization opportunities
Track family and housing expenses:
-
Family Expenses
- Total family support tracking
- Monthly average calculations
- Subcategory breakdown
- Top expense identification
-
Housing Costs
- Rent payment history
- Utility bills tracking
- Monthly housing trends
- HRA tax benefit calculation
-
Insights
- Spending patterns over time
- Budget recommendations
- Tax benefit alerts
Optimize daily spending:
-
Credit Card Analytics
- Card-wise spending breakdown
- Total Cashback Earned: Sum of all cashback income
- Cashback Shared: Expenses and transfers from "Cashback Shared" account
- Actual Cashback: Total Earned - Shared (what you actually kept)
- Cashback rate calculation
- Category-wise card usage
- Card optimization tips
-
Food Spending
- Delivery apps vs groceries
- Office cafeteria spending
- Dining out costs
- Daily food average
- Monthly trends and savings opportunities
-
Transportation
- Daily commute costs
- Intercity travel expenses
- Per-trip averages
- Alternative suggestions (bike, monthly pass)
-
Reimbursements
- Total Reimbursements: Sum of all expense reimbursement income
- Average reimbursement amount
- Monthly reimbursement trends
- Recent reimbursement activity
6 Advanced KPI Cards that give you instant insights:
-
Savings Rate π·
- Shows:
(Income - Expense) / Income Γ 100 - Color-coded: Green (β₯20%), Yellow (β₯10%), Red (<10%)
- Example: "23.5% - Excellent! π"
- Shows:
-
Daily Spending Rate π₯
- Shows: Average money spent per day
- Helps understand your daily burn rate
- Example: "βΉ485.50/day"
-
Monthly Burn Rate π
- Shows: Projected monthly expenses
- Useful for monthly budgeting
- Example: "βΉ14,750/month"
-
Net Worth Change π
- Shows: Total wealth change over period
- Color-coded: Green (positive), Red (negative)
- Example: "+βΉ15,250 (+βΉ5,000/month) β"
-
Spending Velocity (30-day) β‘
- Shows: If you're spending more/less than usual
- Early warning system for budget overruns
- Color-coded: Red (>120%), Yellow (80-120%), Green (<80%)
- Example: "115% β Above average"
-
Top Category Concentration π―
- Shows: Which category dominates your spending
- Warns if >50% (over-concentration risk)
- Example: "Food - 45% of spending
β οΈ "
AI-style personalized financial advice that includes:
- π° Savings Opportunities: Identifies potential savings from delivery apps, cafeteria spending, and recurring expenses
- π Pattern Detection: Analyzes weekend vs weekday spending, high-frequency categories, and unusual transactions
- π Achievements: Celebrates your good financial behaviors
β οΈ Warnings: Alerts you to concerning patterns or low savings rates- π Time Filtering: Filter insights by year and month to analyze specific periods
- π― Priority System: High-priority insights shown first for immediate action
Example Insights:
- "You order food 4.2x/week (avg βΉ350/order). Reducing by 30% could save βΉ52,416/year"
- "You spend 68% more on weekends vs weekdays - consider planning weekend activities better"
- "You're saving 28.5% of your income - that's excellent! Keep it up!"
See exactly how your balance changes over time:
- Chronological View: Transactions sorted by date with cumulative balance
- All Transaction Types: Handles income (+), expenses (-), and transfers
- Color Coding: Green for positive, Red for negative balances
- Historical Analysis: Track exactly when you went positive or negative
- Visual Impact: See the immediate effect of large expenses
Example:
Date | Amount | Type | Running Balance
--------|------------|---------|------------------
Jan 1 | βΉ50,000 | Income | βΉ50,000 (Positive)
Jan 5 | -βΉ12,000 | Expense | βΉ38,000 (Positive)
Jan 10 | βΉ60,000 | Income | βΉ98,000 (Positive)
- Node.js 20.x or higher
- pnpm 9.x or higher (recommended) or npm
Note: This project uses pnpm for faster installs and better disk space usage. Install pnpm:
npm install -g pnpm
-
Clone the repository
git clone https://github.com/Sagargupta16/Financial-Dashboard.git cd Financial-Dashboard -
Install dependencies
pnpm install
-
Start the development server
pnpm start
-
Open your browser
Navigate to http://localhost:3000
This project uses Husky for Git hooks to maintain code quality automatically:
What is Husky? Husky is a tool that makes Git hooks easy. It runs scripts before certain Git actions (like commit or push) to ensure code quality.
Pre-commit Hook (.husky/pre-commit):
- β Automatically runs ESLint on staged files
- β Automatically formats code with Prettier
- β Prevents commits if there are linting errors
- β Ensures consistent code style across the team
Benefits:
- No more "fix lint errors" commits
- Consistent formatting across all developers
- Faster CI/CD pipelines (fewer failed builds)
- Higher code quality in the repository
The hook configuration uses lint-staged to only check files you're actually committing.
Your CSV or Excel file should follow this format:
Date,Time,Accounts,Category,Subcategory,Note,INR,Income/Expense
01/01/2024,10:30:00,Bank Account,Food,Groceries,Weekly shopping,2500,Expense
01/01/2024,14:15:00,Savings Account,Salary,Basic Salary,Monthly salary,50000,IncomeSupported File Types:
- .csv - Comma-separated values
- .xlsx - Excel workbook format
- .xls - Legacy Excel format
- Date: DD/MM/YYYY format
- Time: HH:MM:SS format
- Accounts: Account name (e.g., "Bank Account", "Credit Card")
- Category: Transaction category (e.g., "Food", "Transport", "Salary")
- Subcategory: Optional subcategory for detailed tracking
- Note: Transaction description or notes
- INR: Amount in Indian Rupees (can include βΉ symbol and commas)
- Income/Expense: Transaction type ("Income", "Expense", "Transfer-In", "Transfer-Out")
- React 19.1.1: Modern UI framework
- Chart.js 4.5.0: Powerful charting library
- react-chartjs-2: React wrapper for Chart.js
- TailwindCSS 3.4: Utility-first CSS framework
- Lucide React: Icon library
- xlsx: Excel file parsing
- Create React App: Zero-configuration setup
- ESLint: Code quality and linting
- PropTypes: Runtime type checking
- pnpm: Fast, disk space efficient package manager
- Husky: Git hooks for code quality
Modern browsers (Chrome, Firefox, Safari, Edge)
src/
βββ app/ # Main application entry
βββ pages/ # Page-level components for routing
βββ features/ # Feature modules (analytics, budget, charts, kpi, transactions)
βββ components/ # Shared UI components (data-display, errors, import-export, layout, ui)
βββ lib/ # Core libraries (calculations, analytics, charts, data)
βββ contexts/ # React contexts (DataContext)
βββ hooks/ # Custom React hooks
βββ utils/ # General utilities (logger, localStorage, performance)
βββ config/ # Configuration files
βββ constants/ # Application constants
βββ styles/ # Global styles
pnpm start # Start development server
pnpm build # Build for production
pnpm test # Run test suite
pnpm lint # Run ESLint
pnpm lint:fix # Fix ESLint issues
pnpm format # Format code with PrettierUpdate the formatCurrency function in src/shared/utils/dataUtils.js to change currency:
export const formatCurrency = (value) => {
return new Intl.NumberFormat("en-IN", {
style: "currency",
currency: "INR", // Change as needed
minimumFractionDigits: 2,
maximumFractionDigits: 2,
}).format(value);
};Modify the color scheme in tailwind.config.js or update the CSS classes in components.
This dashboard uses a comprehensive set of financial calculations. All formulas are centralized in src/lib/calculations/ for consistency and maintainability.
Total Income = Sum of all transactions where type = "Income"
Location: src/lib/calculations/aggregations/totals.js
Total Expense = Sum of all transactions where type = "Expense"
Location: src/lib/calculations/aggregations/totals.js
Net Balance = Total Income - Total Expense
Location: src/lib/calculations/financial/savings.js
Savings Rate = ((Total Income - Total Expense) / Total Income) Γ 100
Interpretation:
- β₯20%: Excellent π (Green)
- β₯10%: Good π (Yellow)
- <10%: Needs Improvement
β οΈ (Red)
Location: src/lib/calculations/financial/savings.js
Daily Average = Total Expense / Number of Days in Period
Location: src/lib/calculations/aggregations/averages.js
Monthly Average = (Total Expense / Number of Days) Γ 30.44
Note: 30.44 is the average number of days per month (365.25 / 12)
Location: src/lib/calculations/aggregations/averages.js
Average Transaction = Total Transaction Amount / Number of Transactions
Location: src/lib/calculations/aggregations/averages.js
Spending Velocity = (Last 30 Days Daily Average / All-Time Daily Average) Γ 100
Interpretation:
- <80%: Spending less than usual (Green)
- 80-120%: Normal spending range (Yellow)
-
120%: Spending more than usual (Red)
Location: src/features/kpi/hooks/useCalculations.js
Total Cashback Earned = Sum of all transactions where:
- Category = "Refund & Cashbacks"
- Type = "Income"
Location: src/lib/calculations/financial/cashback.js
Cashback Shared = Sum of all transactions where:
- Account = "Cashback Shared"
- Type = "Expense" OR "Transfer-Out"
Location: src/lib/calculations/financial/cashback.js
Actual Cashback = Total Cashback Earned - Cashback Shared
This represents the cashback you actually kept for yourself after sharing with others
Location: src/lib/calculations/financial/cashback.js
Cashback Rate = (Total Cashback Earned / Total Credit Card Spending) Γ 100
Location: src/lib/calculations/financial/cashback.js
For each credit card:
Card Cashback = Sum of cashback transactions for that card
Card Cashback Rate = (Card Cashback / Card Spending) Γ 100
Location: src/lib/calculations/financial/cashback.js
Total Reimbursements = Sum of all transactions where:
- Subcategory = "Expense Reimbursement"
- Type = "Income"
Location: src/lib/calculations/financial/reimbursement.js
Average Reimbursement = Total Reimbursements / Number of Reimbursement Transactions
Location: src/lib/calculations/financial/reimbursement.js
Total Capital Deployed = Sum of all Transfer-Out to investment accounts
Net Return = (Current Holdings + Withdrawals - Capital Deployed + Realized Profits - Realized Losses - Brokerage Fees)
Return Percentage = (Net Return / Capital Deployed) Γ 100
Location: src/lib/calculations/financial/index.js
Taxable Income = Total Income - Standard Deduction - Section 80C Deductions - HRA Exemption
Tax = Sum of (Slab Amount Γ Slab Rate) for all applicable slabs
Total Tax = Income Tax + 4% Cess on Income Tax
Tax Slabs (New Regime FY 2025-26):
- βΉ0 - βΉ4L: 0%
- βΉ4L - βΉ8L: 5%
- βΉ8L - βΉ12L: 10%
- βΉ12L - βΉ16L: 15%
- βΉ16L - βΉ20L: 20%
- βΉ20L - βΉ24L: 25%
- Above βΉ24L: 30%
Location: src/lib/calculations/financial/index.js
HRA Exemption = Minimum of:
1. Actual HRA Received
2. 50% of Basic Salary (Metro) or 40% (Non-Metro)
3. Rent Paid - 10% of Basic Salary
Location: src/lib/calculations/financial/index.js
Total Food = Sum of all "Food & Dining" expenses
Delivery Apps = Swiggy + Zomato + Other delivery services
Groceries = Supermarket + Grocery store purchases
Dining Out = Restaurant + CafΓ© expenses
Office Cafeteria = Office food expenses
Daily Average = Total Food / Number of Days
Monthly Average = (Total Food / Number of Days) Γ 30.44
Location: src/lib/calculations/financial/index.js
Total Transportation = Sum of all "Transportation" expenses
Daily Commute = Local transport (metro, bus, auto, bike)
Intercity Travel = Long-distance travel expenses
Daily Average = Total Transportation / Number of Days
Per Trip Average = Total Transportation / Number of Transport Transactions
Location: src/lib/calculations/financial/index.js
Net Worth = Total Income - Total Expense
Net Worth Per Month = (Net Worth / Number of Days) Γ 30.44
For each expense category:
Category Total = Sum of expenses in that category
Category Percentage = (Category Total / Total Expense) Γ 100
Top Category Concentration = Highest category percentage
Warning threshold: >50% indicates over-concentration
Location: src/features/kpi/hooks/useCalculations.js
For each account:
Balance = Sum of:
+ Income to account
+ Transfers In
- Expenses from account
- Transfers Out
Location: src/features/kpi/hooks/useCalculations.js
Total Days = (End Date - Start Date) in days
Total Months = Total Days / 30.44
Total Years = Total Days / 365.25
Location: src/lib/calculations/time/dateRange.js
For each category:
Total = Sum of all transaction amounts in category
Count = Number of transactions in category
Average = Total / Count
Location: src/lib/calculations/aggregations/category.js
For each month:
Income = Sum of income transactions in month
Expense = Sum of expense transactions in month
Net = Income - Expense
Growth Rate = ((Current Month - Previous Month) / Previous Month) Γ 100
For each transaction (chronologically):
Running Balance = Previous Balance + Transaction Amount
(where Income/Transfer-In adds, Expense/Transfer-Out subtracts)
All calculations are organized in a clean, modular structure:
src/lib/calculations/
βββ index.js # Main exports
βββ aggregations/
β βββ averages.js # Daily, monthly, per-transaction averages
β βββ category.js # Category grouping and top categories
β βββ totals.js # Total income and expense
βββ financial/
β βββ cashback.js # All cashback calculations
β βββ reimbursement.js # Reimbursement calculations
β βββ savings.js # Savings and savings rate
β βββ index.js # Investment, tax, food, transport
βββ time/
β βββ dateRange.js # Date range and period calculations
βββ legacy.js # Legacy calculations (for compatibility)
// Import what you need
import {
calculateTotalIncome,
calculateTotalExpense,
calculateSavingsRate,
calculateTotalCashbackEarned,
calculateCashbackShared,
calculateActualCashback,
calculateTotalReimbursements,
} from "src/lib/calculations";
// Use in components
const totalIncome = calculateTotalIncome(transactions);
const totalExpense = calculateTotalExpense(transactions);
const savingsRate = calculateSavingsRate(totalIncome, totalExpense);
// Cashback metrics
const cashbackEarned = calculateTotalCashbackEarned(transactions);
const cashbackShared = calculateCashbackShared(transactions);
const actualCashback = calculateActualCashback(transactions);
// Reimbursements
const reimbursements = calculateTotalReimbursements(transactions);Benefits:
- β Single source of truth - no duplicate logic
- β Easy to test and maintain
- β Consistent calculations across all pages
- β Well-documented with JSDoc comments
- β Type-safe with PropTypes validation
-
Overview Tab - Your financial command center
- Main KPI Cards (Income, Expenses, Net Balance)
- 6 Financial Health Metrics (Savings Rate, Burn Rate, Velocity, etc.)
- Smart Insights & Recommendations with time filtering
- Account balances and transfer tracking
-
Income & Expense Tab - Detailed breakdowns
- Income vs Expense comparison charts
- Top expense categories with time filtering
- Income sources analysis
- Spending by account visualization
-
Trends & Forecasts Tab - Temporal analysis
- Monthly trends with time filtering
- Daily spending patterns
- Category-wise spending over time
- Seasonal variation detection
-
Category Analysis Tab - Deep dives
- Subcategory breakdown with drill-down
- Multi-category time comparisons
- Category concentration analysis
- Spending heatmaps
-
Insights Tab - Advanced analytics
- Food spending analytics
- Commute optimization insights
- Account-level analysis
- Recurring payment detection
-
Transactions Tab - Full transaction list
- Running balance column
- Advanced filtering and search
- Proper sorting on all columns
- Pagination and export capabilities
-
Budget & Goals Tab - Financial planning
- Budget tracking by category
- Goal setting and monitoring
- Budget vs actual comparison
- Progress visualization
Automatically calculated for your data:
- Savings rate and financial health score
- Daily and monthly burn rates
- Spending velocity (are you spending more than usual?)
- Category concentration (is spending too concentrated?)
- Weekend vs weekday spending patterns
- Most frequent categories and transaction patterns
- Potential savings opportunities
- Large transaction alerts
- Running balance throughout the period
- Ensure file follows the exact format specified
- Check that all required columns are present
- Verify date format is DD/MM/YYYY
- For Excel files, ensure data is in the first worksheet
- Check browser console for JavaScript errors
- Ensure all dependencies are installed correctly
- Verify file data is properly formatted
- Run
pnpm installto ensure all dependencies are installed - Check Node.js version compatibility (>=20.0.0 required)
- Clear pnpm cache:
pnpm store prune
Comprehensive technical documentation is available in the docs/ folder:
- Architecture Guide - System design, patterns, and technical decisions
- Data Flow Diagram - Visual representation of data flow
- TypeScript Migration - Migration guide and best practices
- Phase 1 Report - Project milestones and achievements
π View Full Documentation Index β
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Commit changes:
git commit -m 'Add new feature' - Push to branch:
git push origin feature-name - Submit a Pull Request
Before contributing:
- Review the Architecture Guide
- Follow TypeScript best practices from the Migration Guide
- Add tests for new business logic
| Project | Description |
|---|---|
| LeetCode Rating Predictor | Full-stack ML-powered LeetCode contest rating predictor |
| InstagramLikesLeaderboard | Browser tool showing who likes your Instagram posts the most |
| claude-cost-optimizer | Save 30-60% on Claude Code costs - proven strategies and benchmarks |
| Contact Manager | Full-stack MERN contact manager with CRUD and dark mode |
This project is open source and available under the MIT License.
Sagar Gupta
- GitHub: @Sagargupta16
- Built with Create React App
- Charts powered by Chart.js
- Icons by Lucide
- Styled with Tailwind CSS
β Star this repository if you find it helpful!