Laravel in layers. Claude Code stays inside them.
A starter kit for AI-assisted modular development. Modular monolith and hexagonal architecture, plus the agents, skills, and rules that keep generated code in the right layer.
- PHP 8.5
- Laravel 13
- React 19
- Inertia.js
- TypeScript
- Tailwind CSS 4
- Vite
- Vitest
- SQLite
- Sail
Start a project
Three commands. Edit the values and copy.
Needs the GitHub CLI and Docker.
Six skills. Every file lands in its layer.
This is the feature workflow for an Order module. Each skill writes the test first, then the code, into the folder its layer owns.
The rule for that folder loads as soon as Claude Code touches it.
/create-module OrderPress play, or pick any step to see what it writes.
Domain
modules/Order/Domain/
Pure PHP. Depends on nothing.
domain-layer.mdmodules/*/Domain/**/*.php
Application
modules/Order/Application/
Commands and queries. Depends on Domain.
application-layer.mdmodules/*/Application/**/*.php
Infrastructure
modules/Order/Infrastructure/
Laravel adapters. Depends on Application and Domain.
infrastructure-layer.mdmodules/*/Infrastructure/**/*.php
Tests
tests/
Unit, Integration, and Feature. Written first.
testing.mdtests/**/*.php
Laravel projects grow into tangled monoliths.
Adding features becomes risky and testing becomes painful. This toolkit pairs structured patterns (modular monolith, hexagonal, DDD) with AI guardrails that enforce consistency and guide architectural decisions.
Who it is for
- Teams that want structure without microservices
- Developers learning DDD and clean architecture with real examples
- Projects that might extract modules into services later
Rules load themselves.
Each rule in .claude/rules/ declares a file glob. When Claude Code works on a matching file, that rule is in context. Three rules have no glob and always apply.
Seven agents for the questions a template can't answer.
Agents live in .claude/agents/. Ask in plain words; each one answers inside this architecture.
Every skill, one line each.
Type a slash command in Claude Code. Reference skills load on their own when you work in the matching area.
Backend scaffolding
Test first, in the right layer
- /create-module <Module>Every layer plus a service provider
- /create-value-object <Module> <Name>Immutable, self-validating value
- /create-entity <Module> <Name>Entity, ID, and exception
- /create-repository <Module> <Entity>Interface, Eloquent, and InMemory
- /create-use-case <Module> <Type> <Name>Command or query DTO and handler
- /create-controller <Module> <Name>Thin controller, request, resource
Frontend scaffolding
React and Inertia, with tests
- /create-page <Module> <Page>Inertia page, test, and factory
- /create-component <Module> <Name>Page subcomponent with exports
- /create-hook <use-name>Custom hook with co-located test
Review
Reports before you merge
- /code-review [path]Quality and architecture compliance
- /refactor-check <path>SOLID violations and refactor options
- /security-review [path]OWASP checks and composer audit
- /ui-review [path]Design consistency and theming
Workflow
From issue to pull request
- /tdd-cycle [test]Guided red-green-refactor
- /test [filter]Run tests with smart filtering
- /fixAuto-fix every quality issue in order
- /gh-issue <number>Fetch an issue and plan it
- /pr [title]Pull request with changelog update
- /update-changelog [change]Record this session's changes
Reference
Loaded when the work matches
- laravel-hexagonalModule structure and where code lives
- react-inertiaFrontend architecture map
- solid-principlesRefactoring and design questions
- tdd-workflowTesting strategy and PHPUnit runs
Every commit runs seven checks first.
composer setup points Git at .githooks/. The pre-commit hook runs these and blocks the commit if one fails.