How rendbit/crossborderpayment works
Purpose and entry points
RendBit is a cross-border payments platform combining a Stellar-based wallet/transfer backend, fiat on/off-ramp providers, and a user-facing web client. The backend API starts at backend/src/server.ts; the SPA starts at client/src/main.tsx and composes routes/views through client/src/App.tsx. A separate Node proxy service is exposed from proxyserver/index.js.
API boundary and access control
Backend routes separate customer, administrative, compliance, super-admin, support, payment, and Stellar/SEP endpoints. Requests flow from route modules into controllers, then services, with validation and role-specific authentication middleware at the boundary.
• backend/src/routes/transaction.ts
• backend/src/routes/multisig.ts
• backend/src/middlewares/authMiddleWare.ts
Rate limiting, API-key checks, transaction-limit enforcement, standardized responses, and socket authentication are centralized middleware concerns rather than embedded in feature services.
Payment, wallet, and Stellar execution
Transaction orchestration is centered on transfer/transaction services and Stellar provider implementations. This layer likely builds/submits blockchain operations, retrieves Horizon data, supports Stellar authentication and SEP-24 anchor interactions, and records application-side transaction history.
• backend/src/services/transaction.ts
• backend/src/services/transfer.ts
• backend/src/providers/stellar/transactions.ts
Blockchain integration is abstracted behind a factory, allowing provider selection without coupling controllers directly to Stellar mechanics:
• backend/src/providers/blockchainFactory.ts
• backend/src/providers/stellar/horizonQueries.ts
• backend/src/controllers/sep24.ts
Fiat ramps and provider adapters
Fiat deposit/withdrawal and ramp workflows are handled through a provider-manager boundary and dedicated adapters for Linkio and SafeHaven. Controllers/services coordinate user-facing ramp state, while provider modules encapsulate external API behavior and country/bank/mobile-money integration.
• backend/src/providers/bank.provider.manager.ts
• backend/src/services/ramp.ts
• backend/src/services/providers/linkio/linkioRampAdapter.ts
Relevant persisted operational records include ramp transactions and withdrawals:
• backend/src/models/RampTransaction.ts
• backend/src/models/Withdrawal.ts
Security, identity, and compliance
Authentication includes JWT-oriented auth, MFA, PIN protections, KYC, liveness/face verification, guardian workflows, fraud detection, audit logging, and compliance-specific access. These checks form a gate around regulated money movement and privileged operations.
• backend/src/services/auth.ts
• backend/src/services/kyc.ts
• backend/src/services/liveness/livenessVerifier.ts
Security/compliance evidence and alerts are modeled separately from core users and transactions:
• backend/src/models/Kyc.ts
• backend/src/models/AuditLog.ts
• backend/src/models/FraudAlert.ts
Stateful payment products and asynchronous processing
Recurring payments, savings rules, and multisignature approvals have dedicated domain services and persistence. Scheduler/worker pairs indicate deferred execution outside the synchronous HTTP request path; RabbitMQ and Redis integrations provide material messaging/cache infrastructure.
• backend/src/services/recurringPayment.ts
• backend/src/services/savings.ts
• backend/src/services/multisigService.ts
• backend/src/jobs/recurringPaymentScheduler.ts
• backend/src/jobs/multisigWorker.ts
• backend/src/microservices/rabbitmq.ts
Client and real-time support experience
The React/Vite client provides wallet, send/receive, deposits, withdrawals, swaps, history, recurring-payment, and settings journeys. Client function modules form its backend/API integration layer. Support chat has both HTTP service/controller paths and Socket-based real-time delivery.
• client/src/pages/Wallet.tsx
• client/src/pages/Transfer.tsx
• client/src/function/transaction/index.ts
• backend/src/services/support/chat.ts
• backend/src/sockets/chat.ts
• backend/src/sockets/emitter.ts
Main entry points: routes/transaction.ts Payment API routes · services/transaction.ts Transfer orchestration · RampTransaction.ts Operational records · server.ts Backend server
Components 21
Web client
- React SPA · Wallet, transfer, ramp, and payment journeys.
client/src/App.tsx - Client API functions
client/src/function/transaction/index.ts - Node proxy
proxyserver/index.js
Backend API
- Backend server
backend/src/server.ts - Access middleware · Auth, roles, API keys, limits, rate limits, and socket auth.
backend/src/middlewares/authMiddleWare.ts - Payment API routes
backend/src/routes/transaction.ts - SEP-24 controller
backend/src/controllers/sep24.ts - Support chat
backend/src/services/support/chat.ts - Chat sockets
backend/src/sockets/chat.ts
Payment domains
- Identity & compliance · JWT, MFA, PIN, KYC, liveness, guardians, fraud, and audit controls.
backend/src/services/auth.ts - Transfer orchestration
backend/src/services/transaction.ts - Blockchain factory
backend/src/providers/blockchainFactory.ts - Stellar execution · Builds and submits operations and queries Horizon.
backend/src/providers/stellar/transactions.ts - Ramp workflows
backend/src/services/ramp.ts - Bank provider manager
backend/src/providers/bank.provider.manager.ts - Recurring, savings & multisig
backend/src/services/recurringPayment.ts - Operational records · Stores ramp, withdrawal, KYC, audit, fraud, and transaction evidence.
backend/src/models/RampTransaction.ts
Async processing
- Schedulers & workers · Executes deferred recurring and multisig work.
backend/src/jobs/recurringPaymentScheduler.ts - RabbitMQ & Redis
backend/src/microservices/rabbitmq.ts
External systems
- Stellar & anchors
- Linkio & SafeHaven
Connections 26
- React SPA → Client API functions: uses
- Client API functions → Node proxy: API requests
- Node proxy → Backend server: forwards
- Backend server → Access middleware: applies
- Access middleware → Payment API routes: authorizes
- Access middleware → SEP-24 controller: guards
- Payment API routes → Identity & compliance: identity checks
- Payment API routes → Transfer orchestration: money movement
- Payment API routes → Ramp workflows: deposits and withdrawals
- Payment API routes → Recurring, savings & multisig: product actions
- Transfer orchestration → Blockchain factory: selects provider
- Blockchain factory → Stellar execution: resolves
- Stellar execution → Stellar & anchors: submits and queries
- SEP-24 controller → Stellar & anchors: anchor flows
- Ramp workflows → Bank provider manager: uses adapters
- Bank provider manager → Linkio & SafeHaven: provider APIs
- Identity & compliance → Operational records: compliance evidence
- Transfer orchestration → Operational records: transaction history
- Ramp workflows → Operational records: ramp and withdrawal state
- Recurring, savings & multisig → Operational records: payment state
- Recurring, savings & multisig → Schedulers & workers: schedules execution
- Schedulers & workers → RabbitMQ & Redis: queues and cache
- Schedulers & workers → Transfer orchestration: executes transfers
- Backend server → Support chat: support API
- Support chat → Chat sockets: real-time delivery
- React SPA → Chat sockets: chat connection