Skip to content

Development

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

Who’s this for? Contributors working inside this monorepo. Local setup, commands, and tests — not needed to install or use Capell (start here).

Local 1.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.

When more than one person or agent session works in this repo at once, use a git worktree and set it up with bash scripts/init-worktree.sh — a fresh worktree has no vendor/, and symlinking one by hand silently makes tests run against the primary checkout.

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

Full suites and preflights join the host release verification gate. The guide explains waiting, release-child ownership and the focused single-file exception.

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 the standard static, contract, formatting, analysis, and test gates.
composer preflight:allRun Composer path and contract checks, doc guards, Rector, Pint, Prettier, ESLint, PHPStan, security audit, 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:lintLint package manifests, versions, assets, and shared extension contracts.
capell:extensions:repair-composer-driftRepair Composer-actionable extension drift outside dashboard requests.
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:theme, capell:make-schema, capell:make-blueprintGenerate host/app/package 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
Apply repository coding conventionsCoding standards
Make queued work survive failuresQueued work reliability
Decide host vs package vs app ownershipHost, package, or app code
Pick an install pathInstall matrix
Configure local repo workLocal development
Work with the 1.x monorepo branchMonorepo 1.x branch
Run Capell in containersContainer development
Install or repair admin setupAdmin install setup
Seed content safelySeeding content
Understand page revisions and rollbackPage event history
Add settings migrationsSettings migrations
Work with public page API outputPublic page API
Understand CI and Pest shardsCI and test shards
Measure Blade view test coverageBlade view coverage
Look up config keys and env varsConfiguration reference
Create package authoring surfacesPackage authoring
Follow package provider conventionsPackage provider conventions
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 write the real work by hand.

  • Reach for capell:make-* to stamp out the file and wiring.
  • Write domain behavior as explicit Actions, and structured boundaries as 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.