Files
life-echo/skills/api-backend-conventions.md
iammm0 6526c08c3a docs: 新增技能文档
- 新增Skills.md技能说明
- 新增skills/技能文档目录

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-03 11:30:12 +08:00

19 lines
587 B
Markdown
Raw 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.
# SkillAPI 与后端约定
与具体业务无关的后端 API 与配置约定:前缀、敏感信息与数据库。
---
## 前缀与路由
- 认证:`/api/auth`
- 其他业务按模块分 router如 user、conversations、books、chapters 等),在 `main.py` 中挂载,统一带 `/api` 前缀时在挂载处配置。
## 敏感配置
- 环境变量中敏感项SECRET_KEY、API_KEY、PASSWORD、TOKEN 等)在日志中脱敏(只打 key 或前后几位)。
## 数据库
- 异步 SQLAlchemy + `get_async_db`;需当前用户时 `Depends(get_current_user)`