Skillara AI uses Prisma ORM with PostgreSQL for server-side data persistence. The database is optional — Firebase Firestore handles user CV storage client-side without any backend involvement. The PostgreSQL schema provides a foundation for server-side CV management, including user accounts, stored CV HTML, and anonymous session caching, and becomes relevant when you want durable server-side records or plan to build features like public CV sharing.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.
Schema overview
The Prisma schema atbackend/prisma/schema.prisma defines three models.
User
Stores registered user accounts. Supports both local password-based auth and Google sign-in via Firebase.
| Field | Type | Notes |
|---|---|---|
id | Int | Auto-incremented primary key |
name | String | Display name |
email | String | Unique — used as the primary identifier for local auth |
password | String? | Optional bcrypt hash — only present for local (non-Google) accounts |
googleId | String? | Unique — Firebase UID for Google sign-in accounts |
photoURL | String? | Profile photo URL |
emailVerified | Boolean | Defaults to false |
createdAt | DateTime | Set automatically on creation |
updatedAt | DateTime | Updated automatically on every change |
cvs | CV[] | One-to-many relation to the CV model |
CV
Stores the generated HTML for each CV, along with the original form data and metadata.
| Field | Type | Notes |
|---|---|---|
id | Int | Auto-incremented primary key |
userId | Int | Foreign key referencing User.id |
title | String | User-defined label, e.g. "CV for CompuTrabajo" |
html | String | Full HTML of the designed CV (stored as Text) |
htmlATS | String? | Optional ATS-optimised plain HTML variant (stored as Text) |
style | String | Template name: moderno, clasico, minimalista, or creativo |
mode | String | Generation mode: "designed" (default) or "ats" |
formData | Json | Complete form data JSON used to generate the CV |
prompt | String? | Last edit instruction submitted by the user |
isPublic | Boolean | Whether the CV is publicly accessible — defaults to false |
viewCount | Int | Public view counter — defaults to 0 |
createdAt | DateTime | Set automatically on creation |
updatedAt | DateTime | Updated automatically on every change |
FormCache
Caches in-progress form data for anonymous (unauthenticated) browser sessions, identified by a client-generated session ID.
| Field | Type | Notes |
|---|---|---|
id | String | UUID primary key, generated automatically |
sessionId | String | Unique browser session identifier |
formData | Json | Cached form data for the session |
html | String? | Optional last-generated HTML for the session (stored as Text) |
createdAt | DateTime | Set automatically on creation |
updatedAt | DateTime | Updated automatically on every change |
Running migrations
Make sureDATABASE_URL is set in backend/.env, then apply all pending migrations with:
Viewing and editing data
Prisma Studio provides a browser-based GUI for reading and editing records in your database:http://localhost:5555 and shows tables for all three models.
Migration history
The repository contains three migrations that must all be applied in order.20260404011911_agregar_tablas — Initial tables
Creates the initial
User and CV tables. At this stage, User has only id, name, email, and createdAt. The CV table has id, userId, html, prompt, createdAt, and updatedAt. A unique index is added on User.email and a foreign key constraint links CV.userId to User.id.20260519043841_add_cv_profiles — CV profile fields
Expands the
CV table with formData, htmlATS, isPublic, mode, style, title, and viewCount. Adds emailVerified, googleId, password, photoURL, and updatedAt to the User table, and creates a unique index on User.googleId. Also creates and immediately drops a transitional CVProfile table that was superseded in the same migration.The database is not required to run Skillara AI in its default configuration. The React frontend uses Firebase Firestore for user CV persistence, and the backend can generate and return CV HTML without storing anything. Set up PostgreSQL only if you need server-side CV management, durable anonymous session caching, or plan to build public CV sharing features.