Skip to content

Feature/cv export#6

Merged
jeanbfly merged 7 commits into
developfrom
feature/cv-export
Apr 20, 2026
Merged

Feature/cv export#6
jeanbfly merged 7 commits into
developfrom
feature/cv-export

Conversation

@jeanbfly
Copy link
Copy Markdown
Collaborator

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

  • Added CV export endpoint (PDF generation)
  • Added a second CV template
  • Fixed sections and section template organizer

Frontend

  • Added template selection UI to the CV preview (switch between templates)
  • Added default CV image
  • Fixed sections and section template organizer

How to test

  1. Start the containers
  2. Refresh the database schema
  3. Run the frontend and backend (front:with-back)
  4. Open a CV and test:
    • Click the export button and verify a PDF is downloaded
    • Switch between templates in the preview bar and verify the CV re-renders
  5. Backend code is in @libs/users-backend, frontend in @libs/users-front

Notes
Template switching is a proof of concept (no common-ui and tests yet) — feedback welcome.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/:modelId endpoint.
  • Added template discovery (/curriculums/models) and frontend template selection in the CV preview.
  • Introduced isActive on 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.

Comment thread @libs/users-backend/src/services/template.service.ts
Comment thread @libs/users-front/src/services/curriculum.ts Outdated
Comment thread @libs/users-backend/tests/integration/sections/update.route.test.ts
Comment thread @libs/users-backend/src/services/template.service.ts
Comment thread @libs/users-backend/src/routes/curriculums/export.route.ts
Comment thread @libs/users-backend/src/routes/curriculums/export.route.ts
Comment thread @libs/users-backend/src/services/pdf.service.ts
Comment thread @libs/users-front/src/services/curriculum.ts
Comment thread @libs/users-front/package.json
Comment thread @libs/users-backend/src/routes/sections/update.route.ts
Comment thread @libs/users-front/src/components/curriculums/edit/curriculum-edit-view.gts Outdated
Comment thread @libs/users-front/src/components/curriculums/edit/curriculum-preview.gts Outdated
Comment thread @libs/users-front/src/services/curriculum.ts Outdated
Comment thread @libs/users-front/src/services/curriculum.ts
@jeanbfly jeanbfly merged commit ba3ed64 into develop Apr 20, 2026
1 check passed
@jeanbfly jeanbfly deleted the feature/cv-export branch April 20, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants