Skip to content

Commit 8ee807e

Browse files
committed
v1.0.0
1 parent 2157e22 commit 8ee807e

File tree

7 files changed

+344
-2
lines changed

7 files changed

+344
-2
lines changed

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,11 @@ Homestead.json
2828
.env.production
2929
.phpactor.json
3030
auth.json
31+
.idea
32+
33+
build
34+
composer.lock
35+
.php-cs-fixer.cache
36+
coverage
37+
phpstan.neon
38+

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Changelog
2+
3+
## May 1, 2025—v1.0.0

README.md

Lines changed: 181 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,181 @@
1-
# laravel-resume-job-match-score
2-
Resume/CV Job Match Score - Smart AI scoring for CV-to-job compatibility
1+
![SharpAPI GitHub cover](https://sharpapi.com/sharpapi-github-laravel-bg.jpg "SharpAPI Laravel Client")
2+
3+
# Resume/CV & Job Description Compatibility Scoring API for Laravel
4+
5+
## 🎯 Instantly evaluate how well a candidate's resume aligns with your job descriptions — powered by SharpAPI AI.
6+
7+
[![Latest Version on Packagist](https://img.shields.io/packagist/v/sharpapi/laravel-resume-job-match-score.svg?style=flat-square)](https://packagist.org/packages/sharpapi/laravel-resume-job-match-score)
8+
[![Total Downloads](https://img.shields.io/packagist/dt/sharpapi/laravel-resume-job-match-score.svg?style=flat-square)](https://packagist.org/packages/sharpapi/laravel-resume-job-match-score)
9+
10+
Check the full documentation on the [Resume/CV Job Match Scoring API](https://sharpapi.com/en/catalog/ai/hr-tech/resume-cv-job-match-score) page.
11+
12+
---
13+
14+
## Requirements
15+
16+
- PHP >= 8.1
17+
- Laravel >= 9.0
18+
19+
---
20+
21+
## Installation
22+
23+
```bash
24+
composer require sharpapi/laravel-resume-job-match-score --prefer-dist
25+
26+
```
27+
28+
Then, in your `.env` file:
29+
30+
```bash
31+
SHARP_API_KEY=your_api_key_here
32+
```
33+
34+
Optionally, publish the config if you want to tweak the default settings:
35+
36+
```bash
37+
php artisan vendor:publish --tag=sharpapi-resume-job-match-score
38+
```
39+
40+
---
41+
42+
## What it does
43+
44+
This package sends a resume file and a job description to the SharpAPI AI endpoint and returns a structured JSON scoring output based on 20+ compatibility factors:
45+
46+
- Skills match
47+
- Experience and industry relevance
48+
- Education and certifications
49+
- Soft skills, language, cultural fit
50+
- Stability score and more
51+
52+
Perfect for recruiters, ATS platforms, and job-matching tools.
53+
54+
---
55+
56+
## Usage
57+
58+
Inject the `ResumeMatchScoreService` into your controller or command and call `matchResumeToJob()`:
59+
60+
```php
61+
use SharpAPI\ResumeMatchScore\ResumeMatchScoreService;
62+
use GuzzleHttp\Exception\GuzzleException;
63+
64+
$resumePath = storage_path('resume.pdf'); // make sure this file exists
65+
$jobDescription = 'We are hiring a PHP Developer with Laravel experience…';
66+
$language = 'English';
67+
68+
$service = new ResumeMatchScoreService();
69+
70+
try {
71+
$statusUrl = $service->matchResumeToJob(
72+
$resumePath,
73+
$jobDescription,
74+
$language // optional – English is default
75+
);
76+
77+
$result = $service->fetchResults($statusUrl)->toArray();
78+
print_r($result);
79+
} catch (GuzzleException $e) {
80+
// Handle SharpAPI or network errors
81+
echo $e->getMessage();
82+
}
83+
```
84+
85+
### Laravel Artisan Command Example
86+
87+
```bash
88+
php artisan sharpapi:test-resume-match \
89+
--file=storage/resume.pdf \
90+
--description="Looking for a full-stack developer skilled in React and Node.js" \
91+
--language=English
92+
```
93+
94+
---
95+
96+
## Example Response
97+
98+
```json
99+
{
100+
"data": {
101+
"type": "api_job_result",
102+
"id": "5a113c4d-38e9-43e5-80f4-ec3fdea3420e",
103+
"attributes": {
104+
"status": "success",
105+
"type": "hr_resume_job_match_score",
106+
"result": {
107+
"match_scores": {
108+
"overall_match": 88,
109+
"skills_match": 92,
110+
"experience_match": 85,
111+
"education_match": 80,
112+
"certifications_match": 70,
113+
"job_title_relevance": 84,
114+
"industry_experience_match": 75,
115+
"project_experience_match": 78,
116+
"technical_stack_match": 90,
117+
"soft_skills_match": 88,
118+
"methodologies_match": 82,
119+
"language_proficiency_match": 95,
120+
"location_preference_match": 100,
121+
"remote_work_flexibility": 90,
122+
"certifications_training_relevance": 70,
123+
"years_experience_weighting": 80,
124+
"recent_role_relevance": 83,
125+
"management_experience_match": 60,
126+
"cultural_fit_potential": 85,
127+
"stability_score": 77
128+
},
129+
"explanations": {
130+
"skills_match": "Candidate lists React, Node.js, and JavaScript with strong proficiency.",
131+
"experience_match": "5+ years experience in a similar role within a tech startup.",
132+
"education_match": "Bachelor's degree in Computer Science aligns with job requirements.",
133+
"certifications_match": "Has partial certification coverage (e.g., Scrum Master).",
134+
"language_proficiency_match": "Fluent in English as required."
135+
}
136+
}
137+
}
138+
}
139+
}
140+
141+
```
142+
143+
---
144+
145+
### Do you think our API is missing some obvious functionality?
146+
147+
- [Please let us know via GitHub »](https://github.com/sharpapi/laravel-resume-job-match-score/issues)
148+
- or [Join our Telegram Group »](https://t.me/sharpapi_community)
149+
150+
---
151+
152+
## Changelog
153+
154+
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
155+
156+
---
157+
158+
## Credits
159+
160+
- [A2Z WEB LTD](https://github.com/a2zwebltd)
161+
- [Dawid Makowski](https://github.com/makowskid)
162+
- Boost your [Laravel AI](https://sharpapi.com/) capabilities!
163+
164+
---
165+
166+
## License
167+
168+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE.md)
169+
170+
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
171+
172+
173+
---
174+
## Social Media
175+
176+
🚀 For the latest news, tutorials, and case studies, don't forget to follow us on:
177+
- [SharpAPI X (formerly Twitter)](https://x.com/SharpAPI)
178+
- [SharpAPI YouTube](https://www.youtube.com/@SharpAPI)
179+
- [SharpAPI Vimeo](https://vimeo.com/SharpAPI)
180+
- [SharpAPI LinkedIn](https://www.linkedin.com/products/a2z-web-ltd-sharpapicom-automate-with-aipowered-api/)
181+
- [SharpAPI Facebook](https://www.facebook.com/profile.php?id=61554115896974)

composer.json

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{
2+
"name": "sharpapi/laravel-resume-job-match-score",
3+
"description": "AI Resume & Job Description Matching for Laravel powered by SharpAPI.com",
4+
"keywords": [
5+
"sharpapi",
6+
"resume matching",
7+
"cv",
8+
"job description",
9+
"laravel",
10+
"ai api",
11+
"php",
12+
"ats",
13+
"hr tech",
14+
"natural language processing",
15+
"job score",
16+
"compatibility scoring"
17+
],
18+
"license": "MIT",
19+
"homepage": "https://github.com/sharpapi/laravel-resume-job-match-score",
20+
"authors": [
21+
{
22+
"name": "Dawid Makowski",
23+
"email": "[email protected]",
24+
"role": "Developer"
25+
}
26+
],
27+
"require": {
28+
"php": "^8.1",
29+
"ext-json": "*",
30+
"laravel/framework": "^9.0|^10.0|^11.0|^12.0",
31+
"guzzlehttp/guzzle": "^7.0",
32+
"sharpapi/php-core": "^1.0.2",
33+
"spatie/url": "^2.4"
34+
},
35+
"require-dev": {
36+
"laravel/pint": "^1.0",
37+
"phpstan/phpstan": "^1.10",
38+
"pestphp/pest": "^2.0"
39+
},
40+
"autoload": {
41+
"psr-4": {
42+
"SharpAPI\\ResumeMatchScore\\": "src/"
43+
}
44+
},
45+
"autoload-dev": {
46+
"psr-4": {
47+
"SharpAPI\\ResumeMatchScore\\Tests\\": "tests/"
48+
}
49+
},
50+
"scripts": {
51+
"post-autoload-dump": "",
52+
"analyse": "vendor/bin/phpstan analyse",
53+
"test": "vendor/bin/pest",
54+
"test-coverage": "vendor/bin/pest --coverage",
55+
"format": "vendor/bin/pint"
56+
},
57+
"config": {
58+
"sort-packages": true,
59+
"allow-plugins": {
60+
"pestphp/pest-plugin": true,
61+
"phpstan/extension-installer": true
62+
}
63+
},
64+
"extra": {
65+
"laravel": {
66+
"providers": [
67+
"SharpAPI\\ResumeMatchScore\\ResumeMatchScoreProvider"
68+
]
69+
}
70+
},
71+
"minimum-stability": "dev",
72+
"prefer-stable": true
73+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
return [
6+
'api_key' => env('SHARP_API_KEY'),
7+
'base_url' => env('SHARP_API_BASE_URL', 'https://sharpapi.com/api/v1'),
8+
'api_job_status_polling_wait' => env('SHARP_API_JOB_STATUS_POLLING_WAIT', 180),
9+
'api_job_status_polling_interval' => env('SHARP_API_JOB_STATUS_POLLING_INTERVAL', 10),
10+
'api_job_status_use_polling_interval' => env('SHARP_API_JOB_STATUS_USE_POLLING_INTERVAL', false),
11+
];

src/ResumeMatchScoreProvider.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace SharpAPI\ResumeMatchScore;
6+
7+
use Illuminate\Support\ServiceProvider;
8+
9+
class ResumeMatchScoreProvider extends ServiceProvider
10+
{
11+
public function boot()
12+
{
13+
if ($this->app->runningInConsole()) {
14+
$this->publishes([
15+
__DIR__.'/../config/sharpapi-resume-match-score.php' => config_path('sharpapi-resume-match-score.php'),
16+
], 'sharpapi-resume-match-score');
17+
}
18+
}
19+
20+
public function register()
21+
{
22+
$this->mergeConfigFrom(
23+
__DIR__.'/../config/sharpapi-resume-match-score.php', 'sharpapi-resume-match-score'
24+
);
25+
}
26+
}

src/ResumeMatchScoreService.php

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace SharpAPI\ResumeMatchScore;
6+
7+
use GuzzleHttp\Exception\GuzzleException;
8+
use SharpAPI\Core\Client\SharpApiClient;
9+
10+
class ResumeMatchScoreService extends SharpApiClient
11+
{
12+
public function __construct()
13+
{
14+
parent::__construct(config('sharpapi-resume-match-score.api_key'));
15+
$this->setApiBaseUrl(config('sharpapi-resume-match-score.base_url'));
16+
$this->setApiJobStatusPollingInterval((int) config('sharpapi-resume-match-score.api_job_status_polling_interval', 10));
17+
$this->setApiJobStatusPollingWait((int) config('sharpapi-resume-match-score.api_job_status_polling_wait', 180));
18+
$this->setUserAgent('SharpAPILaravelMatchScore/1.0.0');
19+
}
20+
21+
/**
22+
* @api
23+
* @throws GuzzleException
24+
*/
25+
public function matchResumeToJob(
26+
string $cvFilePath,
27+
string $jobDescription,
28+
string $language = 'English'
29+
): string {
30+
$response = $this->makeRequest(
31+
'POST',
32+
'/hr/resume_job_match_score',
33+
[
34+
'language' => $language,
35+
'content' => $jobDescription
36+
],
37+
$cvFilePath
38+
);
39+
40+
return $this->parseStatusUrl($response);
41+
}
42+
}

0 commit comments

Comments
 (0)