[{"data":1,"prerenderedAt":441},["ShallowReactive",2],{"docs:navigation":3,"docs:page:\u002Fdocs\u002Fquickstart":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":436},{"id":117,"title":12,"body":118,"description":429,"extension":430,"links":431,"meta":432,"navigation":433,"path":13,"seo":434,"stem":14,"__hash__":435},"docs\u002Fdocs\u002F2.quickstart.md",{"type":119,"value":120,"toc":422},"minimark",[121,125,130,133,229,244,251,255,258,277,284,288,291,303,326,329,332,336,348,370,373,389,402,406,412,418],[122,123,124],"p",{},"This guide takes about ten minutes. You need Node.js 22.12 or newer and pnpm 10\nor newer. You do not need a cloud account.",[126,127,129],"h2",{"id":128},"_1-create-a-project","1. Create a Project",[122,131,132],{},"Run these commands from the directory where you keep your projects. Choose\nStandalone for an API server, or Nuxt for an application with pages and an API:",[134,135,137,194],"code-group",{"sync":136},"framework",[138,139,145],"pre",{"className":140,"code":141,"filename":142,"language":143,"meta":144,"style":144},"language-bash shiki shiki-themes github-light github-light github-dark","pnpm dlx @cloudconfig\u002Fcore@beta init blog-api --target standalone\ncd blog-api\npnpm install\n","Standalone","bash","",[146,147,148,177,186],"code",{"__ignoreMap":144},[149,150,153,157,161,164,167,170,174],"span",{"class":151,"line":152},"line",1,[149,154,156],{"class":155},"snPdu","pnpm",[149,158,160],{"class":159},"sIIMD"," dlx",[149,162,163],{"class":159}," @cloudconfig\u002Fcore@beta",[149,165,166],{"class":159}," init",[149,168,169],{"class":159}," blog-api",[149,171,173],{"class":172},"sBjJW"," --target",[149,175,176],{"class":159}," standalone\n",[149,178,180,183],{"class":151,"line":179},2,[149,181,182],{"class":172},"cd",[149,184,185],{"class":159}," blog-api\n",[149,187,189,191],{"class":151,"line":188},3,[149,190,156],{"class":155},[149,192,193],{"class":159}," install\n",[138,195,198],{"className":140,"code":196,"filename":197,"language":143,"meta":144,"style":144},"pnpm dlx @cloudconfig\u002Fcore@beta init blog-api --target nuxt\ncd blog-api\npnpm install\n","Nuxt",[146,199,200,217,223],{"__ignoreMap":144},[149,201,202,204,206,208,210,212,214],{"class":151,"line":152},[149,203,156],{"class":155},[149,205,160],{"class":159},[149,207,163],{"class":159},[149,209,166],{"class":159},[149,211,169],{"class":159},[149,213,173],{"class":172},[149,215,216],{"class":159}," nuxt\n",[149,218,219,221],{"class":151,"line":179},[149,220,182],{"class":172},[149,222,185],{"class":159},[149,224,225,227],{"class":151,"line":188},[149,226,156],{"class":155},[149,228,193],{"class":159},[122,230,231,232,235,236,239,240,243],{},"The CLI creates ",[146,233,234],{},"cloud.config.ts",", a ",[146,237,238],{},"post"," model, and the project scripts used\nbelow. The Nuxt option also registers ",[146,241,242],{},"@cloudconfig\u002Fnuxt"," inside the application.",[122,245,246,247,250],{},"The ",[146,248,249],{},"--target"," flag here chooses a framework. You will choose a hosting platform\nlater, when you deploy.",[126,252,254],{"id":253},"_2-create-the-database","2. Create the Database",[122,256,257],{},"Generate a SQL migration from the config, then apply it to local SQLite:",[138,259,261],{"className":140,"code":260,"language":143,"meta":144,"style":144},"pnpm db:generate\npnpm db:migrate\n",[146,262,263,270],{"__ignoreMap":144},[149,264,265,267],{"class":151,"line":152},[149,266,156],{"class":155},[149,268,269],{"class":159}," db:generate\n",[149,271,272,274],{"class":151,"line":179},[149,273,156],{"class":155},[149,275,276],{"class":159}," db:migrate\n",[122,278,279,280,283],{},"The first command writes migration files. The second creates the tables. Keep\nthe generated SQL and ",[146,281,282],{},"migrations\u002Fmeta"," snapshots in version control.",[126,285,287],{"id":286},"_3-make-your-first-request","3. Make Your First Request",[122,289,290],{},"Start the development server:",[138,292,294],{"className":140,"code":293,"language":143,"meta":144,"style":144},"pnpm dev\n",[146,295,296],{"__ignoreMap":144},[149,297,298,300],{"class":151,"line":152},[149,299,156],{"class":155},[149,301,302],{"class":159}," dev\n",[122,304,305,306,312,313,317,318,321,322,325],{},"Open ",[307,308,309],"a",{"href":309,"rel":310},"http:\u002F\u002Flocalhost:3000\u002Fapi\u002F_docs",[311],"nofollow",". Expand\n",[314,315,316],"strong",{},"GET \u002Fapi\u002Fposts",", select ",[314,319,320],{},"Try it out",", then ",[314,323,324],{},"Execute",".",[122,327,328],{},"You should receive a successful response with an empty list: there are no posts\nyet. The same routes are available in both framework options. In Nuxt, they run\nalongside your pages.",[122,330,331],{},"You now have a local database, validated REST routes, access rules, and\ninteractive API documentation.",[126,333,335],{"id":334},"_4-store-a-summary-with-each-post","4. Store a Summary with Each Post",[122,337,305,338,340,341,344,345,347],{},[146,339,234],{},". Add this line beside ",[146,342,343],{},"title"," in the existing ",[146,346,238],{},"\nmodel, keeping its other fields and access rules:",[138,349,353],{"className":350,"code":351,"filename":234,"language":352,"meta":144,"style":144},"language-ts shiki shiki-themes github-light github-light github-dark","summary: t.text(),\n","ts",[146,354,355],{"__ignoreMap":144},[149,356,357,360,364,367],{"class":151,"line":152},[149,358,359],{"class":155},"summary",[149,361,363],{"class":362},"sxrX7",": t.",[149,365,366],{"class":155},"text",[149,368,369],{"class":362},"(),\n",[122,371,372],{},"Update the database:",[138,374,375],{"className":140,"code":260,"language":143,"meta":144,"style":144},[146,376,377,383],{"__ignoreMap":144},[149,378,379,381],{"class":151,"line":152},[149,380,156],{"class":155},[149,382,269],{"class":159},[149,384,385,387],{"class":151,"line":179},[149,386,156],{"class":155},[149,388,276],{"class":159},[122,390,391,392,394,395,398,399,401],{},"Review the new SQL file: it adds the ",[146,393,359],{}," column. Restart the development\nserver and reopen ",[146,396,397],{},"\u002Fapi\u002F_docs",". The post schema now includes ",[146,400,359],{},"; the\ntyped client also accepts the new field.",[126,403,405],{"id":404},"what-to-learn-next","What to Learn Next",[122,407,408,409,411],{},"Continue with ",[307,410,17],{"href":18}," to describe fields, decide who\ncan change a post, and call the API with types.",[122,413,414,415,417],{},"You can stay on local SQLite while building. Read ",[307,416,39],{"href":40},"\nwhen you are ready to put the app online.",[419,420,421],"style",{},"html pre.shiki code .snPdu, html code.shiki .snPdu{--shiki-light:#6F42C1;--shiki-default:#6F42C1;--shiki-dark:#B392F0}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 .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);}html pre.shiki code .sxrX7, html code.shiki .sxrX7{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#E1E4E8}",{"title":144,"searchDepth":179,"depth":179,"links":423},[424,425,426,427,428],{"id":128,"depth":179,"text":129},{"id":253,"depth":179,"text":254},{"id":286,"depth":179,"text":287},{"id":334,"depth":179,"text":335},{"id":404,"depth":179,"text":405},"Run a blog API locally, then add a field to its database and API.","md",null,{},{"icon":15},{"title":12,"description":429},"quNMCdiC9iSxiHJwdl40mQ5v9FbEpmGrj6EPqO2M7vM",[437,439],{"title":5,"path":6,"stem":7,"description":438,"icon":10},"Define your data once. Use the same definition for your database, API, and access rules.",{"title":17,"path":18,"stem":19,"description":440,"icon":20},"Describe your data, control access, and call the API with types.",1792122403105]