{
  "id": "nodejs",
  "name": "Node.js / TypeScript",
  "icon": "📦",
  "runtime": "Bun / Node.js 20+",
  "minVersion": "20.0.0",
  "packageManager": "bun|npm|pnpm",
  "extensions": [".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs"],
  "testExtensions": ["*.test.ts", "*.spec.ts", "*.test.tsx"],
  "detectFiles": ["package.json", "tsconfig.json", "bun.lockb", "bun.lock", "next.config.js"],
  "commands": {
    "test": "bun run test",
    "lint": "bun run lint",
    "format": "bun run format",
    "serve": "bun run dev",
    "build": "bun run build",
    "typecheck": "bun run typecheck"
  },
  "qualityGates": [
    { "name": "TypeCheck", "command": "bun run typecheck", "required": true, "order": 1 },
    { "name": "Lint", "command": "bun run lint", "required": true, "order": 2 },
    { "name": "Tests", "command": "bun run test", "required": true, "order": 3 },
    { "name": "RouteSlugs", "command": "node scripts/check-route-slugs.mjs", "required": true, "order": 4, "appliesTo": ["nextjs"], "description": "Static Next.js dynamic-route slug consistency check. `next build` does not catch this class of bug." },
    { "name": "BuildScripts", "command": "node scripts/check-build-scripts.mjs", "required": true, "order": 5, "description": "Static check that scripts.build/prebuild/postinstall do not call dev-only binaries (tsx, ts-node, vitest, eslint, ...) — Vercel/Docker strip devDeps and the build crashes with exit 127." },
    { "name": "Build", "command": "bun run build", "required": true, "order": 6 },
    { "name": "Security", "command": "bun audit --audit-level=high", "required": false, "order": 7, "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": "nextjs",
      "name": "Next.js (App Router)",
      "icon": "▲",
      "detectFiles": ["next.config.js", "next.config.ts", "next.config.mjs"],
      "default": true,
      "skills": ["nextjs-app-router"]
    },
    {
      "id": "nuxt",
      "name": "Nuxt",
      "icon": "💚",
      "detectFiles": ["nuxt.config.ts"],
      "skills": []
    },
    {
      "id": "astro",
      "name": "Astro",
      "icon": "🚀",
      "detectFiles": ["astro.config.mjs"],
      "skills": []
    },
    {
      "id": "express",
      "name": "Express",
      "icon": "⚡",
      "skills": ["trpc-api"]
    },
    {
      "id": "fastify",
      "name": "Fastify",
      "icon": "🏎️",
      "skills": ["fastify-api", "openapi-design", "trpc-api"]
    },
    {
      "id": "vanilla",
      "name": "Vanilla Node.js",
      "icon": "📄",
      "skills": []
    }
  ],
  "databases": [
    { "id": "mongodb", "name": "MongoDB", "icon": "🍃", "skills": ["mongoose-patterns"] },
    { "id": "postgresql", "name": "PostgreSQL", "icon": "🐘", "skills": ["postgres-patterns"] },
    { "id": "mysql", "name": "MySQL / MariaDB", "icon": "🐬", "default": true },
    { "id": "sqlite", "name": "SQLite (Turso / libSQL)", "icon": "📁" },
    { "id": "redis", "name": "Redis (Upstash)", "icon": "🔴" },
    { "id": "none", "name": "None", "icon": "❌" }
  ],
  "frontendOptions": [
    {
      "id": "react-tailwind",
      "name": "React 19+ / TailwindCSS 4+",
      "icon": "⚛️",
      "skillsDir": "react",
      "default": true,
      "frameworks": ["nextjs", "express", "fastify", "vanilla"],
      "skills": ["react-server-components"]
    },
    {
      "id": "vue",
      "name": "Vue.js / Nuxt",
      "icon": "💚",
      "frameworks": ["nuxt"]
    },
    {
      "id": "svelte",
      "name": "Svelte / SvelteKit",
      "icon": "🔥",
      "frameworks": ["astro", "vanilla"]
    },
    {
      "id": "none",
      "name": "API only — no frontend",
      "icon": "❌"
    }
  ],
  "deployTargets": [
    { "id": "github", "name": "GitHub (git push)", "icon": "🐙" }
  ],
  "skills": [
    "typescript-strict",
    "bun-runtime",
    "zod-validation",
    "api-security-node",
    "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": "Node.js",
      "command": "node",
      "versionFlag": "--version",
      "minVersion": "20.0.0",
      "installCommand": {
        "macos": "brew install node",
        "linux": "curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - && sudo apt install -y nodejs"
      },
      "versionRegex": "v?(\\d+\\.\\d+\\.\\d+)"
    }
  ]
}
