refactor: establish standalone application boundary

This commit is contained in:
leefer
2026-08-03 21:42:25 +08:00
parent cc5fb8d73e
commit e1e76cd51e
324 changed files with 63090 additions and 44743 deletions
+559 -67
View File
@@ -13,7 +13,8 @@
"api_exact_paths": 53,
"api_prefixes": 0,
"api_patterns": 11,
"database_tables": 36
"database_tables": 36,
"frontend_page_fragments": 12
},
"pages": [
{
@@ -197,7 +198,7 @@
{
"provider": "tushare",
"path": "backend/data/providers/tushare_client.py",
"runtime_role": "primary deterministic market data"
"runtime_role": "stable client facade for primary deterministic market data"
},
{
"provider": "ifind",
@@ -220,6 +221,53 @@
"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",
@@ -239,6 +287,30 @@
"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",
@@ -299,73 +371,83 @@
],
"css_layers": [
"/shared/tokens.css?v=20260729-1",
"/styles/styles.css",
"/styles/renovation.css?v=20260725-5",
"/styles/redesign-v2.css?v=20260728-1",
"/styles/design-system.css?v=20260728-4",
"/styles/theme.css?v=20260728-2",
"/pages/heaven/page.css?v=20260728-7"
"/shared/base.css?v=20260802-5",
"/shared/shell.css?v=20260802-5",
"/shared/auth.css?v=20260802-5",
"/shared/components/controls.css?v=20260802-5",
"/shared/components/navigation.css?v=20260802-5",
"/shared/components/cards.css?v=20260802-5",
"/shared/components/tables.css?v=20260802-5",
"/shared/components/dialogs.css?v=20260802-5",
"/shared/components/feedback.css?v=20260802-5",
"/pages/market/foundation.css?v=20260802-5",
"/pages/sentiment/foundation.css?v=20260802-5",
"/pages/pools/foundation.css?v=20260802-5",
"/pages/ladder/foundation.css?v=20260802-5",
"/pages/rotation/foundation.css?v=20260802-5",
"/pages/auction/foundation.css?v=20260802-5",
"/pages/themes/foundation.css?v=20260802-5",
"/pages/popularity/foundation.css?v=20260802-5",
"/pages/dragon-tiger/foundation.css?v=20260802-5",
"/pages/screener/foundation.css?v=20260802-5",
"/pages/mentor/foundation.css?v=20260802-5",
"/pages/heaven/foundation.css?v=20260802-5",
"/pages/review/foundation.css?v=20260802-5"
],
"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/styles/styles.css",
"bytes": 359673,
"lines": 15360
"path": "frontend/pages/heaven/foundation.css",
"bytes": 183624,
"lines": 11655
},
{
"path": "frontend/styles/redesign-v2.css",
"bytes": 262013,
"lines": 8531
},
{
"path": "frontend/index.html",
"bytes": 135019,
"lines": 1892
},
{
"path": "backend/features/screener/engine.py",
"bytes": 108387,
"lines": 2203
},
{
"path": "backend/data/providers/tushare_client.py",
"bytes": 94124,
"lines": 2165
},
{
"path": "frontend/app.js",
"bytes": 89213,
"lines": 1939
"path": "frontend/pages/screener/foundation.css",
"bytes": 100200,
"lines": 6433
},
{
"path": "frontend/pages/heaven/page.js",
"bytes": 86493,
"lines": 1830
},
{
"path": "frontend/styles/renovation.css",
"bytes": 81205,
"lines": 1480
},
{
"path": "frontend/pages/heaven/page.css",
"bytes": 73222,
"lines": 1084
},
{
"path": "backend/features/heaven/service.py",
"bytes": 63138,
"lines": 1304
},
{
"path": "backend/features/market/insights.py",
"bytes": 57998,
"lines": 1307
},
{
"path": "frontend/pages/market/runtime.js",
"bytes": 55720,
"lines": 1333
"bytes": 92669,
"lines": 1965
},
{
"path": "backend/features/heaven/engine.py",
@@ -373,19 +455,429 @@
"lines": 1181
},
{
"path": "backend/application.py",
"bytes": 47769,
"lines": 1092
"path": "frontend/index.html",
"bytes": 44688,
"lines": 632
},
{
"path": "frontend/styles/theme.css",
"bytes": 36427,
"lines": 1253
"path": "frontend/shared/shell.css",
"bytes": 40260,
"lines": 2800
},
{
"path": "backend/features/screener/catalog.py",
"bytes": 35424,
"lines": 707
},
{
"path": "frontend/pages/auction/foundation.css",
"bytes": 32818,
"lines": 2305
},
{
"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": 19103,
"lines": 255
},
{
"path": "frontend/pages/screener/page.html",
"bytes": 18513,
"lines": 219
},
{
"path": "frontend/pages/market/preview.js",
"bytes": 18178,
"lines": 446
},
{
"path": "backend/features/market/insights_auction_scoring.py",
"bytes": 16689,
"lines": 355
},
{
"path": "backend/features/heaven/trend.py",
"bytes": 16310,
"lines": 358
},
{
"path": "frontend/pages/market/charts.js",
"bytes": 15311,
"lines": 387
},
{
"path": "frontend/pages/pools/page.html",
"bytes": 14958,
"lines": 235
},
{
"path": "backend/features/screener/data_sync.py",
"bytes": 14743,
"lines": 342
},
{
"path": "frontend/shared/admin.js",
"bytes": 13975,
"lines": 256
},
{
"path": "backend/features/heaven/market_context.py",
"bytes": 13681,
"lines": 338
},
{
"path": "frontend/shared/session.js",
"bytes": 12842,
"lines": 285
},
{
"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/data/providers/tushare_sectors.py",
"bytes": 9876,
"lines": 224
},
{
"path": "backend/features/market/insights_themes.py",
"bytes": 9348,
"lines": 222
},
{
"path": "backend/features/heaven/readings.py",
"bytes": 9313,
"lines": 220
},
{
"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/shared/dashboard.js",
"bytes": 8424,
"lines": 194
},
{
"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/pages/sentiment/page.html",
"bytes": 6488,
"lines": 81
},
{
"path": "frontend/shared/context.js",
"bytes": 6433,
"lines": 216
},
{
"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": "frontend/pages/mentor/page.html",
"bytes": 5501,
"lines": 72
},
{
"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": "backend/features/screener/engine.py",
"bytes": 4242,
"lines": 129
},
{
"path": "backend/http/dispatch.py",
"bytes": 4118,
"lines": 115
},
{
"path": "frontend/shared/theme.js",
"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
}
]
}