Backend Development 6 min read
Build Type‑Safe JSON Resumes Quickly with the Open‑Source Resume‑PHP Library
This guide shows how to install the Resume‑PHP Composer package, create a type‑safe résumé using its builder classes, add work experience, education, and skills, and finally export the data as a formatted JSON file.
Open Source Tech Hub
Open Source Tech Hub
Installation
composer require juststeveking/resume-phpBasic Usage
Build Basic Summary
use JustSteveKing\Resume\Builders\ResumeBuilder;
use JustSteveKing\Resume\DataObjects\Basics;
use JustSteveKing\Resume\DataObjects\Location;
use JustSteveKing\Resume\DataObjects\Profile;
use JustSteveKing\Resume\Enums\Network;
// Create the basics section
$basics = new Basics(
name: 'John Doe',
label: 'Software Engineer',
email: '[email protected]',
url: 'https://johndoe.com',
summary: 'Experienced software engineer with 5+ years in web development.',
location: new Location(
address: '123 Main St',
postalCode: '94105',
city: 'San Francisco',
countryCode: 'US',
region: 'CA',
),
profiles: [
new Profile(Network::GitHub, 'johndoe', 'https://github.com/johndoe'),
new Profile(Network::LinkedIn, 'johndoe', 'https://linkedin.com/in/johndoe'),
],
);
// Build the résumé
$resume = (new ResumeBuilder())
->basics($basics)
->build();
// Convert to JSON
$json = json_encode($resume, JSON_PRETTY_PRINT);Add Work Experience
use JustSteveKing\Resume\DataObjects\Work;
$resume = (new ResumeBuilder())
->basics($basics)
->addWork(new Work(
name: 'Tech Corp',
position: 'Senior Developer',
startDate: '2020-01-01',
endDate: '2023-12-31',
summary: 'Led development of core platform features',
highlights: ['Improved performance by 40%', 'Mentored junior developers'],
))
->addWork(new Work(
name: 'Startup Inc',
position: 'Full Stack Developer',
startDate: '2018-01-01',
endDate: '2019-12-31',
))
->build();Add Education
use JustSteveKing\Resume\DataObjects\Education;
use JustSteveKing\Resume\Enums\EducationLevel;
$resume->addEducation(new Education(
institution: 'University of Technology',
area: 'Computer Science',
studyType: EducationLevel::Bachelor,
startDate: '2014-09-01',
endDate: '2018-06-01',
));Add Skills
use JustSteveKing\Resume\DataObjects\Skill;
use JustSteveKing\Resume\Enums\SkillLevel;
$resume->addSkill(new Skill(
name: 'PHP',
level: SkillLevel::Expert,
keywords: ['Laravel', 'Symfony', 'API Development'],
));Generate the résumé JSON file
{
"basics": {
"name": "John Doe",
"label": "Programmer",
"image": "",
"email": "[email protected]",
"phone": "(912) 555-4321",
"url": "https://johndoe.com",
"summary": "A summary of John Doe…",
"location": {
"address": "2712 Broadway St",
"postalCode": "CA 94115",
"city": "San Francisco",
"countryCode": "US",
"region": "California"
},
"profiles": [{
"network": "Twitter",
"username": "john",
"url": "https://twitter.com/john"
}]
},
"work": [{
"name": "Company",
"position": "President",
"url": "https://company.com",
"startDate": "2013-01-01",
"endDate": "2014-01-01",
"summary": "Description…",
"highlights": ["Started the company"]
}],
"volunteer": [{
"organization": "Organization",
"position": "Volunteer",
"url": "https://organization.com/",
"startDate": "2012-01-01",
"endDate": "2013-01-01",
"summary": "Description…",
"highlights": ["Awarded 'Volunteer of the Month'"]
}],
"education": [{
"institution": "University",
"url": "https://institution.com/",
"area": "Software Development",
"studyType": "Bachelor",
"startDate": "2011-01-01",
"endDate": "2013-01-01",
"score": "4.0",
"courses": ["DB1101 - Basic SQL"]
}],
"awards": [{
"title": "Award",
"date": "2014-11-01",
"awarder": "Company",
"summary": "There is no spoon."
}],
"certificates": [{
"name": "Certificate",
"date": "2021-11-07",
"issuer": "Company",
"url": "https://certificate.com"
}],
"publications": [{
"name": "Publication",
"publisher": "Company",
"releaseDate": "2014-10-01",
"url": "https://publication.com",
"summary": "Description…"
}],
"skills": [{
"name": "Web Development",
"level": "Master",
"keywords": ["HTML", "CSS", "JavaScript"]
}],
"languages": [{
"language": "English",
"fluency": "Native speaker"
}],
"interests": [{
"name": "Wildlife",
"keywords": ["Ferrets", "Unicorns"]
}],
"references": [{
"name": "Jane Doe",
"reference": "Reference…"
}],
"projects": [{
"name": "Project",
"startDate": "2019-01-01",
"endDate": "2021-01-01",
"description": "Description...",
"highlights": ["Won award at AIHacks 2016"],
"url": "https://project.com/"
}]
}Original Source
Signed-in readers can open the original source through BestHub's protected redirect.
Republication Notice
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Written by
Open Source Tech Hub
Sharing cutting-edge internet technologies and practical AI resources.
0 followers
Reader feedback
How this landed with the community
Rate this article
Was this worth your time?
Discussion
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
