How ab7-dev/expense-tracker-dashboard works
Finsight is a personal finance tracker: users authenticate, record income and expenses, set category budgets, and view dashboards, trends, yearly summaries, and rule-based insights. The graph follows the frontend routes and API calls into backend routing, controllers, services, and persistence. README documents OAuth and the analytics capabilities; analytics implementation was not sampled, so those internal relationships are shown only where documented or indexed.
Main entry points: App.tsx Routes and providers · index.ts API client functions · transaction.routes.ts API route modules · prisma.ts Prisma client
Components 32
Finance dashboard
- Routes and providers
finsight-frontend/src/App.tsx - Auth state
finsight-frontend/src/context/AuthContext.tsx - Sign in and register
finsight-frontend/src/pages/LoginPage.tsx - Profile settings
finsight-frontend/src/pages/ProfileSettingsPages.tsx - Transaction management
finsight-frontend/src/pages/TransactionsPage.tsx - Transaction editor
finsight-frontend/src/components/forms/TransactionModal.tsx - Budget management
finsight-frontend/src/pages/BudgetsPage.tsx - Budget editor
finsight-frontend/src/components/forms/BudgetModal.tsx - Dashboard
finsight-frontend/src/pages/DashboardPage.tsx - Analytics views
finsight-frontend/src/pages/AnalyticsPage.tsx - Charts
finsight-frontend/src/components/charts/OverviewBarChart.tsx - API client functions
finsight-frontend/src/api/index.ts - HTTP and JWT client
finsight-frontend/src/api/client.ts
REST API
- Express application
finsight-backend/src/index.ts - API route modules
finsight-backend/src/routes/transaction.routes.ts - Authentication routes
finsight-backend/src/routes/auth.routes.ts - Request validation
finsight-backend/src/middleware/validate.ts - Response helpers
finsight-backend/src/utils/response.ts
Identity and access
- JWT guard
finsight-backend/src/middleware/auth.ts - Auth controller
finsight-backend/src/controllers/auth.controller.ts - Account and login
finsight-backend/src/services/auth.service.ts - JWT signing
finsight-backend/src/utils/jwt.ts
Finance operations
- Transaction controller
finsight-backend/src/controllers/transaction.controller.ts - Transaction operations
finsight-backend/src/services/transaction.service.ts - Budget controller
finsight-backend/src/controllers/budget.controller.ts - Budget operations
finsight-backend/src/services/budget.service.ts - Analytics controller
finsight-backend/src/controllers/analytics.controller.ts - Analytics and insights
finsight-backend/src/services/analytics.service.ts - Category listing
finsight-backend/src/controllers/category.controller.ts
Data persistence
- Prisma client
finsight-backend/src/utils/prisma.ts - PostgreSQL data
Other components
- Finance user
Connections 45
- Finance user → Routes and providers: uses
finsight-frontend/src/App.tsx - Routes and providers → Auth state: provides auth
finsight-frontend/src/App.tsx - Routes and providers → Sign in and register: routes public
finsight-frontend/src/App.tsx - Routes and providers → Transaction management: routes protected
finsight-frontend/src/App.tsx - Routes and providers → Budget management: routes protected
finsight-frontend/src/App.tsx - Routes and providers → Dashboard: routes protected
finsight-frontend/src/App.tsx - Routes and providers → Analytics views: routes protected
finsight-frontend/src/App.tsx - Routes and providers → Profile settings: routes protected
finsight-frontend/src/App.tsx - Sign in and register → Auth state: calls auth
finsight-frontend/src/pages/LoginPage.tsx - Auth state → API client functions: calls auth API
finsight-frontend/src/context/AuthContext.tsx - Transaction management → API client functions: requests data
finsight-frontend/src/pages/TransactionsPage.tsx - Transaction management → Transaction editor: opens editor
finsight-frontend/src/pages/TransactionsPage.tsx - Budget management → API client functions: requests data
finsight-frontend/src/pages/BudgetsPage.tsx - Budget management → Budget editor: opens editor
finsight-frontend/src/pages/BudgetsPage.tsx - Dashboard → API client functions: requests summaries
finsight-frontend/src/pages/DashboardPage.tsx - Dashboard → Charts: renders charts
finsight-frontend/src/pages/DashboardPage.tsx - Analytics views → API client functions: requests analytics
finsight-frontend/src/pages/AnalyticsPage.tsx - Analytics views → Charts: renders trends
finsight-frontend/src/pages/AnalyticsPage.tsx - Profile settings → API client functions: requests account
finsight-frontend/src/pages/ProfileSettingsPages.tsx - API client functions → HTTP and JWT client: sends requests
finsight-frontend/src/api/index.ts - HTTP and JWT client → Express application: calls REST API
- Express application → API route modules: mounts routers
finsight-backend/src/index.ts - Express application → Authentication routes: mounts router
finsight-backend/src/index.ts - API route modules → Transaction controller: dispatches
finsight-backend/src/routes/transaction.routes.ts - API route modules → Budget controller: dispatches
- API route modules → Analytics controller: dispatches
- API route modules → Category listing: dispatches
- Authentication routes → Auth controller: dispatches
finsight-backend/src/routes/auth.routes.ts - Authentication routes → Request validation: validates input
finsight-backend/src/routes/auth.routes.ts - API route modules → JWT guard: guards requests
finsight-backend/src/routes/transaction.routes.ts - Authentication routes → JWT guard: guards routes
finsight-backend/src/routes/auth.routes.ts - Transaction controller → Transaction operations: calls operations
finsight-backend/src/controllers/transaction.controller.ts - Budget controller → Budget operations: calls operations
finsight-backend/src/controllers/budget.controller.ts - Analytics controller → Analytics and insights: calls analytics
- Auth controller → Account and login: calls account logic
finsight-backend/src/controllers/auth.controller.ts - Account and login → JWT signing: signs tokens
finsight-backend/src/services/auth.service.ts - JWT guard → JWT signing: verifies tokens
finsight-backend/src/middleware/auth.ts - Transaction operations → Prisma client: queries
finsight-backend/src/services/transaction.service.ts - Budget operations → Prisma client: queries
finsight-backend/src/services/budget.service.ts - Account and login → Prisma client: queries
finsight-backend/src/services/auth.service.ts - Category listing → Prisma client: reads categories
finsight-backend/src/controllers/category.controller.ts - Analytics and insights → Prisma client: queries data
- Prisma client → PostgreSQL data: reads and writes
- Transaction controller → Response helpers: formats responses
finsight-backend/src/controllers/transaction.controller.ts - JWT guard → Response helpers: returns errors
finsight-backend/src/middleware/auth.ts