{
  "name": "chat-spboucher-ai",
  "description": "Chat SPBoucher AI — interface privée multi-modèles (OpenAI + Anthropic), Next.js 16 + PostgreSQL 17/pgvector",
  "dir": "~/apps/chat-spboucher-ai",
  "port": 8500,
  "runtime": "node",
  "build": "pnpm install --frozen-lockfile && pnpm build && DATABASE_URL=$DATABASE_URL pnpm db:migrate && DATABASE_URL=$DATABASE_URL pnpm registry:refresh",
  "processes": [
    { "name": "chat-spboucher-ai", "script": "node_modules/.bin/next", "args": "start -p 8500", "cwd": "~/apps/chat-spboucher-ai", "env_file": ".env.production", "max_memory_restart": "2G" },
    { "name": "chat-spboucher-ai-registry", "script": "node_modules/.bin/tsx", "args": "scripts/registry-refresh.ts", "cwd": "~/apps/chat-spboucher-ai", "env_file": ".env.production", "cron_restart": "17 5 * * *", "autorestart": false }
  ],
  "health": { "path": "/api/health", "expect": 200 },
  "tunnel": { "domain": "chat.spboucher.ai" },
  "requires": { "node": ">=22", "pnpm": true, "postgresql@17": true, "ram_gb": 4, "disk_gb": 20 },
  "placement": { "prefer": ["M4M64c"], "pin": true, "reason": "Postgres 17 + pgvector installé, nœud sans autre app, 64 Go" },
  "secrets": ["OPENAI_API_KEY", "ANTHROPIC_API_KEY", "TAVILY_API_KEY", "SESSION_SECRET", "DATABASE_URL"],
  "backup": { "script": "scripts/backup.sh", "cron": "45 3 * * *" }
}
