How piyushtanwani/spendwise works
Spendwise is a personal-finance tracker with a friend-to-friend expense-splitting product. Users authenticate, then manage transactions, categories and budgets or use the Split area to manage friends, record shared expenses and settle balances; the dashboard summarizes personal and shared finances. The graph follows the React page-to-API flow into Express routes, controllers and MongoDB models. Several feature modules are represented at their exact source paths, but their internal calls were not sampled; edges are limited to README statements and relationships listed in the SOURCE INDEX.
Main entry points: server.js Express app · api.js Axios API client · models MongoDB models · authController.js Authentication
Components 22
React application
- Auth screens
client/src/pages - Session state
client/src/context/AuthContext.jsx - Finance dashboard
client/src/pages/Dashboard.jsx - Transactions screen
client/src/pages/Transactions.jsx - Categories screen
client/src/pages/Categories.jsx - Budgets screen
client/src/pages/Budgets.jsx - Split workspace
client/src/pages/Split.jsx - Axios API client
client/src/services/api.js
Express API
- Express app
server/server.js - Auth routes
server/routes/authRoutes.js - Authentication
server/controllers/authController.js - MongoDB models
server/models - SMTP email
server/utils/emailService.js
Personal finance
- Analytics
server/controllers/analyticsController.js - Transactions
server/controllers/transactionController.js - Categories
server/controllers/categoryController.js - Budgets
server/controllers/budgetController.js
Expense splitting
- Friend management
server/controllers/friendController.js - Shared expenses
server/controllers/splitController.js
Other components
- User
- Google Identity
- MongoDB
Connections 28
- User → Auth screens: signs in
- Auth screens → Session state: submits credentials
client/src/pages/Register.jsx - Session state → Axios API client: calls endpoints
client/src/context/AuthContext.jsx - Axios API client → Express app: sends requests
- Express app → Auth routes: mounts routes
server/server.js - Auth routes → Authentication: dispatches
server/routes/authRoutes.js - Authentication → MongoDB models: reads and writes
server/controllers/authController.js - Authentication → SMTP email: sends OTP
server/controllers/authController.js - Authentication → Google Identity: verifies credential
server/controllers/authController.js - Finance dashboard → Axios API client: fetches summaries
client/src/pages/Dashboard.jsx - Transactions screen → Axios API client: manages transactions
- Categories screen → Axios API client: manages categories
client/src/pages/Categories.jsx - Budgets screen → Axios API client: manages budgets
client/src/pages/Budgets.jsx - Split workspace → Axios API client: uses split endpoints
client/src/pages/Split.jsx - Express app → Transactions: routes requests
server/server.js - Express app → Categories: routes requests
server/server.js - Express app → Budgets: routes requests
server/server.js - Express app → Analytics: routes requests
server/server.js - Express app → Friend management: routes requests
server/server.js - Express app → Shared expenses: routes requests
server/server.js - Transactions → MongoDB models: reads and writes
server/controllers/transactionController.js - Categories → MongoDB models: reads and writes
server/controllers/categoryController.js - Budgets → MongoDB models: reads and writes
server/controllers/budgetController.js - Analytics → MongoDB models: queries data
- Friend management → MongoDB models: reads and writes
server/controllers/friendController.js - Shared expenses → MongoDB models: reads and writes
server/controllers/splitController.js - Friend management → Shared expenses: computes balances
server/controllers/friendController.js - Express app → MongoDB: connects
server/server.js