Overview
The Resume Builder uses React Context to manage all resume data and template selection. TheResumeContext provides centralized state management with automatic localStorage persistence.
Context Structure
The context is implemented insrc/hooks/useResume.tsx:34 and provides access to resume data, template selection, and mutation methods.
ResumeContextType Interface
ResumeProvider
TheResumeProvider component wraps your application and makes the context available to all child components.
Setup
Initial State
The provider initializes state from localStorage on mount (src/hooks/useResume.tsx:37-54):
Using the Context
Access the context in any component using theuseResume hook:
State Structure
TheResumeData type defines the complete resume state:
Available Methods
Personal Information
updatePersonalInfo
updatePersonalInfo
Updates a specific field in the personal info section.Signature:Example:Implementation:
src/hooks/useResume.tsx:78-83updateSummary
updateSummary
Updates the professional summary text.Signature:Example:Implementation:
src/hooks/useResume.tsx:85-87Experience Management
addExperience
addExperience
Adds a new blank experience entry with a generated UUID.Signature:Implementation:
src/hooks/useResume.tsx:89-106updateExperience
updateExperience
Updates a specific field in an experience entry.Signature:Example:Implementation:
src/hooks/useResume.tsx:108-113removeExperience
removeExperience
Removes an experience entry by ID.Signature:Implementation:
src/hooks/useResume.tsx:115-120Education Management
addEducation
addEducation
Adds a new blank education entry.Signature:Implementation:
src/hooks/useResume.tsx:122-138updateEducation
updateEducation
Updates a specific field in an education entry.Signature:Implementation:
src/hooks/useResume.tsx:140-145removeEducation
removeEducation
Removes an education entry by ID.Signature:Implementation:
src/hooks/useResume.tsx:147-152Skills Management
addSkill
addSkill
Adds a new skill to the list. Ignores empty/whitespace-only names.Signature:Example:Implementation:
src/hooks/useResume.tsx:154-160removeSkill
removeSkill
Removes a skill by ID.Signature:Implementation:
src/hooks/useResume.tsx:162-167Projects Management
addProject
addProject
Adds a new blank project entry.Signature:Implementation:
src/hooks/useResume.tsx:169-184updateProject
updateProject
Updates a specific field in a project entry.Signature:Implementation:
src/hooks/useResume.tsx:186-191removeProject
removeProject
Removes a project entry by ID.Signature:Implementation:
src/hooks/useResume.tsx:193-198Custom Sections Management
addCustomSection
addCustomSection
Creates a new custom section with the given title.Signature:Example:Implementation:
src/hooks/useResume.tsx:200-212updateCustomSection
updateCustomSection
Updates the title of a custom section.Signature:Implementation:
src/hooks/useResume.tsx:214-221removeCustomSection
removeCustomSection
Removes a custom section by ID.Signature:Implementation:
src/hooks/useResume.tsx:223-228addCustomSectionItem
addCustomSectionItem
Adds a new item to a specific custom section.Signature:Implementation:
src/hooks/useResume.tsx:230-252updateCustomSectionItem
updateCustomSectionItem
Updates a field in a custom section item.Signature:Implementation:
src/hooks/useResume.tsx:254-273removeCustomSectionItem
removeCustomSectionItem
Removes an item from a custom section.Signature:Implementation:
src/hooks/useResume.tsx:275-287Section Ordering
reorderSections
reorderSections
Updates the order in which sections appear in the resume.Signature:Example:Implementation:
src/hooks/useResume.tsx:289-294
