Convention-based module loading: ModuleServiceProvider boots the modules enabled in config/modules.php and wires in their routes, migrations, namespaced views, translations, configuration and module service providers
laravel-modular-monolith-starter — Laravel Starter Template
By Sharps-M
Modulith is a Laravel-based modular monolith starter that divides self-contained modules by business domain and enforces layered boundaries, with built-in RBAC, auditing, Docker and CI.
Explore the design
Compare the page layouts and mobile experience. Open any screenshot for a closer look.
Preview provided in the project README.
One original preview is available. Open the full image to inspect the design.
Screenshots show visual appearance; interactive behavior may differ.
What stands out
A quick read of the recorded project description.
Layered modules and boundary enforcement: Domain, Application, Infrastructure and UI layers, with architecture tests that fail the build when Domain imports Infrastructure, UI, HTTP or a facade
RBAC and privilege-escalation protection: permissions are namespaced by module, the super administrator receives all permissions via Gate::before, and only a super administrator can grant that role or edit other super administrators
Hardened authentication and auditing: no public registration, disabled accounts cannot log in, login is rate-limited, password reset does not reveal whether an account exists; role changes and sent emails are recorded
Replaceable branding and themes: the name comes from APP_NAME, the logo from a single Blade partial, and colors from CSS design tokens, with light and dark themes
Docker and CI: Docker Compose provides PHP-FPM, Nginx and MariaDB; GitHub Actions runs Pint, PHPUnit, a Vite build and a Docker image build
Template Details
Modulith is a Laravel starter for a modular monolith. It places each business domain in a separate module, and within each module layers Domain, Application, Infrastructure and UI, with dependencies pointing inward only to Domain. It also provides architecture tests: if a Domain class imports Infrastructure, UI, HTTP or a facade, the build fails. Authentication, role-based access control, auditing and the UI shell are shared by all modules.
Modules are loaded by convention: ModuleServiceProvider boots the modules listed in config/modules.php and wires in their routes, migrations, namespaced views, translations, configuration and the module's own service providers. The repository includes a Gestion module (user and role management) and a Skeleton_referencia reference module. To add a business domain, copy the reference module and enable it in the configuration; no core changes are needed.
Permissions use Spatie Permission, namespaced by module (for example, gestion.usuarios.administrar). The Super Administrador role receives all permissions via Gate::before, and there is a privilege-escalation check: only a super administrator can grant the super administrator role or edit other super administrators. For authentication, there is no public registration, disabled accounts cannot log in, login is rate-limited, and password reset does not reveal whether an account exists. Auditing records role changes (actor, target, before and after values), and sent emails are logged to a separate channel. Branding is replaceable: the name comes from APP_NAME, the logo from a single Blade partial, and colors from CSS design tokens, with light and dark themes.
The project provides Docker Compose (PHP-FPM, Nginx, MariaDB) and a GitHub Actions pipeline that includes Pint, PHPUnit, a Vite build and a Docker image build. The UI and in-depth technical documentation (docs/ directory) are in Spanish, and code identifiers follow the same convention. The repository is MIT licensed; the free scope covers this version of the code, while third-party assets such as demo images, fonts and icons must be checked against their respective licenses, and external services such as domains, hosting and databases may incur separate charges.
Is it right for your project?
Use Cases
- Starting a Laravel project that needs code split by business domain without introducing distributed complexity
- Building a base skeleton with user and role management and audit records for an internal admin platform
- Constraining layered dependencies in a team through architecture tests to prevent infrastructure details from contaminating the Domain layer
- Quickly copying and enabling new business modules using the reference module as a template
Suitable For
- Teams using Laravel that accept a modular monolith architecture
- Projects that need back-office foundations such as RBAC, auditing and hardened authentication
- Developers who want to unify local and deployment environments with Docker Compose
- Projects that can accept a UI and documentation primarily in Spanish
Getting started & customization
Use these recorded setup notes alongside the repository instructions for your chosen version.
- 1
Requires Docker and Docker Compose; after cloning the repository, copy .env.example to .env
- 2
Run docker compose up -d --build, then inside the container run composer install, php artisan key:generate, php artisan migrate --seed
- 3
For the frontend, run npm install and npm run build on the host, then visit http://localhost:8080
- 4
Seed data creates a super administrator using SEED_ADMIN_EMAIL and SEED_ADMIN_PASSWORD from .env; if the password is left empty, a random password is generated and printed only once
- 5
Testing and code style checks: docker compose exec app php artisan test and vendor/bin/pint --test
License & source material
Usage conditions & limitations
Free to use · keep license noticeThis entry covers the free version of the public repository under the MIT license; the free scope covers this version of the code and does not imply that external services or third-party assets are free.
Must comply with when using
- You may use, modify, commercialize and distribute this version of the code for free.
- When distributing copies or substantial portions of the code, retain the original author's copyright notice and the full MIT license notice.
- The code is provided as is; warranties and limitations of liability are governed by the original license and applicable law.
Additional costs & items to verify
- The interface and in-depth technical documentation (docs/ directory) are in Spanish, and code identifiers follow the same convention; teams unfamiliar with Spanish face higher use and maintenance costs.
- Running and deploying require a Docker and Docker Compose environment; it cannot be started directly in a non-container environment.
- The initial super administrator depends on SEED_ADMIN_EMAIL and SEED_ADMIN_PASSWORD in .env; if the password is left empty, it is generated randomly and printed only once, so it must be saved promptly.
- Frontend assets must be built on the host with npm install and npm run build, requiring a Node/npm toolchain.
- Demo images, fonts, icons and other third-party assets must be checked against their respective licenses and cannot be judged solely by the code's MIT license.
- External services such as domains, hosting, databases, payments or AI may incur separate charges.
View Original Text Basis
Permission is hereby granted, free of charge
Original License Text
The UI and the in-depth technical docs ([`docs/`](docs/README.md)) are in > Spanish, the language of the platforms this base was built for. Code > identifiers follow the same convention.
Original README
Requirements: Docker and Docker Compose.
Original README
The seeder creates a super admin using `SEED_ADMIN_EMAIL` / `SEED_ADMIN_PASSWORD` from `.env`; if the password is left empty, a random one is generated and printed once.
Original README
https://github.com/Sharps-M/laravel-modular-monolith-starter/blob/main/LICENSEhttps://github.com/Sharps-M/laravel-modular-monolith-starter/blob/main/README.mdnpm install && npm run build
Original README
Compiled by DeepSeek based on repository license and README ·2026-10-02. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.
Project checks & description sources
Template Information
- Source platforms
- GitHub
- Documentation and maintenance reference score
- Partly documented · 68 / 100
- Technologies
- Laravel
- Website type
- Starter
How this score is calculated
Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.
What to verify for this project
- Repository update recorded
- 2026-10-01
- Screenshot last checked
- 2026-10-02
No demo link is recorded. Use the repository instructions to evaluate the project locally; the screenshot alone cannot establish interactive behavior.
The catalog identifies Laravel as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.
Use a selection guide →How this description was prepared
AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.
Automatically checked against source and license rules; no manual editorial review.
Inspect the recorded source material
SHA-256: c43d8c31247ede698dc27e2eec6e7e091d4b2c7d51d50b952fa85458a0c69c75
2026-10-02T14:38:19.866Z
Source file / repository# Modulith — Laravel Modular Monolith Starter
[](https://github.com/Sharps-M/laravel-modular-monolith-starter/actions/workflows/ci.yml)


[](LICENSE)
**Modulith** is a production-minded **Laravel 12 starter for modular monoliths**: each business
domain lives in its own self-contained module with explicit layers (Domain,
Application, Infrastructure, UI), while authentication, role-based access
control, auditing and the UI shell are shared by every module.
It is the extracted, generic core of internal management platforms I build and
maintain. Add a domain by copying a reference module and enabling it in config:
no changes to the core.

> The UI and the in-depth technical docs ([`docs/`](docs/README.md)) are in
> Spanish, the language of the platforms this base was built for. Code
> identifiers follow the same convention.
---
## Highlights
- **Convention-based module loader.** `ModuleServiceProvider` boots every
module listed in `config/modules.php` and wires its routes, migrations,
namespaced views, translations, config and its own service provider.
- **Layered modules with enforced boundaries.** An architecture test fails the
build if a Domain class imports Infrastructure, UI, HTTP or facades.
- **Repository contracts in the domain, Eloquent in infrastructure**, bound per
module, so controllers never depend on the ORM.
- **RBAC with Spatie Permission.** Permissions are namespaced per module
(`gestion.usuarios.administrar`); a `Super Administrador` role gets full
access through `Gate::before`.
- **Privilege-escalation guards.** Only a super admin can grant the super admin
role or edit another super admin; assignable roles are validated against the
module's catalog.
- **Hardened authentication.** No public sign-up, disabled accounts cannot log
in, login is rate-limited, and password reset never reveals whether an
account exists.
- **Audit trail.** Role changes are stored (who, whom, before/after) and every
outgoing email is logged to a dedicated channel.
- **Replaceable branding.** Name from `APP_NAME`, logo from one Blade partial,
colors from CSS design tokens, with light and dark themes.
- **Dockerized** (PHP 8.3-FPM, Nginx, MariaDB) and **CI on every push**: Pint,
PHPUnit on PHP 8.3/8.4, Vite build and Docker image build.
## Architecture
```
app/ Shared kernel: auth, users, feedback, auditing, mail
modules/
├── Gestion/ Users & roles administration (enabled)
│ ├── Domain/ Repositories (contracts)
│ ├── Infrastructure/ Eloquent repositories, config, service provider
│ ├── UI/ Controllers, form requests, routes, Blade views
│ └── Tests/ Feature tests, auto-discovered by PHPUnit
└── Skeleton_referencia/ Reference module to copy when adding a new domain
```
Dependencies only point inward:
```
UI ──► Application ──► Domain ◄── Infrastructure
```
Enabling a module is one line:
```php
// config/modules.php
'enabled' => [
'Gestion',
'Inventory', // copied from modules/Skeleton_referencia
],
```
The reasoning behind each design choice is recorded in
[`docs/decisiones.md`](docs/decisiones.md).
## Tech stack
| Layer | Technology |
|-------|------------|
| Backend | PHP 8.3, Laravel 12, Spatie Permission 6 |
| Database | MariaDB 11.4 (SQLite in-memory for tests) |
| Frontend | Blade, Bootstrap 5.3, Tailwind 3 (`tw-` prefix), Vite 6 |
| Infrastructure | Docker Compose: PHP-FPM, Nginx 1.27, MariaDB |
| Quality | PHPUnit 11, Laravel Pint, GitHub Actions |
## Getting started
Requirements: Docker and Docker Compose.
```bash
git clone https://github.com/Sharps-M/laravel-modular-monolith-starter.git
cd laravel-modular-monolith-starter
cp .env.example .env
docker compose up -d --build
docker compose exec app composer install
docker compose exec app php artisan key:generate
docker compose exec app php artisan migrate --seed
npm install && npm run build
```
Open <http://localhost:8080>. The seeder creates a super admin using
`SEED_ADMIN_EMAIL` / `SEED_ADMIN_PASSWORD` from `.env`; if the password is left
empty, a random one is generated and printed once.
### Running the tests
```bash
docker compose exec app php artisan test
docker compose exec app vendor/bin/pint --test
```
## Adding a module
1. Copy `modules/Skeleton_referencia/` to `modules/YourModule/` and rename the
namespaces.
2. Add `'YourModule'` to `enabled` in `config/modules.php`.
3. Put routes in `UI/Http/routes.php`, views in `UI/Views/` (available as
`view('your_module::...')`), migrations in
`Infrastructure/Database/Migrations/` and tests in `Tests/`.
4. Declare the module's permissions in `RolesPermisosSeeder` and protect its
routes with `can:`.
Full guide (in Spanish): [`modules/README.md`](modules/README.md) and
[`docs/nuevo-proyecto.md`](docs/nuevo-proyecto.md).
## Screenshots
| Sign in | New user | Dark theme |
|---------|----------|------------|
|  |  |  |
## Documentation
| Document | Contents |
|----------|----------|
| [`docs/decisiones.md`](docs/decisiones.md) | Architecture decision record and AI-assisted development rules |
| [`docs/despliegue.md`](docs/despliegue.md) | Deployment and infrastructure guide |
| [`docs/guidelines/`](docs/guidelines) | Per-subsystem guidelines: base app, users module, visual identity, email |
| [`modules/README.md`](modules/README.md) | How the module system works |
| [`CHANGELOG.md`](CHANGELOG.md) | Release history |
## License
[MIT](LICENSE)
Explore similar templates
Compare previews and descriptions within the same stack and category.

sage
Sage is a WordPress starter theme maintained by Roots, using Laravel Blade components and templates, Vite builds, Tailwind CSS, and built-in block editor support.
Laravel · Starter

wave
Wave is an open-source SaaS starter kit built on Laravel and released under the MIT license.
Laravel · SaaS

filament-starter
A Laravel TALL stack starter template maintained by Log1x, with a preconfigured Filament admin panel and plugins including Curator, Gravatar, Exceptions, Jobs Monitor, Breezy, Peek, and Logger.
Laravel · Starter

electrik
Electrik is a Laravel SaaS starter kit installed as a Composer package, with authentication, teams, Stripe subscription billing, and the Slate 3 interface under the Electrik\ namespace rather than copied into App\.
Laravel · SaaS

php-saas
php-saas is a Laravel-based SaaS starter positioned as an everything-included kit. It generates new projects via a global Composer command and includes authentication with two-factor, API tokens, Stripe and Paddle billing, and project, team, and organization management.
Laravel · SaaS

filament-jetstream
A Laravel starter kit that implements Jetstream-like authentication and account features using Filament's native panels and components. It includes login, registration, two-factor authentication, session management, user profiles, and optional teams and API tokens.
Laravel · Starter
