# muratmula/ai-robinhood-chain architecture

> Architecture diagram of the GitHub repository muratmula/ai-robinhood-chain, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/muratmula/ai-robinhood-chain
- Repository: https://github.com/muratmula/ai-robinhood-chain

## Overview

OpenCatz is a Robinhood Chain crypto-screening and trading intelligence system. Its main workflow screens market candidates with specialist agents, evaluates them through swarm consensus and risk controls, then distributes signal cards through Discord and Telegram; execution remains configurable and can require manual control. Discord, terminal, and Telegram also expose operational and portfolio functions. README documents several capabilities whose detailed implementations were not sampled, so their links are shown only where the README or source index supports them.

Main entry points: [`src/orchestrator/hub.ts`](https://github.com/muratmula/ai-robinhood-chain/blob/master/src/orchestrator/hub.ts) (Screening hub), [`src/discord/handlers/command-handlers.ts`](https://github.com/muratmula/ai-robinhood-chain/blob/master/src/discord/handlers/command-handlers.ts) (Discord command center), [`src/telegram/telegram-service.ts`](https://github.com/muratmula/ai-robinhood-chain/blob/master/src/telegram/telegram-service.ts) (Telegram bridge), [`src/services/state-store.ts`](https://github.com/muratmula/ai-robinhood-chain/blob/master/src/services/state-store.ts) (Persistent state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User interfaces"]
  node_discord["Discord command center"]
  node_terminal["Terminal TUI<br/>[tui.ts]"]
  node_telegram["Telegram bridge"]
end

subgraph group_screening["Market screening"]
  node_meme["Meme screening"]
  node_lp["LP screening<br/>[hub.ts]"]
  node_nft["NFT screening"]
  node_alpha["Alpha screening"]
  node_whale["Whale screening"]
  node_gmgn["GMGN market data<br/>[gmgn-adapter.ts]"]
  node_opensea["OpenSea data<br/>[opensea-adapter.ts]"]
  node_hyperliquid["Hyperliquid data"]
end

subgraph group_orchestration["Signal orchestration"]
  node_hub["Screening hub<br/>[hub.ts]"]
  node_consensus["Swarm consensus<br/>[swarm-consensus.ts]"]
  node_dispatch["Signal dispatch<br/>[dispatch.ts]"]
end

subgraph group_portfolio["Portfolio and risk"]
  node_risk["Risk engine<br/>[risk-engine-v2.ts]"]
  node_positions["Position manager"]
  node_wallet["Wallet service<br/>[wallet-service.ts]"]
  node_journal["Trade journal"]
end

subgraph group_services["Supporting services"]
  node_state[("Persistent state<br/>[state-store.ts]")]
  node_ai["AI provider service<br/>[ai-service.ts]"]
  node_alerts["Price alerts"]
  node_pricefeed["Price feed"]
end

node_user(("Operator"))

node_user -->|"commands"| node_discord
node_user -->|"operates"| node_terminal
node_user -->|"receives alerts"| node_telegram
node_discord -->|"queries"| node_hub
node_discord -->|"manages"| node_wallet
node_discord -->|"queries"| node_journal
node_terminal -->|"triggers"| node_hub
node_terminal -->|"queries"| node_ai
node_telegram -->|"uses"| node_hub
node_telegram -->|"queries"| node_ai
node_hub -->|"runs"| node_meme
node_hub -->|"runs"| node_nft
node_hub -->|"runs"| node_alpha
node_hub -->|"runs"| node_whale
node_hub -->|"screens"| node_lp
node_meme -->|"fetches data"| node_gmgn
node_nft -->|"fetches data"| node_opensea
node_whale -->|"fetches data"| node_hyperliquid
node_hub -.->|"evaluates signals"| node_consensus
node_consensus -->|"approves signals"| node_dispatch
node_dispatch -->|"posts cards"| node_discord
node_dispatch -->|"broadcasts cards"| node_telegram
node_hub -->|"checks exposure"| node_risk
node_risk -.->|"gates entries"| node_positions
node_positions -->|"persists positions"| node_state
node_wallet -->|"loads keys"| node_state
node_journal -->|"persists trades"| node_state
node_alerts -->|"gets prices"| node_pricefeed
node_alerts -->|"persists alerts"| node_state
node_discord -->|"manages alerts"| node_alerts

click node_discord "https://github.com/muratmula/ai-robinhood-chain/blob/master/src/discord/handlers/command-handlers.ts"
click node_terminal "https://github.com/muratmula/ai-robinhood-chain/blob/master/src/cli/tui.ts"
click node_telegram "https://github.com/muratmula/ai-robinhood-chain/blob/master/src/telegram/telegram-service.ts"
click node_meme "https://github.com/muratmula/ai-robinhood-chain/blob/master/src/agents/meme-robinhood/robinhood-screening-agent.ts"
click node_lp "https://github.com/muratmula/ai-robinhood-chain/blob/master/src/orchestrator/hub.ts"
click node_nft "https://github.com/muratmula/ai-robinhood-chain/blob/master/src/agents/nft/nft-screening-agent.ts"
click node_alpha "https://github.com/muratmula/ai-robinhood-chain/blob/master/src/agents/alpha-robinhood/alpha-screening-agent.ts"
click node_whale "https://github.com/muratmula/ai-robinhood-chain/blob/master/src/agents/whale-eth/whale-screening-agent.ts"
click node_gmgn "https://github.com/muratmula/ai-robinhood-chain/blob/master/src/adapters/gmgn-adapter.ts"
click node_opensea "https://github.com/muratmula/ai-robinhood-chain/blob/master/src/adapters/opensea-adapter.ts"
click node_hyperliquid "https://github.com/muratmula/ai-robinhood-chain/blob/master/src/adapters/hyperliquid-adapter.ts"
click node_hub "https://github.com/muratmula/ai-robinhood-chain/blob/master/src/orchestrator/hub.ts"
click node_consensus "https://github.com/muratmula/ai-robinhood-chain/blob/master/src/orchestrator/swarm-consensus.ts"
click node_dispatch "https://github.com/muratmula/ai-robinhood-chain/blob/master/src/orchestrator/dispatch.ts"
click node_risk "https://github.com/muratmula/ai-robinhood-chain/blob/master/src/orchestrator/risk-engine-v2.ts"
click node_positions "https://github.com/muratmula/ai-robinhood-chain/blob/master/src/position/position-manager.ts"
click node_wallet "https://github.com/muratmula/ai-robinhood-chain/blob/master/src/services/wallet-service.ts"
click node_journal "https://github.com/muratmula/ai-robinhood-chain/blob/master/src/services/trade-journal-service.ts"
click node_state "https://github.com/muratmula/ai-robinhood-chain/blob/master/src/services/state-store.ts"
click node_ai "https://github.com/muratmula/ai-robinhood-chain/blob/master/src/services/ai-service.ts"
click node_alerts "https://github.com/muratmula/ai-robinhood-chain/blob/master/src/services/price-alert-service.ts"
click node_pricefeed "https://github.com/muratmula/ai-robinhood-chain/blob/master/src/services/price-feed-service.ts"

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_discord,node_terminal,node_telegram toneBlue
class node_meme,node_lp,node_nft,node_alpha,node_whale,node_gmgn,node_opensea,node_hyperliquid toneAmber
class node_hub,node_consensus,node_dispatch toneMint
class node_risk,node_positions,node_wallet,node_journal toneRose
class node_state,node_ai,node_alerts,node_pricefeed,node_user toneIndigo
```

## Components

### User interfaces

- [Discord command center](https://github.com/muratmula/ai-robinhood-chain/blob/master/src/discord/handlers/command-handlers.ts): `src/discord/handlers/command-handlers.ts`
- [Terminal TUI](https://github.com/muratmula/ai-robinhood-chain/blob/master/src/cli/tui.ts): `src/cli/tui.ts`
- [Telegram bridge](https://github.com/muratmula/ai-robinhood-chain/blob/master/src/telegram/telegram-service.ts): `src/telegram/telegram-service.ts`

### Market screening

- [Meme screening](https://github.com/muratmula/ai-robinhood-chain/blob/master/src/agents/meme-robinhood/robinhood-screening-agent.ts): `src/agents/meme-robinhood/robinhood-screening-agent.ts`
- [LP screening](https://github.com/muratmula/ai-robinhood-chain/blob/master/src/orchestrator/hub.ts): `src/orchestrator/hub.ts`
- [NFT screening](https://github.com/muratmula/ai-robinhood-chain/blob/master/src/agents/nft/nft-screening-agent.ts): `src/agents/nft/nft-screening-agent.ts`
- [Alpha screening](https://github.com/muratmula/ai-robinhood-chain/blob/master/src/agents/alpha-robinhood/alpha-screening-agent.ts): `src/agents/alpha-robinhood/alpha-screening-agent.ts`
- [Whale screening](https://github.com/muratmula/ai-robinhood-chain/blob/master/src/agents/whale-eth/whale-screening-agent.ts): `src/agents/whale-eth/whale-screening-agent.ts`
- [GMGN market data](https://github.com/muratmula/ai-robinhood-chain/blob/master/src/adapters/gmgn-adapter.ts): `src/adapters/gmgn-adapter.ts`
- [OpenSea data](https://github.com/muratmula/ai-robinhood-chain/blob/master/src/adapters/opensea-adapter.ts): `src/adapters/opensea-adapter.ts`
- [Hyperliquid data](https://github.com/muratmula/ai-robinhood-chain/blob/master/src/adapters/hyperliquid-adapter.ts): `src/adapters/hyperliquid-adapter.ts`

### Signal orchestration

- [Screening hub](https://github.com/muratmula/ai-robinhood-chain/blob/master/src/orchestrator/hub.ts): `src/orchestrator/hub.ts`
- [Swarm consensus](https://github.com/muratmula/ai-robinhood-chain/blob/master/src/orchestrator/swarm-consensus.ts): `src/orchestrator/swarm-consensus.ts`
- [Signal dispatch](https://github.com/muratmula/ai-robinhood-chain/blob/master/src/orchestrator/dispatch.ts): `src/orchestrator/dispatch.ts`

### Portfolio and risk

- [Risk engine](https://github.com/muratmula/ai-robinhood-chain/blob/master/src/orchestrator/risk-engine-v2.ts): `src/orchestrator/risk-engine-v2.ts`
- [Position manager](https://github.com/muratmula/ai-robinhood-chain/blob/master/src/position/position-manager.ts): `src/position/position-manager.ts`
- [Wallet service](https://github.com/muratmula/ai-robinhood-chain/blob/master/src/services/wallet-service.ts): `src/services/wallet-service.ts`
- [Trade journal](https://github.com/muratmula/ai-robinhood-chain/blob/master/src/services/trade-journal-service.ts): `src/services/trade-journal-service.ts`

### Supporting services

- [Persistent state](https://github.com/muratmula/ai-robinhood-chain/blob/master/src/services/state-store.ts): `src/services/state-store.ts`
- [AI provider service](https://github.com/muratmula/ai-robinhood-chain/blob/master/src/services/ai-service.ts): `src/services/ai-service.ts`
- [Price alerts](https://github.com/muratmula/ai-robinhood-chain/blob/master/src/services/price-alert-service.ts): `src/services/price-alert-service.ts`
- [Price feed](https://github.com/muratmula/ai-robinhood-chain/blob/master/src/services/price-feed-service.ts): `src/services/price-feed-service.ts`

### Other components

- **Operator**

## Connections

- Operator → Discord command center: commands
- Operator → Terminal TUI: operates
- Operator → Telegram bridge: receives alerts
- Discord command center → Screening hub: queries (evidence: `src/discord/handlers/command-handlers.ts`)
- Discord command center → Wallet service: manages (evidence: `src/discord/handlers/command-handlers.ts`)
- Discord command center → Trade journal: queries (evidence: `src/discord/handlers/command-handlers.ts`)
- Terminal TUI → Screening hub: triggers (evidence: `src/cli/tui.ts`)
- Terminal TUI → AI provider service: queries (evidence: `src/cli/tui.ts`)
- Telegram bridge → Screening hub: uses (evidence: `src/telegram/telegram-service.ts`)
- Telegram bridge → AI provider service: queries (evidence: `src/telegram/telegram-service.ts`)
- Screening hub → Meme screening: runs (evidence: `src/orchestrator/hub.ts`)
- Screening hub → NFT screening: runs (evidence: `src/orchestrator/hub.ts`)
- Screening hub → Alpha screening: runs (evidence: `src/orchestrator/hub.ts`)
- Screening hub → Whale screening: runs (evidence: `src/orchestrator/hub.ts`)
- Screening hub → LP screening: screens (evidence: `src/orchestrator/hub.ts`)
- Meme screening → GMGN market data: fetches data (evidence: `src/agents/meme-robinhood/robinhood-screening-agent.ts`)
- NFT screening → OpenSea data: fetches data (evidence: `src/agents/nft/nft-screening-agent.ts`)
- Whale screening → Hyperliquid data: fetches data (evidence: `src/agents/whale-eth/whale-screening-agent.ts`)
- Screening hub → Swarm consensus: evaluates signals
- Swarm consensus → Signal dispatch: approves signals
- Signal dispatch → Discord command center: posts cards
- Signal dispatch → Telegram bridge: broadcasts cards
- Screening hub → Risk engine: checks exposure (evidence: `src/orchestrator/hub.ts`)
- Risk engine → Position manager: gates entries
- Position manager → Persistent state: persists positions (evidence: `src/position/position-manager.ts`)
- Wallet service → Persistent state: loads keys (evidence: `src/services/wallet-service.ts`)
- Trade journal → Persistent state: persists trades (evidence: `src/services/trade-journal-service.ts`)
- Price alerts → Price feed: gets prices (evidence: `src/services/price-alert-service.ts`)
- Price alerts → Persistent state: persists alerts (evidence: `src/services/price-alert-service.ts`)
- Discord command center → Price alerts: manages alerts (evidence: `src/discord/handlers/command-handlers.ts`)
