How tuhama/stromblick works
Stromblick is a Germany electricity-market dashboard. Its principal workflow is SMARD data ingestion into Postgres, API retrieval and aggregation, then browser presentation; the product also exposes overview, tomorrow, explorer, and explain pages. The excerpts establish the ingest and API wiring plus application entry points; the README documents deployment and one-way data flow. Some page implementations and their API-query wiring were not sampled, so those links are omitted where source evidence is unavailable.
Main entry points: app.ts API service · routes.tsx Page routing · run.ts Ingest runner · series.ts Series routes
Components 24
Data ingestion
- Ingest runner
apps/api/src/ingest/run.ts - SMARD client
apps/api/src/smard/client.ts - Series catalog
apps/api/src/smard/catalog.ts
Market API
- API service
apps/api/src/app.ts - Ingest endpoint
apps/api/src/routes/ingest.ts - Postgres
apps/api/src/db.ts - Series routes
apps/api/src/routes/series.ts - Readings loader
apps/api/src/series/load-readings.ts - Status route
apps/api/src/routes/status.ts - Ingest status
apps/api/src/status/load-status.ts - Health route
apps/api/src/routes/health.ts
Web dashboard
- Browser app
apps/web/src/main.tsx - Page routing
apps/web/src/routes/routes.tsx - Market overview
apps/web/src/features/overview/OverviewPage.tsx - Generation analysis
apps/web/src/features/overview/generation.ts - Chart rendering
apps/web/src/charts/DataTable.tsx - Tomorrow prices
apps/web/src/features/tomorrow/TomorrowPage.tsx - Series explorer
apps/web/src/features/explorer/ExplorerPage.tsx - Data explanations
apps/web/src/features/explain/ExplainPage.tsx - Query management
apps/web/src/api/query-client.ts - API client
apps/web/src/api/client.ts
Shared contracts
- Data contracts
packages/shared/src/readings.ts
Other components
- SMARD data
- Dashboard user
Connections 26
- SMARD data → SMARD client: serves data
README.md - Ingest endpoint → Ingest runner: starts job
apps/api/src/routes/ingest.ts - Ingest runner → SMARD client: fetches weeks
apps/api/src/ingest/run.ts - Ingest runner → Series catalog: ingests series
apps/api/src/ingest/run.ts - Ingest runner → Postgres: upserts readings
apps/api/src/ingest/run.ts - API service → Ingest endpoint: mounts route
apps/api/src/app.ts - API service → Series routes: mounts route
apps/api/src/app.ts - API service → Status route: mounts route
apps/api/src/app.ts - API service → Health route: mounts route
apps/api/src/app.ts - Series routes → Readings loader: loads series
apps/api/src/routes/series.ts - Readings loader → Postgres: queries readings
apps/api/src/series/load-readings.ts - Series routes → Series catalog: uses catalog
apps/api/src/routes/series.ts - Status route → Ingest status: loads status
apps/api/src/routes/status.ts - Ingest status → Postgres: reads runs
apps/api/src/status/load-status.ts - Dashboard user → Browser app: opens dashboard
README.md - Browser app → Page routing: starts router
apps/web/src/main.tsx - Page routing → Market overview: routes to page
apps/web/src/routes/routes.tsx - Page routing → Tomorrow prices: routes to page
apps/web/src/routes/routes.tsx - Page routing → Series explorer: routes to page
apps/web/src/routes/routes.tsx - Page routing → Data explanations: routes to page
apps/web/src/routes/routes.tsx - Browser app → Query management: provides queries
apps/web/src/main.tsx - Market overview → Generation analysis: uses analysis
apps/web/src/features/overview/generation.ts - Generation analysis → Chart rendering: builds table data
apps/web/src/features/overview/generation.ts - Query management → API client: uses requests
apps/web/src/api/query-client.ts - API service → Data contracts: shares schemas
README.md - API client → Data contracts: validates responses
apps/web/src/api/client.ts