PHPackages                             inmanturbo/enterprise - 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. [Framework](/categories/framework)
4. /
5. inmanturbo/enterprise

ActiveProject[Framework](/categories/framework)

inmanturbo/enterprise
=====================

Enterprise Starter Kit for laravel.

11PHPCI passing

Since Feb 19Pushed 2mo agoCompare

[ Source](https://github.com/inmanturbo/enterprise)[ Packagist](https://packagist.org/packages/inmanturbo/enterprise)[ RSS](/packages/inmanturbo-enterprise/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Enterprise
==========

[](#enterprise)

### `inmanturbo/enterprise`

[](#inmanturboenterprise)

An enterprise-grade Laravel starter kit with event sourcing and organization-based multi-tenancy.

Installation
------------

[](#installation)

### Laravel Herd

[](#laravel-herd)

[ ![Install with Herd](https://camo.githubusercontent.com/c62cb221d136c92117fbfd4398c9f0f038d7bc205d84db3ce1b19d46b5045009/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f496e7374616c6c25323077697468253230486572642d6666663f6c6f676f3d6c61726176656c266c6f676f436f6c6f723d663533303033)](https://herd.laravel.com/new?starter-kit=inmanturbo/enterprise)### Laravel Installer

[](#laravel-installer)

```
laravel new enterprise --using=inmanturbo/enterprise
```

### Post-Install

[](#post-install)

```
php artisan migrate --database=landlord --path=database/migrations/landlord
php artisan db:seed
composer run dev
```

Default Accounts
----------------

[](#default-accounts)

After seeding, these accounts are available:

EmailPasswordRolepasswordSite AdminpasswordMemberpasswordMemberAll users belong to the default organization **Acme Corp** (domain: `enterprise.test`).

What's Included
---------------

[](#whats-included)

- **Event-sourced writes** via aggregate roots (User, Organization)
- **Organization-based multi-tenancy** with per-org tenant databases
- **Auto-provisioning** of tenant databases on organization creation
- **Fortify authentication** — login, registration, password reset, email verification, two-factor authentication
- **Admin panel** for managing organizations and users
- **Organization management** — member management, role assignment, settings
- **Tenant-scoped media library** infrastructure (ready for your domain models)
- **Registration modes** — open (public) or invite-only
- **Dark mode**, responsive design, organization switcher

Architecture
------------

[](#architecture)

### Event Sourcing

[](#event-sourcing)

All writes flow through aggregate roots. Aggregates validate business rules, record domain events, and persist them to an event store. Projectors listen to those events and update read models (Eloquent tables). There is no command bus — aggregates are called directly from controllers and Livewire components.

**Aggregates:** `UserAggregate`, `OrganizationAggregate`

**Projectors:** `UserProjector`, `OrganizationProjector`, `OrganizationUserProjector`, `TenantDatabaseProjector`

**Events:** 19 domain events in `app/StoredEvents/Landlord/` covering user lifecycle, organization management, role assignment, and tenant database provisioning.

### Dual Event Stores

[](#dual-event-stores)

- **Landlord** — stores all platform-level events (users, organizations, tenant provisioning)
- **Tenant** — each tenant database includes its own `stored_events` and `snapshots` tables for tenant-scoped event sourcing

### Multi-Tenancy

[](#multi-tenancy)

The platform uses a landlord/tenant database split powered by Spatie Laravel Multitenancy:

- **Landlord database** — users, organizations, organization memberships, tenant database records, platform event store
- **Tenant databases** — one per organization, auto-provisioned on creation, containing tenant-scoped data (event store, snapshots, media)

Tenant resolution is two-phase:

1. **Domain-based** — `TenantFinder` matches the request hostname against organization domains
2. **User-based** — when no domain match, the authenticated user's `current_organization_id` determines the active tenant

Registration Modes
------------------

[](#registration-modes)

Configured via the `ENTERPRISE_REGISTRATION_MODE` environment variable in `config/enterprise.php`:

ModeBehavior`open` (default)Public registration enabled. Each new user gets an auto-created organization and tenant database.`invite`Registration disabled. Site admins create users and assign them to organizations.Roles &amp; Permissions
-----------------------

[](#roles--permissions)

Authorization is enforced across four tiers:

RoleScopeCapabilities**Site Admin**Platform-wideFull access to admin panel. Manage all organizations and users. Can act as org owner in any organization.**Org Owner**Single organizationEdit org settings, manage members (invite, change roles, activate/deactivate, remove). Cannot be removed from the organization.**Org Admin**Single organization`admin` role on the pivot. Currently equivalent to member (reserved for future granular permissions).**Org Member**Single organization`member` role on the pivot. Access to the organization's tenant-scoped features.Site admin status is stored on the `users.is_admin` column. Org roles (`admin`, `member`) are stored on the `organization_user` pivot via the `Role` enum.

Admin Panel
-----------

[](#admin-panel)

Available at `/admin/` (requires site admin):

- **Organizations** (`/admin/organizations`) — list, create, edit organizations. Search by name/domain. Activate/deactivate organizations.
- **Users** (`/admin/users`) — list, create, edit users. Search by name/email. Filter by organization. Activate/deactivate users. Set admin status.

Organization Management
-----------------------

[](#organization-management)

Available to org owners and site admins:

- **Settings** (`/organization/settings`) — edit organization name
- **Members** (`/organization/members`) — search members, change roles, activate/deactivate, remove members, invite new members
- **Org Switcher** — sidebar dropdown to switch between organizations the user belongs to

Media Library
-------------

[](#media-library)

Tenant-scoped file storage infrastructure powered by Spatie Media Library:

- **Private originals** — stored at `storage/app/private/tenants/{id}/media`
- **Public conversions** — stored at `storage/app/public/tenants/{id}/media`
- **Authenticated file serving** — private media served via `GET /media/{media}` (requires auth + active tenant)
- **Infrastructure-only** — no models implement `HasMedia` yet. The media table, disk configuration, and serving route are in place, ready for your domain models.

Database Architecture
---------------------

[](#database-architecture)

### Landlord Tables

[](#landlord-tables)

`users`, `organizations`, `organization_user`, `tenant_databases`, `stored_events`, `snapshots`, `cache`, `jobs`, `job_batches`, `failed_jobs`, `sessions`, `password_reset_tokens`

### Tenant Tables

[](#tenant-tables)

`stored_events`, `snapshots`, `media`

### Migration Paths

[](#migration-paths)

- **Landlord:** `database/migrations/landlord/`
- **Tenant:** `database/migrations/`

Tenant databases support mixed drivers — each organization's tenant database can use `sqlite`, `mysql`, `mariadb`, or `pgsql` independently.

Deployment
----------

[](#deployment)

```
php artisan deploy
```

This runs landlord migrations followed by tenant migrations across all organizations.

Development
-----------

[](#development)

```
composer run dev     # Runs server, queue listener, log tail (Pail), and Vite concurrently
composer run lint    # Laravel Pint code formatting
composer run test    # Pest test suite
```

Testing
-------

[](#testing)

Tests use **Pest 4** with SQLite for both landlord and tenant database connections (configured in `phpunit.xml`). Landlord migrations are loaded automatically via `AppServiceProvider`.

```
php artisan test --compact
php artisan test --compact --filter=testName
```

Tech Stack
----------

[](#tech-stack)

- [Laravel 12](https://laravel.com)
- [Livewire 4](https://livewire.laravel.com)
- [Flux UI](https://fluxui.dev)
- [Tailwind CSS 4](https://tailwindcss.com)
- [Laravel Fortify](https://laravel.com/docs/fortify)
- [Spatie Event Sourcing](https://spatie.be/docs/laravel-event-sourcing)
- [Spatie Multitenancy](https://spatie.be/docs/laravel-multitenancy)
- [Spatie Media Library](https://spatie.be/docs/laravel-medialibrary)
- [Pest](https://pestphp.com)

License
-------

[](#license)

The MIT License (MIT). See [LICENSE](LICENSE) for details.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance56

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity12

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://www.gravatar.com/avatar/0261babef618b8fb3bfcea84376ed5e71e7169586eb8de63a6550c2e7ea653a6?d=identicon)[inmanturbo](/maintainers/inmanturbo)

---

Top Contributors

[![inmanturbo](https://avatars.githubusercontent.com/u/47095624?v=4)](https://github.com/inmanturbo "inmanturbo (23 commits)")

### Embed Badge

![Health badge](/badges/inmanturbo-enterprise/health.svg)

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

###  Alternatives

[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M532](/packages/laravel-passport)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

712181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)[laravel/pail

Easily delve into your Laravel application's log files directly from the command line.

91545.3M590](/packages/laravel-pail)

PHPackages © 2026

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