How natbabi/expense-tracker-cli works
The repository contains two expense-management products: a local-storage React web app and a Node CLI backed by JSON files. The web flow moves from landing/authentication into expense entry and recurring generation, then dashboards, analytics and budgets; settings provide account and data management, while MelaAI answers questions from local financial context with optional Gemini integration. The CLI independently handles expense and budget commands and CSV export. Several pages and their internal wiring are represented from README capabilities and tree paths; those unsampled details are not asserted as direct calls.
Main entry points: App.jsx App Router · expenseStore.jsx Expense Store · authStore.jsx Auth Store · AIChatBot.jsx MelaAI Chat
Components 22
MelaFlow Web
- App Router
web-app/src/App.jsx - Landing
web-app/src/pages/LandingPage.jsx - Authentication
web-app/src/pages/Auth.jsx - Dashboard
web-app/src/pages/Dashboard.jsx - Expenses
web-app/src/pages/Expenses.jsx - Expense Table
web-app/src/components/ExpenseTable.jsx - Expense Form
web-app/src/components/ExpenseForm.jsx - Analytics
web-app/src/pages/Analytics.jsx - Budgeting
web-app/src/pages/Budget.jsx - Recurring
web-app/src/pages/Recurring.jsx - Settings & Export
web-app/src/pages/Settings.jsx - MelaAI Chat
web-app/src/components/AIChatBot.jsx
Expense Domain
- Date & Finance Helpers
web-app/src/utils/helpers.js
CLI Tracker
- CLI Commands
Expense-tracker.js - Expense & Budget JSON
- CSV Export File
Local State
- Auth Store
web-app/src/store/authStore.jsx - Expense Store
web-app/src/store/expenseStore.jsx - Theme Store
web-app/src/store/themeStore.jsx - Browser Storage
Other components
- User
- Gemini API
Connections 33
- User → App Router: opens
- App Router → Landing: renders
- App Router → Authentication: renders
- App Router → Dashboard: routes
- App Router → Expenses: routes
- App Router → Analytics: routes
- App Router → Budgeting: routes
- App Router → Recurring: routes
- App Router → Settings & Export: routes
- Landing → App Router: requests navigation
- Authentication → Auth Store: authenticates
- App Router → Auth Store: provides context
- App Router → Expense Store: provides context
- App Router → Theme Store: provides context
- Auth Store → Browser Storage: reads/writes
- Expense Store → Browser Storage: reads/writes
- Expenses → Expense Form: renders
- Expenses → Expense Table: renders
- Expense Form → Expense Store: dispatches changes
- Expense Table → Expense Store: deletes expenses
- Dashboard → Expense Store: reads financial state
- Analytics → Expense Store: reads financial state
- Budgeting → Expense Store: reads/sets budgets
- Recurring → Expense Store: manages templates
- Expense Store → Date & Finance Helpers: uses schedules
- MelaAI Chat → Expense Store: reads financial state
- MelaAI Chat → Auth Store: reads user
- MelaAI Chat → Gemini API: sends prompts
- Settings & Export → Expense Store: exports/imports/resets
- Settings & Export → Auth Store: manages account
- User → CLI Commands: runs commands
- CLI Commands → Expense & Budget JSON: reads/writes
- CLI Commands → CSV Export File: exports CSV