feat(dev): 本地开发工具集 v0.5.6-dev-tooling

包含本地 dev 链路完整跑通的工具集(不进生产):

backend:
- dev_auth.py: /api/dev/login Mock 企微 OAuth(/dev/* 路由)
- messages.py: dev 模式短路企微推送,避免 invalid corpid 噪音
- main.py: dev 模式启动时建 5 条 demo conversation,让前端有数据可测

frontend:
- PortalSelect.vue: dev 模式 enterRole 跳完整 URL(5173/5174/5175 端口),生产仍走相对路径

infrastructure:
- docker-compose.dev.yml: dev compose(包含 backend/postgres/redis)

scripts(Windows PowerShell):
- dev-frontend-install.ps1: 一次性装 4 个前端依赖
- dev-frontend-start.ps1: 后台起 4 个前端 dev server
- dev-check-schema-drift.ps1: 对比 SQLAlchemy 模型 vs Postgres schema,漂移 exit 1

docs:
- CURRENT-FOCUS.md: 项目状态看板(每次 session 维护)
This commit is contained in:
Simon
2026-06-16 19:24:02 +08:00
parent cec5607c45
commit eee2bcc071
9 changed files with 963 additions and 22 deletions
+4
View File
@@ -75,6 +75,10 @@ services:
- REDIS_URL=redis://redis:6379/0
- DEV_MODE=true # 开启 Mock 企微 OAuth
- CORS_ORIGINS=http://localhost:5173,http://localhost:5174,http://localhost:5175,http://localhost:5176
# PYTHONPATH 必须含 /app,否则 alembic upgrade head 跑 env.py 时
# `from app.config import settings` 会 ModuleNotFoundError
# (alembic 1.13+ 不再默认 prepend cwd 到 sys.path)
- PYTHONPATH=/app
ports:
- "8000:8000" # 暴露到宿主机
volumes: