# ibrahimferizi/reputationx architecture

> Architecture diagram of the GitHub repository ibrahimferizi/reputationx, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ibrahimferizi/reputationx
- Repository: https://github.com/ibrahimferizi/reputationx

## Overview

WalletGuard turns one Solana address into a heuristic reputation report, or up to ten addresses into a shared-funder cluster analysis. The browser presents coverage and findings, while the Axum API orchestrates scans over Solana RPC/history and optional token-risk providers; results are computed off-chain and cached in-process or in the browser. The graph includes documented capabilities whose implementation was not sampled. Edges are limited to README statements and source-index references; unsampled wiring is omitted.

Main entry points: [`backend/src/analysis/reputation.rs`](https://github.com/ibrahimferizi/reputationx/blob/master/backend/src/analysis/reputation.rs) (Reputation scan), [`frontend/src/App.tsx`](https://github.com/ibrahimferizi/reputationx/blob/master/frontend/src/App.tsx) (Wallet report UI), [`frontend/src/components/SybilScanner.tsx`](https://github.com/ibrahimferizi/reputationx/blob/master/frontend/src/components/SybilScanner.tsx) (Batch scanner), [`backend/src/main.rs`](https://github.com/ibrahimferizi/reputationx/blob/master/backend/src/main.rs) (REST API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Browser experience"]
  node_app["Wallet report UI<br/>[App.tsx]"]
  node_sybil_ui["Batch scanner<br/>[SybilScanner.tsx]"]
  node_cluster_graph["Cluster graph<br/>[ClusterGraph.tsx]"]
  node_coverage_ui["Coverage display<br/>[ScanCoverage.tsx]"]
  node_browser_cache[("Browser cache<br/>[cache.ts]")]
  node_normalizer["Report normalizer<br/>[normalizeReport.ts]"]
end

subgraph group_api["API and orchestration"]
  node_api_server["REST API<br/>[main.rs]"]
  node_wallet_route["Reputation endpoint<br/>[wallet.rs]"]
  node_sybil_route["Batch endpoint<br/>[sybil.rs]"]
  node_service["Scan service<br/>[service.rs]"]
  node_response["Report schema<br/>[response.rs]"]
end

subgraph group_analysis["Wallet analysis"]
  node_reputation["Reputation scan<br/>[reputation.rs]"]
  node_risk["Activity scoring<br/>[risk.rs]"]
  node_improvements["Improvement guidance<br/>[improvements.rs]"]
  node_cluster["Funder clustering<br/>[cluster.rs]"]
end

subgraph group_providers["Chain and risk providers"]
  node_solana_data["Wallet data access"]
  node_funding["Funding trace<br/>[funding.rs]"]
  node_helius["Helius history<br/>[helius.rs]"]
  node_rpc["Solana RPC client<br/>[rpc.rs]"]
  node_transactions["Transaction history<br/>[transactions.rs]"]
  node_token_scans["Token scan orchestration<br/>[mod.rs]"]
  node_rugcheck["RugCheck provider<br/>[rugcheck.rs]"]
  node_solsniffer["SolSniffer provider<br/>[solsniffer.rs]"]
end

node_user(("Wallet investigator"))
node_solana_network{{"Solana mainnet"}}
node_helius_service{{"Helius service"}}
node_rugcheck_service{{"RugCheck service"}}
node_solsniffer_service{{"SolSniffer service"}}

node_user -->|"submits address"| node_app
node_app -->|"requests report"| node_api_server
node_app -->|"normalizes response"| node_normalizer
node_app -->|"caches report"| node_browser_cache
node_app -->|"renders scanner"| node_sybil_ui
node_app -->|"renders coverage"| node_coverage_ui
node_sybil_ui -->|"requests batch scan"| node_api_server
node_sybil_ui -->|"renders clusters"| node_cluster_graph
node_sybil_ui -->|"renders coverage"| node_coverage_ui
node_api_server -->|"routes reputation"| node_wallet_route
node_api_server -->|"routes batch scan"| node_sybil_route
node_wallet_route -->|"requests scan"| node_service
node_sybil_route -->|"builds clusters"| node_cluster
node_sybil_route -->|"assesses wallets"| node_risk
node_service -->|"runs reputation scan"| node_reputation
node_reputation -->|"computes score"| node_risk
node_reputation -->|"builds guidance"| node_improvements
node_reputation -->|"reads wallet data"| node_solana_data
node_reputation -->|"traces funding"| node_funding
node_reputation -->|"reads transactions"| node_transactions
node_reputation -->|"checks token risks"| node_token_scans
node_service -->|"returns report"| node_response
node_cluster -.->|"groups shared funders"| node_funding
node_funding -->|"requests history"| node_helius
node_funding -->|"queries transactions"| node_rpc
node_transactions -->|"requests history"| node_helius
node_transactions -->|"queries chain"| node_rpc
node_helius -->|"uses RPC client"| node_rpc
node_rpc -->|"sends JSON-RPC"| node_solana_network
node_helius -->|"fetches history"| node_helius_service
node_token_scans -->|"scans mints"| node_rugcheck
node_token_scans -->|"scans mints"| node_solsniffer
node_rugcheck -->|"checks token"| node_rugcheck_service
node_solsniffer -->|"checks token"| node_solsniffer_service

click node_app "https://github.com/ibrahimferizi/reputationx/blob/master/frontend/src/App.tsx"
click node_sybil_ui "https://github.com/ibrahimferizi/reputationx/blob/master/frontend/src/components/SybilScanner.tsx"
click node_cluster_graph "https://github.com/ibrahimferizi/reputationx/blob/master/frontend/src/components/ClusterGraph.tsx"
click node_coverage_ui "https://github.com/ibrahimferizi/reputationx/blob/master/frontend/src/components/ScanCoverage.tsx"
click node_browser_cache "https://github.com/ibrahimferizi/reputationx/blob/master/frontend/src/utils/cache.ts"
click node_normalizer "https://github.com/ibrahimferizi/reputationx/blob/master/frontend/src/utils/normalizeReport.ts"
click node_api_server "https://github.com/ibrahimferizi/reputationx/blob/master/backend/src/main.rs"
click node_wallet_route "https://github.com/ibrahimferizi/reputationx/blob/master/backend/src/routes/wallet.rs"
click node_sybil_route "https://github.com/ibrahimferizi/reputationx/blob/master/backend/src/routes/sybil.rs"
click node_service "https://github.com/ibrahimferizi/reputationx/blob/master/backend/src/service.rs"
click node_response "https://github.com/ibrahimferizi/reputationx/blob/master/backend/src/models/response.rs"
click node_reputation "https://github.com/ibrahimferizi/reputationx/blob/master/backend/src/analysis/reputation.rs"
click node_risk "https://github.com/ibrahimferizi/reputationx/blob/master/backend/src/analysis/risk.rs"
click node_improvements "https://github.com/ibrahimferizi/reputationx/blob/master/backend/src/analysis/improvements.rs"
click node_cluster "https://github.com/ibrahimferizi/reputationx/blob/master/backend/src/analysis/cluster.rs"
click node_solana_data "https://github.com/ibrahimferizi/reputationx/tree/master/backend/src/solana"
click node_funding "https://github.com/ibrahimferizi/reputationx/blob/master/backend/src/solana/funding.rs"
click node_helius "https://github.com/ibrahimferizi/reputationx/blob/master/backend/src/solana/helius.rs"
click node_rpc "https://github.com/ibrahimferizi/reputationx/blob/master/backend/src/solana/rpc.rs"
click node_transactions "https://github.com/ibrahimferizi/reputationx/blob/master/backend/src/solana/transactions.rs"
click node_token_scans "https://github.com/ibrahimferizi/reputationx/blob/master/backend/src/integrations/mod.rs"
click node_rugcheck "https://github.com/ibrahimferizi/reputationx/blob/master/backend/src/integrations/rugcheck.rs"
click node_solsniffer "https://github.com/ibrahimferizi/reputationx/blob/master/backend/src/integrations/solsniffer.rs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_sybil_ui,node_cluster_graph,node_coverage_ui,node_browser_cache,node_normalizer toneBlue
class node_api_server,node_wallet_route,node_sybil_route,node_service,node_response toneAmber
class node_reputation,node_risk,node_improvements,node_cluster toneMint
class node_solana_data,node_funding,node_helius,node_rpc,node_transactions,node_token_scans,node_rugcheck,node_solsniffer toneRose
class node_user,node_solana_network,node_helius_service,node_rugcheck_service,node_solsniffer_service toneIndigo
```

## Components

### Browser experience

- [Wallet report UI](https://github.com/ibrahimferizi/reputationx/blob/master/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Batch scanner](https://github.com/ibrahimferizi/reputationx/blob/master/frontend/src/components/SybilScanner.tsx): `frontend/src/components/SybilScanner.tsx`
- [Cluster graph](https://github.com/ibrahimferizi/reputationx/blob/master/frontend/src/components/ClusterGraph.tsx): `frontend/src/components/ClusterGraph.tsx`
- [Coverage display](https://github.com/ibrahimferizi/reputationx/blob/master/frontend/src/components/ScanCoverage.tsx): `frontend/src/components/ScanCoverage.tsx`
- [Browser cache](https://github.com/ibrahimferizi/reputationx/blob/master/frontend/src/utils/cache.ts): `frontend/src/utils/cache.ts`
- [Report normalizer](https://github.com/ibrahimferizi/reputationx/blob/master/frontend/src/utils/normalizeReport.ts): `frontend/src/utils/normalizeReport.ts`

### API and orchestration

- [REST API](https://github.com/ibrahimferizi/reputationx/blob/master/backend/src/main.rs): `backend/src/main.rs`
- [Reputation endpoint](https://github.com/ibrahimferizi/reputationx/blob/master/backend/src/routes/wallet.rs): `backend/src/routes/wallet.rs`
- [Batch endpoint](https://github.com/ibrahimferizi/reputationx/blob/master/backend/src/routes/sybil.rs): `backend/src/routes/sybil.rs`
- [Scan service](https://github.com/ibrahimferizi/reputationx/blob/master/backend/src/service.rs): `backend/src/service.rs`
- [Report schema](https://github.com/ibrahimferizi/reputationx/blob/master/backend/src/models/response.rs): `backend/src/models/response.rs`

### Wallet analysis

- [Reputation scan](https://github.com/ibrahimferizi/reputationx/blob/master/backend/src/analysis/reputation.rs): `backend/src/analysis/reputation.rs`
- [Activity scoring](https://github.com/ibrahimferizi/reputationx/blob/master/backend/src/analysis/risk.rs): `backend/src/analysis/risk.rs`
- [Improvement guidance](https://github.com/ibrahimferizi/reputationx/blob/master/backend/src/analysis/improvements.rs): `backend/src/analysis/improvements.rs`
- [Funder clustering](https://github.com/ibrahimferizi/reputationx/blob/master/backend/src/analysis/cluster.rs): `backend/src/analysis/cluster.rs`

### Chain and risk providers

- [Wallet data access](https://github.com/ibrahimferizi/reputationx/tree/master/backend/src/solana): `backend/src/solana`
- [Funding trace](https://github.com/ibrahimferizi/reputationx/blob/master/backend/src/solana/funding.rs): `backend/src/solana/funding.rs`
- [Helius history](https://github.com/ibrahimferizi/reputationx/blob/master/backend/src/solana/helius.rs): `backend/src/solana/helius.rs`
- [Solana RPC client](https://github.com/ibrahimferizi/reputationx/blob/master/backend/src/solana/rpc.rs): `backend/src/solana/rpc.rs`
- [Transaction history](https://github.com/ibrahimferizi/reputationx/blob/master/backend/src/solana/transactions.rs): `backend/src/solana/transactions.rs`
- [Token scan orchestration](https://github.com/ibrahimferizi/reputationx/blob/master/backend/src/integrations/mod.rs): `backend/src/integrations/mod.rs`
- [RugCheck provider](https://github.com/ibrahimferizi/reputationx/blob/master/backend/src/integrations/rugcheck.rs): `backend/src/integrations/rugcheck.rs`
- [SolSniffer provider](https://github.com/ibrahimferizi/reputationx/blob/master/backend/src/integrations/solsniffer.rs): `backend/src/integrations/solsniffer.rs`

### Other components

- **Wallet investigator**
- **Solana mainnet**
- **Helius service**
- **RugCheck service**
- **SolSniffer service**

## Connections

- Wallet investigator → Wallet report UI: submits address (evidence: `README.md`)
- Wallet report UI → REST API: requests report (evidence: `README.md`)
- Wallet report UI → Report normalizer: normalizes response (evidence: `frontend/src/App.tsx`)
- Wallet report UI → Browser cache: caches report (evidence: `frontend/src/App.tsx`)
- Wallet report UI → Batch scanner: renders scanner (evidence: `frontend/src/App.tsx`)
- Wallet report UI → Coverage display: renders coverage (evidence: `frontend/src/App.tsx`)
- Batch scanner → REST API: requests batch scan (evidence: `README.md`)
- Batch scanner → Cluster graph: renders clusters (evidence: `frontend/src/components/SybilScanner.tsx`)
- Batch scanner → Coverage display: renders coverage (evidence: `frontend/src/components/SybilScanner.tsx`)
- REST API → Reputation endpoint: routes reputation (evidence: `backend/src/main.rs`)
- REST API → Batch endpoint: routes batch scan (evidence: `backend/src/main.rs`)
- Reputation endpoint → Scan service: requests scan (evidence: `backend/src/routes/wallet.rs`)
- Batch endpoint → Funder clustering: builds clusters (evidence: `backend/src/routes/sybil.rs`)
- Batch endpoint → Activity scoring: assesses wallets (evidence: `backend/src/routes/sybil.rs`)
- Scan service → Reputation scan: runs reputation scan (evidence: `backend/src/service.rs`)
- Reputation scan → Activity scoring: computes score (evidence: `backend/src/analysis/reputation.rs`)
- Reputation scan → Improvement guidance: builds guidance (evidence: `backend/src/analysis/reputation.rs`)
- Reputation scan → Wallet data access: reads wallet data (evidence: `backend/src/analysis/reputation.rs`)
- Reputation scan → Funding trace: traces funding (evidence: `backend/src/analysis/reputation.rs`)
- Reputation scan → Transaction history: reads transactions (evidence: `backend/src/analysis/reputation.rs`)
- Reputation scan → Token scan orchestration: checks token risks (evidence: `backend/src/analysis/reputation.rs`)
- Scan service → Report schema: returns report (evidence: `backend/src/service.rs`)
- Funder clustering → Funding trace: groups shared funders
- Funding trace → Helius history: requests history (evidence: `backend/src/solana/funding.rs`)
- Funding trace → Solana RPC client: queries transactions (evidence: `backend/src/solana/funding.rs`)
- Transaction history → Helius history: requests history (evidence: `backend/src/solana/transactions.rs`)
- Transaction history → Solana RPC client: queries chain (evidence: `backend/src/solana/transactions.rs`)
- Helius history → Solana RPC client: uses RPC client (evidence: `backend/src/solana/helius.rs`)
- Solana RPC client → Solana mainnet: sends JSON-RPC (evidence: `README.md`)
- Helius history → Helius service: fetches history (evidence: `README.md`)
- Token scan orchestration → RugCheck provider: scans mints (evidence: `backend/src/integrations/mod.rs`)
- Token scan orchestration → SolSniffer provider: scans mints (evidence: `backend/src/integrations/mod.rs`)
- RugCheck provider → RugCheck service: checks token (evidence: `README.md`)
- SolSniffer provider → SolSniffer service: checks token (evidence: `README.md`)
