How inthiiii/lak-arthika works
LakArthika is a Sri Lankan market-intelligence digital twin: official HARTI bulletins become validated historical price data, then feed an API and public dashboard, alongside forecasting and economic-stress analysis. Historical ingestion, forecasting, external signals, stress scoring, and dashboard presentation are distinct product branches. The README documents the broader data lifecycle and capabilities; sampled source excerpts and the SOURCE INDEX support only some implementation links, so unsampled relationships are not asserted.
Main entry points: harti_historical.py Historical workflow · trainer.py Forecast training · api.py FastAPI service · analytics.py DuckDB analytics
Components 28
Price ingestion
- Historical workflow
src/lak_arthika/pipelines/harti_historical.py - HARTI retrieval
src/lak_arthika/ingestion/harti.py - Archive downloads
src/lak_arthika/ingestion/harti_archive.py - Versioned parsers
src/lak_arthika/ingestion/parsers/harti_v1.py - Price records
src/lak_arthika/models/price.py
Data and analytics
- Bulletin manifest
src/lak_arthika/storage/manifest.py - Quality gate
src/lak_arthika/quality.py - Price storage
src/lak_arthika/storage/historical.py - DuckDB analytics
src/lak_arthika/storage/analytics.py - Runtime settings
src/lak_arthika/config.py
Forecasting and signals
- Forecast training
src/lak_arthika/forecasting/trainer.py - Price features
src/lak_arthika/features/price_features.py - Backtests and metrics
src/lak_arthika/evaluation/backtest.py - Model artifacts
src/lak_arthika/forecasting/artifacts.py - Weather and official signals
src/lak_arthika/signals - Signal storage
src/lak_arthika/storage/signals.py - Model health
src/lak_arthika/forecasting/health.py
Economic stress
- Stress engine
src/lak_arthika/stress/engine.py - Stress records
src/lak_arthika/storage/stress.py - Stress contracts
src/lak_arthika/models/stress.py - Scoring and alerts
src/lak_arthika/stress
API and dashboard
- FastAPI service
src/lak_arthika/api.py - Dashboard application
web/src/App.tsx - Dashboard queries
web/src/api/queries.ts - Shareable filters
web/src/hooks/useDashboardFilters.ts - Market and stress views
web/src/components/MarketMap.tsx
Other components
- HARTI archive
- Dashboard user
Connections 31
- HARTI archive → Historical workflow: provides bulletins
README.md - Historical workflow → Archive downloads: discovers and downloads
src/lak_arthika/pipelines/harti_historical.py - Historical workflow → HARTI retrieval: preserves files
src/lak_arthika/pipelines/harti_historical.py - Historical workflow → Versioned parsers: selects parser
src/lak_arthika/pipelines/harti_historical.py - HARTI retrieval → Price records: creates records
src/lak_arthika/ingestion/harti.py - Historical workflow → Bulletin manifest: updates manifest
src/lak_arthika/pipelines/harti_historical.py - Historical workflow → Quality gate: validates records
src/lak_arthika/pipelines/harti_historical.py - Historical workflow → Price storage: publishes prices
src/lak_arthika/pipelines/harti_historical.py - Historical workflow → DuckDB analytics: builds analytics
src/lak_arthika/pipelines/harti_historical.py - Historical workflow → HARTI retrieval: retrieves bulletins
README.md - DuckDB analytics → FastAPI service: serves price data
src/lak_arthika/api.py - Bulletin manifest → FastAPI service: supplies quality status
src/lak_arthika/api.py - DuckDB analytics → Forecast training: provides history
README.md - Forecast training → Price features: builds features
src/lak_arthika/forecasting/trainer.py - Forecast training → Backtests and metrics: evaluates horizons
src/lak_arthika/forecasting/trainer.py - Forecast training → Model artifacts: publishes model
README.md - Weather and official signals → Signal storage: stores observations
- Signal storage → Forecast training: provides point-in-time signals
src/lak_arthika/forecasting/trainer.py - Signal storage → Model health: checks freshness
src/lak_arthika/forecasting/health.py - Model artifacts → Model health: checks promoted model
src/lak_arthika/forecasting/health.py - DuckDB analytics → Stress engine: provides price history
README.md - Stress engine → Scoring and alerts: runs scoring and alerts
src/lak_arthika/stress/engine.py - Stress engine → Stress records: writes results
src/lak_arthika/stress/engine.py - Stress engine → Stress contracts: builds signals
src/lak_arthika/stress/engine.py - Stress records → FastAPI service: serves stress results
src/lak_arthika/api.py - Model artifacts → FastAPI service: serves forecasts
src/lak_arthika/api.py - FastAPI service → Dashboard queries: responds to requests
README.md - Dashboard queries → Dashboard application: provides query data
web/src/App.tsx - Dashboard application → Shareable filters: reads and updates
web/src/App.tsx - Dashboard application → Market and stress views: renders market views
web/src/App.tsx - Dashboard user → Dashboard application: explores markets
README.md