How hadighany25/u-pay-bank works
U-Pay is a payment and account-management backend with a browser-based customer/admin interface. Its main flow is HTTP requests entering the Express server, being dispatched through feature routes and controllers, and updating account or transaction records; the server also exposes Socket.IO updates. The tree indicates broader capabilities including merchant payments, escrow, payroll, U-Fund, cards, communications, and gateway integration. Several of those modules were not excerpted, so their route-to-controller links are shown as unverified rather than inferred.
Main entry points: server.js HTTP and sockets · authMiddleware.js Access middleware · merchantController.js Merchant payments · transactionController.js Payment operations
Components 24
Entry and access
- HTTP and sockets
U-Pay Backend/server.js - Authentication routes
U-Pay Backend/routes/authRoutes.js - Identity and profile
U-Pay Backend/controllers/authController.js - Access middleware
U-Pay Backend/middleware/authMiddleware.js
Payments and accounts
- Account routes
U-Pay Backend/routes/accountRoutes.js - Account management
U-Pay Backend/controllers/accountController.js - Transaction routes
U-Pay Backend/routes/transactionRoutes.js - Payment operations
U-Pay Backend/controllers/transactionController.js - User accounts
U-Pay Backend/models/User.js - Transaction records
U-Pay Backend/models/Transaction.js
Product services
- Merchant routes
U-Pay Backend/routes/merchantRoutes.js - Merchant payments
U-Pay Backend/controllers/merchantController.js - Merchant profiles
U-Pay Backend/models/Merchant.js - Specialized API routes
U-Pay Backend/routes - Specialized services
U-Pay Backend/controllers - Payroll processing
U-Pay Backend/services/payrollProcessor.js - Payroll scheduler
U-Pay Backend/cron/payrollCron.js
Administration
- System settings
U-Pay Backend/services/systemService.js - Admin routes
U-Pay Backend/routes/adminRoutes.js - Administration
U-Pay Backend/controllers/adminController.js - Admin browser UI
public/admin/js - System settings store
U-Pay Backend/models/System.js
Other components
- API client
- Customer browser UI
public/js
Connections 35
- API client → HTTP and sockets: sends requests
- Customer browser UI → HTTP and sockets: calls API
- Admin browser UI → HTTP and sockets: calls API
- HTTP and sockets → Authentication routes: mounts routes
U-Pay Backend/server.js - HTTP and sockets → Transaction routes: mounts routes
U-Pay Backend/server.js - HTTP and sockets → Account routes: mounts routes
U-Pay Backend/server.js - HTTP and sockets → Merchant routes: mounts routes
U-Pay Backend/server.js - HTTP and sockets → Admin routes: mounts routes
U-Pay Backend/server.js - HTTP and sockets → Specialized API routes: mounts routes
U-Pay Backend/server.js - Authentication routes → Identity and profile: dispatches to
U-Pay Backend/routes/authRoutes.js - Authentication routes → Access middleware: protects routes
U-Pay Backend/routes/authRoutes.js - Account routes → Account management: dispatches to
U-Pay Backend/routes/accountRoutes.js - Account routes → Access middleware: protects routes
U-Pay Backend/routes/accountRoutes.js - Transaction routes → Payment operations: dispatches to
U-Pay Backend/routes/transactionRoutes.js - Transaction routes → Access middleware: protects routes
U-Pay Backend/routes/transactionRoutes.js - Merchant routes → Merchant payments: dispatches to
U-Pay Backend/routes/merchantRoutes.js - Merchant routes → Access middleware: protects routes
U-Pay Backend/routes/merchantRoutes.js - Admin routes → Administration: dispatches to
U-Pay Backend/routes/adminRoutes.js - Admin routes → Access middleware: checks roles
U-Pay Backend/routes/adminRoutes.js - Identity and profile → User accounts: reads and writes
U-Pay Backend/controllers/authController.js - Payment operations → User accounts: updates balances
U-Pay Backend/controllers/transactionController.js - Payment operations → Transaction records: records payments
U-Pay Backend/controllers/transactionController.js - Payment operations → Merchant profiles: resolves merchants
U-Pay Backend/controllers/transactionController.js - Merchant payments → Merchant profiles: manages profiles
U-Pay Backend/controllers/merchantController.js - Merchant payments → Transaction records: records charges
U-Pay Backend/controllers/merchantController.js - Merchant payments → User accounts: reads account owners
U-Pay Backend/controllers/merchantController.js - Access middleware → System settings: checks system status
U-Pay Backend/middleware/authMiddleware.js - System settings → System settings store: reads settings
U-Pay Backend/services/systemService.js - Administration → System settings: uses settings
U-Pay Backend/controllers/adminController.js - Administration → User accounts: manages users
U-Pay Backend/controllers/adminController.js - Administration → Transaction records: queries transactions
U-Pay Backend/controllers/adminController.js - Admin routes → Merchant payments: dispatches merchant actions
U-Pay Backend/routes/adminRoutes.js - Specialized API routes → Specialized services: dispatches to
U-Pay Backend/routes/adminRoutes.js - Payroll scheduler → Payroll processing: runs payroll
U-Pay Backend/cron/payrollCron.js - HTTP and sockets → Payroll scheduler: loads scheduler
U-Pay Backend/server.js