Merged
Conversation
added 7 commits
December 15, 2025 13:38
…ow requests from the frontend client.- Implement in the main router: - Add middleware to handle file uploads (key: 'cv'). - Add logic to parse stringified array from . - Integrate middleware to process PDF/DOCX files.- Ensure correct error handling for file parsing and empty uploads.
…tion - Create cvExtractionService to interface with OpenAI for extracting skills.- Update usersCVsRoutes to integrate file parsing, AI analysis, and Supabase storage.- Add TypeScript safety checks for AI response parsing.
- Extract user_id from req.user (authMiddleware) instead of insecure req.body.- Remove manual user_id validation logic.- Fix TypeScript 'verbatimModuleSyntax' errors using 'import type'.- Leverage global Express type declarations for Request.user.
…OST /users_dealbreakers endpoint using auth token for user_id.- Updated POST /users_cvs to return extracted keywords to the frontend to unblock UI testing.- Temporarily commented out DB insertion for CVs to bypass UUID schema mismatch (pending DB migration).
…se causing headers sent error
AnsonChung3
approved these changes
Dec 16, 2025
Contributor
AnsonChung3
left a comment
There was a problem hiding this comment.
Maria said it works 🤣
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.
JOB-{Linear issue id} Pull Request Title
Summary/Description/Done changes
Endpoint Creation: Modified POST /users_cvs endpoint to handle CV file uploads via multipart/form-data.
OpenAI Integration: Implemented service logic to send parsed CV text to OpenAI API for keyword and deal-breaker extraction.
Database Updates: Updated database queries to store the AI-extracted JSON response (keywords/dealbreakers) directly into the users_cvs table. -> not yet working!
FIX: ensures user_id is correctly passed from frontend and used to save the keywords to the db.
Error Handling: Added try/catch blocks to handle failures in both file parsing and external API calls.
Time spent on this issue
30mins