{
  "id": "php",
  "name": "PHP",
  "icon": "🐘",
  "runtime": "PHP 8.3+",
  "minVersion": "8.3.0",
  "packageManager": "composer",
  "extensions": [".php", ".blade.php"],
  "testExtensions": ["*Test.php", "*_test.php"],
  "detectFiles": ["composer.json", "artisan", "public/index.php"],
  "commands": {
    "test": "vendor/bin/phpunit",
    "lint": "vendor/bin/phpstan analyse --level=6",
    "format": "vendor/bin/php-cs-fixer fix",
    "serve": "php artisan octane:start --watch",
    "build": "npm run build"
  },
  "qualityGates": [
    { "name": "PHPStan", "command": "vendor/bin/phpstan analyse --level=6", "required": true, "order": 1 },
    { "name": "PHPUnit", "command": "vendor/bin/phpunit", "required": true, "order": 2 },
    { "name": "TypeCheck", "command": "npx tsc --noEmit", "required": true, "order": 3 },
    { "name": "Lint", "command": "npx eslint resources/js/", "required": false, "order": 4 },
    { "name": "ViteManifest", "command": "node scripts/check-vite-manifest.mjs", "required": false, "order": 5 },
    { "name": "Security", "command": "composer audit", "required": false, "order": 6, "description": "Local dependency vulnerability audit (OWASP 2025-A03 supply chain). Non-blocking: needs network. CI security.yml runs the full SAST/secret/SBOM suite." }
  ],
  "frameworks": [
    {
      "id": "laravel-octane",
      "name": "Laravel 12 + Octane (RoadRunner) + Sanctum SPA API",
      "icon": "🚀",
      "detectFiles": ["artisan", "rr.yaml"],
      "default": true,
      "skills": [
        "laravel-patterns",
        "laravel-octane",
        "laravel-api-architecture",
        "api-security",
        "laravel-octane-inertia"
      ]
    },
    {
      "id": "laravel",
      "name": "Laravel 12 (standard) + Sanctum SPA API",
      "icon": "🏗️",
      "detectFiles": ["artisan", "bootstrap/app.php"],
      "skills": [
        "laravel-patterns",
        "laravel-api-architecture",
        "api-security",
        "laravel-octane-inertia"
      ]
    }
  ],
  "databases": [
    { "id": "mysql", "name": "MySQL / MariaDB", "icon": "🐬", "default": true },
    { "id": "postgresql", "name": "PostgreSQL", "icon": "🐘", "skills": ["postgres-patterns"] },
    { "id": "sqlite", "name": "SQLite", "icon": "📁" }
  ],
  "frontendOptions": [
    {
      "id": "react-api",
      "name": "ReactJS 19 + Vite + Axios (Sanctum SPA API)",
      "icon": "⚛️",
      "default": true,
      "frameworks": ["laravel", "laravel-octane"],
      "baseSkillsDir": "react"
    },
    {
      "id": "react-inertia",
      "name": "ReactJS 19 + Inertia.js (LEGACY)",
      "icon": "🪦",
      "frameworks": ["laravel", "laravel-octane"],
      "baseSkillsDir": "react"
    },
    {
      "id": "blade",
      "name": "Blade + TailwindCSS 4",
      "icon": "🖼️",
      "frameworks": ["laravel", "laravel-octane"]
    },
    {
      "id": "livewire",
      "name": "Livewire + Alpine.js",
      "icon": "⚡",
      "frameworks": ["laravel", "laravel-octane"]
    },
    {
      "id": "none",
      "name": "API only — no frontend",
      "icon": "🔌"
    }
  ],
  "deployTargets": [
    { "id": "github", "name": "GitHub (git push)", "icon": "🐙" }
  ],
  "skills": [
    "php-patterns",
    "phpunit-testing",
    "phpstan-analysis",
    "composer-workflow",
    "security-scan-php",
    "api-design",
    "api-security",
    "laravel-api-architecture",
    "openapi-design",
    "docker-patterns",
    "podman-patterns",
    "tool-resilience",
    "dead-code-hygiene",
    "owned-infra-ops",
    "own-subscription-integration",
    "typesafe-jev",
    "security-assessment-ops",
    "email-push-marketing"
  ],
  "requirements": [
    {
      "name": "PHP",
      "command": "php",
      "versionFlag": "-v",
      "minVersion": "8.3.0",
      "installCommand": {
        "macos": "brew install php@8.3",
        "linux": "sudo apt install -y php8.3-cli php8.3-mbstring php8.3-xml php8.3-curl php8.3-zip"
      },
      "versionRegex": "PHP\\s+(\\d+\\.\\d+\\.\\d+)"
    },
    {
      "name": "Composer",
      "command": "composer",
      "versionFlag": "--version",
      "minVersion": "2.0.0",
      "installCommand": {
        "macos": "brew install composer",
        "linux": "curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer"
      },
      "versionRegex": "(\\d+\\.\\d+\\.\\d+)"
    },
    {
      "name": "Node.js",
      "command": "node",
      "versionFlag": "--version",
      "minVersion": "20.0.0",
      "installCommand": {
        "macos": "brew install node",
        "linux": "curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - && sudo apt install -y nodejs"
      },
      "versionRegex": "v?(\\d+\\.\\d+\\.\\d+)"
    }
  ]
}
