How stabix-protocol/stabix-pay- works
StabiX is a wallet and social-finance application with web/mobile-facing screens, an API backend, and blockchain workers. The user-facing flow includes account access, internal transfers and balance/history views, plus distinct deposit and withdrawal stages; deposits are detected, confirmed, credited, and swept, while withdrawals are queued and broadcast by a worker. The tree also shows chat, profiles, search, and administration features. Backend wiring is supported by the server and sampled routes; several controller and frontend internals were not sampled, so their downstream connections are left unspecified.
Main entry points: server.js HTTP and socket server · db.js Application database · ethereumSweepWorker.js Deposit sweep worker · app StabiX screens
Components 25
Client experience
- StabiX screens
stabix-frontend/app - Theme manager
stabix-frontend/components/ThemeManager.tsx - API client
stabix-frontend/lib/api.ts
Application API
- HTTP and socket server
backend/server.js - User routes
backend/routes/userRoutes.js - Transaction routes
backend/routes/transactionRoutes.js - Deposit routes
backend/routes/depositRoutes.js - Withdrawal routes
backend/routes/withdrawRoutes.js - Social routes
backend/routes - Account and profile
backend/controllers/userController.js - Transaction history
backend/controllers/transactionController.js - Deposit requests
backend/controllers/depositController.js - Withdrawal requests
backend/controllers/withdrawController.js - Chat and blocks
backend/controllers - Internal transfer service
backend/services/transactionService.js
Wallet operations
- Deposit listener
backend/services/EVM/Ethereum/deposit/ethereumDepositListener.js - Deposit scanner
backend/services/EVM/Ethereum/deposit/ethereumDepositScanner.js - Deposit processor
backend/services/EVM/Ethereum/deposit/ethereumDepositProcessor.js - Deposit crediting
backend/services/depositCreditService.js - Deposit sweep worker
backend/services/EVM/Ethereum/sweep/ethereumSweepWorker.js - Ethereum withdrawal worker
backend/services/EVM/Ethereum/withdraw/ethereumWithdrawService.js - Chain access
backend/services/blockchainService.js
Persistent state
- Application database
backend/config/db.js
Other components
- Wallet user
- Ethereum network
Connections 34
- Wallet user → StabiX screens: uses
- StabiX screens → API client: requests
- StabiX screens → Theme manager: applies theme
- API client → HTTP and socket server: calls API
- HTTP and socket server → User routes: dispatches
- HTTP and socket server → Transaction routes: dispatches
- HTTP and socket server → Deposit routes: dispatches
- HTTP and socket server → Withdrawal routes: dispatches
- HTTP and socket server → Social routes: dispatches
- User routes → Account and profile: dispatches
- Transaction routes → Transaction history: dispatches
- Deposit routes → Deposit requests: dispatches
- Withdrawal routes → Withdrawal requests: dispatches
- Social routes → Chat and blocks: dispatches
- Transaction history → Internal transfer service: invokes
- HTTP and socket server → Deposit listener: starts
- HTTP and socket server → Deposit scanner: starts
- HTTP and socket server → Deposit processor: starts
- HTTP and socket server → Ethereum withdrawal worker: starts
- HTTP and socket server → Deposit sweep worker: starts
- Deposit processor → Deposit crediting: credits deposits
- Deposit crediting → Deposit sweep worker: creates sweep job
- Deposit listener → Ethereum network: monitors
- Deposit scanner → Ethereum network: scans
- Chain access → Ethereum network: accesses chain
- Deposit sweep worker → Chain access: gets provider
- Ethereum withdrawal worker → Chain access: gets provider
- HTTP and socket server → Application database: checks connection
- Account and profile → Application database: queries
- Transaction history → Application database: queries
- Withdrawal requests → Application database: updates requests
- Deposit crediting → Application database: credits balances
- Deposit sweep worker → Application database: updates jobs
- Ethereum withdrawal worker → Application database: updates withdrawals