You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is coherent with #134 🙂 as it fulfills a layer over CRUD using the user interface (without the D in this case) :)
Currently, copying content between CVs requires one of these workflows:
Method
Limitation
Duplicate entire CV
Copies everything, not selective
Load Dataset A → manually copy items → Load Dataset B
Time-consuming, error-prone
Export/Import JSON
Works but not intuitive for quick tasks
Users with multiple CV versions (e.g., "Frontend Dev", "Full Stack Lead", "Contractor") often need to share specific sections across them — like a new certification or a project they want to showcase on multiple CVs.
Proposed Solution
Add multiselect capability for sections with the ability to copy selected sections to a target CV.
Use Cases
Share a new certification across all CV versions
Copy a custom section template to a new CV
Move experience from one CV to another (e.g., after a job change)
Bulk-copy skills categories between CVs with similar requirements
// Option A: Copy logo files (increases storage)functioncopyLogoForSection(sectionType,sourceItem,targetDb){if(sourceItem.logo_filename){constsourcePath=path.join(uploadsPath,sourceItem.logo_filename);consttargetFilename=`${Date.now()}_${sourceItem.logo_filename}`;consttargetPath=path.join(uploadsPath,targetFilename);if(fs.existsSync(sourcePath)){fs.copyFileSync(sourcePath,targetPath);}returntargetFilename;}returnnull;}// Option B: Share logo references (simpler, shared storage)// Just copy the filename, don't copy the file
Recommendation: Option B (share references) — simpler, less storage, but means editing logo in one CV affects all.
asyncfunctioncopySectionsToTarget(sourceCvId,targetCvId,sections,mode){// 1. Export sections from sourceconstexportRes=awaitfetch(`/api/cv/sections/export?types=${sections.join(',')}`);const{sections: exportData}=awaitexportRes.json();// 2. Import to targetconstimportRes=awaitfetch('/api/cv/sections/import',{method: 'POST',headers: {'Content-Type': 'application/json'},body: JSON.stringify({sections: exportData,
mode,targetDatasetId: targetCvId})});if(importRes.ok){toast(t('toast.sections_copied'));}else{toast(t('toast.copy_failed'),'error');}}
Edge Cases
Scenario
Handling
Copy to same CV
Show warning, allow anyway (no-op for most)
Replace mode with existing data
Require explicit confirmation
Empty source section
Skip silently
Logo file missing
Skip logo, copy rest of item
Duplicate entries (merge)
Always add as new items with new IDs
Target CV has 0 items, using merge
Works fine, adds all items
Copy custom section with items
Includes all child items
Out of Scope
Copying individual items (not full sections)
Copy between different users' CVs (multi-tenant)
Real-time sync after copy
Copy history/audit trail
Code Review Findings
When implementing this feature, be aware of these existing patterns:
🔴 Critical: Logo File Handling
Location:src/server.js:2677 (dataset load)
When sections are copied via POST /api/datasets/:id/load, logo filenames are copied but files are not. Both source and target CVs reference the same file.
Impact on this feature:
Option A (copy files): Increases storage, but deleting a logo in one CV doesn't affect others
Option B (share references): Simpler, but logo edits propagate to all CVs sharing it
Recommendation: Implement Option A with a copy-on-write strategy for V1.
🟡 Warning: Inconsistent Validation
Location:src/server.js:2240-2250
experiences: No validation (accepts any input)
certifications: Validates credential_id is a valid URL
For copy feature: Normalize/validate data from source CV before importing to target.
🟡 Warning: Empty Section Handling
Location:src/server.js:2178
PUT /api/sections/order accepts empty arrays silently. For copy feature, validate that at least one section is selected before processing.
🔵 Info: gatherCvData() Monolith (optional)
Location:src/server.js:1186
This function (~50 lines) gathers all CV data in one place. For the export endpoint, consider extracting section-specific helpers:
duplicateThis issue or pull request already existswontfixThis will not be worked on
1 participant
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Context
This is coherent with #134 🙂 as it fulfills a layer over CRUD using the user interface (without the D in this case) :)
Currently, copying content between CVs requires one of these workflows:
Users with multiple CV versions (e.g., "Frontend Dev", "Full Stack Lead", "Contractor") often need to share specific sections across them — like a new certification or a project they want to showcase on multiple CVs.
Proposed Solution
Add multiselect capability for sections with the ability to copy selected sections to a target CV.
Use Cases
UX Flow
Option a): Either use a dedicated modal:
Option b): Or use the current userinterface alongside with checkboxes and actions.
Key Decisions
Technical Approach
Data Structure (please verify)
Each section type has a distinct schema:
API Endpoints (please verify)
1. Export Sections (from source CV)
2. Import Sections (to target CV) (please verify)
Logo Handling (please verify)
When copying sections with logos:
Recommendation: Option B (share references) — simpler, less storage, but means editing logo in one CV affects all.
UI Implementation
Section Selector Component
Copy Flow
Edge Cases
Out of Scope
Code Review Findings
When implementing this feature, be aware of these existing patterns:
🔴 Critical: Logo File Handling
Location:
src/server.js:2677(dataset load)When sections are copied via
POST /api/datasets/:id/load, logo filenames are copied but files are not. Both source and target CVs reference the same file.Impact on this feature:
Recommendation: Implement Option A with a copy-on-write strategy for V1.
🟡 Warning: Inconsistent Validation
Location:
src/server.js:2240-2250experiences: No validation (accepts any input)certifications: Validatescredential_idis a valid URLFor copy feature: Normalize/validate data from source CV before importing to target.
🟡 Warning: Empty Section Handling
Location:
src/server.js:2178PUT /api/sections/orderaccepts empty arrays silently. For copy feature, validate that at least one section is selected before processing.🔵 Info:
gatherCvData()Monolith (optional)Location:
src/server.js:1186This function (~50 lines) gathers all CV data in one place. For the export endpoint, consider extracting section-specific helpers:
References
src/server.js:1186(gatherCvData())src/server.js:2677(POST /api/datasets/:id/load)src/server.js:2988(POST /api/import)public/shared/admin.js:3111(renderCvManagerList())Beta Was this translation helpful? Give feedback.
All reactions