Skip to main content

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​

ProductRepoRoleLicense
RMI backendrmi-backendThe platform (private core)Proprietary core
Web apprmi-frontendrugmunch.io UIOpen source
Scanner enginerugmunch-scannerDetectors + scoring engineMIT
RugBrainrugbrainRAG intelligence layerMIT
Lite Chain Indexerlite-chain-indexerMulti-chain indexingMIT

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.