How datle04/fintrack works
FinTrack is an Express backend for personal-finance tracking. A user authenticates, records transactions, and can review budgets, savings goals, dashboards, reports, and analytics; transaction changes can trigger budget checks and goal recalculation. Admin APIs provide oversight, while chat, uploads, email, and real-time notifications extend the product. The graph follows the documented route mounting and sampled calls; several feature controllers and integrations are represented at their exact tree paths, but their internal wiring is not inferred where source excerpts were unavailable.
Main entry points: app.ts Express app · models Finance models · transaction.controller.ts Transactions · auth.controller.ts Authentication
Components 27
API and access
- Express app
src/app.ts - Auth routes
src/routes/auth.routes.ts - Authentication
src/controllers/auth.controller.ts - Admin routes
src/routes/admin.routes.ts - Admin user controls
src/controllers/admin/user.controller.ts
Finance workflows
- Transaction routes
src/routes/transaction.routes.ts - Transactions
src/controllers/transaction.controller.ts - Budget features
src/controllers/budget.controller.ts - Budget alert checks
src/services/budget.service.ts - Savings goals
src/controllers/goal.controller.ts - Goal progress
src/services/goal.service.ts
Insights and reports
Persistence and operations
- Finance models
src/models - MongoDB
- Scheduled jobs
src/cron - Socket sessions
src/socket/sessionTracker.ts - Notifications
src/services/notification.service.ts
External integrations
- Chat proxy
src/controllers/chatProxy.controller.ts - AI service
- Upload handling
src/controllers/upload.controller.ts - Cloudinary
- Email delivery
src/services/email.service.ts - Email provider
Other components
- FinTrack user
- Administrator
Connections 33
- FinTrack user → Express app: requests API
- Administrator → Express app: admin requests
- Express app → Auth routes: mounts routes
- Express app → Admin routes: mounts routes
- Express app → Transaction routes: mounts routes
- Express app → Budget features: mounts budget routes
- Express app → Savings goals: mounts goal routes
- Express app → Dashboard: mounts dashboard routes
- Express app → Analytics: mounts analytics routes
- Express app → Reports: mounts report routes
- Express app → Chat proxy: mounts chat routes
- Express app → Upload handling: mounts upload routes
- Auth routes → Authentication: dispatches
- Admin routes → Admin user controls: dispatches
- Authentication → Finance models: reads and writes
- Transactions → Finance models: reads and writes
- Transactions → Budget alert checks: checks budget
- Transactions → Goal progress: recalculates progress
- Budget alert checks → Finance models: reads budget and transactions
- Savings goals → Finance models: reads and writes
- Savings goals → Goal progress: recalculates progress
- Dashboard → Finance models: reads finance data
- Analytics → Finance models: reads finance data
- Reports → Finance models: report data
- Finance models → MongoDB: persists data
- Scheduled jobs → Finance models: scheduled data work
- Express app → Socket sessions: sets up tracking
- Admin user controls → Notifications: sends notification
- Notifications → Socket sessions: emits events
- Chat proxy → AI service: proxies requests
- Upload handling → Cloudinary: uploads files
- Authentication → Email delivery: sends OTP
- Email delivery → Email provider: delivers email