Building an AI product, with AI
LuminaAI turns a master profile into CVs and cover letters tailored to each job offer, scored and fact-checked by AI. I built it for my own job search — and as a place to try new tools and show how I work with AI.
A real product
I use it for my own applications: import, coaching, tailored CVs, scores, PDF export.
A tech lab
Where I try the latest models, SDKs and framework versions on a real codebase.
An AI showcase
AI inside the product, and AI agents in the way it is built — every decision documented.
- Architecture decisions
- 35
- Tests written
- 429
- Milestones
- 26
- Languages
- 2
The product
From a static profile to applications tailored to each offer.
Profile import
Upload a CV or a LinkedIn PDF export; AI structures it into a master profile, which can be exported as Markdown at any time.
AI profile coach
Document your achievements one question at a time. Switch between conversations, rename or archive them, and dictate answers in supported browsers.
Tailored or role-oriented CVs
Paste an offer, or target a role enriched with a standard competency blueprint; the CV introduces your professional identity and the role family you seek, then presents the relevant experience.
Cover letters
A matching cover letter for each application that adds what the CV cannot say — why this company, and the strengths the role needs, each backed by one line of evidence — editable before export.
Fit scores and fact-check
Profile and CV assessed with the same requirements rubric, with evidence gaps and a check for unsupported claims.
Document styles and language
Two layouts and four palettes shared by the CV and the cover letter, an accent colour kept readable automatically, and a default language the documents are written in — each overridable per application.
PDF export and tracking
Print-quality PDFs in an editorial dark layout with numbered sections, and an application tracker with status history, updated from the dashboard or the review page, in English and French. Rejected and withdrawn applications record the stage reached and why, and an outcomes page groups them by company.
Stack per role
Each experience lists its stack by category (languages, data, cloud, CI/CD, monitoring, methods, tools), printed under the role; it can be extracted from an existing profile and reviewed before saving.
Clear message on old browsers
Browsers too old to run the app get a lightweight page instead of a broken one: it presents LuminaAI with its video and lists the minimum versions for iPhone and iPad, Android, Windows and Mac.
AI in the product
Models are treated as interchangeable components with contracts: schemas, fallbacks, judges and costs.
One model per feature
Each AI feature has its own primary model, fallback from the other vendor and reasoning effort, chosen for what it does and what it costs.
ADR-0006Typed structured outputs
Every generation returns JSON validated against a Zod schema, typed end to end from the model to the UI.
ADR-0006Writer and judge from different vendors
CVs are written by one vendor's model and fact-checked by another's, so the writer never grades itself.
ADR-0008Scores computed in code
Models grade weighted criteria; the overall score is computed in code, so it always agrees with the breakdown.
ADR-0009Prompt caching
The master profile is sent as a cached prefix, cutting cost and latency of repeated calls — measured in the logs.
ADR-0007Tools instead of parsing
The coach proposes profile changes through a strict tool call validated against the real profile, not text parsed with a regex.
ADR-0010One profile, any document language
The CV is written in the application's language from a single profile, translated by the writer model; the fact-check accepts a faithful translation.
ADR-0013Written for two readers
Prompts give each CV section one job — keyword index for screening software, proof and brevity for the recruiter — and ban a named list of stock phrases in English and French.
ADR-0014Evidence-led coaching
The coach distinguishes confirmed facts from past proposals and enriches achievements without inventing figures or overwriting unrelated information.
ADR-0015Recognition of applied suggestions
The coach checks earlier suggestions against the saved profile and picks up from the changes already present.
ADR-0020Comparable fit scores
One rubric, weighting and evidence standard for profile and CV, versioned to distinguish historical assessments.
ADR-0016Professional identity and direction
The opening draws on the whole profile to introduce professional identity and the role family being sought. The target guides the objective without inventing expertise or personal motivations.
ADR-0017Detailed evidence in the master profile
The coach records context, decisions, contributions and results for the models that write and verify application documents.
ADR-0021Guarded stacks
Stack items the writer or the extraction proposes are checked in code against the profile, and against the role's own text for extraction, so no tool is invented.
ADR-0031
Architecture
A single Next.js application deployed on serverless infrastructure.
System map
CV generation pipeline
One generation for a job offer: independent steps run in parallel, and the CV is checked by a model from another vendor than the one that wrote it.
- Anthropic model first
- OpenAI model first
- Fallback or local only
Stack
Read from the project's dependencies at render time.
- next 16
- react 19
- typescript 6
- tailwindcss 4
- next-intl 4
- next-auth 5
- ai 7
- @ai-sdk/anthropic 4
- @ai-sdk/openai 4
- zod 4
- pg 8
- @neondatabase/serverless 1
- puppeteer-core 25
- remotion 4
- vitest 5
Technical decisions
Every lasting trade-off is recorded as an Architecture Decision Record. This list is generated from the repository.
ADR-0001Multi-provider AI behind one SDKSuperseded
- Context
- The app started on a single AI vendor with nested try/catch fallbacks between two of its models.
- Decision
- Use the Vercel AI SDK as a provider-agnostic layer, with one model route per feature and a fallback from another vendor.
- Trade-off
- No vendor lock-in and models swappable in one place, at the cost of two provider SDKs and two API keys. Model choices were later superseded by ADR-0006.
ADR-0002Centralised input validationAccepted
- Context
- Each API route validated its input with ad-hoc checks: inconsistent errors and untyped payloads.
- Decision
- All API input schemas live in one Zod module; routes call safeParse and get fully typed data.
- Trade-off
- One file to audit and consistent 400 errors; deeply nested CV data is deliberately not validated at every internal call.
ADR-0003In-memory rate limitingAccepted
- Context
- Registration and job-page scraping were expensive (hashing, headless browser, AI calls) and unthrottled.
- Decision
- A sliding-window limiter in memory, behind an interface that a Redis implementation can replace.
- Trade-off
- Zero infrastructure today, but the state is per serverless instance and resets on deploy: a best-effort defence.
ADR-0004Structured JSON loggingAccepted
- Context
- Scattered console logs could not be filtered, had no severity and sometimes leaked error details to clients.
- Decision
- A dependency-free logger writing one JSON line per event, with redaction of sensitive keys and generic errors for clients.
- Trade-off
- Queryable, safe logs; less readable locally and no sampling or batching compared with a full logging library.
ADR-0005HTTP security headersAccepted
- Context
- The app shipped without browser security headers (clickjacking, MIME sniffing, referrer leaks, no CSP).
- Decision
- Declare the OWASP baseline headers and a Content Security Policy for every route in the Next.js config.
- Trade-off
- Strong baseline with no code changes; the CSP still allows inline scripts until a nonce-based policy is in place.
ADR-0006October 2026 model refreshAccepted
- Context
- New model generations from both vendors and a major SDK version changed prices, capabilities and APIs.
- Decision
- Keep per-feature routing, refresh every route with an explicit reasoning effort, move to typed structured outputs and fix the chat fallback.
- Trade-off
- Lower cost at equal or better quality and explicit behaviour per feature; model tiers change often, so the routing needs regular review.
ADR-0007Prompt caching of the profileAccepted
- Context
- The profile, often thousands of tokens, was resent at full price on almost every call because no two prompts shared a prefix.
- Decision
- Build prompts profile-first with explicit cache breakpoints and a per-user cache key, and log cache reads and writes.
- Trade-off
- Cheaper, faster repeated calls with measurable hit rates; prompt order becomes load-bearing, and CV generation is kept out because the layout degraded its output.
ADR-0008Fact-checking generated CVsAccepted
- Context
- Prompts forbid inventing facts but nothing verified it — and an invented fact in a CV sent to an employer is the worst failure.
- Decision
- After each generation, a model from another vendor lists statements the profile does not support; the user reviews them.
- Trade-off
- Invented facts surface before the CV leaves the app, for one extra call run in parallel; the judge can be wrong, so it informs rather than blocks.
ADR-0009Rubric-based fit scoresAccepted
- Context
- A single holistic 0–100 score was unstable between runs and said nothing about what to fix.
- Decision
- Each score has weighted criteria graded by the model; the total is computed in code, with up to five gaps to address.
- Trade-off
- Actionable, more stable scores with explicit weights; older scores are not directly comparable.
ADR-0010Coach suggestions as tool callsAccepted
- Context
- The coach wrote profile changes as JSON inside its text; malformed output or invalid targets failed silently.
- Decision
- One strict, schema-checked tool whose target path is validated against the real profile; the model retries on error.
- Trade-off
- Every suggestion shown is valid and saved conversations keep working, for slightly more latency per turn.
ADR-0011This page, derived from the repositoryAccepted
- Context
- A portfolio page is only useful if it stays true; hand-written pages drift after each feature or decision.
- Decision
- Facts are read from the repository (decision records, dependencies, tests) and copy lives in translations; tests fail when a decision has no summary in both languages.
- Trade-off
- The page cannot silently miss a decision, but each new decision needs two short summaries, and features still rely on a written rule.
ADR-0012CV themes: layout × palette, legible by constructionAccepted
- Context
- Users want to choose how their CV looks, but free colour choices can make a CV unreadable or clashing.
- Decision
- A theme pairs a layout with a hand-tuned palette; users may add one accent colour, whose lightness is adjusted until it meets accessibility contrast on every surface it is printed on.
- Trade-off
- Any colour stays readable and the preview matches the PDF exactly, but a chosen accent can come out visibly darker or lighter than picked.
ADR-0013Documents written in the chosen languageAccepted
- Context
- The application language only changed the CV titles: a French profile generated in English gave English titles over French text.
- Decision
- Users set a default language and can override it per application; the AI writes the CV in that language from the single profile, translating it, and the fact-check accepts a faithful translation.
- Trade-off
- One profile is enough and no extra AI call is made, but switching the language of an existing application means regenerating it.
ADR-0014Documents written for AI screeners and recruitersAccepted
- Context
- Generated CVs and letters read as machine-written and repeated the same achievements, while applications are now often screened by an AI model before a recruiter skims them.
- Decision
- Each CV section has one reader and one job: a short summary for the recruiter, each achievement once in the role where it happened, and a skills index in the offer's exact words. Every document avoids a named list of stock phrases, and the cover letter covers what the CV cannot.
- Trade-off
- Requirements stay explicit for screening software without repetition for humans, but style is only steered by the prompt until an automated check is added.
ADR-0015Evidence-led profile coachingAccepted
- Context
- Vague duties and figures without context give document writers little reliable evidence.
- Decision
- Ask about personal contributions, tools and outcomes, preserve message attribution and validate suggestion targets and types.
- Trade-off
- Response quality still needs live model evaluation; adding whole new experiences remains manual.
ADR-0016One rubric for fit scoresAccepted
- Context
- Profile and CV scores measured different things, so their difference did not reveal lost evidence.
- Decision
- Grade evidence against the same requirements and weights, version scores and recalculate both after edits.
- Trade-off
- Separate AI calls can still vary; recalculation costs more and historical scores need refreshing.
ADR-0017Professional identity and directionAccepted
- Context
- A summary built around recent achievements repeats the experience section and says little about who the person is or what role they seek.
- Decision
- Introduce professional identity and a target-aligned role-family objective in both CV modes. Distinguish the role being sought from experience already acquired when checking facts.
- Trade-off
- The opening is more personal without another AI call, but its quality depends on the available profile and the model’s interpretation of the role family.
ADR-0018Exclude an unpatched extraction dependencyAccepted
- Context
- An unused translation extraction watcher introduced a denial-of-service vulnerability into production dependencies, with no patched release available.
- Decision
- Upgrade Next.js for its cache disclosure fixes and disable unused extraction watching with a local dependency replacement that rejects watcher operations, keeping the production audit gate unchanged.
- Trade-off
- JSON translations and locale routing remain available, but live extraction watching requires a safe upstream dependency before it can be enabled. Development tools still have reported vulnerabilities.
ADR-0019Browser dictation for the profile coachAccepted
- Context
- Explaining an achievement to the coach can mean typing a long answer.
- Decision
- Use the browser’s speech recognition to fill an editable draft. The app can request microphone access after the user starts dictation.
- Trade-off
- The browser controls support and may process the audio through its own service. The user decides when to send the resulting text to the coach.
ADR-0020Coach suggestion status from profile contentAccepted
- Context
- The chat could forget that a suggestion was applied after a reload, and the coach could continue treating that change as pending.
- Decision
- Check old suggestions against the saved profile and send their current status to the coach on the next turn. Save the conversation and profile independently.
- Trade-off
- An identical manual edit counts as applied. A later edit may change the status because it reflects the content currently in the profile.
ADR-0021Keep detailed evidence in the master profileAccepted
- Context
- Writing CV bullets too early compressed the context and limits of achievements before the candidate chose an application.
- Decision
- Keep editable notes by section and experience. The document writers select relevant facts, and the fact-check uses the same evidence.
- Trade-off
- Detailed notes use more model context and let the candidate reuse the same example across different applications.
ADR-0022Save coach conversations on the serverAccepted
- Context
- Leaving the profile page could interrupt a browser save and bring back an earlier conversation.
- Decision
- Save messages as part of each turn, confirm resets after saving them, and load the latest conversation when reopening the profile.
- Trade-off
- Saving before the model starts adds a database write to the start of each turn.
ADR-0023Archive and resume coach conversationsAccepted
- Context
- Starting a fresh chat used to erase interview context that the candidate might want to revisit.
- Decision
- Archive the current conversation when switching and show past conversations by preview and date. Protect each active conversation from older replies.
- Trade-off
- The archive stores more transcript data so candidates can resume their previous interviews.
ADR-0024Recover the coach schema after a hot reloadAccepted
- Context
- A running development server can load newer coach code before its database has been upgraded.
- Decision
- Apply the same upgrade used at startup if a query reports that the coach schema is missing, then retry.
- Trade-off
- The first affected request waits for the upgrade. Requests against an upgraded database run directly.
ADR-0025Keep conversation entries stable in coach historyAccepted
- Context
- Switching conversations made the History list jump, especially when it contained only two conversations.
- Decision
- Keep the active conversation visible and highlight it. Preserve the identity and date of each conversation when switching.
- Trade-off
- Older conversations use the date already available so that they can keep a stable place in the list.
ADR-0026Name and manually archive coach conversationsAccepted
- Context
- Similar previews are hard to distinguish, and users sometimes want to set a conversation aside.
- Decision
- Let the current conversation be renamed or moved to Archives. A conversation can be resumed from Archives.
- Trade-off
- Archived conversations keep their transcripts and titles so they remain recoverable.
ADR-0027Keep photos out of profile text savesAccepted
- Context
- A large encoded photo could block edits to another part of the master profile.
- Decision
- Save photos separately and preserve photos embedded in older profiles when saving text.
- Trade-off
- Older profiles retain their embedded photo until the user replaces or deletes it.
ADR-0028Animate with plain CSSAccepted
- Context
- A more expressive visual design needed scroll reveals, animated gradients, glows and drifting background shapes across the app.
- Decision
- Build these effects as shared CSS classes plus one small viewport-entry hook instead of adding an animation library, and switch all motion off for visitors who ask for reduced motion.
- Trade-off
- No extra code is shipped to the browser, but there is no spring physics or sequencing API: complex choreography is written by hand with delays.
ADR-0029A landing video written as codeAccepted
- Context
- Screenshots showed what the product does but not why it exists: a career has many facets, and a CV or an online profile shows only one.
- Decision
- Write a short video as React code with an original soundtrack synthesised from code, render it in English and French from the same translated copy, in landscape and in a portrait cut for phones, and play it muted on the landing page only once it scrolls into view, with a still image for visitors who prefer reduced motion.
- Trade-off
- The video follows the interface and both languages without re-editing, but the rendered files are committed and must be re-rendered by hand, and the rendering library needs a paid license for larger companies.
ADR-0030Error codes the interface translatesAccepted
- Context
- The server answered failures with English sentences that several pages showed as they were, so French users read errors in English, and network failures showed raw browser messages.
- Decision
- The server adds a stable code to every error a user can act on, and the interface translates it, falling back to a generic message in the user's language for anything unexpected.
- Trade-off
- Every error a user reads follows the interface language, but a new error needs a code and a message in each language, or users only see the generic one.
ADR-0031A stack for each roleAccepted
- Context
- The CV listed technologies globally, so a reader could not tell when, for how long or in which role each was used, and tailoring dropped the tools the offer did not name.
- Decision
- Each role keeps its own stack in fixed categories that the candidate can correct. CVs copy it, trimming only older or off-target roles and never adding a tool; existing profiles can have it extracted from their own text, reviewed before saving.
- Trade-off
- Readers see where and how long each tool was used, and a tool repeated across roles stands out, at the cost of longer CVs and a profile format older data had to be converted to.
ADR-0032Content belongs to its owner, admins includedAccepted
- Context
- The admin role bypassed ownership checks, so an administrator's dashboard mixed in every user's applications and could open, edit, export or delete anyone's CVs and cover letters.
- Decision
- Every read or change of an application is limited to its owner, whatever the role. Administrators keep only account approval and the exemption from usage limits; another user's application answers as if it did not exist.
- Trade-off
- A careless or compromised administrator account no longer exposes candidates' documents, at the cost of support: inspecting a user's application now needs direct database access or a future sharing feature.
ADR-0033Cover letters cite experience, they do not retell itAccepted
- Context
- Cover letters told one or two career stories in depth, and turned into project write-ups: implementation steps, tools, chains of figures and caveats about who did what.
- Decision
- The letter states why this role and two or three strengths it needs, each proven by a single sentence naming where and at what scale. It names at most three past employers, leaves the detail to the CV and the interview, and drops any fact that would need a caveat.
- Trade-off
- Shorter letters about motivation and fit that no longer compete with the CV, at the cost of no worked example of how the candidate operates.
ADR-0034Why an application ended is kept on the applicationAccepted
- Context
- A rejected application only said "rejected": the candidate could not recall who ended each process, at which step or why, nor spot companies to avoid or reasons that keep recurring.
- Decision
- A new "withdrawn" status covers processes the candidate ends. Each rejected or withdrawn application keeps the stage reached, a reason from a fixed list for its side, and a free note, all optional and editable later. Reopening an application clears them.
- Trade-off
- Each application shows its outcome directly and the overview is a single read, at the cost of keeping only the last reason when an application is rejected, reopened and rejected again.
ADR-0035Browsers that are too old get a page of their ownAccepted
- Context
- On an old iPad that cannot update past iOS 12, the site showed as a broken page: the styling framework and the application's JavaScript both need browsers from 2023 onwards, and supporting older ones would mean downgrading the stack and patching the whole client.
- Decision
- The supported browsers are those the web framework targets (Chrome, Edge and Firefox 111, Safari 16.4). Older ones are recognised on the server and receive a simple page, without script and with styling they can render, that says the browser is not supported, presents the product with its video, and lists the minimum version for each kind of device.
- Trade-off
- Visitors on old devices understand what happens and still discover the product, while modern browsers are untouched; recognising browsers from what they announce can miss unusual ones, so anything unclear is let through rather than blocked.
Building with AI
Development is done with AI coding agents inside an explicit framework: written context, specs, plans, reviews and automated gates.
- 01
Written context for agents
A single instruction file, read by every coding agent whatever the tool, describes the architecture, conventions and rules they must follow: translations first, queries scoped to the user, decision records, branches and conventional commits.
- 02
Spec before code
Each feature starts with a dialogue that ends in a written, approved design spec — before any implementation.
- 03
Plans in small tasks
The spec becomes a plan of small tasks, each with exact files, tests written first and its own commit.
- 04
Agents execute, reviews gate
A fresh agent implements each task; a review between tasks checks the result against the spec before moving on.
- 05
Decisions recorded
Every lasting trade-off gets an Architecture Decision Record, committed with the code that implements it.
- 06
Automated gates
Pre-commit formatting and linting; CI runs format, lint, type check, tests, dependency audit and a production build on every pull request. Production dependencies must pass the security audit; the unused translation extraction watcher is disabled because it has no upstream patch.
- 07
This page keeps itself honest
A test fails if a decision record has no public summary in both languages, so the page cannot fall behind the code.
Milestones
The main steps of the project.
Editorial CV layout
A redesigned PDF: dark editorial page, numbered sections, skill chips and exact page numbers.
Document styles and language
Layouts, palettes and a default language for the CV and the cover letter, with a live preview.
Documents for screeners and recruiters
CVs and cover letters rewritten to pass AI screening and read as written by the candidate.
Evidence-led coaching
Focused achievement interviews, clear separation of facts and proposals, and type-checked profile updates.
Comparable fit scores
A shared job-requirements rubric measures profile evidence and the evidence retained in the CV.
Professional identity and direction
CV summaries introduce who the candidate is and the role family they seek, without recapping recent jobs or copying the vacancy title.
Dictation for the profile coach
A microphone button fills the editable draft in French or English on supported browsers.
Applied coach suggestions
Suggestion cards recover their status after a reload, and the latest coach conversation stays saved after starting a new one.
A more detailed master profile
Editable notes preserve career details for CVs, cover letters and fact-checking.
Coach conversation history
History keeps conversations in place while switching, with options to rename the current conversation or move it to Archives.
An animated interface
Scroll reveals, drifting backgrounds, glowing highlights and counting fit scores across the app, all switched off for visitors who prefer reduced motion.
A video of the philosophy
A 40-second video on the landing page: one career has many facets, and LuminaAI shows the one each offer needs, without inventing anything. Phones get a portrait cut.
A stack for each role
Every role of the CV shows the tools used there, by category, so readers see where and how long each one was used.
A clearer review page
Each application's page groups the match analysis, the editable documents, its status with history, and the export, so the follow-up happens where the documents are. Its role and company can be corrected in place.
Shorter cover letters
Cover letters focus on why the role fits and what the candidate brings, backing each strength with one line instead of retelling projects.
Remembering why applications ended
Rejections and withdrawals record the stage reached and the reason (salary, on-site presence, profile fit, a failed technical step…). An outcomes page lists every application by company with counts by reason and stage.
A page for old browsers
An old iPad showed the site broken. Browsers below the supported versions now get a simple page that presents the product and says which devices can run it.
Taking your profile with you
The master profile, with its details and the stack of each role, downloads as a structured Markdown file to keep, reuse elsewhere or give to another assistant.
Trustworthy AI output
New model generation, prompt caching, fact-checking, rubric-based scores and tool-based coach suggestions.
Engineering page
This page, generated from the repository and guarded by tests.
Mobile and landing page
Responsive pass across the whole app and a refreshed landing page.
Cover letters and role-oriented CVs
Cover letter generation, and CVs targeting a role through a standard skills blueprint.
Production hardening
Four sprints: input validation, rate limiting, structured logs, security headers, CI, then a test suite over every API route.
Multi-provider AI
Move from a single vendor to per-feature routing across Anthropic and OpenAI.
AI agents join the workflow
Agent instructions and skills added to the repository; development moves to an agent-assisted workflow.
First version
A static CV with A4 PDF export, then the first Next.js application.