DEV Community

Cover image for How I Built CVpilotX — An AI Resume Builder with Next.js and OpenAI
Subashbelina
Subashbelina

Posted on

How I Built CVpilotX — An AI Resume Builder with Next.js and OpenAI

Resumes are generic. Jobs are specific.
Every job needs a tailored CV but nobody
has time to rewrite it every time.

So I built CVpilotX — paste a job description,
AI rewrites your CV to match it, download as PDF instantly.

🔗 Live: https://cvpilotx-frontend.onrender.com/

Stack

  • Next.js (Frontend)
  • Node.js + Express (Backend)
  • OpenAI GPT-4
  • Docker (Deployment)
  • Render (Hosting)

Biggest Challenge — PDF Generation

Generating a clean, formatted PDF from
AI-generated content was harder than expected.

The AI returns text but PDF needs proper
formatting — fonts, spacing, margins, sections.

First attempt was ugly. 😅

Fix using puppeteer:

const browser = await puppeteer.launch()
const page = await browser.newPage()
await page.setContent(htmlContent)
const pdf = await page.pdf({
  format: 'A4',
  margin: {
    top: '20px',
    bottom: '20px',
    left: '20px',
    right: '20px'
  }
})
await browser.close()
Enter fullscreen mode Exit fullscreen mode

Convert AI response to HTML first,
then Puppeteer renders it as perfect PDF.
Clean output every time.

What It Does

  • 📋 Paste any job description
  • 🤖 AI rewrites your CV to match it
  • 📄 Download as PDF instantly
  • ⚡ Takes less than 30 seconds

What I Learned

  • PDF generation needs HTML as middle layer
  • Puppeteer inside Docker needs extra config
  • OpenAI prompt engineering matters more than the code itself

Found this helpful? Drop a ❤️

Top comments (0)