Skip to content

feat: add resume JSON import and export#803

Open
slawekmarczak wants to merge 1 commit into
srbhr:mainfrom
slawekmarczak:codex/resume-json-import-export
Open

feat: add resume JSON import and export#803
slawekmarczak wants to merge 1 commit into
srbhr:mainfrom
slawekmarczak:codex/resume-json-import-export

Conversation

@slawekmarczak
Copy link
Copy Markdown

@slawekmarczak slawekmarczak commented May 20, 2026

Related Issue

No linked issue.

Description

Adds JSON import and export support for individual resumes.

This lets users download the structured resume data for a specific
resume, edit it outside the application, and upload it back to replace
that same resume's JSON content. The upload path validates the
submitted JSON against the existing resume schema before saving,
rejects mismatched resume IDs, and stores a backup of the previous
JSON before replacement.

Type

  • Bug Fix
  • Feature Enhancement
  • Documentation Update
  • Code Refactoring
  • Other:

Proposed Changes

  • Added GET /api/v1/resumes/{resume_id}/json for structured JSON
    export.
  • Added PUT /api/v1/resumes/{resume_id}/json for validated JSON
    replacement.
  • Added backup storage for the previous resume JSON before import.
  • Added resume ID mismatch protection for uploaded JSON metadata.
  • Added Download JSON, Upload JSON, and Refresh actions to the
    resume detail page.
  • Added readable JSON download filenames based on the resume name/
    title.
  • Added localized UI labels and upload/download dialog messages.
  • Added integration tests for export, import, backup creation, and ID
    mismatch rejection.

Screenshots / Code Snippets

Not applicable.

How to Test

  1. Open any resume detail page.
  2. Click Download JSON and confirm that a JSON file is downloaded.
  3. Edit a safe field in the downloaded JSON, such as summary text.
  4. Click Upload JSON and select the modified file.
  5. Confirm that the resume data updates successfully.
  6. Download the JSON again and verify that the uploaded change
    persisted.
  7. Try uploading JSON with a different metadata.resume_id and
    confirm that it is rejected.

Backend:

cd apps/backend
uv sync --extra dev
uv run pytest tests/integration/test_resume_api.py

Frontend:

cd apps/frontend
npm ci
npm run lint
npx tsc --noEmit
npm test
npm run build

## Checklist

- [x] The code compiles successfully without any errors or warnings
- [x] The changes have been tested and verified
- [ ] The documentation has been updated (if applicable)
- [x] The changes follow the project's coding guidelines and best
  practices
- [x] The commit messages are descriptive and follow the project's
  guidelines
- [x] All tests pass successfully
- [ ] This pull request has been linked to the related issue (if
  applicable)


<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Adds JSON import and export for individual resumes so users can round‑trip structured data. Uploads are validated, mismatched IDs are blocked, and a backup is saved before any replacement.

- **New Features**
- Backend API: `GET /api/v1/resumes/{id}/json` exports `{metadata, resume}`; `PUT /api/v1/resumes/{id}/json` accepts the export wrapper or raw resume JSON, validates against `ResumeData`, and stores a backup in `resume_json_backups`.
- Safety: rejects uploads whose `metadata.resume_id` differs from the target resume; returns clear 4xx errors for invalid JSON.
- Frontend: added Download JSON, Upload JSON, and Refresh actions on the resume page; readable download filenames via `sanitizeDownloadFilename`; localized labels and dialogs; new client helpers `downloadResumeJson` and `uploadResumeJson`.
- Tests: integration coverage for export metadata, backup creation on import, and ID‑mismatch rejection.

<sup>Written for commit c864074cad8d86f6ad94e2b1f5b1677531d3b40e. Summary will update on new commits. <a href="https://cubic.dev/pr/srbhr/Resume-Matcher/pull/803?utm_source=github">Review in cubic</a></sup>

<!-- End of auto-generated description by cubic. -->

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 12 files

Re-trigger cubic

andrewscouten added a commit to andrewscouten/Resume-Matcher that referenced this pull request May 25, 2026
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.

1 participant