Platform Architecture
This page explains how the pieces of Rug Munch Intelligence fit together β useful if you're integrating deeply, evaluating the platform, or self-hosting parts of the stack.
β Live-platform facts on this page verified against production on 2026-08-24.
The big pictureβ
βββββββββββββββββββββββββββββββ Clients βββββββββββββββββββββββββββ
β rugmunch.io (React web app) β
β AI agents via MCP (Claude, Cursor, opencode) β
β Your services via REST / WebSocket β
β @rugmunchbot (Telegram) β
ββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββ
β RMI Backend (FastAPI monolith) β
β β
β Interfaces: REST Β· WebSocket Β· MCP (JSON-RPC/SSE) Β· Telegram β
β Domains: β
β β’ Scanner v2 (multi-engine token/wallet risk) β
β β’ x402 Tools (346 pay-per-call security/intel tools) β
β β’ RugMaps (entity graphs, fund flows, clusters) β
β β’ RugCharts (OHLCV, TA, threat signals) β
β β’ Wallet Intelligence (labels, PnL, clusters) β
β β’ Alerts (webhooks, SSE stream, Telegram push) β
β β’ Auth (better-auth sessions; legacy JWT in maintenance) β
βββββββββββββββββββββββββ x402 Gateway ββββββββββββββββββββββββββββ€
β HTTP 402 β signed micropayment β facilitator settlement β
β 7 facilitators Β· 13 payment chains Β· per-call pricing β
βββββββββββββββββββββββββ DataBus (data layer) ββββββββββββββββββββ€
β One interface, many providers. Automatic failover chains: β
β e.g. token price β cache β Jupiter β DexScreener β β
β Binance β CoinGecko. Degraded sources reported in β
β X-Degraded-Stores header. β
βββββββββ¬βββββββββββββββ¬ββββββββββββββββ¬βββββββββββββββ¬ββββββββββββ
β β β β
βββββββββΌβββββββ βββββββΌβββββββ ββββββββΌβββββββ ββββββΌββββββββββ
β ClickHouse β β RugBrain β β Neo4j β β Postgres / β
β 1.59B+ rows β β (RAG) β β entity graphβ β Redis β
β transfers, β β 57 vector β β clusters, β β sessions, β
β swaps, DEX β β collectionsβ β labels β β billing β
βββββββββ²βββββββ βββββββ²βββββββ βββββββββββββββ ββββββββββββββββ
β β
βββββββββ΄βββββββ βββββββ΄βββββββββββββββββββββββββββββββββββββββ
β Lite Chain β β External providers (28): DexScreener, β
β Indexer β β Jupiter, Helius, Birdeye, CoinGecko, β
β free RPCs, β β Nansen, Arkham, GMGN, Moralis, PumpFun, β
β 14 chains β β DeFiLlama, Dune β¦ β
β in prod β β β
ββββββββββββββββ ββββββββββββββββββββββββββββββββββββββββββββββ
Design decisions that matterβ
Monolith over microservicesβ
One FastAPI application serves every domain. At our scale this beats a microservice mesh: simpler deploys, no cross-service auth overhead, one OpenAPI spec. Domain boundaries are enforced in code (router modules), not in network hops.
DataBus as the single data layerβ
No domain code calls upstream APIs directly. Everything goes through DataBus,
which owns provider selection, caching, failover, rate-limit handling, and
health tracking. When a provider dies mid-day, your scan doesn't β the next
provider in the chain answers, and X-Degraded-Stores tells you which.
Multi-source fusion risk scoringβ
Risk scores are ensembles, not single-source opinions. Contract checks, liquidity state, holder structure, deployer history, and social signals each vote with explicit weights (scoring model), and every input carries a confidence tier.
Pay-per-call via x402, not subscriptionsβ
The x402 gateway turns HTTP 402 into on-chain settlement. This removes the entire API-key/billing/subscription subsystem for paid usage: your wallet signature is the account.
Free-first data infrastructureβ
Lite Chain Indexer proves the platform's raw data layer can run at zero marginal cost on free public RPCs β which is why the platform's unit economics work at $0.01β$0.50 per call.
The product reposβ
| Product | Repo | Role | License |
|---|---|---|---|
| RMI backend | rmi-backend | The platform (private core) | Proprietary core |
| Web app | rmi-frontend | rugmunch.io UI | Open source |
| Scanner engine | rugmunch-scanner | Detectors + scoring engine | MIT |
| RugBrain | rugbrain | RAG intelligence layer | MIT |
| Lite Chain Indexer | lite-chain-indexer | Multi-chain indexing | MIT |
RugMaps and RugCharts began as standalone engines and now run as first-class
domains inside the backend (/api/v1/rugmaps/*, /api/v1/rugcharts/*).
Reliability postureβ
- Health surfaces everywhere:
/health,/live,/ready, per-domain health endpoints (/rugmaps/health,/rugcharts/health, DataBus health). - Graceful degradation: endpoints return structured "no data" responses
(
{"data": null, "reason": "no_data", "sources_tried": [...]}) rather than fabricating values β and empty paid results are refundable. - Observability: request IDs (
X-Request-ID), response timing headers, degraded-store reporting, rate-limit headers.