How sharone-12/mulenet works
MuleNet is an anti-money-laundering investigation application: analysts explore suspicious transaction rings, inspect their flows and account roles, and can use an AI assistant to investigate and draft SAR narratives. The UI talks to a FastAPI service; backend tools expose detection results and ring investigations. The excerpts document API delegation, tool behavior, and several UI relationships, but omit the detection engine, data-loading implementation, and most frontend API wiring, so those internal links are shown only where supported or marked unverified.
Main entry points: main.py HTTP and WebSocket API · App.jsx Application Shell · engine.py Detection Engine · tools.py Investigation Tools
Components 28
Investigator UI
- Application Shell
frontend/src/App.jsx - Chat Panel
frontend/src/components/ChatPanel.jsx - Ring Queue
frontend/src/components/RingQueue.jsx - Network Graph
frontend/src/components/GraphPanel.jsx - Ring Inspector
frontend/src/components/RingInspector.jsx - Ring Topology
frontend/src/components/RingTopology.jsx - Ring Timeline
frontend/src/components/RingTimeline.jsx - Investigation Stats
frontend/src/components/StatCards.jsx - Frontend API
frontend/src/api.js
Service API
- HTTP and WebSocket API
backend/main.py
Detection Analysis
- Detection Engine
backend/mulenet/engine.py - Ring Detectors
backend/mulenet/detectors.py - Pattern Library
backend/mulenet/patterns.py - Ring Ranker
backend/mulenet/ranker.py - Detection Scoring
backend/mulenet/scoring.py - Transaction Graph
backend/mulenet/graph.py - Ring Results
backend/mulenet/rings.py - Threshold Baseline
backend/mulenet/rule_engine.py
Investigation Tools
- Investigation Tools
backend/mulenet/tools.py - Chat Agent
backend/mulenet/agent.py - Prompt Guard
backend/mulenet/guard.py - SAR Generation
backend/main.py - Graph and Ring Views
backend/mulenet/viz.py
Data and Models
- Dataset Loader
backend/mulenet/loader.py - Runtime Configuration
backend/mulenet/config.py - LLM Key Pool
backend/mulenet/keys.py
Other components
- Analyst
- Groq LLM
Connections 34
- Analyst → Application Shell: uses
- Application Shell → Frontend API: loads bundle
frontend/src/App.jsx - Application Shell → Chat Panel: renders
frontend/src/App.jsx - Application Shell → Ring Queue: renders
frontend/src/App.jsx - Application Shell → Ring Inspector: renders
frontend/src/App.jsx - Application Shell → Network Graph: renders
frontend/src/App.jsx - Application Shell → Investigation Stats: renders
frontend/src/App.jsx - Ring Inspector → HTTP and WebSocket API: requests ring data
frontend/src/components/RingInspector.jsx - Ring Inspector → Ring Topology: renders
frontend/src/components/RingInspector.jsx - Ring Inspector → Ring Timeline: renders
frontend/src/components/RingInspector.jsx - HTTP and WebSocket API → Investigation Tools: delegates investigations
backend/main.py - HTTP and WebSocket API → Detection Engine: loads engine
backend/main.py - HTTP and WebSocket API → Graph and Ring Views: requests views
backend/main.py - HTTP and WebSocket API → Threshold Baseline: evaluates baseline
backend/main.py - HTTP and WebSocket API → Chat Agent: runs chat
backend/main.py - HTTP and WebSocket API → Investigation Tools: investigates ring
backend/main.py - HTTP and WebSocket API → Investigation Tools: classifies roles
backend/main.py - Investigation Tools → Detection Engine: reads results
backend/mulenet/tools.py - Chat Agent → Investigation Tools: dispatches tools
backend/mulenet/agent.py - Chat Agent → Prompt Guard: screens message
backend/mulenet/agent.py - Chat Agent → LLM Key Pool: requests completion
backend/mulenet/agent.py - LLM Key Pool → Groq LLM: calls model
backend/mulenet/keys.py - HTTP and WebSocket API → Investigation Tools: builds SAR context
backend/main.py - HTTP and WebSocket API → LLM Key Pool: writes SAR
backend/main.py - Detection Engine → Dataset Loader: loads transactions
- Detection Engine → Transaction Graph: uses transaction graph
- Detection Engine → Ring Detectors: runs detection
- Detection Engine → Ring Ranker: ranks candidates
- Detection Engine → Ring Results: produces ring results
- Ring Detectors → Pattern Library: uses patterns
- Threshold Baseline → Dataset Loader: loads data
backend/mulenet/rule_engine.py - Detection Scoring → Dataset Loader: scores labels
- Graph and Ring Views → Ring Results: renders ring data
- HTTP and WebSocket API → Runtime Configuration: reads settings
backend/main.py