Sycorax is a modular Laravel 12 scaffold application built with Filament v4 for admin panels, Livewire v3, Pest v4 for testing, and Tailwind CSS v4.
It follows a modular monolith architecture for better organization, scalability, and maintainability.
Core code lives in app/ (standard Laravel), while business domains and UIs are separated into self-contained
modules under app-modules/.
app-modules/{module-name}/
├── src/ # Core PHP classes
│ ├── Models/ # Eloquent models
│ ├── Policies/ # Authorization policies
│ ├── Resources/ # Filament resources (panels only)
│ ├── Schemas/ # Form/Table schemas
│ ├── Tables/ # Table definitions
│ └── {Module}ServiceProvider.php # Module bootstrap
├── tests/
│ └── Feature/ # Pest feature/unit tests
├── database/
│ ├── factories/ # Model factories
│ └── migrations/ # Module migrations (if any)
└── config/ # Module-specific config (e.g., rbac.php)
Handle business logic:
users: User management, models, policies, factories.permissions: RBAC (Roles/Permissions via Spatie), policies.panel-admin: Admin panel with User/Role resources.
Modules prefixed with
panel-are for Filament-based UIs
- Namespaces:
He4rt\{PascalCasedModule}(e.g.,He4rt\Admin). - Service Providers: One per module for auto-registration.
- Policies: Attached via
#[UsePolicy(...)]attributes on models. - Testing: Pest v4 feature tests per module; use factories; assertions like
assertSuccessful(),livewire(). - Filament v4: Use schemas,
relationship(), Heroicons; tests withlivewire(Class::class). - PHP: Strict types, constructor promotion, explicit types/returns.
- Formatting: Laravel Pint v1.
- Analysis: PHPStan (Larastan v3), Rector v2.
- Reuse existing components; descriptive names (e.g.,
isRegisteredForDiscounts).
Development workflow powered by Makefile. Run make help for all commands.
| Command | Alias | Description |
|---|---|---|
make test |
t |
Run all Pest tests (--parallel --compact) |
make test-feature |
Feature tests only | |
make pint |
Run Pint formatter | |
make phpstan |
p |
PHPStan analysis |
make check |
c |
Dry-run: Rector/Pint/PHPStan |
make format |
f |
Rector + Pint fixes |
make route-list |
rl |
List routes (--except-vendor) |
make migrate-fresh |
Reset & seed DB | |
make env-up |
Docker Compose up | |
make env-down |
Docker down (clean) | |
make dev |
composer run dev (Vite) |
|
make setup |
Full project setup |
make setup # Install deps, etc.
make env-up # Start Docker (DB, etc.)
make migrate-fresh # DB setup
make dev # Frontend build/watchAccess admin panel (SuperAdmin required): /admin (create via tinker or seed).
- Docker:
docker-compose.ymlfor dev env. - Vite: Tailwind v4 CSS-first config.
- RBAC: Spatie Permission; sync via
php artisan sync:permissions. - Docs: Use Laravel/Filament v4 guides.
For contributions, follow Laravel standards.