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.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.
Base URL
The backend listens on port3001 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.
VITE_API_URL in your Vercel project settings to point at the live backend URL.
Endpoints
The router inbackend/src/routes/cv.routes.ts registers three endpoints:
| Method | Path | Description |
|---|---|---|
| POST | /api/cv/generate | Generate a styled CV HTML document from form data |
| POST | /api/cv/edit | Edit an existing CV HTML using a natural language prompt |
| POST | /api/cv/suggest | Get 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 thecors middleware. The following origins are permitted by default:
http://localhost:5173http://localhost:3000https://cv-builder-livid-two.vercel.apphttps://cv-builder-skillara.vercel.app- The value of the
FRONTEND_URLenvironment variable (if set)
.env file:
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 theContent-Type: application/json header on every request.
Error format
All error responses use a consistent JSON envelope with an appropriate HTTP status code:| Code | Meaning |
|---|---|
| 400 | Missing or invalid request body fields |
| 500 | AI model failure or internal server error |