Skip to content

feat(api): add endpoints, tests for backend and front integration of …#4

Merged
jeanbfly merged 2 commits intodevelopfrom
feature-cv-fill
Mar 23, 2026
Merged

feat(api): add endpoints, tests for backend and front integration of …#4
jeanbfly merged 2 commits intodevelopfrom
feature-cv-fill

Conversation

@jeanbfly
Copy link
Copy Markdown
Collaborator

Description

This PR extends the CV management features introduced previously by adding full CRUD support for sections, section items, and section templates — both on the backend and frontend.

Users can now:

  • Add, delete sections to a CV using a template
  • Add, update, and delete items within a section
  • All operations are reflected immediately in the UI without a page reload

Scope

This PR focuses exclusively on the sections/items/templates layer. CV-level operations (create, rename, duplicate, delete) were introduced in the previous PR.

Changes

Backend

  • Added routes: create, delete, update, list, reorder sections
  • Added routes: create, update, delete, reorder section items
  • Added section templates listing endpoint
  • Added integration tests for all new routes (create, delete, update, reorder)
  • Fixed logical errors

Frontend

  • Implemented CurriculumService methods for sections and items (not yet reorder)

Known limitations

  • Section templates are not yet manageable from the UI (read-only)
  • Error handling on the frontend is minimal for now
  • WarpDrive delete not yet implemented correctly (specially on delete)
  • Lack of tests on curriculums back or on front

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: add a section from a template, add items, rename, and delete them
  5. Backend code is in @libs/users-backend, frontend in @libs/users-front

Notes

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 expands the CV feature set by introducing section templates plus CRUD/reorder operations for CV sections and section items, wiring the new backend endpoints into the Ember frontend and adding integration tests and seed data.

Changes:

  • Backend: add section/section-item/section-template entities, serializers, routes, and integration tests.
  • Frontend: add WarpDrive schemas and CurriculumService methods, plus UI components to add/delete sections and manage section items.
  • Tooling/seed: update PNPM deps and add template HTML/CSS + JSON schemas and dev seeding updates.

Reviewed changes

