Files
resume-agent/backend/README.md
T
hypandClaude ae2d9b128d feat: builder 简历生成 + 轻度优化 + 简历导入交付副本
自内部仓库剥离深度优化与 RAG 知识库后的交付版本:
- Builder 对话式简历生成(FSM + 意图路由 LLM 兜底增强)
- 条目级轻度优化:事实覆盖门禁 + STAR/bullet 修复链,功能/简介/成果与技术栈同级保护
- 简历导入:DOCX/PDF 解析、结构归一、手机号脱敏
- PostgreSQL 运行时 + Alembic 迁移链

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-05 11:08:30 +08:00

1.3 KiB

Resume Agent backend

FastAPI service for the conversational resume builder: sessions, turns, resumes, imports, and light-optimization state, persisted in SQLite (pilot) or PostgreSQL (production).

Run locally

Python 3.11 or newer is required.

python -m pip install -r requirements.txt
cp .env.example .env
# Leave OPENAI_API_KEY empty for offline rules, or fill in the live LLM gateway values.
python -m uvicorn app.asgi:application --reload --port 8000

app.asgi:application wraps app.main:app and hides /docs, /redoc, and /openapi.json by default; set RESUME_AGENT_API_DOCS=1 to expose them (development only).

The runtime expects DATABASE_URL (PostgreSQL) and uses the resume_agent schema by default; override with RESUME_AGENT_DATABASE_SCHEMA. Run alembic upgrade head to create the tables, and python scripts/migrate_sqlite_to_postgres.py to move existing SQLite data. SQLite is used only when database_path is passed explicitly (tests, local pilot). CORS defaults to http://localhost:5173; set a comma-separated RESUME_AGENT_CORS_ORIGINS.

The health check at GET /health is always open.

Tests

python -m pytest tests -q

Postgres-backed tests require RESUME_AGENT_TEST_DATABASE_URL; the rest run on SQLite temporary files. Tests force the rule-based LLM provider, so no API key is needed.