Skip to content

Tolu2492/Budget-Tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Budget Tracker

A full stack personal finance application for tracking spending, managing monthly budgets, and analyzing expenses by category and time period. The system supports both manual transactions and automated bank data via Plaid.


Features

Authentication & Security

  • Email/password authentication (bcrypt)
  • Server-side sessions stored in SQLite
  • Secure, httpOnly cookies
  • CSRF protection for all state changing requests

Transactions

  • Manual transaction creation and deletion
  • Paginated transaction listing
  • Clear transaction type labeling:
    • Spent
    • Credit / Refund
  • Mock data import for testing and demos

Budgets

  • Monthly budgets by category (YYYY-MM)
  • One budget per category per month
  • Budget usage calculation
  • Remaining balance and usage percentage per category

Analytics Dashboard

  • Monthly spending totals (last 6 months)
  • Category level spending breakdown
  • Budget usage visualization
  • Spent only analytics model:
    • Credits/refunds remain visible in transactions
    • Credits/refunds are excluded from analytics and budgets

Plaid Integration

  • Plaid Link (Sandbox / Production)
  • Bank account linking
  • Incremental transaction sync using Plaid cursors
  • Plaid can be enabled or disabled via .env (PLAID_ENABLED=true|false)
  • Application functions fully without Plaid enabled

Tech Stack

Backend

  • Node.js
  • Express
  • SQLite
  • Plaid API
  • bcrypt
  • CSRF-CSRF

Frontend

  • React (Vite)
  • Fetch API with CSRF handling
  • Client-side page numbering

Architecture

Session Based Auth

  • Sessions stored server side in SQLite
  • Random session IDs stored in httpOnly cookies
  • Immediate session invalidation after logout

CSRF Protection

  • Cookie based CSRF tokens
  • Used on POST, PUT, and DELETE requests
  • Clean 403 handling for invalid tokens

Database Design

  • SQLite configured with:
    • foreign_keys = ON
    • journal_mode = WAL
    • busy_timeout to prevent lock errors
  • Seperate base schema and evolving features (e.g Plaid support)

Spent vs Credit Rules

  • Transactions store raw signed amounts
  • Budgets and analytics operate on outflows only
  • Prevents refunds or credits from distorting spending metrics

Local Startup

Backend

cd backend
cp .env.example .env
npm install
npm run db:migrate
npm run dev

Frontend

cd frontend
npm install
npm run dev

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published