Build and Deploy Documentation / build (push) Failing after 8s
Styling: - Dark-first design (Vercel/Linear inspired) with Geist font - Custom CSS with full --ifm- token overrides - Glassmorphic navbar, refined sidebar, modern tables - Gradient hero with animated glow, app cards, C4 section - Custom badge, tag, and callout components - Announcement bar, TOC config, dark scrollbar draw.io: - Added docusaurus-plugin-drawio + raw-loader - SMP full pipeline diagram (smp-pipeline.drawio) - Embedded in architecture overview Mermaid: - Added @docusaurus/theme-mermaid - C4Context, C4Container, C4Component diagrams - Sequence and graph diagrams in architecture C4 Architecture (Stock Market Professional): - L1 Context: system in the world, actors, external systems - L2 Containers: Data Ingestor, Analysis Engine, Signal Generator, TimescaleDB, Notifier - L3 Components: deep component breakdown with mermaid C4Component diagrams Other: - Sidebar restructured with C4 section and Modules section - Homepage rebuilt as modern dark landing page
3.4 KiB
3.4 KiB
sidebar_position
| sidebar_position |
|---|
| 2 |
L2 — Containers
C4 Level 2: Zooms into Stock Market Professional and shows its deployable units — services, databases, and schedulers.
:::info C4 Model — Level 2 The Container diagram answers: What are the high-level technical building blocks, and how do they talk to each other? :::
Container Diagram
C4Container
title Container Diagram — Stock Market Professional
Person(trader, "Trader", "Reviews signals, executes manually")
System_Boundary(smp, "Stock Market Professional") {
Container(ingestor, "Data Ingestor", "Python / APScheduler", "Polls market data APIs on schedule, normalises OHLCV candles, detects gaps.")
Container(analyser, "Analysis Engine", "Python / pandas-ta", "Applies technical indicators and pattern recognition on latest candle data.")
Container(signalGen, "Signal Generator", "Python", "Scores setups by confluence, filters by risk rules, produces ≤3 daily signals.")
Container(scheduler, "Job Scheduler", "APScheduler / cron", "Orchestrates pipeline runs: ingest every minute, analyse every 5 min, generate plan pre-market.")
ContainerDb(tsdb, "Market Data Store", "SQLite / TimescaleDB", "Stores normalised OHLCV candles, indicator snapshots, and signal history.")
Container(notifier, "Notifier", "Python / Discord Webhook", "Formats and delivers the daily trading plan and intraday alerts.")
}
System_Ext(marketData, "Market Data APIs", "Yahoo Finance, Alpha Vantage, Polygon")
System_Ext(discord, "Discord", "Signal delivery")
System_Ext(newsApi, "Economic Calendar API", "Forex Factory, Investing.com")
Rel(scheduler, ingestor, "Triggers", "Internal call")
Rel(scheduler, analyser, "Triggers", "Internal call")
Rel(scheduler, signalGen, "Triggers", "Internal call")
Rel(ingestor, marketData, "Fetches OHLCV", "REST / WS")
Rel(ingestor, tsdb, "Writes candles", "SQL")
Rel(analyser, tsdb, "Reads candles", "SQL")
Rel(analyser, tsdb, "Writes indicator snapshots", "SQL")
Rel(signalGen, tsdb, "Reads snapshots", "SQL")
Rel(signalGen, newsApi, "Checks economic calendar", "REST")
Rel(signalGen, notifier, "Passes signals", "In-process")
Rel(notifier, discord, "Posts daily plan", "Webhook")
Rel(trader, discord, "Reads signals", "Discord UI")
Containers Inventory
| Container | Technology | Responsibility |
|---|---|---|
| Data Ingestor | Python, requests, websockets | Poll & normalise market data |
| Analysis Engine | Python, pandas, pandas-ta, ta-lib | Technical indicators + pattern recognition |
| Signal Generator | Python | Confluence scoring, risk rules, signal assembly |
| Job Scheduler | APScheduler | Pipeline orchestration & timing |
| Market Data Store | SQLite (dev) / TimescaleDB (prod) | Persist OHLCV, indicators, signals |
| Notifier | Python, Discord Webhook | Format and deliver signals |
Deployment
All containers run as a single Python process in development (scheduler + all modules), and can be split into separate Docker containers in production:
docker/
├── ingestor/ # Data poller container
├── analyser/ # Analysis worker container
├── signal-gen/ # Signal generation + notifier
└── timescaledb/ # Database container
The CI pipeline (Gitea Actions) builds images and pushes to the Zot container registry at lego-cloud.eu:30264.