Skip to content

Development

Use this page when working in the Capell 4.x host repo or wiring Capell into a Laravel app. Product concepts live in How Capell works; package-authoring rules live in Packages.

Local 4.x work normally uses two sibling repos:

capell/
capell-4/
capell-packages-4/

The host repo owns Core, Admin, Frontend, Installer, and Marketplace. Add-on package behavior belongs in ../capell-packages-4 unless the host repo owns the contract or extension point.

Use Composer path repositories for local package development. Keep matching 4.x branches in both repos when a change spans host and add-on packages.

CommandUse
composer prepareRun Testbench package discovery.
composer test:fastRun the sharded fast Pest command while developing.
composer testRun the full Pest test suite.
composer lintRun changed-file Pint formatting.
composer analyzeRun the fast PHPStan configuration.
composer preflightRun fast PHPStan and changed-file formatting.
composer preflight:allRun Composer path checks, Rector, Pint, Prettier, ESLint, PHPStan, and Pest.
composer serveBuild and serve the Testbench workbench.

Start narrow while developing:

Terminal window
vendor/bin/pest packages/admin/tests --configuration=phpunit.xml
vendor/bin/pest packages/frontend/tests/Unit/Security/PublicHtmlSafetyInspectorTest.php --configuration=phpunit.xml

Use the command index for a short grouped reference and artisan commands when you need install option details.

Check the installed app first:

Terminal window
php artisan list capell

Common host commands:

CommandUse
capell:installInstall Capell packages, default data, admin access, and selected optional packages.
capell:upgradeRun host package upgrade flow and migrations.
capell:doctorRun host diagnostic checks.
capell:extension-auditValidate extension contracts and manifests.
capell:package-cache / capell:package-cache:clearWarm or clear package discovery cache.
capell:make, capell:make-action, capell:make-data, capell:make-extender, capell:make-extension, capell:make-schema, capell:make-typeGenerate host/app scaffolding.
capell:admin-install, capell:admin-setup, capell:admin-upgradeAdmin package install/setup/upgrade surfaces.
capell:admin-cache-widgets, capell:admin-clear-widgets-cache, capell:admin-cache-configurators, capell:admin-clear-configurators-cacheWarm or clear Admin registries.
capell:frontend-install, capell:frontend-after-install, capell:frontend-upgradeFrontend package lifecycle commands.

Optional-package commands such as capell:static-site, capell:xml-sitemap, and capell:frontend-tailwind-assets only exist when their package is installed.

NeedRead
Decide host vs package vs app ownershipHost, package, or app code
Pick an install pathInstall matrix
Configure local repo workLocal development
Work with the 4.x monorepo branchMonorepo 4.x branch
Run Capell in containersContainer development
Install or repair admin setupAdmin install setup
Seed content safelySeeding content
Add settings migrationsSettings migrations
Work with public page API outputPublic page API
Diagnose environment or registry stateDiagnostics
Decide where docs belongDocs ownership rules
Avoid unsafe extension/package patternsDo not do this
Capture useful docs screenshotsScreenshot state guide

Host config lives in:

FileCovers
packages/core/config/capell.phpPackage discovery, cache flags, media backend, install tooling, roles, workspace preview/prune, release windows.
packages/admin/config/capell-admin.phpAdmin settings, update notices, cache refresh, security headers, preview containers.
packages/frontend/config/capell-frontend.phpAsset build tool, home route registration, fallback site behavior, model-event registration, debug logging, HTML rendering.
packages/installer/config/capell-installer.phpReinstall guard, Composer/PHP binaries, default install package selection.
packages/marketplace/config/capell-marketplace.phpMarketplace enablement, API/web URLs, identity, webhook URL/secret, catalogue paging.

After changing config in an app:

Terminal window
php artisan optimize:clear

Use Actions and models directly from seeders. Avoid building seeders around admin forms.

  • Create sites with CreateSiteAction.
  • Create pages with CreatePageAction or page factories in tests.
  • Use PageUrl records for language/site-aware URLs.
  • Seed translations explicitly.
  • Use package seeders for optional package data.

For repeatable demos, keep demo content in the package that owns the feature.

Settings migrations go in database/settings/, are registered by install/setup commands, and must be guarded with existence checks. Do not assume a settings table exists during early install or test bootstrap.

Use maker commands for boring scaffolding, then move domain behavior into Actions and structured boundaries into Data objects.

Diagnostics should report state without mutating it. If a diagnostic can fix something, make the repair an explicit Action and call it from a separate command or admin action.