Saltar a contenido

C4 - Contenedores#

C4Container
title SignalDashPro - Contenedores
Person(usuario, "Trader/Analista")
System_Boundary(app, "SignalDashPro") {
  Container(frontend, "Frontend Web", "Next.js/React", "UI web que consume REST/WS.")
  Container(backend, "FastAPI Backend", "Python 3.13 + FastAPI", "Expone API REST, WebSocket y jobs.")
  ContainerDb(db, "PostgreSQL 15", "SQL", "Ticks, estrategias, noticias, snapshots financieros.")
  Container(storage, "Storage local", "Filesystem", "Logs rotativos, modelos IA, exports BI.")
}
System_Ext(binance, "Binance API", "REST (spot/futures)")
System_Ext(newsapi, "News Providers", "REST (NewsAPI/FMP/Prixe)")
System_Ext(slack, "Slack/Teams", "Webhooks HTTP")

Rel(usuario, frontend, "UI Web/Desktop/Mobile", "HTTPS")
Rel(frontend, backend, "REST /binance/*, /risk/*, /analytics/*, /jobs/*, /ops/*", "HTTPS")
Rel(backend, db, "ORM SQLAlchemy", "TCP 5433")
Rel(backend, storage, "Logs, exportaciones, modelos", "File I/O")
Rel(backend, binance, "Trading/account + market data", "HTTPS")
Rel(backend, newsapi, "Ingesta noticias", "HTTPS")
Rel(backend, slack, "Alertas externas", "Webhooks HTTPS")

El backend ejecuta jobs recurrentes (cron/systemd) que orquestan ingestion de noticias, pipelines IA, exportaciones BI, entrenamiento y monitor de metas. El frontend se comunica exclusivamente con la API FastAPI y no accede directamente a bases de datos ni terceros.