How abooddeveloper/infoza-tech-pocket works
Pocketwise is a personal income and expense tracker. A user works through the browser UI to register or sign in, then uses authenticated transaction operations and filtered summaries to review a dashboard with balances, category breakdowns, a six-month chart, and recent activity. Express routes requests through controllers to services, which perform user-scoped Prisma operations against PostgreSQL. The README documents dashboard and security capabilities beyond the sampled browser source; those UI details and some middleware wiring are therefore represented at the documented level.
Main entry points: app.js Express app · transactionController.js Transaction controller · authController.js Auth controller · db.js Prisma client
Components 18
Browser experience
- Dashboard UI
public/app.js
HTTP API
- Express app
src/app.js - Auth routes
src/routes/authRoutes.js - Transaction routes
src/routes/transactionRoutes.js - Auth controller
src/controllers/authController.js - Transaction controller
src/controllers/transactionController.js - Bearer auth
src/middleware/auth.js - Error responses
src/middleware/errorHandler.js
Account and money
- Account service
src/services/authService.js - Transaction service
src/services/transactionService.js - Input validation
src/utils/validation.js - Async wrapper
src/utils/asyncHandler.js - HTTP errors
src/utils/httpError.js
Runtime and storage
- App configuration
src/config.js - Prisma client
src/db.js - PostgreSQL
prisma/schema.prisma - Server runtime
src/server.js
Other components
- Tracker user
Connections 23
- Tracker user → Dashboard UI: uses
README.md - Dashboard UI → Express app: requests API
README.md - Express app → Dashboard UI: serves UI
src/app.js - Express app → Auth routes: mounts
src/app.js - Express app → Transaction routes: mounts
src/app.js - Express app → Error responses: handles errors
src/app.js - Auth routes → Auth controller: routes to
src/routes/authRoutes.js - Transaction routes → Bearer auth: protects routes
src/routes/transactionRoutes.js - Transaction routes → Transaction controller: routes to
src/routes/transactionRoutes.js - Auth controller → Account service: calls
src/controllers/authController.js - Transaction controller → Transaction service: calls
src/controllers/transactionController.js - Auth controller → Input validation: validates email
src/controllers/authController.js - Transaction controller → Input validation: validates dates
src/controllers/transactionController.js - Auth controller → Async wrapper: wraps handlers
src/controllers/authController.js - Transaction controller → Async wrapper: wraps handlers
src/controllers/transactionController.js - Transaction controller → HTTP errors: raises errors
src/controllers/transactionController.js - Account service → Prisma client: queries users
src/services/authService.js - Account service → App configuration: signs tokens
src/services/authService.js - Transaction service → Prisma client: queries transactions
src/services/transactionService.js - Bearer auth → App configuration: checks tokens
src/middleware/auth.js - Prisma client → PostgreSQL: persists data
README.md - Server runtime → Express app: starts
src/server.js - Server runtime → Prisma client: disconnects
README.md