RESUMai is a Next.js app that analyzes PDF resumes with Google Gemini. Users upload a resume, the backend extracts text, sends it to Gemini, and the UI renders a score plus targeted improvements.
- Input: PDF resume (max 10MB)
- Processing: PDF text extraction → Gemini analysis → JSON parsing
- Output: Score (0–10), improved bullet points, missing skills, ATS tips, and general suggestions
- Upload a PDF on the landing page.
/api/analyzevalidates file type/size and extracts text (trimmed to ~8000 characters).- Gemini returns structured JSON.
- Results render with copy-to-clipboard actions.
- Drag-and-drop PDF upload with validation
- Fast analysis with structured results
- Copy buttons per section + “copy all”
- Dark, responsive UI with smooth states
Next.js 14 (App Router), React, TypeScript, Tailwind CSS, Google Gemini API, pdf-parse.
resume-anal/
├── app/
│ ├── api/analyze/route.ts # Upload + validation + analysis
│ ├── page.tsx # Main UI
│ └── globals.css # Global styles
├── components/
│ ├── UploadCard.tsx # File upload UI
│ └── ResultsCard.tsx # Results display
├── lib/
│ ├── pdf.ts # PDF parsing
│ └── gemini.ts # Gemini integration
├── public/
├── package.json
└── README.md
| Name | Required | Description |
|---|---|---|
GEMINI_API_KEY |
Yes | Gemini API key |
GEMINI_MODEL |
No | Override model (e.g., gemini-3-flash) |
- Install dependencies:
npm install
- Create
.env.local(gitignored):GEMINI_API_KEY=your_key_here GEMINI_MODEL=gemini-3-flash
- Start the dev server:
npm run dev
- Open http://localhost:3000
POST /api/analyze
Body: multipart/form-data with field file
Validations
- PDF only (
.pdforapplication/pdf) - Max size: 10MB
Success Response
{
"success": true,
"data": {
"score": 8,
"improvedBullets": ["..."],
"missingSkills": ["..."],
"atsTips": ["..."],
"suggestions": ["..."]
}
}Error Responses
400: invalid file type/size or empty text500: Gemini or parsing errors
npm run build
npm start- Uploaded resumes are processed in memory and not stored.
- "GEMINI_API_KEY not configured" → add the key to
.env.localand restart. - "Failed to parse PDF" → use a text-based PDF (not scanned images).
- "File too large" → keep the PDF under 10MB.
- "Only PDF files are supported" → upload a
.pdf.