How thisa93/daily-expenses-manager works
This is a personal-finance tracking web app: users register or sign in, manage money sources, record transactions, then review balances, summaries and history; admins can manage users. The graph follows the shown Express routing and controller calls, with Mongoose models as the persistence layer. It also retains category seeding and the admin workflow. Source excerpts are partial, so unsampled features are represented only where the tree or source index supports them; unverified connections are omitted.
Main entry points: app.ts Express app · transactionController.ts Record and edit transactions · authMiddleware.ts Access checks · dashboardController.ts Dashboard summaries
Components 24
Web entry and access
- Express app
src/app.ts - Authentication routes
src/routes/authRoutes.ts - Sign-in and registration
src/controllers/authController.ts - Access checks
src/middlewares/authMiddleware.ts
Finance workflows
- Dashboard routes
src/routes/dashboardRoutes.ts - Dashboard summaries
src/controllers/dashboardController.ts - Source routes
src/routes/sourceRoutes.ts - Manage sources
src/controllers/sourceController.ts - Transaction routes
src/routes/transactionRoutes.ts - Record and edit transactions
src/controllers/transactionController.ts - Transaction history
src/controllers/historyController.ts - Dashboard view
src/views/dashboard.ejs - History and reports
src/views/transactions/history.ejs
Administration
- Admin routes
src/routes/adminRoutes.ts - Admin management
src/controllers/adminController.ts - Admin dashboard view
src/views/admin/dashboard.ejs
Persistence and categories
- Database connection
src/config/db.ts - User records
src/models/User.ts - Transaction records
src/models/Transaction.ts - Source records
src/models/Source.ts - Category records
src/models/Category.ts - Default category seeding
src/utils/seedCategories.ts
Other components
- Member
- Administrator
Connections 33
- Member → Express app: uses
- Administrator → Express app: uses
- Express app → Database connection: connects through
src/app.ts - Express app → Authentication routes: mounts
src/app.ts - Express app → Admin routes: mounts
src/app.ts - Express app → Dashboard routes: mounts
src/app.ts - Express app → Transaction routes: mounts
src/app.ts - Express app → Source routes: mounts
src/app.ts - Express app → User records: looks up
src/app.ts - Authentication routes → Sign-in and registration: routes to
src/routes/authRoutes.ts - Sign-in and registration → User records: creates and checks
src/controllers/authController.ts - Sign-in and registration → Default category seeding: seeds after login
src/controllers/authController.ts - Default category seeding → Category records: creates defaults
src/utils/seedCategories.ts - Dashboard routes → Access checks: protects
src/routes/dashboardRoutes.ts - Dashboard routes → Dashboard summaries: routes to
src/routes/dashboardRoutes.ts - Dashboard summaries → Source records: loads
src/controllers/dashboardController.ts - Dashboard summaries → Transaction records: aggregates and lists
src/controllers/dashboardController.ts - Dashboard summaries → Dashboard view: renders
src/controllers/dashboardController.ts - Source routes → Access checks: protects
src/routes/sourceRoutes.ts - Source routes → Manage sources: routes to
src/routes/sourceRoutes.ts - Manage sources → Source records: manages
src/controllers/sourceController.ts - Transaction routes → Access checks: protects
src/routes/transactionRoutes.ts - Transaction routes → Record and edit transactions: routes to
src/routes/transactionRoutes.ts - Record and edit transactions → Transaction records: creates and updates
src/controllers/transactionController.ts - Record and edit transactions → Source records: updates balances
src/controllers/transactionController.ts - Record and edit transactions → Category records: uses
src/controllers/transactionController.ts - Record and edit transactions → History and reports: renders history
src/controllers/transactionController.ts - Admin routes → Access checks: checks access
src/routes/adminRoutes.ts - Admin routes → Admin management: routes to
src/routes/adminRoutes.ts - Admin management → User records: manages
src/controllers/adminController.ts - Admin management → Transaction records: summarizes
src/controllers/adminController.ts - Admin management → Admin dashboard view: renders
src/controllers/adminController.ts - Access checks → User records: checks role
src/middlewares/authMiddleware.ts