Inspiration

What it does

How we built it

Challenges we ran into

Accomplishments that we're proud of

What we learned

What's next for FinTrackr

I was inspired to build this personal finance tracker after watching friends and family struggle with scattered receipts, forgotten ATM withdrawals, and surprise overdrafts—classic signs of manual tracking gone wrong. Like many in Chandigarh, where rising costs for groceries and fuel hit hard, I saw how a simple tool could empower better habits without relying on privacy-risky apps like Mint or bank-linked trackers. My goal: a lightweight Ruby CLI app using the Envelope Budgeting System, where you allocate "envelopes" (budgets) for categories like Food or Transport, making overspending visually obvious. What I Learned Diving into Ruby deepened my appreciation for its elegance in handling data structures and file I/O. Key takeaways: Persistence with JSON: Ruby's JSON library made serializing transactions a breeze—no need for a full DB initially. Real-time Analytics: Using hashes for categories let me compute balances on-the-fly, like total spent S_c=∑_(t∈C) |amount_t | for category C. CLI Polish: Gems like colorize and tty-prompt turned a bare script into an interactive tool, teaching me user-friendly UX in terminals. Rails Teaser: Prototyping a web version showed MVC patterns shine for scaling to reports with charts. How I Built It I started with a CLI prototype in pure Ruby, then iterated toward modularity. Core Models: Defined a Transaction class with attributes (date, amount, category, description). Positive amounts for income, negative for expenses. class Transaction attr_accessor :date, :amount, :category, :description def initialize(date, amount, category, description) @date = date @amount = amount.to_f @category = category @description = description end end

Data Store: A FinanceTracker class manages an array of transactions, loads/saves to data.json.
Balance: running_balance = transactions.map(&:amount).sum
Category totals: Group by category using group_by.
CLI Interface: Main loop with options:
Add transaction: Prompt inputs, categorize (Food, Transport, etc.).
View balance/report: Weekly/monthly summaries, e.g., "Food: ₹500/₹800 (62.5%)".
Budgets: Hash of { "Food" => 800 }; track progress as p=S_c/B_c ×100%.
Analytics: Methods for summaries:

Monthly Report:

  • Total Income: ₹5000
  • Total Expenses: -₹3200
  • Balance: ₹1800 Food: ₹500 / ₹800 (62.5%)

    Persistence & Polish: Auto-save on exit. Added validation (e.g., valid dates via Date.parse). For v2, swapped to SQLite with sequel gem for queries like SELECT SUM(amount) FROM transactions WHERE category = 'Food'. Full repo would be on GitHub, but here's the essence in ~200 LOC.

Challenges Faced Date Handling: Parsing Indian formats (DD-MM-YYYY) tripped me up—fixed with custom parsing and Date.strptime. Negative Balances: Early versions didn't flag envelope overruns clearly; solved by alerts like "Food envelope empty!". Scalability: CLI felt limiting for charts—prototyped Chartkick in Rails but stuck to CLI for privacy/local focus. Edge Cases: Timezones (IST quirks) and multi-currency hints were fun puzzles, using BigDecimal for precision. This project boosted my Ruby confidence and net worth tracking—now I save 20% more monthly!

Built With

  • and-mvc-structure.-pure-ruby-suits-simple-cli-apps-with-local-persistence.-databases-sqlite-enables-easy-local-setup-for-development-and-persistence-via-rails-migrations.-postgresql-supports-production-scale
  • apis
  • authentication-(e.g.
  • bootstrap
  • core-language-ruby-serves-as-the-primary-programming-language-for-both-cli-tools-using-core-features-like-file-i/o-and-full-web-apps-via-frameworks.-frameworks-ruby-on-rails-is-commonly-used-for-web-based-versions
  • css
  • devise-gem)
  • emphasizing
  • handling-crud
  • local/privacy-focused
  • or-platforms-are-specified
  • or-tailwind-css-for-rails-views.-no-cloud-services
  • secure-storage-with-better-concurrency.-csv-or-json-files-work-for-lightweight-cli-data-saving.-additional-tech-front-end-often-includes-html
Share this project:

Updates