DevPrep
  • Interview Prep
  • Projects
  • Resources
  • Pricing
  • About Us
Submit Question
DevPrep
  • Pricing
  • About Us
Submit Question
← From Beginner to Expert in Fundamentals of Frontend
  • Project 1: The Performance-First Dashboard
  • Project 2: Accessible Video Player
  • Project 3: Markdown Blog Engine
  • Project 4: Browser-Based Code Editor
  • Project 5: Multi-Tab Whiteboard
  • Project 6: Infinite Scroll Image Gallery
  • Project 7: Recipe Optimizer & Converter
  • Project 8: Budget Tracker with Charts
  • Project 9: Typing Speed Test
  • Project 10: Weather App with Time-Travel
  • Project 11: CSS Grid Layout Builder
  • Project 12: Password Vault (Frontend Only)
  • Project 13: Kanban Board (Trello Clone)
  • Project 14: Quiz App with Leaderboard
  • Project 15: Habit Tracker (GitHub Style)
  • Project 16: E-commerce Product Page
  • Project 17: Unit Converter (Expert Mode)
  • Project 18: Music Visualizer
  • Project 19: Flashcard Learning App
  • Project 20: Custom Form Validator
  • Project 21: Virtual Terminal
  • Project 22: Pomodoro Timer (Focus Pro)
  • Project 23: SVG Path Editor
  • Project 24: Movie Database Matchmaker
  • Project 25: Interactive Resume / Portfolio
  • Project 26: Recipe Scraper UI
  • Project 27: Crypto Tracker (Real-Time)
  • Project 28: Find My Pet (PWA)
  • Project 29: Markdown-to-Slide Tool
  • Project 30: Browser Health Dashboard
← From Beginner to Expert in Fundamentals of Frontend

Project 8: Budget Tracker with Charts

45 min read
CRUD OperationsChart.js / D3.jsCSV Import/ExportData AggregationLocalStoragePrivacy UX

📋 Project Brief

Build a personal finance dashboard that transforms raw transaction data into insightful visual charts. You will implement a full CRUD system with LocalStorage persistence, integrate a charting library (Chart.js or D3.js), and perform complex data aggregation — grouping expenses by category, calculating trends, and generating percentage breakdowns.

🎯 Learning Objectives

  • Build a complete CRUD interface with form validation
  • Integrate and customize a charting library for data visualization
  • Perform complex array operations: groupBy, reduce, sort, and percentage calculations
  • Implement CSV import/export using the File and Blob APIs
  • Design a "Privacy Mode" that obscures sensitive financial data

✅ Feature Requirements

Feature 1: Interactive Charts

Acceptance Criteria:

  • A pie chart shows expense distribution by category (Food, Transport, Entertainment, etc.)
  • A line chart shows spending trends over the last 30 days
  • Hovering over a chart segment shows a tooltip with the exact amount and percentage
  • Charts must update in real-time when transactions are added, edited, or deleted
  • Charts must be responsive and readable on mobile screens

Feature 2: CSV Import/Export

Acceptance Criteria:

  • Export: A "Download CSV" button generates a file with columns: Date, Description, Category, Amount
  • Import: Users can upload a CSV file that parses and adds transactions to the app
  • The import must validate data: skip rows with missing amounts, flag invalid dates
  • Show a preview of imported data before confirming the import
  • Handle encoding issues (UTF-8 BOM)

Feature 3: Category Budgeting

Acceptance Criteria:

  • Users can set a monthly budget for each category (e.g., Food: $500)
  • A progress bar shows current spending vs. budget for each category
  • The bar turns yellow at 80% and red at 100%
  • A notification appears when a category budget is exceeded

Feature 4: Recursive Totals

Acceptance Criteria:

  • Auto-calculate: daily average, weekly total, monthly total, and yearly projection
  • All calculations update when any transaction is modified
  • Show "vs. last month" percentage change with green (down) / red (up) indicators

Feature 5: Privacy Toggle ("Ghost Mode")

Acceptance Criteria:

  • A toggle button blurs all currency amounts across the entire app
  • Charts should show relative proportions but hide actual numbers
  • The toggle state persists in the session (not across refreshes for security)
  • Keyboard shortcut: Ctrl+Shift+H to toggle

📊 Data Model

FieldTypeRequiredValidation
idUUIDYesAuto-generated
dateDateYesCannot be in the future
descriptionStringYes1-100 characters
categoryEnumYesMust be from predefined list
amountNumberYesPositive number, max 2 decimal places
typeEnumYes"income" or "expense"

🧪 Testing Checklist

  • Unit test all aggregation functions (daily average, monthly total, percentage change)
  • Unit test CSV parsing with edge cases (commas in descriptions, empty rows)
  • Integration test: adding a transaction updates the chart
  • Integration test: import CSV → verify transactions appear in list
  • A11y: charts must have text alternatives for screen readers

🚀 Stretch Goals

  • Add recurring transactions (e.g., monthly rent auto-added)
  • Implement a "Savings Goal" tracker with a target date
  • Add multi-currency support with live exchange rates
  • Create a year-end financial summary report

Practice

  • JavaScript
  • DSA
  • Machine Coding
  • System Design

Resources

  • Learning Tracks
  • Articles
  • Roadmaps
  • Compare Concepts
  • Glossary
  • Developer Tools
  • All Questions

Company

  • About
  • Pricing

Legal

  • Privacy Policy
  • Terms of Service
DevPrep

© 2026 DevPrep. All rights reserved.