Local Development
Projects built on Core are standard Laravel applications. The recommended way to start your local environment is composer dev, which uses concurrently to run all required processes in one terminal:
This starts:
- PHP dev server —
php artisan serve
- Queue worker —
php artisan queue:listen --tries=1
- Log viewer —
php artisan pail --timeout=0
- Vite dev server —
pnpm dev with HMR
If you prefer Laravel Herd, it serves your project automatically at https://[project-name].test. In that case run pnpm run dev separately for the Vite dev server, and start a queue worker if your application uses queues.
Linking Core Locally
When developing Core itself alongside a client project, use the symlink command to point the project at your local Core checkout instead of the Composer-installed version:
This replaces vendor/inly/core with a symlink to your local Core directory. Changes to Core files take effect immediately without requiring a Composer update.
Pre-Commit Hooks
Pre-commit hooks are managed by Husky and run automatically on every commit. They are installed as part of pnpm install.
What Runs on Commit
- lint-staged — runs ESLint and Prettier on staged TypeScript/React files
- commitlint — validates your commit message format
- Laravel Pint — formats staged PHP files
All commits must follow Conventional Commits:
Allowed types: build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test
feat(tables): add sorting support for PropertyColumn
fix: resolve pagination bug in CoreTable
docs: update authentication guide
Lines in the commit body must not exceed 100 characters. Commits that don’t match the format are rejected by the hook.
Running Hooks Manually
lint-staged only processes staged files. Stage your changes with git add before running manually.
Useful Commands
| Command | Purpose |
|---|
composer dev | Start PHP server, queue worker, logs, and Vite HMR |
pnpm run dev | Start Vite dev server with HMR only |
pnpm run build | Build production assets |
composer generate-ts | Regenerate TypeScript types from PHP DTOs and enums |
php artisan permissions:generate | Sync permissions and roles to the database |
php artisan core:symlink | Symlink local Core for development |
vendor/bin/pint --dirty | Format changed PHP files |
composer test | Run the full test suite |
composer localize | Extract translatable strings |
TypeScript Generation
Core uses spatie/laravel-typescript-transformer to generate TypeScript interfaces from PHP DTOs and enums. Run this whenever you add or modify a DTO or enum:
Generated types appear in resources/js/types/generated.d.ts and are available globally as App.Data.* and App.Enums.*.
Add composer generate-ts to your workflow after any PHP model or DTO change. Stale types cause TypeScript errors that can be hard to trace.