How hexagondigitalservices/expensetracker works
This repository implements a personal-finance tracker for recording income and expenses, reviewing transactions over time, and viewing financial summaries. The main workflow runs from the browser through the React application: users manage transactions in the income or expense views, while the shared layout fetches and refreshes transaction lists. The backend controllers provide transaction and overview operations, with MongoDB models defining income and expense records. Dashboard calculations and export/chart capabilities are represented where supported by the supplied excerpts; backend routing and authentication implementation were not present in the sampled files.
Main entry points: Layout.jsx Transaction workspace · App.jsx App and auth state · Income.jsx Income management · Expense.jsx Expense management
Components 18
Web application
- App and auth state
frontend/src/App.jsx - Transaction workspace
frontend/src/components/Layout.jsx - Dashboard summaries
frontend/src/pages/Dashboard.jsx - Income management
frontend/src/pages/Income.jsx - Expense management
frontend/src/pages/Expense.jsx - Profile view
frontend/src/pages/Profile.jsx - Login
frontend/src/components/Login.jsx - Signup
frontend/src/components/Signup.jsx - Timeframe controls
frontend/src/components/TimeFrame.jsx - Transaction display
frontend/src/components/TransactionItem.jsx - Date and chart helpers
frontend/src/components/Helpers.jsx
Finance backend
- Dashboard calculations
backend/controllers/dashboardController.js - Income operations
backend/controllers/incomeController.js - Expense operations
backend/controllers/expenseController.js - Date range selection
backend/utils/dateFilter.js
Transaction storage
- Income records
backend/models/incomeModel.js - Expense records
backend/models/expenseModel.js
Other components
- Finance user
Connections 23
- Finance user → App and auth state: uses
- App and auth state → Transaction workspace: hosts workspace
- App and auth state → Login: presents login
- App and auth state → Signup: presents signup
- Transaction workspace → Dashboard summaries: shows summaries
- Transaction workspace → Income management: routes to
- Transaction workspace → Expense management: routes to
- Transaction workspace → Profile view: routes to
- Transaction workspace → Income operations: fetches income
- Transaction workspace → Expense operations: fetches expenses
- Income management → Income operations: requests operations
- Expense management → Expense operations: requests operations
- Dashboard summaries → Dashboard calculations: requests summary
- Income management → Timeframe controls: selects range
- Expense management → Timeframe controls: selects range
- Income management → Date and chart helpers: builds chart points
- Expense management → Date and chart helpers: builds chart points
- Transaction workspace → Transaction display: renders transactions
- Income operations → Income records: reads and writes
- Expense operations → Expense records: reads and writes
- Expense operations → Date range selection: selects date range
- Dashboard calculations → Income records: aggregates income
- Dashboard calculations → Expense records: aggregates expenses