TenantAtlas/specs/182-platform-relocation/contracts/local-command-model.md
2026-04-08 09:33:16 +02:00

1.8 KiB

Local Command Model Contract

Canonical Working Directory

  • The canonical working directory for the platform app is apps/platform.

Canonical Commands

Purpose Canonical Command
Install PHP dependencies cd apps/platform && composer install
Start local stack cd apps/platform && ./vendor/bin/sail up -d
Stop local stack cd apps/platform && ./vendor/bin/sail stop
Run artisan cd apps/platform && ./vendor/bin/sail artisan <command>
Build assets cd apps/platform && ./vendor/bin/sail npm run build
Run tests cd apps/platform && ./vendor/bin/sail artisan test --compact
Run formatter cd apps/platform && ./vendor/bin/sail bin pint --dirty --format agent

Delegation Rules

  • Root-level wrappers, tasks, MCP configs, or aliases are compatibility helpers only.
  • Any root-level helper must do nothing except delegate transparently to apps/platform.
  • Documentation must not present root-level delegation as a second primary workflow.

Environment Contract

  • apps/platform/.env is the canonical Laravel environment file.
  • apps/platform/.env.example is the canonical application example env file.
  • If app-local Sail needs to target the repo-root compose file, the bridge must be configured explicitly, for example via SAIL_FILES.
  • Any root-level env file must be compose-only and must not duplicate canonical app config truth.

Compose Contract

  • The authoritative compose file remains docker-compose.yml at repo root.
  • Web and queue services must mount ./apps/platform into /var/www/html.
  • Queue commands must execute against the relocated app root.

Deployment Contract

  • Application deploy commands run from apps/platform.
  • Existing Filament asset deployment remains required and is executed as php artisan filament:assets from apps/platform.