Neo caf179a5da feat: 2026-04-15~05-02 累积变更基线 — AI 重构 + Runtime Context + DWS 修复
涵盖(每条对应已存的审计记录):
- AI 模块拆分:apps/backend/app/ai/apps -> prompts/(8 个 APP + app2a 派生)
  audit: 2026-04-20__ai-module-complete.md
- admin-web AI 管理套件:AIDashboard / AIOperations / AIRunLogs / AITriggers / TriggerManager
  audit: 2026-04-21__admin-web-ai-management-suite.md
- App2 财务洞察 prompt v3 -> v5.1 + 小程序 AI 接入(chat / board-finance)
  audit: 2026-04-22__app2_prompt_v5_1_and_miniprogram_ai_insight.md
- App2 prewarm 全过滤器 + AI 触发器 cron reschedule
  audit: 2026-04-21__app2-finance-prewarm-all-filters.md
  migration: 20260420_ai_trigger_jobs_and_app2_prewarm.sql / 20260421_app2_prewarm_cron_reschedule.sql
- AppType 联合类型对齐 + adminAiAppTypes.test.ts
  audit: 2026-04-30__admin_web_ai_app_type_alignment.md
- DashScope tokens_used 提取修复
  audit: 2026-04-30__backend_dashscope_tokens_used_extraction.md
- App3 线索完整详情 prompt
  audit: 2026-05-01__backend_app3_full_detail_prompt.md
- Runtime Context 沙箱(5-1~5-2 主线):
  - 后端 schema/service + admin_runtime_context / xcx_runtime_clock 两个 router
  - admin-web RuntimeContext.tsx + miniprogram runtime-clock.ts
  - migration: 20260501__runtime_context_sandbox.sql
  - tools/db/verify_admin_web_sandbox.py + verify_sandbox_end_to_end.py
  - database/changes: 7 份 sandbox_* 验证报告
- 飞球 DWS 修复:finance_area_daily 区域汇总 + task_engine 调整
  + RLS 视图业务日上界(migration 20260502 + scripts/ops/gen_rls_business_date_migration.py)

合规:
- .gitignore 启用 tmp/ 排除
- 不入仓:apps/etl/connectors/feiqiu/.env(API_TOKEN secret,本地修改保留)

待验证清单:
- docs/audit/changes/2026-05-04__cumulative_baseline_pending_verification.md
  每个主题的功能完整性 / 上线验证几乎都未收口,按优先级 P0~P3 逐一处理
2026-05-04 02:30:19 +08:00
2026-04-10 06:24:13 +08:00

NeoZQYY Monorepo

台球门店运营助手一体化平台,整合 ETL 数据 Connector、微信小程序后端、小程序前端与管理后台。

项目结构

目录 说明 文档
apps/etl/connectors/feiqiu/ 飞球 ConnectorAPI → ODS → DWD → DWS docs/
apps/backend/ FastAPI 后端13 个路由 · JWT 双认证 · WebSocket README · API 参考
apps/miniprogram/ 微信小程序Donut + TDesign + TypeScript README
apps/admin-web/ 管理后台React + Vite + Ant Design README
apps/mcp-server/ MCP ServerAI 工具集成PostgreSQL 只读查询) README
packages/shared/ 共享包(枚举、金额精度、时间工具) README
db/etl_feiqiu/ ETL 数据库6 层 Schemameta/ods/dwd/core/dws/app README
db/zqyy_app/ 业务数据库auth 认证 + 任务队列 + 调度) README
docs/ 项目文档中心(架构、数据库、部署、审计) README
scripts/ 运维/工具脚本
tests/ Monorepo 级属性测试

快速开始

# 安装全部依赖(需要 uv
uv sync

# 运行 ETL
cd apps/etl/connectors/feiqiu
python -m cli.main --pg-dsn "$PG_DSN" --store-id "$STORE_ID" --api-token "$API_TOKEN"

# 启动后端 API
cd apps/backend
uvicorn app.main:app --reload

# 运行 ETL 单元测试
cd apps/etl/connectors/feiqiu
pytest tests/unit

配置

配置采用分层叠加:根 .env -> 应用 .env.local -> 环境变量 -> CLI 参数。

参见 .env.template 了解可用配置项。

技术栈

  • Python 3.10+, uv workspace4 个成员etl、backend、mcp-server、shared
  • PostgreSQL 四库:etl_feiqiu / test_etl_feiqiuETLzqyy_app / test_zqyy_app(业务)
  • FastAPI + Uvicorn后端 API
  • React 19 + Vite 6 + Ant Design 5管理后台独立 pnpm
  • 微信小程序原生 + Donut + TDesign + TypeScriptC 端)
  • JWT 双认证(管理后台用户名密码 + 小程序微信登录)
  • 多门店隔离(site_id + RLS
Description
桌球运营小程序 Monorepo 统一仓库
Readme 64 MiB
Languages
Python 79.6%
TypeScript 17.4%
PLpgSQL 1.9%
HTML 0.7%
PowerShell 0.4%