Candidate Analyzer is a Node.js server using tRPC to analyze two PDF files:
- A job description
- A candidate's CV
The server processes the files, extracts their content, and sends it to the Gemini 1.5 Flash AI API. The AI evaluates the candidate's strengths and weaknesses and compares them with the job description to determine the candidate's suitability.
- Accepts two PDF files as input:
- cv — Candidate's CV
- jobDescription — Job description
- Extracts content from PDFs using
pdf-parse
. - Sends data to an Gemini API for evaluation.
- Returns structured JSON with candidate analysis.
- Node.js >= 18.0.0
- pnpm >= 9.11.0
- API Key for the external AI service (Gemini 1.5 Flash)
- Postman (optional for manual testing)
pnpm install
Create a .env file in the root directory and configure it like .env.example file
Start the server:
pnpm run server:dev
Run the client:
pnpm run client:dev
Build the project:
pnpm run build
Start the server:
pnpm run server
Run the client:
pnpm run client
- Endpoint: http://localhost:3301/analyzeCandidate (default port)
- Method: POST
- Content-Type: multipart/form-data
- Body:
Key | Value | Description |
---|---|---|
cv |
cv.pdf |
Candidate's CV PDF file |
jobDescription |
job-description.pdf |
Job description PDF file |
- Run the client script to upload example PDFs from the content folder:
pnpm run client:dev
Example PDFs are located in the content folder:
- cv.pdf — Example candidate CV
- job-description.pdf — Example job description