@magic-resume-kit/* from npm.
Templates live in packages/resume-templates, where each MagicTemplateDSL value describes design tokens, layout, and per-section rendering. The package’s renderer turns one DSL value and one Resume into JSX, and the web app and PDF exporter share that renderer.
This means templates are data, not components. The web app and the PDF exporter share one renderer.
What does a template look like?
sections map in order, looks up the Resume sub-value for each, and renders. Sections that don’t appear in sections are simply not rendered for that template.
How does the template registry stay aligned with the schema?
All templates are registered inpackages/resume-templates/src/registry.ts:
templateIds in packages/resume-schema exactly. The schema’s Zod enum is what validates the selectedTemplate field on a resume — drift will cause stored resumes to fail validation.
How do I add a new template?
1
Add the ID to the schema
In
packages/resume-schema/src/, append your new ID to the templateIds tuple.2
Create the DSL config
In
packages/resume-templates/src/config/, add a new file exporting your MagicTemplateDSL. Start from the closest existing template — pick one with the same layout shape.3
Register it
4
Add a thumbnail
Drop a JPEG at:The gallery picks it up by ID; the filename must match the template ID exactly.
5
Rebuild
What does TemplateCustomizer do?
@magic-resume-kit/resume-templates/TemplateCustomizer is a sub-export — a React component the web app embeds to let users tweak a template’s design tokens without forking the DSL. If you’re adding new tokens, also add a control for them here.
