How alphatech29/bittrixpay-backend works
Bittrixpay is a fintech REST and WebSocket backend for Nigerian-naira wallets, crypto, and related digital services. The main user workflow enters through versioned API routes, passes through controllers and business services, then updates the MySQL-backed wallet, ledger, or domain records; provider callbacks and scheduled reconciliation complete asynchronous transactions. The map also preserves crypto operations, other product services, staff access control, notifications, and real-time delivery. Relationships are limited to README documentation and shown source references; some product branches are documented but their detailed call paths were not sampled.
Main entry points: models Domain models · user Request controllers · notification Notifications · cryptoWallet.service.js Crypto wallet
Components 25
API and identity
- API routes
routes/v1/user.routes.js - Authentication
services/auth/auth.service.js - Request controllers
controllers/user
Wallet and crypto
- Wallet and ledger
services/wallet - Crypto wallet
services/crypto/cryptoWallet.service.js - Crypto sweeps
services/crypto/cryptoSweep.service.js - Crypto chain services
integrations/crypto - Fiat payments
integrations/flutterwave/flutterwave.js
Digital products
- Gift cards
services/giftcard/giftcard.service.js - Digital accounts
services/digitalAccount/digitalAccount.service.js - eSIM services
services/esim/esim.service.js - Telecom and bills
services/telecom - Virtual numbers
services/virtualNumber
Operations and access
- Crypto callbacks
webhook/tatum.webhook.js - Fiat callbacks
webhook/flutterwave.webhook.js - Reconciliation jobs
jobs/depositReconciliation.service.js - Job scheduler
jobs/engine/cronEngine.js - Staff access
services/access
Data and delivery
- MySQL data layer
config/database.js - Domain models
models - Notifications
services/notification - Mail queue
mail/queue/mailQueue.service.js - WebSocket updates
sockets/socketServer.js - Push delivery
services/notification/pushNotification.service.js
Other components
- App user
Connections 24
- App user → API routes: calls API
README.md - API routes → Request controllers: dispatches
routes/v1/user.routes.js - Request controllers → Authentication: invokes
- Request controllers → Wallet and ledger: invokes
controllers/user/wallet.controller.js - Request controllers → Crypto wallet: invokes
controllers/user/cryptoWallet.controller.js - Authentication → Domain models: reads and writes
services/auth/auth.service.js - Wallet and ledger → Domain models: reads and writes
README.md - Crypto wallet → Crypto chain services: uses chain tools
services/crypto/cryptoWallet.service.js - Crypto wallet → WebSocket updates: publishes updates
services/crypto/cryptoWallet.service.js - Crypto callbacks → Crypto sweeps: requests sweeps
webhook/tatum.webhook.js - Fiat callbacks → API routes: enters callback route
- Reconciliation jobs → Crypto sweeps: triggers sweeps
jobs/depositReconciliation.service.js - Job scheduler → Reconciliation jobs: schedules
jobs/engine/cronEngine.js - Gift cards → Domain models: reads and writes
services/giftcard/giftcard.service.js - Digital accounts → Domain models: reads and writes
services/digitalAccount/digitalAccount.service.js - eSIM services → Domain models: reads and writes
services/esim/esim.service.js - Telecom and bills → Domain models: reads and writes
services/telecom/electricity.service.js - Staff access → Domain models: loads access profiles
README.md - Domain models → MySQL data layer: queries
README.md - Notifications → Domain models: stores notifications
services/notification/notification.service.js - Notifications → Push delivery: delivers push
- Notifications → WebSocket updates: emits events
- Mail queue → Domain models: loads settings
mail/queue/mailQueue.service.js - Fiat payments → App user: provides payment rails
README.md