RMI Backend — FastAPI with 410+ routes, 32 token detectors, 96 chains, x402 paid API, MCP server for AI agents, Rug Munch Verified badge program. Pay-per-call crypto security. Wyoming-based.
|
Some checks failed
CI / build (push) Failing after 2s
Per AUDIT-2026-Q3.md Phase 2, mounted the highest-quality dead routers
that fit the product surface with minimal wiring cost.
Routers mounted (24):
- bulletin, bulletin_board (FEATURES.md claim, 21+22 routes, supabase-backed)
- intelligence_router, intelligence_panel (n8n-fed, 19+4 routes, /intelligence prefix shared, paths non-overlapping)
- chat (AI chat = product surface, 5 routes)
- address_profiler, chain_comparability (scanner extensions, 1+2 routes)
- honeypot_map (unique viz, 3 routes)
- label_lookup (CF worker enrichment, 1 route)
- whale_alerts, lp_health (5+5 routes, whale tracker + LP monitor)
- ai_stream (SSE infra, 3 routes)
- rugcharts, bubble_maps_router (RugCharts + RugMaps, 3+7 routes)
- mev_advisory, impersonation_detector (forensics, 2+1 routes)
- rug_recovery, laundry_matcher (recovery + copycat detect, 2+2 routes)
- death_clock, token_cv, tvl_verifier (scanner differentiators, 1+2+2)
- contract_analyzer, criminal_clusters (SENTINEL ext + Real-CATS, 2+3)
Flat file mounted (1):
- rag_metrics_api (16 lines, uses LIVE rag_observability, /api/v1/rag/metrics)
Flat files NOT mounted (audit was wrong, no APIRouter / no consumers):
- circuit_breaker.py (no APIRouter; not imported by x402_databus_tools - duplicate
_CircuitBreaker classes in app/databus/provider_core.py and app/databus/providers.py)
- sweep_now.py (CLI cron utility, operational, not an API)
- tool_fingerprint.py (utility, no APIRouter)
- ai_pipeline_v3.py (utility, already imported by app/news_intelligence.py and
app/routers/unified_wallet_scanner.py)
Deferred to Wave 2 (path conflict):
- app.routers.news - CONFLICTS with app.domain.news.router.
domain.news has GET /{news_id} catch-all; routes.news has /feed /headlines etc.
Catch-all in domain.news shadows the new routes when domain is mounted first
(verified via TestClient - /feed hit domain catch-all with news_id=feed).
Needs domain.news refactor (move catch-all to a less-broad path) before mount.
Also fixed pre-existing mypy errors in mount_all and _try_mount (added Any type
annotations) so pre-commit hook passes.
Net effect:
- Before: 79 routes (24 top-level app.routes)
- After: 198 routes (48 top-level app.routes) = +119 routes
- Mounted: 25 modules (24 routers + 1 flat)
- pytest: 817 passed, 3 failed (all 3 pre-existing, unrelated to this change:
test_factory_boots.py needs HEALTH_CHECK_DURATION in app/core/metrics.py)
- OpenAPI: 184 paths, all new routes visible
|
||
|---|---|---|
| .forgejo | ||
| .github | ||
| .semgrep | ||
| alembic | ||
| app | ||
| data | ||
| dify-agents | ||
| docker/x402-rs | ||
| docs | ||
| infra | ||
| infrastructure/database | ||
| plans | ||
| prompts | ||
| public | ||
| requirements | ||
| scripts | ||
| sdks | ||
| src/rug_munch_mcp | ||
| static | ||
| supabase | ||
| tests | ||
| widget | ||
| x402-gateway | ||
| , r.stdout) # Check if we can read wallets from the data directory directly - theyre | ||
| .deploy-cleanup.sh | ||
| .dockerignore | ||
| .editorconfig | ||
| .env.example | ||
| .gitattributes | ||
| .gitignore | ||
| .gitleaks.toml | ||
| .gitleaksignore | ||
| .gitmessage | ||
| .mise.toml | ||
| .pre-commit-config.yaml | ||
| .secretsallow | ||
| .trivyignore | ||
| AGENTS.md | ||
| alembic.ini | ||
| ARCHITECTURE.md | ||
| AUDIT-2026-Q3.md | ||
| backend.log | ||
| CLEANUP.md | ||
| CODE_OF_CONDUCT.md | ||
| CODEOWNERS | ||
| CONTRIBUTING.md | ||
| DARKROOM_ADMIN_V2.md | ||
| databus_warm_cron.py | ||
| DESIGN.md | ||
| docker-compose.email.yml | ||
| Dockerfile | ||
| Dockerfile.worker | ||
| EMAIL_SETUP.md | ||
| generate_env.py | ||
| hf-model-card.md | ||
| huggingface.yaml | ||
| justfile | ||
| LICENSE | ||
| LICENSING_PRICING_STRATEGY.md | ||
| LINT-CLEANUP-REPORT.md | ||
| logo-preview.html | ||
| main.py | ||
| Makefile | ||
| mypy.ini | ||
| PORT_MAP.md | ||
| PRICING_ARCHITECTURE.md | ||
| PRODUCT.md | ||
| PROPRIETARY_REGISTRATION.txt | ||
| pyproject.toml | ||
| pytest.ini | ||
| RAG_MODERNIZATION.md | ||
| RAG_R2_SETUP.md | ||
| README.md | ||
| README_HF.md | ||
| requirements.txt | ||
| rmi_langchain.py | ||
| rmi_sdk.py | ||
| RMI_SYSTEM_MAP.md | ||
| ROADMAP.md | ||
| safe_deploy.sh | ||
| SECURITY.md | ||
| SECURITY_STACK.md | ||
| smithery.yaml | ||
| STANDARDS.md | ||
| STATUS.md | ||
| SUPABASE_ARCHITECTURE.md | ||
| supabase_create_tables.sql | ||
| supabase_pgvector_setup.sql | ||
| test_new_scanners.py | ||
| TODO.md | ||
| uv.lock | ||
| worker.py | ||
| X402_ARCHITECTURE.md | ||
| x402_REVENUE.md | ||
| x402_STRATEGY.md | ||
| x402_tool_builder.py | ||
| X_AUDIT_AND_STRATEGY.md | ||
RMI Backend
Repo: git.rugmunch.io/RugMunchMedia/rmi-backend
Deploy: /root/backend/ on Talos
Container: rmi-backend
Health: http://127.0.0.1:8000/health (currently unhealthy — Redis host not resolving)
What it is
FastAPI backend for the RMI platform. Serves token risk scans, wallet forensics, market data, Telegram bot commands, MCP agent tools, and x402-gated premium endpoints.
Status
Production, but degraded. The container runs and responds, but /health reports unhealthy because the Redis hostname rmi-redis:6379 is not resolving inside the container network.
Quick start (local)
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python -m pytest tests/unit/ -x -q
Deploy
ssh netcup
cd /root/backend/
docker compose pull
docker compose up -d rmi-backend
Fleet dependencies
| Service | Address | Status |
|---|---|---|
| Postgres | rmi-postgres:5432 |
Up |
| Redis | rmi-redis:6379 |
Failing to resolve |
| Qdrant | 127.0.0.1:6333 |
Down (stale IP bind) |
| Neo4j | 127.0.0.1:7687 |
Up |
| ClickHouse | 127.0.0.1:8123 |
Up |
Current issues
- 8.61% test coverage
- 17
time.sleep(), 1,713 f-string logs, 399print()calls - Largest file
app/routers/x402_tools.pyis 212 KB - CI gates use
continue-on-error: trueand|| true - 5 Telegram tokens leaked in git history
Docs
PRODUCT.md— charter and scopeARCHITECTURE.md— components and data flowROADMAP.md— next 90 daysTODO.md— current tasks
Standards
This repo follows Rug Munch Media standards.