How rohit-deogharkar/userbot works
userDexBot is a web app for linking a login to MetaMask, creating and funding a smart account, and enabling a permission-limited server-side trading bot. The browser presents the workflow and verifies permission transactions; the API coordinates authentication and wallet actions, while the strategy runner initiates automatic trades. README capabilities include deposits, withdrawals, stopping, test trades, on-chain permission rules, and KMS-backed bot signing. Some frontend and backend relationships are supported by the SOURCE INDEX or README rather than inspected source excerpts.
Main entry points: App.jsx App workflow · wallets.js Account actions · chain.js Chain clients · db.js Application records
Components 23
Browser app
- App workflow
frontend/src/App.jsx - Wallet forms
frontend/src/components/AmountForm.jsx - Login onboarding
frontend/src/components/Onboarding.jsx - Activity view
frontend/src/components/Activity.jsx - Wallet client
frontend/src/lib/wallet.js - Permission verifier
frontend/src/lib/verifyMetaMask.js
API and accounts
- HTTP API
frontend/src/lib/api.js - API routes
backend/src/routes.js - Login and linking
backend/src/auth.js - Account actions
backend/src/wallets.js - Smart account rules
backend/src/metamask.js
Trading runtime
- Strategy runner
backend/src/strategy/runner.js - Trade decisions
backend/src/strategy/strategy.js - Quotes and swaps
backend/src/bot.js
Chain and persistence
- Network and limits
backend/src/config.js - Chain clients
backend/src/chain.js - Bot key signer
backend/src/kms.js - Application records
backend/src/db.js
Other components
- User
- MetaMask
- MongoDB
- BNB Chain
- PancakeSwap v3
Connections 29
- User → App workflow: uses
README.md - App workflow → Login onboarding: renders
frontend/src/App.jsx - App workflow → Wallet forms: renders
frontend/src/App.jsx - App workflow → Activity view: renders
frontend/src/App.jsx - App workflow → HTTP API: requests
frontend/src/App.jsx - App workflow → Wallet client: uses
frontend/src/App.jsx - App workflow → Permission verifier: checks permissions
frontend/src/App.jsx - App workflow → MetaMask: requests signatures
README.md - Permission verifier → MetaMask: verifies transactions
README.md - HTTP API → API routes: calls
- API routes → Login and linking: authenticates
backend/src/routes.js - API routes → Account actions: dispatches actions
backend/src/routes.js - API routes → Application records: reads records
backend/src/routes.js - Login and linking → Application records: reads and writes
backend/src/auth.js - Login and linking → Chain clients: checks signatures
backend/src/auth.js - Account actions → Smart account rules: builds executions
backend/src/wallets.js - Account actions → Application records: stores actions
backend/src/wallets.js - Account actions → Quotes and swaps: executes trades
backend/src/wallets.js - Strategy runner → Trade decisions: requests decisions
backend/src/strategy/runner.js - Strategy runner → Account actions: trades for users
backend/src/strategy/runner.js - Strategy runner → Application records: loads enabled users
backend/src/strategy/runner.js - Quotes and swaps → Smart account rules: encodes calls
backend/src/bot.js - Quotes and swaps → Chain clients: submits transactions
backend/src/bot.js - Chain clients → Network and limits: configures clients
backend/src/chain.js - Chain clients → Bot key signer: creates signer
backend/src/chain.js - Application records → MongoDB: stores records
backend/src/db.js - Chain clients → BNB Chain: reads and submits
backend/src/chain.js - Quotes and swaps → PancakeSwap v3: quotes and swaps
README.md - Smart account rules → BNB Chain: enforces delegation
README.md