Resume Check Karo persists every resume submission in a single PostgreSQL table managed by Prisma ORM. The schema is intentionally minimal: oneDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/nayalsaurav/resume-analyzer/llms.txt
Use this file to discover all available pages before exploring further.
Resume model captures everything needed to display a user’s history — the job context they provided, the CDN URLs of their uploaded files, and the full AI-generated feedback object stored as a JSON column. This flat design avoids join complexity while remaining fully queryable through Prisma’s type-safe client.
Prisma Schema
Field Reference
| Field | Type | Description |
|---|---|---|
id | String (UUID) | Primary key, auto-generated UUID via @default(uuid()). Globally unique and safe to expose in URLs. |
userId | String | The Clerk user ID of the authenticated user who submitted the resume. Indexed for fast per-user lookups. |
companyName | String | Target company name entered by the user at submission time. |
jobName | String | Internal job listing name or reference, entered by the user. |
jobTitle | String | The formal job title the user is applying for (e.g. “Senior Software Engineer”). |
jobDescription | String | Full job description text provided by the user. Injected verbatim into the Gemini AI prompt. |
analysis | Json? | Nullable JSON column. Stores the full Feedback object returned by Gemini AI after analysis. |
pdfUrl | String | ImageKit CDN URL of the uploaded PDF resume file. |
imageUrl | String | ImageKit CDN URL of the generated resume preview image (used in the dashboard card thumbnail). |
createdAt | DateTime | Timestamp of record creation, set automatically by @default(now()). |
updatedAt | DateTime | Timestamp of the most recent mutation, updated automatically by @updatedAt. |
The analysis JSON Field
The analysis column stores the complete Feedback object exactly as returned by Google Gemini and parsed from JSON. Because Prisma maps the Json type to unknown on the TypeScript client, the server action casts it to the Feedback interface before passing it to the UI layer.
analysis value looks like this at rest in the database:
The
analysis field is nullable (Json?). This means a Resume record can be created before the AI call completes or if the AI call fails. The UI checks for a null analysis and renders an appropriate empty state rather than crashing.The userId Index
Resume table on every page load — fine with ten rows, unacceptable at scale. The @@index([userId]) directive creates a B-tree index on the userId column so Prisma queries like the one below resolve in sub-millisecond time regardless of total table size:
Clerk user IDs are stable string identifiers (e.g.
user_2abc...). They never change for a given account, so the index remains valid even if a user updates their email or other profile details.Running Migrations
After cloning the repository, apply the schema to your PostgreSQL database and regenerate the Prisma client:Apply the initial migration
Resume table, its columns, and the userId index in your development database. Prisma also auto-generates the typed client after a successful migration.Regenerate the Prisma client (schema changes only)
If you modify
prisma/schema.prisma without adding a migration (e.g. after pulling changes), regenerate the client manually:Querying Patterns
The server action and dashboard page use three primary query patterns against theResume model: