Skip to content

Commit 22d37a7

Browse files
committed
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
1 parent 1844b41 commit 22d37a7

1 file changed

Lines changed: 6 additions & 24 deletions

File tree

README.md

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -22,36 +22,18 @@ graph TB
2222
2323
subgraph "Windows Host"
2424
subgraph "FastAPI Application"
25-
Main["main.py<br/>App Wiring & Lifespan"]
26-
Main --> CORS["CORS Middleware"]
27-
CORS --> Logging["Logging Middleware"]
28-
Logging --> Error["Error Handler Middleware"]
29-
Error --> RateLimit["Rate Limiter<br/>(SlowAPI)"]
30-
RateLimit --> Auth["API Key Auth<br/>(Optional)"]
31-
32-
Auth --> HealthRouter["health.py<br/>/health, /version, /last-error"]
33-
Auth --> SymbolsRouter["symbols.py<br/>/symbols, /symbols/{symbol}"]
34-
Auth --> MarketRouter["market.py<br/>/rates, /ticks, /market-book"]
35-
Auth --> AccountRouter["account.py<br/>/account, /terminal"]
36-
Auth --> HistoryRouter["history.py<br/>/history/orders, /history/deals"]
37-
Auth --> CalcRouter["calc.py<br/>/calc/margin, /calc/profit"]
38-
Auth --> TradingRouter["trading.py<br/>/order/check"]
39-
40-
SymbolsRouter --> Deps["dependencies.py<br/>MT5 Client Singleton"]
41-
MarketRouter --> Deps
42-
AccountRouter --> Deps
43-
HistoryRouter --> Deps
44-
CalcRouter --> Deps
45-
TradingRouter --> Deps
46-
Deps --> Fmt["formatters.py<br/>JSON / Parquet"]
25+
Middleware["Middleware Stack<br/>CORS · Logging · Error Handler · Rate Limiter · Auth"]
26+
Routers["Routers<br/>health · symbols · market · account · history · calc · trading"]
27+
Deps["MT5 Client Singleton<br/>+ JSON/Parquet Formatter"]
28+
Middleware --> Routers --> Deps
4729
end
4830
4931
Deps --> pdmt5["pdmt5<br/>MT5 Client Library"]
5032
pdmt5 --> MT5["MetaTrader 5<br/>Terminal"]
5133
end
5234
53-
Client -- "HTTP/REST" --> Main
54-
Fmt -- "JSON / Parquet" --> Client
35+
Client -- "HTTP/REST" --> Middleware
36+
Deps -- "JSON / Parquet" --> Client
5537
```
5638

5739
## Features

0 commit comments

Comments
 (0)