# shekath/btcpro architecture

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

- Interactive diagram: https://gitdiagram.com/shekath/btcpro
- Repository: https://github.com/shekath/btcpro

## Overview

Pro Bitcoin Trader is a real-time Bitcoin analysis dashboard with optional human-approved trade execution. Its main workflow collects Delta Exchange market data and news, computes futures signals, options strategies, and sentiment, then broadcasts updates to the React dashboard; users can also simulate positions or request an order. The graph preserves the documented charting, alerts, and P&L capabilities. Source evidence is limited to the supplied excerpts and README, so unsampled implementation details are not expanded.

Main entry points: [`backend/main.py`](https://github.com/shekath/btcpro/blob/main/backend/main.py) (Analysis and API), [`frontend/src/App.jsx`](https://github.com/shekath/btcpro/blob/main/frontend/src/App.jsx) (Trading Dashboard), [`backend/delta_ws.py`](https://github.com/shekath/btcpro/blob/main/backend/delta_ws.py) (Live Tick Stream), [`backend/delta_api.py`](https://github.com/shekath/btcpro/blob/main/backend/delta_api.py) (REST Market Client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_market["Market Data"]
  node_market_api["REST Market Client<br/>[delta_api.py]"]
  node_live_ticks["Live Tick Stream<br/>[delta_ws.py]"]
end

subgraph group_analysis["Analysis"]
  node_signal_engine["Signal Analysis<br/>[analyzer.py]"]
  node_options_engine["Options Strategy<br/>[analyzer.py]"]
  node_sentiment_engine["Sentiment Analysis<br/>[sentiment.py]"]
  node_news_parser["News Fetch and Score<br/>[sentiment.py]"]
end

subgraph group_backend["Backend Services"]
  node_orchestrator["Analysis and API<br/>[main.py]"]
end

subgraph group_frontend["Trader Dashboard"]
  node_dashboard_entry["React Entry<br/>[main.jsx]"]
  node_dashboard["Trading Dashboard<br/>[App.jsx]"]
  node_charting["Interactive Chart<br/>[App.jsx]"]
  node_position_tracker["P&amp;L and Paper Trades<br/>[App.jsx]"]
  node_alerts["Volume and Audio Alerts<br/>[App.jsx]"]
end

node_trader(("Trader"))
node_delta[("Delta Exchange")]
node_newsfeed["Crypto RSS"]
node_tradingview["TradingView"]

node_orchestrator -->|"fetches market data"| node_market_api
node_orchestrator -->|"starts tick stream"| node_live_ticks
node_live_ticks -->|"delivers ticks"| node_orchestrator
node_market_api -->|"requests market data"| node_delta
node_live_ticks -->|"subscribes to ticks"| node_delta
node_orchestrator -->|"analyzes candles"| node_signal_engine
node_orchestrator -->|"builds strategy"| node_options_engine
node_orchestrator -->|"fetches headlines"| node_news_parser
node_news_parser -->|"reads RSS feed"| node_newsfeed
node_orchestrator -->|"computes composite"| node_sentiment_engine
node_orchestrator -->|"broadcasts updates"| node_dashboard
node_dashboard_entry -->|"renders"| node_dashboard
node_trader -->|"uses"| node_dashboard
node_trader -->|"requests trade execution"| node_orchestrator
node_orchestrator -->|"places confirmed order"| node_market_api
node_dashboard -->|"displays market chart"| node_charting
node_dashboard -->|"tracks simulated P&amp;L"| node_position_tracker
node_dashboard -->|"plays volume alerts"| node_alerts
node_dashboard -.->|"embeds chart"| node_tradingview

click node_market_api "https://github.com/shekath/btcpro/blob/main/backend/delta_api.py"
click node_live_ticks "https://github.com/shekath/btcpro/blob/main/backend/delta_ws.py"
click node_signal_engine "https://github.com/shekath/btcpro/blob/main/backend/analyzer.py"
click node_options_engine "https://github.com/shekath/btcpro/blob/main/backend/analyzer.py"
click node_sentiment_engine "https://github.com/shekath/btcpro/blob/main/backend/sentiment.py"
click node_orchestrator "https://github.com/shekath/btcpro/blob/main/backend/main.py"
click node_news_parser "https://github.com/shekath/btcpro/blob/main/backend/sentiment.py"
click node_dashboard_entry "https://github.com/shekath/btcpro/blob/main/frontend/src/main.jsx"
click node_dashboard "https://github.com/shekath/btcpro/blob/main/frontend/src/App.jsx"
click node_charting "https://github.com/shekath/btcpro/blob/main/frontend/src/App.jsx"
click node_position_tracker "https://github.com/shekath/btcpro/blob/main/frontend/src/App.jsx"
click node_alerts "https://github.com/shekath/btcpro/blob/main/frontend/src/App.jsx"

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_market_api,node_live_ticks,node_tradingview toneBlue
class node_signal_engine,node_options_engine,node_sentiment_engine,node_news_parser,node_delta toneAmber
class node_orchestrator toneMint
class node_dashboard_entry,node_dashboard,node_charting,node_position_tracker,node_alerts toneRose
class node_trader,node_newsfeed toneIndigo
```

## Components

### Market Data

- [REST Market Client](https://github.com/shekath/btcpro/blob/main/backend/delta_api.py): `backend/delta_api.py`
- [Live Tick Stream](https://github.com/shekath/btcpro/blob/main/backend/delta_ws.py): `backend/delta_ws.py`

### Analysis

- [Signal Analysis](https://github.com/shekath/btcpro/blob/main/backend/analyzer.py): `backend/analyzer.py`
- [Options Strategy](https://github.com/shekath/btcpro/blob/main/backend/analyzer.py): `backend/analyzer.py`
- [Sentiment Analysis](https://github.com/shekath/btcpro/blob/main/backend/sentiment.py): `backend/sentiment.py`
- [News Fetch and Score](https://github.com/shekath/btcpro/blob/main/backend/sentiment.py): `backend/sentiment.py`

### Backend Services

- [Analysis and API](https://github.com/shekath/btcpro/blob/main/backend/main.py): `backend/main.py`

### Trader Dashboard

- [React Entry](https://github.com/shekath/btcpro/blob/main/frontend/src/main.jsx): `frontend/src/main.jsx`
- [Trading Dashboard](https://github.com/shekath/btcpro/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Interactive Chart](https://github.com/shekath/btcpro/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [P&L and Paper Trades](https://github.com/shekath/btcpro/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Volume and Audio Alerts](https://github.com/shekath/btcpro/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`

### Other components

- **Trader**
- **Delta Exchange**
- **Crypto RSS**
- **TradingView**

## Connections

- Analysis and API → REST Market Client: fetches market data (evidence: `backend/main.py`)
- Analysis and API → Live Tick Stream: starts tick stream (evidence: `backend/main.py`)
- Live Tick Stream → Analysis and API: delivers ticks (evidence: `backend/main.py`)
- REST Market Client → Delta Exchange: requests market data (evidence: `README.md`)
- Live Tick Stream → Delta Exchange: subscribes to ticks (evidence: `README.md`)
- Analysis and API → Signal Analysis: analyzes candles (evidence: `backend/main.py`)
- Analysis and API → Options Strategy: builds strategy (evidence: `backend/main.py`)
- Analysis and API → News Fetch and Score: fetches headlines (evidence: `backend/main.py`)
- News Fetch and Score → Crypto RSS: reads RSS feed (evidence: `backend/sentiment.py`)
- Analysis and API → Sentiment Analysis: computes composite (evidence: `backend/main.py`)
- Analysis and API → Trading Dashboard: broadcasts updates (evidence: `README.md`)
- React Entry → Trading Dashboard: renders (evidence: `frontend/src/main.jsx`)
- Trader → Trading Dashboard: uses (evidence: `README.md`)
- Trader → Analysis and API: requests trade execution (evidence: `README.md`)
- Analysis and API → REST Market Client: places confirmed order (evidence: `backend/main.py`)
- Trading Dashboard → Interactive Chart: displays market chart (evidence: `README.md`)
- Trading Dashboard → P&L and Paper Trades: tracks simulated P&L (evidence: `frontend/src/App.jsx`)
- Trading Dashboard → Volume and Audio Alerts: plays volume alerts (evidence: `README.md`)
- Trading Dashboard → TradingView: embeds chart (evidence: `README.md`)
