Skip to main content

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:
composer dev
This starts:
  • PHP dev serverphp artisan serve
  • Queue workerphp artisan queue:listen --tries=1
  • Log viewerphp artisan pail --timeout=0
  • Vite dev serverpnpm 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:
php artisan core:symlink
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

Commit Message Format

All commits must follow Conventional Commits:
type(scope): description
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

./.husky/pre-commit
lint-staged only processes staged files. Stage your changes with git add before running manually.

Useful Commands

CommandPurpose
composer devStart PHP server, queue worker, logs, and Vite HMR
pnpm run devStart Vite dev server with HMR only
pnpm run buildBuild production assets
composer generate-tsRegenerate TypeScript types from PHP DTOs and enums
php artisan permissions:generateSync permissions and roles to the database
php artisan core:symlinkSymlink local Core for development
vendor/bin/pint --dirtyFormat changed PHP files
composer testRun the full test suite
composer localizeExtract 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:
composer generate-ts
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.