Back to Resume Matcher

Custom Sections System

docs/agent/features/custom-sections.md

1.2.02.8 KB
Original Source

Custom Sections System

Dynamic resume sections with full customization.

Section Types

TypeDescriptionExample Uses
personalInfoSpecial type for header (always first)Name, contact details
textSingle text blockSummary, objective, statement
itemListArray of items with title, subtitle, years, descriptionExperience, projects, publications
stringListSimple array of stringsSkills, languages, hobbies

Section Features

  • Rename sections: Change display names (e.g., "Education" → "Academic Background")
  • Reorder sections: Up/down buttons to change section order
  • Hide sections: Toggle visibility (hidden sections still editable, just not in PDF)
  • Delete sections: Remove custom sections entirely
  • Add custom sections: Create new sections with any name and type

Section Controls (UI)

Each section (except Personal Info) has these controls in the header:

ControlIconFunction
Visibility👁 Eye / EyeOffToggle show/hide in PDF preview
Move Up⬆ ChevronUpMove section earlier in order
Move Down⬇ ChevronDownMove section later in order
Rename✏️ PencilEdit section display name
Delete🗑 TrashHide (default) or delete (custom)

Hidden Section Behavior

  • Hidden sections appear in the form with:
    • Dashed border and 60% opacity
    • "Hidden from PDF" badge (amber)
  • Hidden sections are still editable
  • Only PDF/preview hides them (uses getSortedSections which filters by visibility)
  • Form shows all sections (uses getAllSections)

Key Files

FilePurpose
apps/backend/app/schemas/models.pySectionType, SectionMeta, CustomSection models
apps/frontend/lib/utils/section-helpers.tsSection management utilities
apps/frontend/components/builder/section-header.tsxSection controls UI
apps/frontend/components/builder/add-section-dialog.tsxAdd custom section dialog
apps/frontend/components/builder/resume-form.tsxDynamic form rendering
apps/frontend/components/resume/dynamic-resume-section.tsxRenders custom sections in templates

Data Structure

typescript
interface ResumeData {
  // ... existing fields (personalInfo, summary, etc.)
  sectionMeta?: SectionMeta[];  // Section order, names, visibility
  customSections?: Record<string, CustomSection>;  // Custom section data
}

Migration

Existing resumes are automatically migrated via lazy normalization - default section metadata is added when a resume is fetched if sectionMeta is missing.

Important: The normalize_resume_data() function uses copy.deepcopy(DEFAULT_SECTION_META) to avoid shared mutable reference bugs. Always use deep copies when assigning default mutable values.