How kirtijha-devloper/whitelable-server works
This is a multi-tenant payments and merchant operations API. Users and administrators enter through HTTP routes; the application handles bill payments, payouts, POS transaction processing, wallet/ledger accounting, settlement, and operational configuration. Its README also documents OTP delivery and Razorpay/Everlife webhook authentication. The graph emphasizes sampled runtime flows and major product areas visible in the tree; several unsampled subsystems are represented at their existing directory paths, without asserting internal calls that the excerpts do not establish.
Main entry points: server.js HTTP API · ledgerService.js Ledger accounting · razorpayWebhookWorker.js Razorpay processing · validateTokenHandler.js Token and roles
Components 23
Access and administration
- Token and roles
middleware/validateTokenHandler.js - Tenant domain
middleware/validateWhitelabelDomain.js - User administration
controllers/userController.js - Admin operations
controllers/adminController.js - Service settings
services/serviceSettingsService.js
Payments and accounting
- BBPS credit bills
controllers/cc/bbps/bbpsCCBillController.js - Bill Avenue bills
controllers/cc/billAvenue/billAvenueBillController.js - Payouts
controllers/payments/branchxController.js - Credxpay payouts
controllers/credxpay/payoutController.js - Ledger accounting
services/ledgerService.js - Ledger records
models/Ledger.js
POS and settlement
- POS operations
controllers/posMachineController.js - Transaction charges
services/chargeService.js - Settlement management
services/settlementService.js - Reports and reconciliation
controllers/reportController.js - Inventory management
controllers/inventoryController.js
Payment integrations
- Razorpay webhook routes
routes/razorpay/webhook/notificationRoutes.js - Razorpay notifications
controllers/razorpay/webhook/notificationController.js - Razorpay processing
workers/razorpayWebhookWorker.js - Webhook notifications
models/RazorpayNotification.js - Bulk9 SMS gateway
Application runtime
- HTTP API
server.js
Other components
- Merchant or admin
Connections 29
- Merchant or admin → HTTP API: sends requests
- HTTP API → Token and roles: validates tokens
- HTTP API → Tenant domain: checks domain
- Token and roles → User administration: authorizes users
middleware/validateTokenHandler.js - Token and roles → Tenant domain: loads company
middleware/validateWhitelabelDomain.js - HTTP API → Admin operations: routes requests
- HTTP API → BBPS credit bills: routes bill requests
- HTTP API → Bill Avenue bills: routes bill requests
- HTTP API → Payouts: routes payouts
- HTTP API → Credxpay payouts: routes payouts
- Admin operations → Service settings: manages services
- BBPS credit bills → Ledger accounting: checks balance
controllers/cc/bbps/bbpsCCBillController.js - BBPS credit bills → Ledger accounting: records payment
controllers/cc/bbps/bbpsCCBillController.js - Bill Avenue bills → Ledger accounting: records accounting
controllers/cc/billAvenue/billAvenueBillController.js - Payouts → Ledger accounting: records payout
controllers/payments/branchxController.js - Credxpay payouts → Ledger accounting: records payout
controllers/credxpay/payoutController.js - Ledger accounting → Ledger records: reads and writes
services/ledgerService.js - HTTP API → Razorpay webhook routes: mounts routes
server.js - Razorpay webhook routes → Razorpay notifications: dispatches events
routes/razorpay/webhook/notificationRoutes.js - Razorpay notifications → Webhook notifications: stores notifications
controllers/razorpay/webhook/notificationController.js - Razorpay notifications → Razorpay processing: processes events
controllers/razorpay/webhook/notificationController.js - Razorpay processing → Webhook notifications: loads notifications
workers/razorpayWebhookWorker.js - Razorpay processing → Transaction charges: calculates charges
workers/razorpayWebhookWorker.js - Razorpay processing → Ledger accounting: posts entries
workers/razorpayWebhookWorker.js - HTTP API → POS operations: routes operations
- HTTP API → Settlement management: runs settlement
- HTTP API → Reports and reconciliation: routes reports
- HTTP API → Inventory management: routes inventory
- User administration → Bulk9 SMS gateway: sends OTP