PHPackages                             mohaaosman/persona-generator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mohaaosman/persona-generator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mohaaosman/persona-generator
============================

Locale-aware, coherent, seedable persona generator (names, timelines, prose) for candidate seeding.

v0.1.0(1mo ago)0304↓88.9%MITPHPPHP ^8.3CI passing

Since Jun 1Pushed 1mo agoCompare

[ Source](https://github.com/mohaaosman/persona-generator)[ Packagist](https://packagist.org/packages/mohaaosman/persona-generator)[ RSS](/packages/mohaaosman-persona-generator/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (3)Dependencies (12)Versions (5)Used By (0)

PersonaGenerator
================

[](#personagenerator)

A Faker-like generator for **realistic, internally-coherent, seedable** person personas — names, gender, age/dob, education &amp; work timelines, spoken languages, bio and cover letter. Locale-aware (ships with Somali) and Laravel-ready.

The standout feature is **patronymic naming**: a persona's first name comes from a gendered pool, while the middle (father's) and last (grandfather's) names are always drawn from the male pool — the way Somali names actually work — giving an effectively unbounded pool of unique people.

Requirements
------------

[](#requirements)

- PHP `^8.3` (uses `\Random\Randomizer`; the optional `laravel/ai` prose driver requires 8.3+)
- Laravel **11, 12, or 13** (`illuminate/support: ^11 || ^12 || ^13`)
- `nesbot/carbon: ^2.72 || ^3.0`

PSR-4 autoloaded under the `PersonaGenerator\` namespace and PSR-12 formatted, so it drops into any Laravel 11+ app and can be extracted to its own repo / Packagist later without code changes.

Install (local path package)
----------------------------

[](#install-local-path-package)

In the host app's `composer.json`:

```
"repositories": [
    { "type": "path", "url": "packages/persona-generator", "options": { "symlink": true } }
],
"require": { "mohaaosman/persona-generator": "@dev" }
```

```
composer update mohaaosman/persona-generator
php artisan vendor:publish --tag=persona-generator-config   # optional
```

Usage
-----

[](#usage)

```
use PersonaGenerator\PersonaFactory;
use PersonaGenerator\ValueObjects\Gender;

$persona = PersonaFactory::new()->locale('so')->seed(1234)->make();

$persona->full_name;          // "Faadumo Maxamed Cabdullaahi"
$persona->genderCode();       // "F"
$persona->age;                // 31
$persona->education();        // Collection, oldest → newest
$persona->workExperience();   // Collection, exactly one current
$persona->spokenLanguages();  // ["Somali", "Arabic", "English"]
$persona->bio();              // memoised prose
$persona->coverLetter();      // memoised prose

PersonaFactory::new()->seed(1)->makeMany(8); // array
```

Guarantees
----------

[](#guarantees)

- **Coherent** — one birth year drives age, education years, and a first job that starts no earlier than graduation; employment is ordered and non-overlapping.
- **Field-aligned careers** — each field of study maps to a career *family*(engineering, health, finance, ICT, law, education, …), so a persona's job ladder matches what they studied. Most positions are public-sector, with some NGO and private employers mixed in for realism. ~30% of personas show one short career gap.
- **Seedable** — a given seed reproduces the same structured output via an isolated `\Random\Randomizer` (never touches global `mt_srand()`). AI prose is the exception and is non-deterministic. Note: seed output is stable *within* a minor version; v0.1.0 intentionally changed what a given seed produces.
- **Offline by default** — bio/cover letter use sentence templates; enable `laravel/ai` prose with `config('persona-generator.ai.enabled')` (falls back to templates on any failure).

Testing
-------

[](#testing)

The package is self-contained: it ships its own `phpunit.xml` and an Orchestra Testbench harness, so you can develop and test it in isolation.

```
cd packages/persona-generator
composer install
composer test          # or: ./vendor/bin/pest
```

Laravel Boost skill
-------------------

[](#laravel-boost-skill)

The package ships a Boost maintainer skill at `resources/boost/skills/persona-generator/SKILL.md`. When the host app uses Laravel Boost, its SkillComposer auto-discovers this skill and loads the usage directives into the agent's context whenever the prompt mentions `PersonaFactory`, persona seeding, or candidate seeders — no host-side wiring required.

Adding a locale
---------------

[](#adding-a-locale)

Mirror `resources/lang/so/` for your locale and call `PersonaFactory::new()->locale('{locale}')`. Override bundled data by publishing `--tag=persona-generator-data` and pointing `PERSONA_DATA_PATH` at it.

See the host project's `docs/persona-generator.md` for the full reference.

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance93

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~6 days

Total

4

Last Release

34d ago

PHP version history (2 changes)v0.0.1PHP ^8.2

v0.0.2PHP ^8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/21177710?v=4)[Mohamed Osman](/maintainers/mohaaosman)[@mohaaosman](https://github.com/mohaaosman)

---

Top Contributors

[![mohaaosman](https://avatars.githubusercontent.com/u/21177710?v=4)](https://github.com/mohaaosman "mohaaosman (6 commits)")

---

Tags

laravelfakerseedingPersonaSomali

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/mohaaosman-persona-generator/health.svg)

```
[![Health](https://phpackages.com/badges/mohaaosman-persona-generator/health.svg)](https://phpackages.com/packages/mohaaosman-persona-generator)
```

###  Alternatives

[illuminate/database

The Illuminate Database package.

2.8k54.9M12.2k](/packages/illuminate-database)[illuminate/support

The Illuminate Support package.

583113.0M42.8k](/packages/illuminate-support)[illuminate/events

The Illuminate Events package.

13557.0M2.2k](/packages/illuminate-events)[illuminate/session

The Illuminate Session package.

9939.3M861](/packages/illuminate-session)[illuminate/pagination

The Illuminate Pagination package.

10534.1M1.1k](/packages/illuminate-pagination)[illuminate/broadcasting

The Illuminate Broadcasting package.

7127.2M221](/packages/illuminate-broadcasting)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
