{
  "schemaVersion": 1,
  "product": "Cake20",
  "compatibility": {
    "view": "0.1.5",
    "runtime": "0.7.101",
    "cli": "0.7.146",
    "patchArtifactCompatibility": "required",
    "minorUpgradeRebuild": "recommended"
  },
  "entry": {
    "project": "package.json",
    "requirements": "README.md",
    "public": "public"
  },
  "roots": {
    "app": [
      "assets",
      "components",
      "composables",
      "middleware",
      "layouts",
      "lib",
      "pages",
      "preview",
      "stores",
      "types",
      "utils"
    ],
    "server": [
      "api",
      "db",
      "hooks",
      "routes",
      "tasks",
      "types",
      "utils"
    ],
    "shared": ["types", "utils"]
  },
  "files": {
    "page": "app/pages/**/*.tsx",
    "layout": "app/layouts/**/*.tsx",
    "component": "app/components/**/*.tsx",
    "store": "app/stores/**/*.store.ts",
    "clientHook": "app/middleware/**/*.hook.ts",
    "api": "server/api/**/*.<method>.ts",
    "route": "server/routes/**/*.<method>.ts",
    "httpHook": "server/hooks/**/*.hook.ts",
    "previewData": "app/preview/<Model>.json",
    "model": "server/db/**/*.db.ts",
    "sql": "server/db/**/*.sql.ts",
    "task": "server/tasks/**/*.task.ts",
    "job": "server/tasks/**/*.job.ts",
    "websocket": "server/routes/**/*.ws.ts",
    "sse": "server/routes/**/*.sse.ts"
  },
  "globals": {
    "runtime": [
      "$fetch",
      "api",
      "admin",
      "app",
      "auth",
      "db",
      "defineApi",
      "defineApp",
      "defineHook",
      "defineMiddleware",
      "defineTask",
      "excel",
      "fetchGet",
      "fetchPost",
      "form",
      "gmail",
      "job",
      "mail",
      "now",
      "payment",
      "project",
      "startOfToday",
      "storage",
      "telegram",
      "textDate",
      "toDate",
      "z",
      "zip"
    ],
    "exactTypes": "installed @cake20/runtime declarations"
  },
  "imports": {
    "appAlias": "~/ resolves from app in frontend source",
    "serverAlias": "~/ resolves from server in backend source",
    "sharedAutoImports": ["shared/types", "shared/utils"],
    "forbidCrossRuntime": true
  },
  "view": {
    "defaultSource": "Cake20 View TSX",
    "compatibilitySource": "Existing .vue files remain supported",
    "componentExport": "export default () => JSX",
    "styleAttribute": "class",
    "reactiveState": "export const data = { ... }",
    "computedState": "export const computed = { ... }",
    "watchPath": "Use underscore-separated keys such as profile_name",
    "lifecycle": ["onStart", "onClose"],
    "browserFetch": "api(path, options)",
    "componentAutoImport": "app/components/**/*.tsx",
    "clientSuffix": "browser-only environment marker excluded from component name",
    "numericRepeat": "Array.from({ length: count }).map(...) when count is numeric",
    "namedBind": "bindName maps to name plus onNameChange or onUpdate:name",
    "eventRule": "pass the function or invoke it; never reference it without a call",
    "globals": [
      "behavior",
      "capture",
      "cell",
      "component",
      "element",
      "elements",
      "lazy",
      "nextView",
      "node",
      "onClose",
      "onScopeClose",
      "onStart",
      "once",
      "passive",
      "plain",
      "readonly",
      "scope",
      "shallow",
      "shared",
      "state",
      "viewId"
    ]
  },
  "forbidden": {
    "directories": ["app/plugins", "app/modules"],
    "websiteDependencies": [
      "@cake20/runtime",
      "@cake20/cli",
      "@cake20/view",
      "@cake20/fullstack",
      "tailwindcss",
      "h3",
      "prisma",
      "@prisma/client"
    ],
    "actions": [
      "edit generated build output",
      "edit system-managed package fields",
      "implement custom auth tokens",
      "expose Secrets to browser code",
      "persist data in release output",
      "execute system commands in production website code"
    ]
  },
  "data": {
    "modes": ["auto", "local", "server"],
    "autoLocalTarget": "local",
    "autoCake20CoreTarget": "server",
    "codeDataScope": "shared by design preview, debug review, and release",
    "legacyTestTarget": "alias of the shared website database and Redis namespace",
    "modelSeed": "export const seed = async () => {} at the bottom of each server/db/*.db.ts; return deterministic rows without calling db, include an id or unique field, and Cake20 validates then upserts changed seed files while regenerating Preview data",
    "globalSeed": "optional server/db/seed.sql.ts may call db and runs last; keep it idempotent because checksum changes run it again",
    "passwordField": "declare z.password().hashFrom(\"<name>Text\"), write plaintext through that explicit input, and verify with auth.password.verify()",
    "persistentFiles": "files",
    "temporaryFiles": "tmp"
  },
  "authorization": {
    "productionDeploy": "explicit user request required",
    "sharedDataWrite": "limited to the targets and scope in the current user request",
    "destructiveWork": "the current request must explicitly include the exact destructive operation",
    "routineSourceWork": "the coding request authorizes required source edits, commit, and review without another approval prompt"
  },
  "concurrency": {
    "workState": "begin_work records status but does not lock the editor",
    "textAndBinaryWrites": "latest complete content wins",
    "requiredPractice": "read the current file immediately before writing and preserve unrelated changes"
  },
  "precedence": [
    "user instruction",
    "current MCP schema and website state",
    "website README.md and source",
    "installed Runtime declarations",
    "ai.cake20.com context",
    "generic framework knowledge"
  ]
}
