Feature/cv export#6
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends the CV feature set by adding server-side PDF export, introducing a second CV template, and refactoring sections to support activation toggling and improved ordering (sections + items), with corresponding frontend UI updates.
Changes:
- Added backend CV export pipeline (HTML template rendering + Puppeteer PDF generation) and a
/curriculums/:id/export/:modelIdendpoint. - Added template discovery (
/curriculums/models) and frontend template selection in the CV preview. - Introduced
isActiveon sections and updated section/item ordering + default avatar handling in templates.
Reviewed changes
Copilot reviewed 60 out of 62 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-workspace.yaml | Bumps handlebars catalog version used across workspaces. |
| pnpm-lock.yaml | Locks new/updated deps (Handlebars bump, Puppeteer, ember-drag-drop, etc.). |
| package.json | Adds puppeteer to allowed built dependencies. |
| @libs/users-front/src/services/curriculum.ts | Adds model selection state, CV export + list models calls, section activation and item reorder calls. |
| @libs/users-front/src/schemas/sections.ts | Adds isActive attribute to sections schema/types. |
| @libs/users-front/src/schemas/models.ts | Adds a basic models schema/type export. |
| @libs/users-front/src/helpers/cv-renderer.ts | Adds template selection support and skips inactive sections during render. |
| @libs/users-front/src/components/curriculums/edit/curriculum-preview.gts | Adds template selector UI and re-renders preview on template change. |
| @libs/users-front/src/components/curriculums/edit/curriculum-edit-view.gts | Switches section add/remove to isActive toggling; implements section/item reorder UI hooks. |
| @libs/users-front/src/components/curriculums/edit/curriculum-edit-top-bar.gts | Implements download action calling the export endpoint. |
| @libs/users-front/src/components/curriculums/edit/curriculum-edit-section-item.gts | Adds drag/drop interactions and i18n for “choose file”. |
| @libs/users-front/package.json | Adds ember-drag-drop and exports the new models schema bundle path. |
| @libs/users-backend/tests/utils/setup-module.ts | Ensures test-created sections set isActive: true. |
| @libs/users-backend/tests/integration/sections/update.route.test.ts | Updates section update tests to patch isActive instead of title. |
| @libs/users-backend/src/services/template.service.ts | Adds server-side Handlebars CV rendering from filesystem templates + embeds profile picture. |
| @libs/users-backend/src/services/pdf.service.ts | Adds Puppeteer-based HTML→PDF rendering service. |
| @libs/users-backend/src/routes/sections/update.route.ts | Changes section update payload to update isActive. |
| @libs/users-backend/src/routes/sections/get.route.ts | Includes isActive in sections response schema/payload. |
| @libs/users-backend/src/routes/sections/create.route.ts | Initializes newly created sections as inactive (isActive: false). |
| @libs/users-backend/src/routes/curriculums/list.models.route.ts | Adds endpoint to list available CV template folders. |
| @libs/users-backend/src/routes/curriculums/export.route.ts | Adds curriculum export endpoint producing a PDF response. |
| @libs/users-backend/src/routes/curriculums/duplicate.route.ts | Copies isActive when duplicating sections. |
| @libs/users-backend/src/routes/curriculums/create.route.ts | Creates one section per template on curriculum creation (inactive by default). |
| @libs/users-backend/src/init.ts | Registers the new export + models routes; wires extra repositories into curriculum creation route. |
| @libs/users-backend/src/index.ts | Exports new curriculum routes from the library entrypoint. |
| @libs/users-backend/src/entities/sections.entity.ts | Adds isActive boolean to section entity. |
| @libs/users-backend/package.json | Adds handlebars + puppeteer deps and a Puppeteer chrome install postinstall step. |
| @apps/front/translations/curriculums/fr-fr.yaml | Adds template selection + choose file translations (FR). |
| @apps/front/translations/curriculums/en-us.yaml | Adds template selection + choose file translations (EN). |
| @apps/front/public/templates/template2/style.css | Adds Template 2 stylesheet for frontend preview. |
| @apps/front/public/templates/template2/sections/profil.html | Adds Template 2 “profil” section markup (frontend). |
| @apps/front/public/templates/template2/sections/langues.html | Adds Template 2 “langues” section markup (frontend). |
| @apps/front/public/templates/template2/sections/informations-personnelles.html | Adds Template 2 personal info section with default avatar fallback (frontend). |
| @apps/front/public/templates/template2/sections/formations.html | Adds Template 2 formations section markup (frontend). |
| @apps/front/public/templates/template2/base.html | Adds Template 2 base layout wrapper (frontend). |
| @apps/front/public/templates/template1/sections/informations-personnelles.html | Adds default avatar fallback to Template 1 personal info section (frontend). |
| @apps/front/public/assets/img/default_avatar.png | Adds default avatar asset used by templates. |
| @apps/backend/src/templates/template2/style.css | Adds Template 2 stylesheet for backend PDF rendering. |
| @apps/backend/src/templates/template2/sections/profil.html | Adds Template 2 “profil” section markup (backend). |
| @apps/backend/src/templates/template2/sections/langues.html | Adds Template 2 “langues” section markup (backend). |
| @apps/backend/src/templates/template2/sections/informations-personnelles.html | Adds Template 2 personal info section with default avatar fallback (backend). |
| @apps/backend/src/templates/template2/sections/formations.html | Adds Template 2 formations section markup (backend). |
| @apps/backend/src/templates/template2/base.html | Adds Template 2 base HTML skeleton for PDF rendering. |
| @apps/backend/src/templates/template1/style.css | Adds Template 1 stylesheet for backend PDF rendering. |
| @apps/backend/src/templates/template1/sections/profil.html | Adds Template 1 “profil” section markup (backend). |
| @apps/backend/src/templates/template1/sections/langues.html | Adds Template 1 “langues” section markup (backend). |
| @apps/backend/src/templates/template1/sections/informations-personnelles.html | Adds Template 1 personal info section with default avatar fallback (backend). |
| @apps/backend/src/templates/template1/sections/formations.html | Adds Template 1 formations section markup (backend). |
| @apps/backend/src/templates/template1/base.html | Adds Template 1 base HTML skeleton for PDF rendering. |
| @apps/backend/src/seeders/curriculumInjector.seeder.ts | Updates seeded sections to include isActive and adjusts seeded CV content accordingly. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
AmauryD
approved these changes
Apr 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds CV export functionality, a second CV template, and various fixes around sections, section templates, and default image handling.
Scope
This PR focuses on extending the CV export pipeline and improving template flexibility.
Changes
Backend
Frontend
How to test
front:with-back)@libs/users-backend, frontend in@libs/users-frontNotes
Template switching is a proof of concept (no common-ui and tests yet) — feedback welcome.