{
  "schema_version": 1,
  "captured_from": "app accepted modular runtime",
  "runtime": {
    "http_server": "http.server.ThreadingHTTPServer",
    "application_processes": 1,
    "database": "SQLite WAL",
    "frontend": "build-free HTML/CSS/JavaScript",
    "container_port": 8765
  },
  "counts": {
    "primary_pages": 16,
    "api_exact_paths": 53,
    "api_prefixes": 0,
    "api_patterns": 11,
    "database_tables": 36,
    "frontend_page_fragments": 12
  },
  "pages": [
    {
      "id": "sentimentCycleView",
      "title": "情绪周期"
    },
    {
      "id": "limitPool",
      "title": "涨停池"
    },
    {
      "id": "brokenView",
      "title": "炸板池"
    },
    {
      "id": "downView",
      "title": "跌停板"
    },
    {
      "id": "yesterdayView",
      "title": "昨日涨停"
    },
    {
      "id": "performanceView",
      "title": "涨停表现"
    },
    {
      "id": "ladderView",
      "title": "市场天梯"
    },
    {
      "id": "rotationView",
      "title": "板块轮动"
    },
    {
      "id": "auctionView",
      "title": "集合竞价"
    },
    {
      "id": "themeLibraryView",
      "title": "题材库"
    },
    {
      "id": "popularityView",
      "title": "人气热榜"
    },
    {
      "id": "dragonView",
      "title": "龙虎榜"
    },
    {
      "id": "screenerView",
      "title": "智能选股"
    },
    {
      "id": "mentorView",
      "title": "问师"
    },
    {
      "id": "heavenView",
      "title": "问天"
    },
    {
      "id": "reviewWorkspaceView",
      "title": "我的复盘"
    }
  ],
  "api": {
    "exact": [
      "/api/account/birth-profile",
      "/api/account/password",
      "/api/account/status",
      "/api/admin/membership",
      "/api/admin/refresh",
      "/api/admin/settings",
      "/api/admin/settings/test",
      "/api/alerts",
      "/api/alerts/read-all",
      "/api/assistant/chat",
      "/api/assistant/messages",
      "/api/auction",
      "/api/auth/login",
      "/api/auth/logout",
      "/api/auth/me",
      "/api/auth/register",
      "/api/backfill",
      "/api/chart/intraday",
      "/api/dashboard",
      "/api/dragon-tiger",
      "/api/dragon-tiger/profiles",
      "/api/health",
      "/api/heaven/hexagram",
      "/api/heaven/interpret",
      "/api/heaven/personal",
      "/api/heaven/readings",
      "/api/heaven/sector-phases",
      "/api/heaven/setup",
      "/api/mentors/chat",
      "/api/mentors/messages",
      "/api/mentors/preferences",
      "/api/mentors/setup",
      "/api/notes",
      "/api/popularity",
      "/api/realtime-aggregate/health",
      "/api/reasons",
      "/api/rotation/history",
      "/api/rotation/members",
      "/api/screener/compile",
      "/api/screener/run",
      "/api/screener/setup",
      "/api/screener/strategies",
      "/api/screener/sync",
      "/api/screener/tracking",
      "/api/screener/tracking/refresh",
      "/api/search",
      "/api/search/detail",
      "/api/seat-aliases",
      "/api/sentiment/history",
      "/api/themes",
      "/api/themes/detail",
      "/api/trades",
      "/api/watchlist"
    ],
    "prefixes": [],
    "patterns": [
      "/api/alerts/(\\d+)",
      "/api/alerts/(\\d+)/read",
      "/api/heaven/readings/(\\d+)",
      "/api/heaven/sector-phases/(.+)",
      "/api/notes/(\\d+)",
      "/api/screener/strategies/(\\d+)",
      "/api/screener/tracking/(\\d+)",
      "/api/stock/(\\d{6})",
      "/api/stock/(\\d{6})/preview",
      "/api/trades/(\\d+)",
      "/api/watchlist/(\\d{6})"
    ]
  },
  "database_tables": [
    "users",
    "user_sessions",
    "user_credentials",
    "user_birth_profiles",
    "system_settings",
    "llm_usage",
    "dashboard_snapshots",
    "sync_runs",
    "data_snapshots",
    "watchlist",
    "review_notes",
    "reason_overrides",
    "seat_aliases",
    "sector_phase_overrides",
    "stock_master",
    "daily_bars",
    "benchmark_bars",
    "daily_indicators",
    "fundamental_indicators",
    "moneyflow_daily",
    "auction_factors",
    "earnings_events",
    "popularity_factors",
    "lhb_institution_daily",
    "screener_strategies",
    "screener_runs",
    "mentor_messages",
    "mentor_preferences",
    "wencai_saved_queries",
    "strategy_tracks",
    "alerts",
    "trade_entries",
    "assistant_messages",
    "heaven_readings",
    "job_runs",
    "schema_migrations"
  ],
  "background_job_methods": [
    "_background_refresh_tick"
  ],
  "external_data_adapters": [
    {
      "provider": "tushare",
      "path": "backend/data/providers/tushare_client.py",
      "runtime_role": "stable client facade for primary deterministic market data"
    },
    {
      "provider": "ifind",
      "path": "backend/data/providers/ifind_client.py",
      "runtime_role": "realtime, charts, snapshots, enrichment"
    },
    {
      "provider": "eastmoney",
      "path": "backend/features/market/charts.py",
      "runtime_role": "display chart fallback"
    },
    {
      "provider": "eastmoney",
      "path": "backend/data/realtime.py",
      "runtime_role": "isolated realtime observation"
    },
    {
      "provider": "tencent",
      "path": "backend/data/realtime.py",
      "runtime_role": "index observation fallback"
    }
  ],
  "provider_domains": [
    {
      "provider": "tushare",
      "path": "backend/data/providers/tushare_transport.py",
      "responsibility": "HTTP transport and provider errors"
    },
    {
      "provider": "tushare",
      "path": "backend/data/providers/tushare_dashboard.py",
      "responsibility": "market overview and realtime breadth"
    },
    {
      "provider": "tushare",
      "path": "backend/data/providers/tushare_indices.py",
      "responsibility": "market indices"
    },
    {
      "provider": "tushare",
      "path": "backend/data/providers/tushare_industries.py",
      "responsibility": "Shenwan membership and industry snapshots"
    },
    {
      "provider": "tushare",
      "path": "backend/data/providers/tushare_sectors.py",
      "responsibility": "generic sector snapshots"
    },
    {
      "provider": "tushare",
      "path": "backend/data/providers/tushare_dragon_tiger.py",
      "responsibility": "hot-money directory and dragon-tiger activity"
    },
    {
      "provider": "tushare",
      "path": "backend/data/providers/tushare_stocks.py",
      "responsibility": "stock detail and intraday bars"
    },
    {
      "provider": "tushare",
      "path": "backend/data/providers/tushare_daily.py",
      "responsibility": "trading calendar, daily bars, and limit lists"
    },
    {
      "provider": "tushare",
      "path": "backend/data/providers/tushare_helpers.py",
      "responsibility": "shared deterministic normalization helpers"
    }
  ],
  "provider_construction": [
    {
      "client": "TushareClient",
      "owner": "backend/data/providers/tushare.py",
      "compatibility_fallback": "backend/features/market/service.py"
    },
    {
      "client": "IfindHttpClient",
      "owner": "backend/data/gateway.py"
    },
    {
      "client": "MarketChartClient",
      "owner": "backend/data/gateway.py"
    },
    {
      "client": "WebRealtimeAggregator",
      "owner": "backend/data/gateway.py"
    }
  ],
  "heaven_service_owners": {
    "facade": "backend/features/heaven/service.py",
    "manual_validation_and_safety": "backend/features/heaven/manual.py",
    "trend_orchestration_and_quality": "backend/features/heaven/trend.py",
    "market_context": "backend/features/heaven/market_context.py",
    "readings_and_interpretation": "backend/features/heaven/readings.py"
  },
  "market_insight_owners": {
    "facade": "backend/features/market/insights.py",
    "shared_context": "backend/features/market/insights_context.py",
    "auction_scoring": "backend/features/market/insights_auction_scoring.py",
    "auction_data": "backend/features/market/insights_auction_data.py",
    "auction_orchestration": "backend/features/market/insights_auction.py",
    "themes": "backend/features/market/insights_themes.py",
    "popularity": "backend/features/market/insights_popularity.py"
  },
  "application_owners": {
    "composition_root": "backend/application.py",
    "http_dispatch": "backend/http/dispatch.py",
    "system_service": "backend/features/system/service.py",
    "account_bridge": "backend/features/accounts/application.py",
    "job_lifecycle": "backend/jobs/service.py",
    "feature_routes": "backend/features/*/routes.py"
  },
  "numeric_normalization": [
    {
      "function": "finite_number",
      "path": "backend/data/numbers.py"
    },
    {
      "function": "non_nan_number",
      "path": "backend/data/numbers.py"
    }
  ],
  "date_formatting": [
    {
      "function": "display_compact_date",
      "path": "backend/bootstrap/config.py"
    }
  ],
  "llm_entrypoints": [
    {
      "function": "stream_with_mentor",
      "path": "backend/features/mentor/agent.py"
    },
    {
      "function": "interpret_heaven",
      "path": "backend/features/heaven/agent.py"
    },
    {
      "function": "stream_review_assistant",
      "path": "backend/features/review/agent.py"
    },
    {
      "function": "compile_strategy_with_llm",
      "path": "backend/features/screener/compiler.py"
    },
    {
      "function": "test_llm_connection",
      "path": "backend/features/screener/compiler.py"
    }
  ],
  "llm_transport": [
    {
      "function": "chat_completion",
      "path": "backend/llm/transport.py"
    },
    {
      "function": "stream_chat_completion",
      "path": "backend/llm/transport.py"
    }
  ],
  "http_transport": [
    {
      "function": "send_json",
      "path": "backend/http/handler.py"
    },
    {
      "function": "send_ndjson_stream",
      "path": "backend/http/handler.py"
    }
  ],
  "css_layers": [
    "/shared/tokens.css?v=20260820-2",
    "/shared/base.css?v=20260806-1",
    "/shared/shell.css?v=20260820-2",
    "/shared/auth.css?v=20260806-1",
    "/shared/components/controls.css?v=20260820-1",
    "/shared/components/navigation.css?v=20260820-1",
    "/shared/components/cards.css?v=20260820-1",
    "/shared/components/tables.css?v=20260820-1",
    "/shared/components/dialogs.css?v=20260806-1",
    "/shared/components/feedback.css?v=20260806-1",
    "/pages/market/foundation.css?v=20260806-1",
    "/pages/sentiment/foundation.css?v=20260820-2",
    "/pages/pools/foundation.css?v=20260820-1",
    "/pages/ladder/foundation.css?v=20260806-1",
    "/pages/rotation/foundation.css?v=20260806-1",
    "/pages/auction/foundation.css?v=20260806-2",
    "/pages/themes/foundation.css?v=20260806-1",
    "/pages/popularity/foundation.css?v=20260806-1",
    "/pages/dragon-tiger/foundation.css?v=20260806-1",
    "/pages/screener/foundation.css?v=20260806-2",
    "/pages/mentor/foundation.css?v=20260820-2",
    "/pages/heaven/foundation.css?v=20260806-2",
    "/pages/review/foundation.css?v=20260806-1"
  ],
  "frontend_composition": {
    "shell": "frontend/index.html",
    "bootstrap": "frontend/bootstrap.js",
    "registry": "frontend/pages.config.js",
    "startup": "frontend/app.js",
    "runtime_owners": {
      "context": "frontend/shared/context.js",
      "application": "frontend/shared/application.js",
      "feedback": "frontend/shared/feedback.js",
      "dashboard": "frontend/shared/dashboard.js",
      "session": "frontend/shared/session.js",
      "admin": "frontend/shared/admin.js",
      "theme": "frontend/shared/theme.js",
      "table": "frontend/shared/table.js"
    },
    "market_runtime_owners": {
      "breadth": "frontend/pages/market/breadth.js",
      "charts": "frontend/pages/market/charts.js",
      "entity_detail": "frontend/pages/market/entity-detail.js",
      "stock_detail": "frontend/pages/market/stock-detail.js",
      "preview": "frontend/pages/market/preview.js",
      "search": "frontend/pages/market/search.js",
      "bindings": "frontend/pages/market/bindings.js"
    },
    "fragments": [
      "/pages/pools/page.html",
      "/pages/sentiment/page.html",
      "/pages/heaven/page.html",
      "/pages/ladder/page.html",
      "/pages/screener/page.html",
      "/pages/mentor/page.html",
      "/pages/rotation/page.html",
      "/pages/auction/page.html",
      "/pages/themes/page.html",
      "/pages/popularity/page.html",
      "/pages/dragon-tiger/page.html",
      "/pages/review/page.html"
    ]
  },
  "code_hotspots": [
    {
      "path": "frontend/pages/heaven/foundation.css",
      "bytes": 185936,
      "lines": 11734
    },
    {
      "path": "frontend/pages/screener/foundation.css",
      "bytes": 102987,
      "lines": 6565
    },
    {
      "path": "frontend/pages/heaven/page.js",
      "bytes": 97189,
      "lines": 2069
    },
    {
      "path": "frontend/shared/shell.css",
      "bytes": 62384,
      "lines": 3718
    },
    {
      "path": "backend/features/heaven/engine.py",
      "bytes": 51764,
      "lines": 1183
    },
    {
      "path": "frontend/index.html",
      "bytes": 47056,
      "lines": 646
    },
    {
      "path": "backend/features/screener/catalog.py",
      "bytes": 35571,
      "lines": 711
    },
    {
      "path": "frontend/pages/auction/foundation.css",
      "bytes": 34990,
      "lines": 2409
    },
    {
      "path": "database.py",
      "bytes": 32073,
      "lines": 716
    },
    {
      "path": "backend/features/screener/factors.py",
      "bytes": 31756,
      "lines": 562
    },
    {
      "path": "backend/data/providers/tushare_dashboard.py",
      "bytes": 28051,
      "lines": 644
    },
    {
      "path": "backend/data/providers/tushare_industries.py",
      "bytes": 26540,
      "lines": 616
    },
    {
      "path": "backend/features/heaven/manual.py",
      "bytes": 24521,
      "lines": 412
    },
    {
      "path": "frontend/pages/heaven/page.html",
      "bytes": 19747,
      "lines": 262
    },
    {
      "path": "frontend/pages/screener/page.html",
      "bytes": 19579,
      "lines": 229
    },
    {
      "path": "frontend/pages/market/preview.js",
      "bytes": 18178,
      "lines": 446
    },
    {
      "path": "backend/features/heaven/trend.py",
      "bytes": 16772,
      "lines": 370
    },
    {
      "path": "backend/features/market/insights_auction_scoring.py",
      "bytes": 16689,
      "lines": 355
    },
    {
      "path": "frontend/pages/market/charts.js",
      "bytes": 15311,
      "lines": 387
    },
    {
      "path": "frontend/pages/pools/page.html",
      "bytes": 14942,
      "lines": 235
    },
    {
      "path": "backend/features/screener/data_sync.py",
      "bytes": 14743,
      "lines": 342
    },
    {
      "path": "frontend/shared/admin.js",
      "bytes": 14145,
      "lines": 261
    },
    {
      "path": "backend/features/heaven/market_context.py",
      "bytes": 13681,
      "lines": 338
    },
    {
      "path": "frontend/shared/session.js",
      "bytes": 13176,
      "lines": 293
    },
    {
      "path": "backend/features/market/insights_auction_data.py",
      "bytes": 12829,
      "lines": 318
    },
    {
      "path": "backend/features/system/service.py",
      "bytes": 12392,
      "lines": 254
    },
    {
      "path": "backend/features/market/insights_auction.py",
      "bytes": 10717,
      "lines": 221
    },
    {
      "path": "backend/features/heaven/readings.py",
      "bytes": 10539,
      "lines": 244
    },
    {
      "path": "frontend/shared/dashboard.js",
      "bytes": 9993,
      "lines": 220
    },
    {
      "path": "backend/data/providers/tushare_sectors.py",
      "bytes": 9876,
      "lines": 224
    },
    {
      "path": "backend/features/market/insights_themes.py",
      "bytes": 9348,
      "lines": 222
    },
    {
      "path": "frontend/pages/market/entity-detail.js",
      "bytes": 9119,
      "lines": 199
    },
    {
      "path": "backend/data/providers/tushare_dragon_tiger.py",
      "bytes": 9059,
      "lines": 214
    },
    {
      "path": "backend/features/screener/indicators.py",
      "bytes": 8562,
      "lines": 238
    },
    {
      "path": "frontend/pages/mentor/page.html",
      "bytes": 8357,
      "lines": 116
    },
    {
      "path": "backend/features/screener/formula.py",
      "bytes": 6983,
      "lines": 146
    },
    {
      "path": "backend/data/providers/tushare_daily.py",
      "bytes": 6837,
      "lines": 160
    },
    {
      "path": "backend/application.py",
      "bytes": 6751,
      "lines": 178
    },
    {
      "path": "backend/features/market/insights_popularity.py",
      "bytes": 6739,
      "lines": 156
    },
    {
      "path": "frontend/shared/context.js",
      "bytes": 6547,
      "lines": 220
    },
    {
      "path": "frontend/pages/sentiment/page.html",
      "bytes": 6488,
      "lines": 81
    },
    {
      "path": "backend/data/providers/tushare_stocks.py",
      "bytes": 6244,
      "lines": 137
    },
    {
      "path": "backend/features/screener/backtest.py",
      "bytes": 6202,
      "lines": 141
    },
    {
      "path": "backend/features/screener/selection.py",
      "bytes": 6092,
      "lines": 138
    },
    {
      "path": "frontend/pages/dragon-tiger/page.html",
      "bytes": 5754,
      "lines": 85
    },
    {
      "path": "frontend/pages/market/stock-detail.js",
      "bytes": 5690,
      "lines": 124
    },
    {
      "path": "backend/data/providers/tushare_indices.py",
      "bytes": 5451,
      "lines": 118
    },
    {
      "path": "frontend/pages/market/search.js",
      "bytes": 5384,
      "lines": 131
    },
    {
      "path": "frontend/pages.config.js",
      "bytes": 5380,
      "lines": 130
    },
    {
      "path": "frontend/pages/auction/page.html",
      "bytes": 5350,
      "lines": 74
    },
    {
      "path": "frontend/shared/feedback.js",
      "bytes": 5157,
      "lines": 153
    },
    {
      "path": "frontend/pages/review/page.html",
      "bytes": 4753,
      "lines": 57
    },
    {
      "path": "backend/features/screener/routes.py",
      "bytes": 4712,
      "lines": 106
    },
    {
      "path": "backend/features/market/routes.py",
      "bytes": 4276,
      "lines": 91
    },
    {
      "path": "frontend/shared/theme.js",
      "bytes": 4258,
      "lines": 117
    },
    {
      "path": "backend/features/screener/engine.py",
      "bytes": 4242,
      "lines": 129
    },
    {
      "path": "backend/http/dispatch.py",
      "bytes": 4118,
      "lines": 115
    },
    {
      "path": "frontend/shared/table.js",
      "bytes": 3790,
      "lines": 81
    },
    {
      "path": "backend/features/heaven/routes.py",
      "bytes": 3475,
      "lines": 79
    },
    {
      "path": "backend/features/review/routes.py",
      "bytes": 3369,
      "lines": 81
    },
    {
      "path": "frontend/pages/themes/page.html",
      "bytes": 3309,
      "lines": 55
    },
    {
      "path": "frontend/app.js",
      "bytes": 3201,
      "lines": 93
    },
    {
      "path": "backend/features/market/insights_context.py",
      "bytes": 3175,
      "lines": 84
    },
    {
      "path": "frontend/pages/rotation/page.html",
      "bytes": 3031,
      "lines": 54
    },
    {
      "path": "frontend/pages/market/bindings.js",
      "bytes": 2663,
      "lines": 40
    },
    {
      "path": "backend/features/accounts/application.py",
      "bytes": 2442,
      "lines": 63
    },
    {
      "path": "backend/features/mentor/routes.py",
      "bytes": 2299,
      "lines": 57
    },
    {
      "path": "backend/features/screener/regime.py",
      "bytes": 2202,
      "lines": 53
    },
    {
      "path": "backend/data/providers/tushare_client.py",
      "bytes": 2166,
      "lines": 68
    },
    {
      "path": "frontend/pages/popularity/page.html",
      "bytes": 2165,
      "lines": 35
    },
    {
      "path": "backend/data/providers/tushare_helpers.py",
      "bytes": 2083,
      "lines": 64
    },
    {
      "path": "frontend/pages/market/breadth.js",
      "bytes": 2071,
      "lines": 41
    },
    {
      "path": "backend/features/dragon_tiger/routes.py",
      "bytes": 1919,
      "lines": 45
    },
    {
      "path": "backend/jobs/service.py",
      "bytes": 1746,
      "lines": 49
    },
    {
      "path": "backend/features/alerts/routes.py",
      "bytes": 1687,
      "lines": 47
    },
    {
      "path": "frontend/shared/application.js",
      "bytes": 1642,
      "lines": 53
    },
    {
      "path": "backend/features/market/insights.py",
      "bytes": 1580,
      "lines": 45
    },
    {
      "path": "frontend/bootstrap.js",
      "bytes": 1535,
      "lines": 39
    },
    {
      "path": "backend/data/providers/tushare_transport.py",
      "bytes": 1455,
      "lines": 48
    },
    {
      "path": "backend/features/system/routes.py",
      "bytes": 1423,
      "lines": 40
    },
    {
      "path": "backend/features/themes/routes.py",
      "bytes": 1337,
      "lines": 35
    },
    {
      "path": "backend/features/rotation/routes.py",
      "bytes": 1195,
      "lines": 30
    },
    {
      "path": "frontend/pages/ladder/page.html",
      "bytes": 1143,
      "lines": 19
    },
    {
      "path": "backend/features/popularity/routes.py",
      "bytes": 822,
      "lines": 23
    },
    {
      "path": "backend/features/auction/routes.py",
      "bytes": 817,
      "lines": 23
    },
    {
      "path": "backend/features/accounts/routes.py",
      "bytes": 803,
      "lines": 22
    },
    {
      "path": "backend/features/sentiment/routes.py",
      "bytes": 724,
      "lines": 19
    },
    {
      "path": "backend/features/pools/routes.py",
      "bytes": 568,
      "lines": 18
    },
    {
      "path": "backend/features/heaven/service.py",
      "bytes": 435,
      "lines": 15
    }
  ]
}
