Resume Check Karo runs your uploaded PDF through a multi-stage pipeline that validates your inputs, constructs a context-rich prompt from the job details you provide, and sends everything to Google Gemini AI. The model evaluates the resume against five structured dimensions and returns a machine-readable JSON scorecard that is immediately rendered as an interactive feedback report.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/nayalsaurav/resume-analyzer/llms.txt
Use this file to discover all available pages before exploring further.
How It Works
Upload Your PDF
You select a PDF resume file on the dashboard. The client performs an initial check — confirming the file is a PDF and does not exceed 10 MB — before anything is sent to the server.
Server-Side Validation
The
analyzeResume server action re-validates every input on the server. All four fields (Company Name, Job Title, Job Description, and the file itself) must be present and well-formed. Any violation returns an error before the AI is contacted.Build the AI Prompt
A structured instruction string is assembled that injects the company name, target job title, and full job description as context. The prompt then instructs Gemini to evaluate the resume across five specific dimensions and return a strictly typed JSON response.
Send to Google Gemini
The PDF is read as an
ArrayBuffer, base64-encoded, and submitted alongside the instruction prompt to the Gemini model configured via the GOOGLE_AI_MODEL environment variable. The model name is kept in environment configuration so it can be swapped without a code change.Parse the Structured Response
Gemini returns a JSON object that conforms to a predefined schema. The
getAiResponse function validates and parses this object into a typed Feedback structure. If the model call fails for any reason, a safe fallback object with all scores set to 0 is returned instead.Validation Rules
Every field is required. The server action will reject the request if any of the following conditions are not met.Company Name
Must be a non-empty string after trimming whitespace. This is injected into the AI prompt so the model understands the employer context.
Job Title
Must be a non-empty string after trimming whitespace. The model uses this to calibrate expected seniority, tone, and skill requirements.
Job Description
Required and must be a non-empty string after trimming whitespace. The client form additionally enforces a minimum of 50 characters to ensure the AI has enough context for accurate analysis.
Resume File
Must be a valid PDF (
application/pdf MIME type). Maximum size is 10 MB. DOC/DOCX files are not accepted by the server action.AI Prompt Construction
The instruction prompt sent to Gemini contains three layers of context followed by evaluation directives. Injected context:- Company — the employer name you entered
- Position — the job title you entered
- Job Description — the full text of the posting
- ATS — keyword optimization and formatting compatibility
- Tone & Style — professional language and appropriate voice
- Content — relevance to the role, achievements, and quantified results
- Structure — layout clarity and section organization
- Skills — alignment of technical and soft skills with the job requirements
Structured Response Schema
Gemini is constrained to return a JSON object matching the following shape. ThegetAiResponse function uses this schema to enforce structured output from the model.
The
explanation field is present on tips for toneAndStyle, content, structure, and skills sections. ATS tips contain only type and tip — there is no explanation field in the ATS schema.If the Gemini API call fails — due to a network error, quota limit, or unexpected model output — the system returns a fallback
Feedback object with all scores set to 0 and a generic error tip rather than crashing the request.