Skip to content

Commit aed0d86

Browse files
dceoyclaudeCopilot
authored
Add architecture diagram to README (#19)
* Add Mermaid architecture diagram to README Show the request flow from HTTP clients through middleware layers (CORS, logging, error handling, rate limiting, auth) into the router endpoints, the shared MT5 client singleton, and down to the MetaTrader 5 terminal via pdmt5. https://claude.ai/code/session_01YNwrPB3iN3JWpkVgM5XwVQ * Compact FastAPI Application subgraph in architecture diagram Collapse the middleware chain and seven routers into single summary nodes to reduce diagram verbosity while keeping the key layers visible. https://claude.ai/code/session_01YNwrPB3iN3JWpkVgM5XwVQ * docs: clarify architecture diagram Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent e12714a commit aed0d86

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,32 @@ The API server must run on Windows. The `MetaTrader5` Python package used by
1414
machine with a logged-in MetaTrader 5 terminal. HTTP clients can connect from
1515
any operating system.
1616

17+
## Architecture
18+
19+
```mermaid
20+
graph TB
21+
Client["HTTP Client<br/>(Any OS)"]
22+
23+
subgraph "Windows Host"
24+
subgraph "FastAPI Application"
25+
Middleware["Middleware Stack<br/>CORS · Logging · Error Handler · Rate Limiter"]
26+
Routers["Routers<br/>health · symbols · market · account · history · calc · trading"]
27+
Auth["API Key Security Dependency<br/>Security(api_key_header) · verify_api_key"]
28+
Deps["FastAPI Dependencies<br/>MT5 Client Singleton · Format Negotiation"]
29+
Formatters["Response Formatters<br/>JSON · Parquet"]
30+
Middleware --> Routers --> Deps --> Formatters
31+
Auth -.-> Routers
32+
Formatters --> Middleware
33+
end
34+
35+
Deps --> pdmt5["pdmt5<br/>MT5 Client Library"]
36+
pdmt5 --> MT5["MetaTrader 5<br/>Terminal"]
37+
end
38+
39+
Client -- "HTTP/REST" --> Middleware
40+
Middleware -- "JSON / Parquet" --> Client
41+
```
42+
1743
## Features
1844

1945
- REST endpoints for symbols, market data, account info, orders, history,

0 commit comments

Comments
 (0)