[{"data":1,"prerenderedAt":475},["ShallowReactive",2],{"docs:navigation":3,"docs:page:\u002Fdocs":115},[4],{"title":5,"path":6,"stem":7,"children":8,"icon":10},"Introduction","\u002Fdocs","docs\u002F1.index",[9,11,16,21,38,95,110],{"title":5,"path":6,"stem":7,"icon":10},"i-lucide-house",{"title":12,"path":13,"stem":14,"icon":15},"Quickstart","\u002Fdocs\u002Fquickstart","docs\u002F2.quickstart","i-lucide-rocket",{"title":17,"path":18,"stem":19,"icon":20},"Essentials","\u002Fdocs\u002Fconfiguration","docs\u002F3.configuration","i-lucide-book-open",{"title":22,"path":23,"stem":24,"children":25,"icon":27},"Authentication","\u002Fdocs\u002Fauthentication","docs\u002F4.authentication\u002Findex",[26,28,33],{"title":22,"path":23,"stem":24,"icon":27},"i-lucide-shield-check",{"title":29,"path":30,"stem":31,"icon":32},"Protect User Data","\u002Fdocs\u002Fauthentication\u002Fuser-data","docs\u002F4.authentication\u002F1.user-data","i-lucide-user-lock",{"title":34,"path":35,"stem":36,"icon":37},"Two-Factor Verification","\u002Fdocs\u002Fauthentication\u002Ftwo-factor","docs\u002F4.authentication\u002F2.two-factor","i-lucide-key-round",{"title":39,"path":40,"stem":41,"children":42,"icon":44},"Deployment","\u002Fdocs\u002Fdeployment","docs\u002F5.deployment\u002Findex",[43,45,50,55,60,65,70,75,80,85,90],{"title":39,"path":40,"stem":41,"icon":44},"i-lucide-cloud-upload",{"title":46,"path":47,"stem":48,"icon":49},"Deploy to Cloudflare","\u002Fdocs\u002Fdeployment\u002Fcloudflare","docs\u002F5.deployment\u002F1.cloudflare","i-simple-icons-cloudflare",{"title":51,"path":52,"stem":53,"icon":54},"Platform Support","\u002Fdocs\u002Fdeployment\u002Fsupport","docs\u002F5.deployment\u002F10.support","i-lucide-list-checks",{"title":56,"path":57,"stem":58,"icon":59},"Deploy to Vercel","\u002Fdocs\u002Fdeployment\u002Fvercel","docs\u002F5.deployment\u002F2.vercel","i-simple-icons-vercel",{"title":61,"path":62,"stem":63,"icon":64},"Deploy to Azure","\u002Fdocs\u002Fdeployment\u002Fazure","docs\u002F5.deployment\u002F3.azure","i-simple-icons-microsoftazure",{"title":66,"path":67,"stem":68,"icon":69},"Switch Hosts","\u002Fdocs\u002Fdeployment\u002Fswitch-hosts","docs\u002F5.deployment\u002F4.switch-hosts","i-lucide-arrow-right-left",{"title":71,"path":72,"stem":73,"icon":74},"Database and File Storage","\u002Fdocs\u002Fdeployment\u002Fdata-services","docs\u002F5.deployment\u002F5.data-services","i-lucide-database",{"title":76,"path":77,"stem":78,"icon":79},"Domains and Secrets","\u002Fdocs\u002Fdeployment\u002Fsettings","docs\u002F5.deployment\u002F6.settings","i-lucide-settings",{"title":81,"path":82,"stem":83,"icon":84},"Troubleshoot Deployment","\u002Fdocs\u002Fdeployment\u002Ftroubleshooting","docs\u002F5.deployment\u002F7.troubleshooting","i-lucide-wrench",{"title":86,"path":87,"stem":88,"icon":89},"Deploy Agents","\u002Fdocs\u002Fdeployment\u002Fagents","docs\u002F5.deployment\u002F8.agents","i-lucide-bot",{"title":91,"path":92,"stem":93,"icon":94},"Deploy Automations","\u002Fdocs\u002Fdeployment\u002Fautomations","docs\u002F5.deployment\u002F9.automations","i-lucide-workflow",{"title":96,"path":97,"stem":98,"children":99,"icon":101},"Connect Accounts","\u002Fdocs\u002Fconnect","docs\u002F6.connect\u002Findex",[100,102,106],{"title":96,"path":97,"stem":98,"icon":101},"i-lucide-plug",{"title":103,"path":104,"stem":105,"icon":37},"Connection Credentials","\u002Fdocs\u002Fconnect\u002Fcredentials","docs\u002F6.connect\u002F1.credentials",{"title":107,"path":108,"stem":109,"icon":84},"Connect MCP Servers","\u002Fdocs\u002Fconnect\u002Fmcp","docs\u002F6.connect\u002F2.mcp",{"title":111,"path":112,"stem":113,"icon":114},"Project Reference","\u002Fdocs\u002Freference","docs\u002F7.reference","i-lucide-terminal",{"page":116,"surround":472},{"id":117,"title":5,"body":118,"description":465,"extension":466,"links":467,"meta":468,"navigation":469,"path":6,"seo":470,"stem":7,"__hash__":471},"docs\u002Fdocs\u002F1.index.md",{"type":119,"value":120,"toc":459},"minimark",[121,125,128,133,136,348,359,362,366,369,372,375,379,386,392,396,399,455],[122,123,124],"p",{},"A blog needs more than a page that displays posts. It needs somewhere to store\nthem, validation for new posts, and rules that keep drafts private.",[122,126,127],{},"CloudConfig describes those decisions in one TypeScript file. Your database\nschema, REST API, typed client, and API documentation use that same definition.",[129,130,132],"h2",{"id":131},"keep-your-model-and-api-in-sync","Keep Your Model and API in Sync",[122,134,135],{},"This model lets visitors list published posts:",[137,138,144],"pre",{"className":139,"code":140,"filename":141,"language":142,"meta":143,"style":143},"language-ts shiki shiki-themes github-light github-light github-dark","import { defineBackend, model, t } from '@cloudconfig\u002Fcore'\n\nexport const config = defineBackend({\n  models: {\n    post: model(\n      {\n        title: t.text().required(),\n        published: t.boolean().default(false),\n      },\n      {\n        access: {\n          list: ({ where }) => where('published', 'eq', true),\n        },\n      },\n    ),\n  },\n})\n","cloud.config.ts","ts","",[145,146,147,167,174,197,203,215,221,239,262,268,273,279,319,325,330,336,342],"code",{"__ignoreMap":143},[148,149,152,156,160,163],"span",{"class":150,"line":151},"line",1,[148,153,155],{"class":154},"s8jYJ","import",[148,157,159],{"class":158},"sxrX7"," { defineBackend, model, t } ",[148,161,162],{"class":154},"from",[148,164,166],{"class":165},"sIIMD"," '@cloudconfig\u002Fcore'\n",[148,168,170],{"class":150,"line":169},2,[148,171,173],{"emptyLinePlaceholder":172},true,"\n",[148,175,177,180,183,187,190,194],{"class":150,"line":176},3,[148,178,179],{"class":154},"export",[148,181,182],{"class":154}," const",[148,184,186],{"class":185},"sBjJW"," config",[148,188,189],{"class":154}," =",[148,191,193],{"class":192},"snPdu"," defineBackend",[148,195,196],{"class":158},"({\n",[148,198,200],{"class":150,"line":199},4,[148,201,202],{"class":158},"  models: {\n",[148,204,206,209,212],{"class":150,"line":205},5,[148,207,208],{"class":158},"    post: ",[148,210,211],{"class":192},"model",[148,213,214],{"class":158},"(\n",[148,216,218],{"class":150,"line":217},6,[148,219,220],{"class":158},"      {\n",[148,222,224,227,230,233,236],{"class":150,"line":223},7,[148,225,226],{"class":158},"        title: t.",[148,228,229],{"class":192},"text",[148,231,232],{"class":158},"().",[148,234,235],{"class":192},"required",[148,237,238],{"class":158},"(),\n",[148,240,242,245,248,250,253,256,259],{"class":150,"line":241},8,[148,243,244],{"class":158},"        published: t.",[148,246,247],{"class":192},"boolean",[148,249,232],{"class":158},[148,251,252],{"class":192},"default",[148,254,255],{"class":158},"(",[148,257,258],{"class":185},"false",[148,260,261],{"class":158},"),\n",[148,263,265],{"class":150,"line":264},9,[148,266,267],{"class":158},"      },\n",[148,269,271],{"class":150,"line":270},10,[148,272,220],{"class":158},[148,274,276],{"class":150,"line":275},11,[148,277,278],{"class":158},"        access: {\n",[148,280,282,285,288,292,295,298,301,303,306,309,312,314,317],{"class":150,"line":281},12,[148,283,284],{"class":192},"          list",[148,286,287],{"class":158},": ({ ",[148,289,291],{"class":290},"sP4rz","where",[148,293,294],{"class":158}," }) ",[148,296,297],{"class":154},"=>",[148,299,300],{"class":192}," where",[148,302,255],{"class":158},[148,304,305],{"class":165},"'published'",[148,307,308],{"class":158},", ",[148,310,311],{"class":165},"'eq'",[148,313,308],{"class":158},[148,315,316],{"class":185},"true",[148,318,261],{"class":158},[148,320,322],{"class":150,"line":321},13,[148,323,324],{"class":158},"        },\n",[148,326,328],{"class":150,"line":327},14,[148,329,267],{"class":158},[148,331,333],{"class":150,"line":332},15,[148,334,335],{"class":158},"    ),\n",[148,337,339],{"class":150,"line":338},16,[148,340,341],{"class":158},"  },\n",[148,343,345],{"class":150,"line":344},17,[148,346,347],{"class":158},"})\n",[122,349,350,351,354,355,358],{},"CloudConfig provides a ",[145,352,353],{},"posts"," table and an ",[145,356,357],{},"\u002Fapi\u002Fposts"," endpoint. The endpoint\nreturns published posts; other operations stay denied until you allow them.",[122,360,361],{},"When you add a field, generate and review a SQL migration. The API and client\ntypes pick up the new field from the config.",[129,363,365],{"id":364},"start-locally-then-choose-a-host","Start Locally, Then Choose a Host",[122,367,368],{},"Use CloudConfig inside Nuxt or Next.js, or run it as a standalone API. Local\ndevelopment uses SQLite and needs no cloud account.",[122,370,371],{},"When you are ready to deploy, choose Cloudflare, Vercel, or Azure. Application\nhosting, the production database, and file storage have separate settings, so\nyou can move the app before migrating its data.",[122,373,374],{},"CloudConfig is in beta. Its APIs may change before the first stable release.",[129,376,378],{"id":377},"build-your-first-api","Build Your First API",[122,380,381,382,385],{},"Start with the ",[383,384,12],"a",{"href":13},". In about ten minutes, you will run\na blog API locally and add a field to a post.",[122,387,388,389,391],{},"Already have a project? Read ",[383,390,17],{"href":18}," for models,\naccess rules, and typed requests.",[129,393,395],{"id":394},"install-the-cli","Install the CLI",[122,397,398],{},"The Quickstart runs the CLI without installing it globally. If you prefer a\nglobal command, use Node.js 22.12 or newer and install the beta:",[400,401,403,432],"code-group",{"sync":402},"package-manager",[137,404,409],{"className":405,"code":406,"filename":407,"language":408,"meta":143,"style":143},"language-bash shiki shiki-themes github-light github-light github-dark","npm install -g @cloudconfig\u002Fcore@beta\ncloudconfig --help\n","npm","bash",[145,410,411,424],{"__ignoreMap":143},[148,412,413,415,418,421],{"class":150,"line":151},[148,414,407],{"class":192},[148,416,417],{"class":165}," install",[148,419,420],{"class":185}," -g",[148,422,423],{"class":165}," @cloudconfig\u002Fcore@beta\n",[148,425,426,429],{"class":150,"line":169},[148,427,428],{"class":192},"cloudconfig",[148,430,431],{"class":185}," --help\n",[137,433,436],{"className":405,"code":434,"filename":435,"language":408,"meta":143,"style":143},"pnpm add -g @cloudconfig\u002Fcore@beta\ncloudconfig --help\n","pnpm",[145,437,438,449],{"__ignoreMap":143},[148,439,440,442,445,447],{"class":150,"line":151},[148,441,435],{"class":192},[148,443,444],{"class":165}," add",[148,446,420],{"class":185},[148,448,423],{"class":165},[148,450,451,453],{"class":150,"line":169},[148,452,428],{"class":192},[148,454,431],{"class":185},[456,457,458],"style",{},"html pre.shiki code .s8jYJ, html code.shiki .s8jYJ{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sxrX7, html code.shiki .sxrX7{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sIIMD, html code.shiki .sIIMD{--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sBjJW, html code.shiki .sBjJW{--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .snPdu, html code.shiki .snPdu{--shiki-light:#6F42C1;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sP4rz, html code.shiki .sP4rz{--shiki-light:#E36209;--shiki-default:#E36209;--shiki-dark:#FFAB70}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":143,"searchDepth":169,"depth":169,"links":460},[461,462,463,464],{"id":131,"depth":169,"text":132},{"id":364,"depth":169,"text":365},{"id":377,"depth":169,"text":378},{"id":394,"depth":169,"text":395},"Define your data once. Use the same definition for your database, API, and access rules.","md",null,{},{"icon":10},{"title":5,"description":465},"nD_P65HX-6hSPykxwmaySAtsjZohDPadkab3s-6_Fm0",[467,473],{"title":12,"path":13,"stem":14,"description":474,"icon":15},"Run a blog API locally, then add a field to its database and API.",1792122402513]