Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/CristianParadaLopez/cv-builder/llms.txt

Use this file to discover all available pages before exploring further.

The Skillara AI backend exposes a REST API built with Express and TypeScript. It is the same API the React frontend uses — you can call it directly from any HTTP client, Postman, or curl without any special tooling.

Base URL

The backend listens on port 3001 by default. In the React frontend, the base URL is read from the VITE_API_URL environment variable and falls back to http://localhost:3001 when the variable is not set.
http://localhost:3001
In production, the backend is deployed separately (for example on Render) and the frontend on Vercel. Set VITE_API_URL in your Vercel project settings to point at the live backend URL.

Endpoints

The router in backend/src/routes/cv.routes.ts registers three endpoints:
MethodPathDescription
POST/api/cv/generateGenerate a styled CV HTML document from form data
POST/api/cv/editEdit an existing CV HTML using a natural language prompt
POST/api/cv/suggestGet AI field suggestions for a specific CV section

POST /api/cv/generate

Generate a complete, styled CV HTML document from candidate form data and style preferences.

POST /api/cv/edit

Edit an existing CV HTML document using a plain-language instruction prompt.

POST /api/cv/suggest

Transform informal text into professional CV language for a specific resume section.

PDF controller (unregistered)

The handleDownloadPDF controller exists in the codebase but is not wired to a route yet. See the page for wiring instructions.

CORS

The API uses an origin allowlist enforced by the cors middleware. The following origins are permitted by default:
  • http://localhost:5173
  • http://localhost:3000
  • https://cv-builder-livid-two.vercel.app
  • https://cv-builder-skillara.vercel.app
  • The value of the FRONTEND_URL environment variable (if set)
For self-hosted deployments, add your frontend origin to the backend .env file:
FRONTEND_URL=https://your-frontend.example.com
Requests that arrive without an Origin header (such as those from Postman, curl, or Render health checks) bypass the CORS check and are allowed through automatically.

Content-Type

All request bodies must be JSON. Include the Content-Type: application/json header on every request.
Content-Type: application/json

Error format

All error responses use a consistent JSON envelope with an appropriate HTTP status code:
{ "error": "Descriptive error message" }
Common status codes:
CodeMeaning
400Missing or invalid request body fields
500AI model failure or internal server error

Build docs developers (and LLMs) love