Copilot reviewed 71 out of 72 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
pnpm-workspace.yaml Workspace catalog adjustment (dependency moved/updated).
pnpm-lock.yaml Lockfile updates reflecting dependency moves/versions.
@libs/users-front/src/services/curriculum.ts Adds section/template/item API methods and tweaks curriculum rename/delete fetching.
@libs/users-front/src/schemas/sections.ts New WarpDrive schema/type for sections (includes embedded items).
@libs/users-front/src/schemas/section-templates.ts New WarpDrive schema/type for section templates.
@libs/users-front/src/schemas/section-items.ts New WarpDrive schema/type for section items.
@libs/users-front/src/components/curriculums/edit/curriculum-edit-view.gts UI wiring to load templates/sections and create/delete sections and items.
@libs/users-front/src/components/curriculums/edit/curriculum-edit-top-bar.gts Test selector rename + minor styling tweak.
@libs/users-front/src/components/curriculums/edit/curriculum-edit-section.gts Passes curriculumId into edit view (and adds unused loaders).
@libs/users-front/src/components/curriculums/edit/curriculum-edit-section-item.gts New UI for editing/deleting section items based on template fields.
@libs/users-front/src/components/curriculums/edit/curriculum-edit-section-dropdown.gts Dropdown now driven by external @isActive + activation/deactivation callbacks.
@libs/users-front/package.json Dependency and exports updates for new schemas; test tooling pin.
@libs/users-backend/tests/utils/setup-module.ts Test module extended to include new modules/entities + helper creators.
@libs/users-backend/tests/integration/sections/update.route.test.ts Integration coverage for section update endpoint.
@libs/users-backend/tests/integration/sections/update.reorder.route.test.ts Integration coverage for section reorder endpoint.
@libs/users-backend/tests/integration/sections/get.route.test.ts Integration coverage for listing sections by curriculum.
@libs/users-backend/tests/integration/sections/delete.route.test.ts Integration coverage for section deletion.
@libs/users-backend/tests/integration/sections/create.route.test.ts Integration coverage for section creation from template.
@libs/users-backend/tests/integration/section-templates/list.route.test.ts Integration coverage for listing section templates.
@libs/users-backend/tests/integration/section-items/update.route.test.ts Integration coverage for section item update (jsonData validation).
@libs/users-backend/tests/integration/section-items/update.reorder.route.test.ts Integration coverage for reordering items in a section.
@libs/users-backend/tests/integration/section-items/delete.route.test.ts Integration coverage for deleting a section item.
@libs/users-backend/tests/integration/section-items/create.route.test.ts Integration coverage for creating a section item with initialized jsonData.
@libs/users-backend/src/serializers/sections.serializer.ts JSON:API serialization/schema for sections.
@libs/users-backend/src/serializers/section-templates.serializer.ts JSON:API serialization/schema for section templates.
@libs/users-backend/src/serializers/section-items.serializer.ts JSON:API serialization/schema for section items.
@libs/users-backend/src/serializers/proposed-sections.serializer.ts Removes proposed-sections serializer (feature replaced).
@libs/users-backend/src/routes/sections/update.route.ts PATCH section title endpoint.
@libs/users-backend/src/routes/sections/update.reorder.route.ts PATCH sections reorder endpoint.
@libs/users-backend/src/routes/sections/get.route.ts GET sections list (with items) endpoint.
@libs/users-backend/src/routes/sections/delete.route.ts DELETE section endpoint.
@libs/users-backend/src/routes/sections/create.route.ts POST section endpoint (create from template).
@libs/users-backend/src/routes/section-templates/list.route.ts GET section templates endpoint.
@libs/users-backend/src/routes/section-items/update.route.ts PATCH item endpoint with allowed-field validation against template schema.
@libs/users-backend/src/routes/section-items/update.reorder.route.ts PATCH items reorder endpoint.
@libs/users-backend/src/routes/section-items/delete.route.ts DELETE item endpoint.
@libs/users-backend/src/routes/section-items/create.route.ts POST item endpoint; initializes jsonData from template schema.
@libs/users-backend/src/routes/proposedSections/list.route.ts Removes proposed-sections list route.
@libs/users-backend/src/routes/curriculums/delete.route.ts Small refactor of curriculum deletion logic.
@libs/users-backend/src/init.ts Registers new modules/routes; removes proposed-sections module.
@libs/users-backend/src/index.ts Exports new entities/serializers/routes; updates entities list.
@libs/users-backend/src/entities/sections.entity.ts New Sections entity (relations to curriculum/template/items).
@libs/users-backend/src/entities/section.entity.ts Removes legacy Section entity.
@libs/users-backend/src/entities/section-templates.entity.ts New SectionTemplates entity.
@libs/users-backend/src/entities/section-items.entity.ts Updates section-items entity to use relations + renames entity.
@libs/users-backend/src/entities/proposed-sections.entity.ts Removes proposed-sections entity.
@libs/users-backend/src/entities/curriculum.entity.ts Adds one-to-many relationship from curriculum to sections.
@libs/users-backend/src/context.ts Introduces new module context types for sections/templates/items.
@libs/shared-front/package.json Removes ember-truth-helpers from shared-front deps.
@apps/front/translations/curriculums/fr-fr.yaml Adds translations for section item UI labels.
@apps/front/translations/curriculums/en-us.yaml Adds translations for section item UI labels.
@apps/front/package.json Adds ember-truth-helpers dependency.
@apps/front/app/services/store.ts Registers new WarpDrive schemas (templates/sections/items).
@apps/backend/src/seeders/models/templates/template1/sections/personal-info.html Adds template HTML for personal info section rendering.
@apps/backend/src/seeders/models/templates/template1/sections/generic.html Adds generic fallback section rendering.
@apps/backend/src/seeders/models/templates/template1/sections/education.html Adds template HTML for education section rendering.
@apps/backend/src/seeders/models/templates/template1/layout.html Adds template layout that includes section templates.
@apps/backend/src/seeders/models/templates/template1/base.html Adds base HTML for rendered CV.
@apps/backend/src/seeders/models/templates/template1/base.css Adds CSS styling for the rendered CV template.
@apps/backend/src/seeders/models/references.schema.json Adds jsonSchema for “references” template fields.
@apps/backend/src/seeders/models/profil.schema.json Adds jsonSchema for “profil” template fields.
@apps/backend/src/seeders/models/personal-informations.schema.json Adds jsonSchema for “personal informations” template fields.
@apps/backend/src/seeders/models/langues.schema.json Adds jsonSchema for “languages” template fields.
@apps/backend/src/seeders/models/formations.schema.json Adds jsonSchema for “formations” template fields.
@apps/backend/src/seeders/models/experiences.schema.json Adds jsonSchema for “experiences” template fields.
@apps/backend/src/seeders/models/competences.schema.json Adds jsonSchema for “competences” template fields.
@apps/backend/src/seeders/models/centres-interets.schema.json Adds jsonSchema for “centres d’interets” template fields.
@apps/backend/src/seeders/development.seeder.ts Seeds templates/sections/items for e2e/dev.
@apps/backend/src/mikro-orm.config.ts Attempts to enable MikroORM debug logging.
@apps/backend/src/app/database.connection.ts Registers new entities for MikroORM connection.
@apps/backend/src/app/app.ts Wires new backend modules into the application bootstrap.
@apps/backend/src/app/app.router.ts Mounts new module routes under /api/v1.
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 @apps/backend/src/seeders/development.seeder.ts
Comment thread @apps/backend/src/mikro-orm.config.ts Outdated
Comment thread @libs/users-front/src/services/curriculum.ts
Comment thread @libs/users-front/src/services/curriculum.ts
Comment thread @apps/backend/src/seeders/development.seeder.ts Outdated
Comment thread @libs/users-backend/src/routes/sections/get.route.ts Outdated
Comment thread @libs/users-front/src/schemas/section-templates.ts
Comment thread @apps/front/package.json Outdated
Comment thread @libs/users-backend/src/routes/section-items/create.route.ts
@jeanbfly jeanbfly merged commit 616e4de into develop Mar 23, 2026
1 check passed
@jeanbfly jeanbfly deleted the feature-cv-fill branch March 23, 2026 16:40
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