Skip to main content

CV Processing

CV processing is a core frontend feature spanning upload, AI extraction, face photo extraction, manual editing (CV builder), and structured data mutations.

Upload and Extraction Pipeline

Upload Flow

The useCvUploadAndParse hook orchestrates the two-step process:

  1. Upload -- File is sent to background-tasks via GraphQL mutation
  2. Parse -- AI extraction begins automatically after upload
State: isUploading → isParsing → complete (CVParseResult)

Returns structured data: firstName, lastName, email, skills, experiences, education. Timeout: 5 minutes.

Real-Time Extraction

The useCvExtractionGraphQL hook uses a GraphQL subscription for real-time progress:

Input: CVExtractionInput { fileUrl, sequential }
Events: progress updates → structured CV data
Output: contact info, skills (with proficiency), experiences, education, languages

Skill proficiency levels: BASIC, INTERMEDIATE, ADVANCED, EXPERT.

Components:

ComponentFilePurpose
CVExtractorcomponents/cv/CVExtractor.tsxMain extraction interface
ContextCVExtractorcomponents/cv/ContextCVExtractor.tsxContext-aware extractor
CVUploadStepcomponents/cv/CVUploadStep.tsxUpload step in CV builder
ProcessingIndicatorcomponents/cv/ProcessingIndicator.tsxExtraction progress display
ConnectionStatuscomponents/cv/ConnectionStatus.tsxWebSocket connection indicator
DebugPanelcomponents/cv/DebugPanel.tsxDevelopment-only debug panel

Face Extraction

The useFaceExtraction hook extracts profile photos from CV documents:

Input: FaceExtractionInput { id, fileUrl, originalFilename }
States: idle → processing → completed / failed
Output: FaceExtracted with face image data

Component: FaceExtractionDisplay.tsx renders the extracted face.

CV Builder

The CV builder is a multi-step form backed by CVBuilderContext:

Context state:

  • Personal info (name, email, phone, links)
  • Skills (with proficiency levels)
  • Work experiences
  • Education
  • Portfolio links
  • isFromExtraction flag (distinguishes AI-uploaded vs manually entered)

Key components:

ComponentFilePurpose
ProfileFormcomponents/cv/ProfileForm.tsxMain profile editing form (33KB)
ProfileBuilderStepcomponents/cv/ProfileBuilderStep.tsxStep in the builder wizard
StepFootercomponents/cv/StepFooter.tsxStep navigation (back/next)
StepSidebarcomponents/cv/StepSidebar.tsxStep progress indicator

Structured CV Mutations

The useStructuredCvMutations hook is the central CV save orchestrator. It uses a diff algorithm to determine what changed and sends parallel mutations:

  • Computes diffs: items added, updated, or removed
  • Maps form data to mutation input types
  • Sends parallel mutations for: profile, work experiences, education, certifications, languages
  • Provides transaction-like behavior (all-or-nothing intent)

See Structured CV Migration for the full field reference and migration guide.

HookPurpose
useCvUploadAndParseUpload + parse orchestration
useCvExtractionGraphQLSubscription-based extraction
useCvProcessorGraphQLCV processing via subscription
useCvManagerCV lifecycle CRUD operations
useCvWithFaceExtractionCombined CV + face extraction
useFaceExtractionStandalone face extraction
useStructuredCvMutationsDiff-based save orchestrator
useCreateCvCreate new CV from scratch or template