Files
resume/CLAUDE.md

1.8 KiB

Resume Generator with docx-js

Overview

This project generates professional Word documents (.docx) from JSON Resume format using the docx npm package.

Setup

npm install docx

Usage

  1. Place your resume data in resume.json following the JSON Resume schema (https://jsonresume.org/schema/)
  2. Run: node generate_resume.js
  3. Output: Phillip_Tarrant_Resume_{YEAR}.docx

Key docx-js Patterns

Page Setup

  • Always set explicit page size (US Letter: 12240 x 15840 DXA, where 1440 DXA = 1 inch)
  • Set margins in DXA units

Text Formatting

  • Use TextRun for text with formatting (bold, italic, size, font)
  • Size is in half-points (22 = 11pt, 24 = 12pt, 32 = 16pt)
  • Always specify font explicitly for consistency

Lists/Bullets

  • Never use unicode bullets manually (like "•" in text)
  • Use numbering config with LevelFormat.BULLET
  • Reference the numbering config in paragraphs

Critical Rules

  1. Never use \n for line breaks - use separate Paragraph elements
  2. Always set table width when using tables
  3. PageBreak must be inside a Paragraph
  4. Use Arial as default font (universally supported)

Customization

  • Modify margins in sections[0].properties.page.margin
  • Change fonts by updating the font property in TextRun objects
  • Adjust spacing with spacing: { before: X, after: Y } on Paragraphs

JSON Resume Schema

The input JSON should follow the standard JSON Resume format with these sections:

  • basics: name, label, email, phone, url, summary, location, profiles
  • work: array of positions with name, position, startDate, endDate, summary, highlights
  • education: institution, area, studyType, startDate, endDate, score
  • certificates: name, issuer, date
  • awards: title, awarder, date, summary
  • skills: array of skill categories with name, level, keywords