Appearance
Ecosystem map
Every module in the platform, what owns it, and where its documentation lives. Use this page to find the right corner of the codebase quickly.
Trading core
| Module | Owning repo(s) | Docs |
|---|---|---|
| Quote aggregation across 26 providers | swap-sdk | swap-sdk internals |
| Quote fan-out over SSE | bz-backend controllers/defi/swap.js, services/swap.service.js | Quote → settle pipeline |
| Provider proxies (keys never leave the server) | bz-backend controllers/defi/* | Provider proxy reference |
| Meta-transaction settlement | contract-deployment/contracts/BlazpayRelayer.sol, finalContracts/ | BlazpayRelayer |
| EIP-712 signing service | bz-backend controllers/defi/transaction.controller.js | Quote → settle pipeline |
| Swap / bridge UI | defi-dex src/pages/defi/{swap,bridge}.tsx | Swap, Bridge |
| Solana + TRON paths | defi-dex src/utils/trade.ts, swap-sdk | Non-EVM paths |
| Transaction history + status refresh | bz-backend models/defiTransactions.js | Portfolio & history |
Fiat rails
| Module | Owning repo | Docs |
|---|---|---|
| OnRamp.money (INR / UPI) | bz-backend controllers/defi/onRampController.js | Buy / Sell |
| Changelly (instant + fiat) | controllers/defi/changelly.js, changellyFiat.js | Fiat API |
| AlchemyPay | controllers/defi/alchemyController.js | Fiat API |
| Transak | controllers/defi/transak.js | Fiat API |
| MoonPay | controllers/defi/moonPay.js | Fiat API |
| Unified quote comparison | bz-backend services/buy.js | Buy / Sell |
Derivatives & orders
| Module | Owning repo | Docs |
|---|---|---|
| Perpetuals via Orderly Network | bz-backend controllers/defi/orderlyController.js, models/orderlyAccount.js | Perpetuals |
| Limit orders | bz-backend models/limitOrder.js, iZiSwap SDK on the frontend | Limit orders |
| Liquidity pools | bz-backend routes/liquidityRoutes.js, models/liquidityTransactions.js | Liquidity |
Automation
| Module | Owning repo | Docs |
|---|---|---|
| CSIP / DCA vault (UUPS, Arbitrum) | contract-deployment/contracts/dca/ | DCA contract |
| DCA executor cron | bz-backend services/dcaCron.js | Cron jobs |
| Shared execution engine | bz-backend services/executionEngine.js | Execution engine |
| Autopilot vault (UUPS, Arbitrum + Robinhood Chain) | contract-deployment/contracts/autopilot/ | Autopilot vault |
| Autopilot policy toolkit | bz-backend utils/policy.js, defi-dex src/utils/autopilotPolicy.ts | Policy engine |
| Autopilot engine + triggers | bz-backend services/autopilotEngine.js, autopilotPrices.js, autopilotCron.js | Autopilot |
| Copy trading (Hyperliquid perps) | external copytrade-agent repo | Copy trading |
| Price alerts | bz-backend services/priceAlertsCron.js, models/priceAlertModel.js | Cron jobs |
AI
| Module | Owning repo | Docs |
|---|---|---|
| Intent classification graph | bz-agent src/agent/{graph,node,index}.ts | Agent graph |
| Intent prompt templates | bz-agent src/template/*.ts | Intent catalogue |
| Vector knowledge base (RAG fallback) | bz-agent src/agent/vector.ts, PGVector | Agent graph |
| Chat session + message persistence | bz-backend v1/models/{blazSession,blazMessage}.js | Chat request path |
| Intent dispatch | bz-backend v1/services/agent.service.js | Chat request path |
| SSE streaming + action renderer | defi-dex src/apis/ai.api.ts, src/component/defi/swapAI/BotMessage.tsx | Action renderer |
| Training-data review pipeline | bz-backend v1/routes/training.routes.js, models/trainingDataModel.js | Platform API |
Safety suite
| Module | Owning repo | Docs |
|---|---|---|
| EVM contract auditor | bz-backend v1/services/contractAudit.service.js | Contract auditor |
| Token safety / rug check + embed badge | v1/services/tokenSafety.service.js | Safety suite |
| Wallet reputation card | v1/services/walletCard.service.js | Safety suite |
| Approval revoker | v1/services/approvals.service.js | Safety suite |
| Public share pages | defi-dex src/pages/audit/* | Safety suite |
dApp builder
| Module | Owning repo | Docs |
|---|---|---|
| Project generation + iteration | bz-backend v1/services/dappBuilder.service.js, v1/routes/dapp.routes.js | dApp builder |
| Contract generation + deploy | v1/services/aiDeveloper.service.js, ZeroDev smart accounts | dApp builder |
| Subscription / iteration quota | models/dappSubscriptionModel.js, models/dappProjectModel.js | dApp API |
Ecosystem layer
| Module | Owning repo | Docs |
|---|---|---|
| BlazRocket NFT staking | contract-deployment/contracts/StakeRocketV3.sol, modular/BlazRocketNFT.sol | Rewards & staking |
| BlazBob NFT (11 tiers) | contract-deployment/contracts/modular/BlazBobNFT.sol | Rewards & staking |
| NFT marketplace | contracts/modular/BzMarketplace.sol, services/marketplace* | Marketplace |
| Prediction markets | models/predictionMarketModel.js, services/predictionCron.js | GameFi |
| Poker | contracts/poker/PokerManager.sol, routes/pokerRoutes.js | GameFi |
| Rewards hub / points | contracts/RewardsHub.sol, models/pointsModel.js | Rewards |
| Quests, tasks, streaks, missions | models/{dailyTask,missionModel,userStreakModel}.js | Rewards |
| Clippers creator program | routes/clippersRoutes.js, models/clippers*.js | Social & creators |
| DAO | routes/daoRoutes.js, models/dao*.js, services/daoCron.js | Social & creators |
| Presale | routes/presaleRoutes.js, models/presale*.js | Marketplace & presale |
| Blog, threads, support, notifications | routes/{blogRoutes,threadRoutes,supportRoutes,notificationsRoutes}.js | Social |
Platform infrastructure
| Concern | Where | Docs |
|---|---|---|
| Mongo models (130+) | bz-backend/models/, bz-backend/v1/models/ | Data model |
| Redis (quote cache, checkpoints, price series, socket adapter) | bz-backend, bz-agent | Runtime topology |
| Socket.io realtime | bz-backend/services/socket.js | Runtime topology |
| Feature flags & limits | models/systemSettingModel.js | Platform API |
| Wallet-signature auth | bz-backend/middleware/walletAuth.js | Security model |
| SEO / AEO prerender | defi-dex/scripts/prerender-seo.mjs, src/data/*Seo.mjs | SEO subsystem |
| Deployment | bz-backend/scripts/deploy.gcp.sh, Netlify | Deployment |
What is not in this repo set
copytrade-agent— the Hyperliquid perps copy-trading engine lives in a separate monorepo (~/Documents/code/personal-agents/copytrade-agent). It is the intended basis for the Blazpay copy-trading product rather than a rewrite. See copy trading.blazpay-sdk— a legacy on-chain DEX SDK still referenced bydefi-dexfor the older native swap path (src/state/swap/). New work should not extend it.bz-tokensandqube-backend— small server-only services deployed alongside the backend on the production VM; no local checkout. See environments.