How pedrodnt/silo-bz works
SILO ingests public Brazilian financial data, validates and stores it in Supabase Postgres, then exposes read-only data for people and agents. Its principal data workflow is source fetch → parse and validate → pipeline orchestration → warehouse; the read API and SDK provide a separate query path. A portfolio-diagnosis service accepts statements, queries SILO data, computes analysis, and renders reports. The README documents the ingest stages and public surfaces; some subsystem links below rely on SOURCE INDEX references rather than inspected implementation excerpts.
Main entry points: pipeline Ingest orchestration · app.py Read API · fetchers Source fetchers · server.py Diagnosis endpoint
Components 22
Data ingestion
- Source fetchers
src/fetchers - Parsing and validation
src/parsers - Ingest orchestration
src/pipeline - Ingest audit
src/pipeline/ingest_log.py
Warehouse and serving
- Postgres client
src/store/pg_client.py - Supabase warehouse
Portfolio diagnosis
- Diagnosis endpoint
src/portfolio/server.py - Statement handling
src/portfolio/statement.py - Diagnosis engine
src/portfolio/engine.py - Portfolio data client
src/portfolio/client.py - Portfolio analysis
src/portfolio - Report rendering
src/portfolio/report/render.py
Agent access
- SILO MCP tools
supabase/functions/silo-mcp/tools.ts
Public surfaces
- Read API
serve/app.py - API catalog
serve/catalog.py - Python client
sdk/silo_client/client.py - Public dashboard
dashboard/pages/+layout.svelte
Other components
- CVM data
- B3 data
- Macro data
- Researchers and readers
- AI agents
Connections 21
- CVM data → Source fetchers: provides filings
- B3 data → Source fetchers: provides market data
- Macro data → Source fetchers: provides series
- Ingest orchestration → Source fetchers: orchestrates fetch
src/pipeline/cvm_pipeline.py - Ingest orchestration → Parsing and validation: orchestrates parsing
src/pipeline/cvm_pipeline.py - Parsing and validation → Postgres client: validated rows
- Ingest orchestration → Postgres client: upserts data
src/pipeline/cvm_pipeline.py - Ingest orchestration → Ingest audit: records ingest
src/pipeline/ingest_log.py - Postgres client → Supabase warehouse: writes rows
- Supabase warehouse → Read API: serves schema
serve/app.py - Read API → API catalog: uses catalog
serve/app.py - Researchers and readers → Read API: queries
- AI agents → SILO MCP tools: uses tools
- Python client → Read API: calls endpoints
sdk/silo_client/client.py - Ingest orchestration → Public dashboard: triggers republish
- Diagnosis endpoint → Statement handling: handles input
src/portfolio/server.py - Diagnosis endpoint → Diagnosis engine: runs diagnosis
src/portfolio/server.py - Diagnosis engine → Portfolio data client: queries data
src/portfolio/engine.py - Diagnosis engine → Portfolio analysis: computes metrics
src/portfolio/engine.py - Diagnosis endpoint → Report rendering: renders report
src/portfolio/server.py - SILO MCP tools → Supabase warehouse: reads warehouse