A TypeScript-based CV/Resume generator that creates professional PDF documents from JSON data files. Supports multiple languages and customizable templates.
- β Multi-language support (English, French, or add your own)
- β Generate professional PDF resumes
- β JSON-based content management
- β Customizable HTML template
- β Environment-based configuration
- β Automatic results folder creation
- Node.js (v16 or higher)
- npm or yarn
- Clone the repository:
git clone <repository-url>
cd builder- Install dependencies:
npm install-
Configure environment variables (see Environment Configuration)
-
Set up your content files (see Content Structure)
Create a .env file in the root directory:
fileName=cv_yourname| Variable | Description | Example |
|---|---|---|
fileName |
Base name for generated PDF files (without language suffix) | cv_servais_guillaume |
The final PDF will be named: {fileName}_{language}.pdf
Example: cv_servais_guillaume_en.pdf, cv_servais_guillaume_fr.pdf
All content files are located in the content/ directory. You need to create/customize the following files:
Create language-specific files: en.json, fr.json
[
{
"title": "Software Developer",
"place": "Company Name",
"startDate": "2024-01-01",
"endDate": null,
"description": "Brief description of the role",
"tasks": ["Task or achievement 1", "Task or achievement 2"],
"technologies": [".NET", "React", "SQL"]
}
]Fields:
title(string): Job titleplace(string): Company namestartDate(string): ISO date format (YYYY-MM-DD)endDate(string|null): ISO date format ornullfor current positiondescription(string): Role descriptiontasks(array|null): List of responsibilities or achievementstechnologies(array): Technologies used (optional, for reference)
Not language-specific (same for all languages):
["JavaScript", "TypeScript", "React", "Node.js", "SQL"]Create language-specific files: en.json, fr.json
[
{
"name": "English",
"level": "C1"
},
{
"name": "French",
"level": "Native"
}
]Fields:
name(string): Language namelevel(string): Proficiency level (A1-C2, Native, etc.)
Create language-specific files: en.json, fr.json
[
{
"school": "University Name",
"place": "City",
"degree": "Bachelor's in Computer Science",
"year": "2019 - 2022"
}
]Fields:
school(string): Institution nameplace(string): Locationdegree(string): Degree/qualificationyear(string): Period or graduation year
Not language-specific:
[
{
"title": "AWS Certified Developer",
"date": "2024-03-15"
}
]Fields:
title(string): Certification namedate(string): ISO date format (YYYY-MM-DD)
Create language-specific files: en.json, fr.json
[
{
"place": "Hackathon Name 2024",
"project": "Project Title",
"description": "Brief project description",
"date": "2024-06-01",
"price": "First Place Prize"
}
]Fields:
place(string): Hackathon name/eventproject(string): Project namedescription(string): Project descriptiondate(string): ISO date format (YYYY-MM-DD)price(string|null): Award/prize ornull
Create language-specific files: en.json, fr.json
{
"now": "Present",
"drivingLicense": "Driver's License",
"age": "years old",
"title": "Software Developer",
"won": "Won"
}Required Keys:
now: Text for current/ongoing positionsdrivingLicense: Driving license textage: Age suffix texttitle: Your professional titlewon: Text for prizes/awards
Place your profile picture at: content/profile_picture.jpg
Recommended: Square image, 500x500px or larger
Edit content/base.html to customize the CV layout and styling.
Available placeholders:
{{ProfilePicture}}- Base64 encoded profile image{{Title}}- Professional title{{DrivingLicense}}- Driving license text{{Experiences}}- Work experience section{{Languages}}- Languages section{{Skills}}- Skills section{{Educations}}- Education section{{Certifications}}- Certifications section{{Hackathons}}- Hackathons/Projects section
Generate your CV PDFs:
npm run build-cvThis will:
- Read all content files
- Generate HTML for each language (en, fr)
- Convert HTML to PDF using Puppeteer
- Save PDFs in the
results/folder
Generated PDFs will be saved as:
results/cv_yourname_en.pdfresults/cv_yourname_fr.pdf
To add a new language (e.g., Spanish):
-
Add language files in these directories:
content/experiences/es.jsoncontent/educations/es.jsoncontent/languages/es.jsoncontent/hackathons/es.jsoncontent/translations/es.json
-
Update
model/LanguageOptions.ts:
export type LanguageOptions = 'fr' | 'en' | 'es';- Update
builder.ts:
const languages = ['fr' as LanguageOptions, 'en' as LanguageOptions, 'es' as LanguageOptions];builder/
βββ content/ # All CV content
β βββ certifications/
β βββ educations/
β βββ experiences/
β βββ hackathons/
β βββ languages/
β βββ skills/
β βββ translations/
β βββ base.html # HTML template
β βββ profile_picture.jpg
βββ model/ # TypeScript interfaces
βββ utils/ # Helper functions
βββ results/ # Generated PDFs (auto-created)
βββ .env # Environment configuration
βββ builder.ts # Main entry point
βββ package.json
npm run build-cvThe project uses tsx for TypeScript execution without pre-compilation.
- Date Formats: Always use ISO format (YYYY-MM-DD) for dates
- Current Position: Set
endDatetonullfor ongoing roles - Optional Fields: Set
tasks,price, ordescriptiontonullif not needed - Sorting: Experiences are automatically sorted by most recent first
- Profile Picture: Use JPG format for best compatibility
- Make sure all required JSON files exist for your languages
- Check that file names match exactly (case-sensitive)
- Verify all JSON files have valid syntax
- Check that dates are in correct ISO format (YYYY-MM-DD)
- Ensure profile picture exists at
content/profile_picture.jpg
- Create
.envfile withfileNamevariable - Restart the build process after creating
.env