PayrollManagementSystem/backend/.env.example
liuwenxin 273ebf4657 chore: 初始化项目结构与登录鉴权模块
后端 FastAPI 六层结构(api/services/repositories/models/schemas/core),
统一响应信封、全局异常、日志脱敏;6 张表经 Alembic 迁移建库,SQL 留存
db/migration;登录鉴权含图形验证码(Redis GETDEL 防重放)、JWT、登录限流、
登出黑名单(TTL=令牌剩余有效期)、登录日志。

前端 Vue3 + TS + Element Plus 骨架,含登录页、路由守卫、请求封装与 Vite 代理。

工程配置:uv 锁定 Python 3.12、ruff 检查与格式化、editorconfig、gitattributes。

测试 184 项(单元 155 / 集成 29)全绿,浏览器端到端 8 项通过。

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-10-09 18:46:36 +08:00

32 lines
798 B
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 后端应用配置模板——复制为 backend/.env 并填入真实值(.env 已 gitignore)
# 注意:MYSQL_PASSWORD / REDIS_PASSWORD 与 docker/.env 保持一致(改一处要改两处)
# ===== MySQL =====
MYSQL_HOST=127.0.0.1
MYSQL_PORT=3306
MYSQL_DATABASE=payroll
MYSQL_USER=payroll
MYSQL_PASSWORD=
# ===== Redis =====
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
REDIS_PASSWORD=
REDIS_DB=0
# ===== 应用 =====
APP_ENV=dev
APP_SECRET_KEY=
# JWT 有效期(分钟),规范要求 ≤120
JWT_EXPIRE_MINUTES=120
# 验证码有效期(秒),规范要求 300
CAPTCHA_EXPIRE_SECONDS=300
# 登录连续失败锁定:次数与锁定分钟
LOGIN_FAIL_LIMIT=5
LOGIN_LOCK_MINUTES=15
# ===== T+ 对接(待畅捷通确认后填写)=====
T_PLUS_BASE_URL=
T_PLUS_APP_KEY=
T_PLUS_APP_SECRET=