# Resume-Assistant **Repository Path**: P1M0U/Resume-Assistant ## Basic Information - **Project Name**: Resume-Assistant - **Description**: Personal Resume AI Agent Assistant powered by Vue3+FastAPI+Langchain - **Primary Language**: Python - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2026-05-21 - **Last Updated**: 2026-09-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: llm, Python, Agent, Vue, langchain ## README # AI Resume Assistant [中文简体](README.md) | [English](README-EN.md) ![Project Status](https://img.shields.io/badge/status-active-brightgreen) ![Version](https://img.shields.io/badge/version-1.1.0-blue) ![Python](https://img.shields.io/badge/python-3.11-blue) ![License](https://img.shields.io/badge/license-MIT-green) ![Vue](https://img.shields.io/badge/vue-3.5%2B-green) ![TypeScript](https://img.shields.io/badge/typescript-6.0%2B-blue) ![FastAPI](https://img.shields.io/badge/fastapi-0.136%2B-red) ![MySQL](https://img.shields.io/badge/mysql-8.0%2B-blue) ![LangChain](https://img.shields.io/badge/langchain-1.3%2B-orange) ![Element Plus](https://img.shields.io/badge/element--plus-2.13%2B-blue) ![Vite](https://img.shields.io/badge/vite-8.0%2B-yellow) ![LLM](https://img.shields.io/badge/llm-openai--compatible-blue) ![Providers](https://img.shields.io/badge/providers-zhipu%2Fdeepseek-blue) --- ## Introduction An intelligent resume analysis and job recommendation system built on OpenAI-compatible large language models (Zhipu AI by default, switchable to DeepSeek and others). Upload PDF or DOCX resumes, and the system automatically parses content, provides professional optimization suggestions, and recommends matching positions. ## Core Features - **Smart Resume Analysis** -- Upload PDF/DOCX resumes; AI extracts personal info, skills, provides multi-dimensional scoring and actionable suggestions - **Job Recommendation** -- Recommend matching positions based on resume content; support custom target positions, skill gap analysis - **AI Chat** -- Context-aware conversation leveraging resume analysis and job recommendation results, streamed in real time via SSE - **RAG Enhancement** -- Resume and job data vectorization via ChromaDB; similarity retrieval improves analysis accuracy - **User Authentication** -- Registration/login, JWT authentication, route permission guards - **Admin Panel** -- User management and role-based access control - **Export** -- Export analysis reports and job recommendation results as JSON ## Tech Stack | Layer | Technology | Purpose | |-------|-----------|---------| | Frontend | Vue 3 + TypeScript 6 | Reactive UI | | UI Kit | Element Plus 2 | Component library (on-demand import) | | State | Pinia 3 | State management | | Router | Vue Router 5 | Route management | | Build | Vite 8 | Frontend tooling | | HTTP | Axios | API communication | | Backend | FastAPI 0.136 | RESTful API framework | | LLM | LangChain 1.3 + LangChain-OpenAI | LLM orchestration (multi-provider routing) | | AI | Zhipu / DeepSeek etc. (OpenAI-compatible) | Text generation & embeddings | | Package | uv (pyproject.toml) | Backend dependencies & env | | ORM | SQLAlchemy 2.0 | Database operations | | Vector DB | ChromaDB | Semantic search | | Database | MySQL 8.0 | User data persistence | | Parsing | PyPDF / python-docx | PDF/DOCX extraction | ## Project Structure ``` resume_assistant/ ├── backend/ │ ├── core/ # Config, security & response utilities │ │ ├── security.py # JWT + bcrypt auth │ │ └── response.py # Unified response structure │ ├── dbs/mysql/ # Database layer │ │ ├── database.py # SQLAlchemy engine & session │ │ └── models/ # Data models │ ├── agentics/ # Agent & LLM adaption (OpenAI-compatible) │ │ ├── agents/ # Agents (resume/job/chat) │ │ ├── prompts/ # Prompt templates │ │ ├── rag/ # RAG chain │ │ ├── tools/ # LangChain tools │ │ ├── utils/ # Utilities (JSON extraction, file parsing) │ │ ├── chat.py # Chat model factory (multi-provider routing) │ │ └── embeddings.py # Embedding model factory │ ├── routers/v1/ # API routes │ ├── schemas/ # Pydantic models │ ├── services/ # Business logic (resume/job/rag/user) │ ├── main.py # Application entry point │ ├── settings.py # Configuration loader │ └── pyproject.toml # Dependencies & tooling (uv) ├── env.yaml.example # Config template (copy to env.yaml) ├── Makefile # Common command shortcuts (check/test) ├── resume_vue/src/ │ ├── assets/css/ # Global styles (CSS variables) │ ├── components/ # Vue components │ ├── composables/ # Composable functions │ ├── services/ # API layer │ ├── stores/ # Pinia stores │ ├── utils/ # Shared utilities │ ├── views/ # Page components │ └── router/ # Route definitions └── docker-compose.yml ``` ## Quick Start ### Prerequisites - Node.js ^20.19.0 or >=22.12.0 - Python 3.11 - MySQL 8.0+ - uv (Python package manager, optional, for backend) ### Configuration Copy the template and fill in your credentials: ```bash cp env.yaml.example env.yaml ``` Edit `env.yaml` to configure multi-provider LLM (Zhipu by default, switchable), JWT and MySQL: ```yaml LLM: PROVIDER: zhipu # Active provider; switch to deepseek PROVIDERS: zhipu: BASE_URL: "https://open.bigmodel.cn/api/paas/v4" API_KEY: "your_zhipu_api_key" CHAT_MODEL: "glm-4-flash-250414" EMBEDDING_MODEL: "embedding-3" TEMPERATURE: 0.7 MAX_TOKENS: 4096 STREAMING: false deepseek: BASE_URL: "https://api.deepseek.com/v1" API_KEY: "your_deepseek_api_key" CHAT_MODEL: "deepseek-chat" EMBEDDING_MODEL: "" TEMPERATURE: 0.7 MAX_TOKENS: 4096 STREAMING: false JWT: SECRET_KEY: "your_jwt_secret_key" ALGORITHM: "HS256" ACCESS_TOKEN_EXPIRE_HOURS: 24 MYSQL: HOST: "127.0.0.1" # Use host.docker.internal for Docker PORT: 3306 USER: "root" PASSWORD: "your_password" DB: "resume_db" ``` > Set `MYSQL.HOST` to `127.0.0.1` or `localhost` when running the backend directly; use `host.docker.internal` inside Docker containers. ### Start Backend ```bash cd backend # uv run syncs dependencies (incl. dev group) on first run per pyproject.toml uv run uvicorn main:app --host 0.0.0.0 --port 8000 --reload ``` After startup: - Swagger UI: http://localhost:8000/docs - ReDoc: http://localhost:8000/redoc ### Start Frontend ```bash cd resume_vue npm install npm run dev ``` Frontend runs at `http://localhost:5173`. API requests are automatically proxied to the backend at `http://localhost:8000`. ### Docker ```bash docker compose up -d --build ``` > Note: the current MySQL `bind-address=127.0.0.1` restricts container access via `host.docker.internal`, so the backend container cannot connect to the database. Release the bind or set up network forwarding before enabling the full-stack containers. ## API Documentation ### Key Endpoints | Category | Method | Path | Description | |----------|--------|------|-------------| | User | POST | `/api/v1/user/register` | Register | | User | POST | `/api/v1/user/login` | Login | | User | GET | `/api/v1/user/me` | Get current user | | User | PUT | `/api/v1/user/me` | Update profile | | User | GET | `/api/v1/user/` | List users (admin) | | Resume | POST | `/api/v1/resume/upload` | Upload & analyze | | Job | POST | `/api/v1/resume/job-recommend` | Get recommendations | | Chat | POST | `/api/v1/chat/send` | Send message | | Chat | POST | `/api/v1/chat/stream` | Send message (SSE stream) | | Chat | GET | `/api/v1/chat/history` | Get history | | Chat | POST | `/api/v1/chat/clear` | Clear history | | RAG | POST | `/api/v1/rag/store/resume` | Store resume to vector DB | | RAG | POST | `/api/v1/rag/search/resume` | Search similar resumes | > Except for the `User` category, every endpoint requires `Authorization: Bearer ` in the request header (all `/chat/*` endpoints are JWT-protected). ## Available Scripts ### Backend | Command | Description | |---------|-------------| | `make check-backend` | ruff lint + pytest unit tests | | `make test` | Backend checks & tests + frontend unit tests | | `make check-frontend` | prettier format + eslint + vue-tsc type check | ### Frontend | Command | Description | |---------|-------------| | `npm run dev` | Start dev server | | `npm run build` | Type check + production build | | `npm run lint` | ESLint code quality check | | `npm run lint:fix` | Auto-fix ESLint issues | | `npm run format` | Prettier formatting | | `npm run type-check` | TypeScript type checking | | `npm run test:unit` | Run unit tests | ### Admin Setup ```sql UPDATE user SET is_admin = 1 WHERE name = 'your_username'; ``` ## Development Guide - **Code Style** -- Frontend follows Vue style guide + ESLint config; backend follows PEP 8 (ruff) - **Commit Convention** -- Semantic commits: `feat:` / `fix:` / `refactor:` / `docs:` - **Git Workflow** -- Never modify main directly; run `git checkout main && git pull` first, then create a feature branch, and squash-merge via PR after verifying - **CSS Variables** -- Theme colors defined in `assets/css/variables.css` -- change once, apply everywhere - **Custom Agents** -- Extend `agents/base_agent.py` `BaseAgent` class for new AI agents - **Provider Switching** -- Switch the LLM provider via `LLM.PROVIDER` in `env.yaml`; no code changes needed (per-provider config lives under `LLM.PROVIDERS`) ## License MIT License. ## Contact - Maintainer: PIMOU (Gitee) / P1M0U (GitHub) - Repository: [GitHub](https://github.com/P1M0U/Resume-Assistant) - Email: `p1m0u@foxmail.com`