How minji827/day68 works
DeltaWatch detects changes in corporate disclosures, financials, and interest-rate context, then presents review priorities and evidence-backed explanations. The main user workflow is entering a stock code in the local web app, which collects and loads data, runs change rules, optionally generates validated AI explanations, and refreshes the dashboard. The graph includes the documented Power BI and n8n capabilities and the separate pure-function rule engines. Edges rely on README statements or SOURCE INDEX references; unsampled implementation details are not inferred.
Main entry points: webapp.py Live web app · collect.py Company collector · run_rules.py SQL rule runner · explain.py AI explanations
Components 28
Data collection
- OpenDART client
scripts/opendart_client.py - ECOS client
scripts/ecos_client.py - Company collector
scripts/collect.py
Data platform
- RAW tables
sql/002_raw.sql - RAW loader
scripts/load_raw.py - CORE tables
sql/003_core.sql - CORE transformer
scripts/load_core.py - MART tables
sql/004_mart.sql - Database connections
scripts/db.py
Change analysis
- SQL rule runner
scripts/run_rules.py - Rule engine v3.3
src/rules/rule_engine_v33.py - Rule engine v4.0
src/rules/rule_engine_v40.py - Rule domains
src/rules/domain_map.py - Disclosure sections
scripts/sections.py - DART XML parser
scripts/dart_xml.py - Disclosure diff
scripts/compare_disclosure.py - AI explanations
scripts/explain.py - Quarterly analysis
scripts/quarterly.py
Review experience
- Live web app
scripts/webapp.py - Dashboard UI
scripts/webapp_static/index.html - Dashboard data export
scripts/data_export.py
Reporting and alerts
- Power BI sync
scripts/export_powerbi.py - Power BI database
sql/powerbi/001_schema.sql - Weekly email workflow
n8n/deltawatch_weekly_alert.json
Other components
- Analyst
- OpenAI API
- Power BI consumer
- Email recipient
Connections 33
- Analyst → Dashboard UI: enters stock code
README.md - Dashboard UI → Live web app: requests analysis
README.md - Live web app → OpenDART client: resolves company
scripts/webapp.py - Live web app → Company collector: starts collection
README.md - Company collector → OpenDART client: fetches disclosures
scripts/collect.py - Company collector → ECOS client: fetches rates
scripts/collect.py - Company collector → RAW tables: saves raw data
README.md - Live web app → RAW loader: loads raw data
README.md - RAW loader → RAW tables: writes records
- Live web app → CORE transformer: transforms records
README.md - CORE transformer → RAW tables: reads raw data
README.md - CORE transformer → CORE tables: writes normalized data
README.md - Live web app → SQL rule runner: runs rules
README.md - SQL rule runner → CORE tables: reads core data
scripts/run_rules.py - SQL rule runner → MART tables: writes change results
README.md - SQL rule runner → Database connections: uses database connection
scripts/run_rules.py - Rule engine v3.3 → Rule domains: uses rule metadata
src/rules/rule_engine_v33.py - Rule engine v4.0 → Rule domains: uses rule metadata
src/rules/rule_engine_v40.py - Live web app → AI explanations: runs optional explanations
scripts/webapp.py - AI explanations → Disclosure sections: gets disclosure text
scripts/explain.py - AI explanations → Database connections: reads and stores results
scripts/explain.py - Disclosure sections → OpenDART client: downloads originals
scripts/sections.py - Disclosure sections → DART XML parser: parses document
scripts/sections.py - AI explanations → OpenAI API: requests explanations
scripts/explain.py - Live web app → Dashboard data export: exports dashboard data
scripts/webapp.py - Dashboard data export → MART tables: reads dashboard metrics
- Live web app → Dashboard UI: serves dashboard
README.md - Live web app → Power BI sync: triggers sync
scripts/webapp.py - Power BI sync → Power BI database: writes reporting tables
scripts/export_powerbi.py - Power BI consumer → Power BI database: views reports
README.md - Weekly email workflow → Email recipient: sends weekly alerts
README.md - Disclosure diff → Disclosure sections: compares disclosure sections
scripts/compare_disclosure.py - Quarterly analysis → Database connections: uses database connection
scripts/quarterly.py