PHPackages                             shonen/genesis - 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. [API Development](/categories/api)
4. /
5. shonen/genesis

ActiveLibrary[API Development](/categories/api)

shonen/genesis
==============

Basic setup for multitenancy projects using passport and graphql

05PHP

Since Oct 15Pushed 5y ago1 watchersCompare

[ Source](https://github.com/ShonenPMA/genesis)[ Packagist](https://packagist.org/packages/shonen/genesis)[ RSS](/packages/shonen-genesis/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Genesis
=======

[](#genesis)

Basic setup for multitenancy projects using passport and graphql

Dependencies
------------

[](#dependencies)

- laravel/passport : "^9.3"
- laravel/framework: "^7.0",
- laravel/ui: "^2.1",
- mll-lab/laravel-graphql-playground: "^2.3",
- nuwave/lighthouse: "^4.16",
- stancl/tenancy: "^3.1"

Instalation
-----------

[](#instalation)

```
composer require shonen/genesis
```

Quickstart guide
----------------

[](#quickstart-guide)

To publish all files run the command :

```
php artisan genesis:public
```

Then, you have to include the providers in your `config/app.php` file

```
'providers' => [
    ...,
    App\Providers\SchemaLighthouseServiceProvider::class,
    App\Providers\TenancyServiceProvider::class,
]
```

After that, you have to register universal routes for passport in `app/Http/Kernel.php` file

```
protected $middlewareGroups = [
        ...
        ,
        'universal' => [],
    ];
```

Moreover, you have to add your guard in `config/auth.php` file

```
    'guards' => [
        ...
        'api' => [  //central
            'driver' => 'passport',
            'provider' => 'users',
            'hash' => false,
        ],
        'tenant' => [
            'driver' => 'passport',
            'provider' => 'tenantUsers',
        ],
    ],

    'providers' => [
        'users' => [
            'driver' => 'eloquent',
            'model' => App\Models\Central\User::class,
        ],
        'tenantUsers' => [
            'driver' => 'eloquent',
            'model' => App\Models\Tenant\User::class,
        ]
    ],
```

Furthermore, you have to add in `app/Providers/AppServiceProvider` file

```
    use App\Models\Central\Tenant;
    use App\Observers\Central\TenantObserver;
    use Laravel\Passport\Passport;
    use Laravel\Passport\Console\ClientCommand;
    use Laravel\Passport\Console\InstallCommand;
    use Laravel\Passport\Console\KeysCommand;
    ...
    public function register()
    {
        Passport::ignoreMigrations();
        Passport::routes(null, ['middleware' => 'universal']);
    }

    public function boot()
    {
        Tenant::observe(TenantObserver::class);

        $this->commands([
            InstallCommand::class,
            ClientCommand::class,
            KeysCommand::class,
        ]);
    }
```

Finally, you have to change your central domain in `config.tenancy.php` file

```
    'central_domains' => [
        'test', // your central domain here...
    ],
```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/621049?v=4)[shonen](/maintainers/shonen)[@shonen](https://github.com/shonen)

---

Top Contributors

[![ShonenPMA](https://avatars.githubusercontent.com/u/37628033?v=4)](https://github.com/ShonenPMA "ShonenPMA (1 commits)")

### Embed Badge

![Health badge](/badges/shonen-genesis/health.svg)

```
[![Health](https://phpackages.com/badges/shonen-genesis/health.svg)](https://phpackages.com/packages/shonen-genesis)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.5M7](/packages/exsyst-swagger)[lucasdotvin/laravel-soulbscription

A straightforward interface to handle subscriptions and features consumption.

709209.3k](/packages/lucasdotvin-laravel-soulbscription)[pimax/fb-messenger-php

Facebook Messenger Bot PHP API

313188.5k2](/packages/pimax-fb-messenger-php)

PHPackages © 2026

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