[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-openai-expo-api-routes":3,"mdc-h96xek-key":36,"related-repo-openai-expo-api-routes":5938,"related-org-openai-expo-api-routes":6060},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":25,"repoUrl":26,"updatedAt":27,"license":28,"forks":29,"topics":30,"repo":31,"sourceUrl":34,"mdContent":35},"expo-api-routes","create API routes with Expo Router","Guidelines for creating API routes in Expo Router with EAS Hosting",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"openai","OpenAI","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fopenai.png",[12,16,19,22],{"name":13,"slug":14,"type":15},"Backend","backend","tag",{"name":17,"slug":18,"type":15},"Expo","expo",{"name":20,"slug":21,"type":15},"API Development","api-development",{"name":23,"slug":24,"type":15},"Serverless","serverless",3992,"https:\u002F\u002Fgithub.com\u002Fopenai\u002Fplugins","2026-04-17T05:07:18.85455","MIT",465,[],{"repoUrl":26,"stars":25,"forks":29,"topics":32,"description":33},[],"OpenAI Plugins","https:\u002F\u002Fgithub.com\u002Fopenai\u002Fplugins\u002Ftree\u002FHEAD\u002Fplugins\u002Fexpo\u002Fskills\u002Fexpo-api-routes","---\nname: expo-api-routes\ndescription: Guidelines for creating API routes in Expo Router with EAS Hosting\nversion: 1.0.0\nlicense: MIT\n---\n\n## When to Use API Routes\n\nUse API routes when you need:\n\n- **Server-side secrets** — API keys, database credentials, or tokens that must never reach the client\n- **Database operations** — Direct database queries that shouldn't be exposed\n- **Third-party API proxies** — Hide API keys when calling external services (OpenAI, Stripe, etc.)\n- **Server-side validation** — Validate data before database writes\n- **Webhook endpoints** — Receive callbacks from services like Stripe or GitHub\n- **Rate limiting** — Control access at the server level\n- **Heavy computation** — Offload processing that would be slow on mobile\n\n## When NOT to Use API Routes\n\nAvoid API routes when:\n\n- **Data is already public** — Use direct fetch to public APIs instead\n- **No secrets required** — Static data or client-safe operations\n- **Real-time updates needed** — Use WebSockets or services like Supabase Realtime\n- **Simple CRUD** — Consider Firebase, Supabase, or Convex for managed backends\n- **File uploads** — Use direct-to-storage uploads (S3 presigned URLs, Cloudflare R2)\n- **Authentication only** — Use Clerk, Auth0, or Firebase Auth instead\n\n## File Structure\n\nAPI routes live in the `app` directory with `+api.ts` suffix:\n\n```\napp\u002F\n  api\u002F\n    hello+api.ts          → GET \u002Fapi\u002Fhello\n    users+api.ts          → \u002Fapi\u002Fusers\n    users\u002F[id]+api.ts     → \u002Fapi\u002Fusers\u002F:id\n  (tabs)\u002F\n    index.tsx\n```\n\n## Basic API Route\n\n```ts\n\u002F\u002F app\u002Fapi\u002Fhello+api.ts\nexport function GET(request: Request) {\n  return Response.json({ message: \"Hello from Expo!\" });\n}\n```\n\n## HTTP Methods\n\nExport named functions for each HTTP method:\n\n```ts\n\u002F\u002F app\u002Fapi\u002Fitems+api.ts\nexport function GET(request: Request) {\n  return Response.json({ items: [] });\n}\n\nexport async function POST(request: Request) {\n  const body = await request.json();\n  return Response.json({ created: body }, { status: 201 });\n}\n\nexport async function PUT(request: Request) {\n  const body = await request.json();\n  return Response.json({ updated: body });\n}\n\nexport async function DELETE(request: Request) {\n  return new Response(null, { status: 204 });\n}\n```\n\n## Dynamic Routes\n\n```ts\n\u002F\u002F app\u002Fapi\u002Fusers\u002F[id]+api.ts\nexport function GET(request: Request, { id }: { id: string }) {\n  return Response.json({ userId: id });\n}\n```\n\n## Request Handling\n\n### Query Parameters\n\n```ts\nexport function GET(request: Request) {\n  const url = new URL(request.url);\n  const page = url.searchParams.get(\"page\") ?? \"1\";\n  const limit = url.searchParams.get(\"limit\") ?? \"10\";\n\n  return Response.json({ page, limit });\n}\n```\n\n### Headers\n\n```ts\nexport function GET(request: Request) {\n  const auth = request.headers.get(\"Authorization\");\n\n  if (!auth) {\n    return Response.json({ error: \"Unauthorized\" }, { status: 401 });\n  }\n\n  return Response.json({ authenticated: true });\n}\n```\n\n### JSON Body\n\n```ts\nexport async function POST(request: Request) {\n  const { email, password } = await request.json();\n\n  if (!email || !password) {\n    return Response.json({ error: \"Missing fields\" }, { status: 400 });\n  }\n\n  return Response.json({ success: true });\n}\n```\n\n## Environment Variables\n\nUse `process.env` for server-side secrets:\n\n```ts\n\u002F\u002F app\u002Fapi\u002Fai+api.ts\nexport async function POST(request: Request) {\n  const { prompt } = await request.json();\n\n  const response = await fetch(\"https:\u002F\u002Fapi.openai.com\u002Fv1\u002Fchat\u002Fcompletions\", {\n    method: \"POST\",\n    headers: {\n      \"Content-Type\": \"application\u002Fjson\",\n      Authorization: `Bearer ${process.env.OPENAI_API_KEY}`,\n    },\n    body: JSON.stringify({\n      model: \"gpt-4\",\n      messages: [{ role: \"user\", content: prompt }],\n    }),\n  });\n\n  const data = await response.json();\n  return Response.json(data);\n}\n```\n\nSet environment variables:\n\n- **Local**: Create `.env` file (never commit)\n- **EAS Hosting**: Use `eas env:create` or Expo dashboard\n\n## CORS Headers\n\nAdd CORS for web clients:\n\n```ts\nconst corsHeaders = {\n  \"Access-Control-Allow-Origin\": \"*\",\n  \"Access-Control-Allow-Methods\": \"GET, POST, PUT, DELETE, OPTIONS\",\n  \"Access-Control-Allow-Headers\": \"Content-Type, Authorization\",\n};\n\nexport function OPTIONS() {\n  return new Response(null, { headers: corsHeaders });\n}\n\nexport function GET() {\n  return Response.json({ data: \"value\" }, { headers: corsHeaders });\n}\n```\n\n## Error Handling\n\n```ts\nexport async function POST(request: Request) {\n  try {\n    const body = await request.json();\n    \u002F\u002F Process...\n    return Response.json({ success: true });\n  } catch (error) {\n    console.error(\"API error:\", error);\n    return Response.json({ error: \"Internal server error\" }, { status: 500 });\n  }\n}\n```\n\n## Testing Locally\n\nStart the development server with API routes:\n\n```bash\nnpx expo serve\n```\n\nThis starts a local server at `http:\u002F\u002Flocalhost:8081` with full API route support.\n\nTest with curl:\n\n```bash\ncurl http:\u002F\u002Flocalhost:8081\u002Fapi\u002Fhello\ncurl -X POST http:\u002F\u002Flocalhost:8081\u002Fapi\u002Fusers -H \"Content-Type: application\u002Fjson\" -d '{\"name\":\"Test\"}'\n```\n\n## Deployment to EAS Hosting\n\n### Prerequisites\n\n```bash\nnpm install -g eas-cli\neas login\n```\n\n### Deploy\n\n```bash\neas deploy\n```\n\nThis builds and deploys your API routes to EAS Hosting (Cloudflare Workers).\n\n### Environment Variables for Production\n\n```bash\n# Create a secret\neas env:create --name OPENAI_API_KEY --value sk-xxx --environment production\n\n# Or use the Expo dashboard\n```\n\n### Custom Domain\n\nConfigure in `eas.json` or Expo dashboard.\n\n## EAS Hosting Runtime (Cloudflare Workers)\n\nAPI routes run on Cloudflare Workers. Key limitations:\n\n### Missing\u002FLimited APIs\n\n- **No Node.js filesystem** — `fs` module unavailable\n- **No native Node modules** — Use Web APIs or polyfills\n- **Limited execution time** — 30 second timeout for CPU-intensive tasks\n- **No persistent connections** — WebSockets require Durable Objects\n- **fetch is available** — Use standard fetch for HTTP requests\n\n### Use Web APIs Instead\n\n```ts\n\u002F\u002F Use Web Crypto instead of Node crypto\nconst hash = await crypto.subtle.digest(\n  \"SHA-256\",\n  new TextEncoder().encode(\"data\")\n);\n\n\u002F\u002F Use fetch instead of node-fetch\nconst response = await fetch(\"https:\u002F\u002Fapi.example.com\");\n\n\u002F\u002F Use Response\u002FRequest (already available)\nreturn new Response(JSON.stringify(data), {\n  headers: { \"Content-Type\": \"application\u002Fjson\" },\n});\n```\n\n### Database Options\n\nSince filesystem is unavailable, use cloud databases:\n\n- **Cloudflare D1** — SQLite at the edge\n- **Turso** — Distributed SQLite\n- **PlanetScale** — Serverless MySQL\n- **Supabase** — Postgres with REST API\n- **Neon** — Serverless Postgres\n\nExample with Turso:\n\n```ts\n\u002F\u002F app\u002Fapi\u002Fusers+api.ts\nimport { createClient } from \"@libsql\u002Fclient\u002Fweb\";\n\nconst db = createClient({\n  url: process.env.TURSO_URL!,\n  authToken: process.env.TURSO_AUTH_TOKEN!,\n});\n\nexport async function GET() {\n  const result = await db.execute(\"SELECT * FROM users\");\n  return Response.json(result.rows);\n}\n```\n\n## Calling API Routes from Client\n\n```ts\n\u002F\u002F From React Native components\nconst response = await fetch(\"\u002Fapi\u002Fhello\");\nconst data = await response.json();\n\n\u002F\u002F With body\nconst response = await fetch(\"\u002Fapi\u002Fusers\", {\n  method: \"POST\",\n  headers: { \"Content-Type\": \"application\u002Fjson\" },\n  body: JSON.stringify({ name: \"John\" }),\n});\n```\n\n## Common Patterns\n\n### Authentication Middleware\n\n```ts\n\u002F\u002F utils\u002Fauth.ts\nexport async function requireAuth(request: Request) {\n  const token = request.headers.get(\"Authorization\")?.replace(\"Bearer \", \"\");\n\n  if (!token) {\n    throw new Response(JSON.stringify({ error: \"Unauthorized\" }), {\n      status: 401,\n      headers: { \"Content-Type\": \"application\u002Fjson\" },\n    });\n  }\n\n  \u002F\u002F Verify token...\n  return { userId: \"123\" };\n}\n\n\u002F\u002F app\u002Fapi\u002Fprotected+api.ts\nimport { requireAuth } from \"..\u002F..\u002Futils\u002Fauth\";\n\nexport async function GET(request: Request) {\n  const { userId } = await requireAuth(request);\n  return Response.json({ userId });\n}\n```\n\n### Proxy External API\n\n```ts\n\u002F\u002F app\u002Fapi\u002Fweather+api.ts\nexport async function GET(request: Request) {\n  const url = new URL(request.url);\n  const city = url.searchParams.get(\"city\");\n\n  const response = await fetch(\n    `https:\u002F\u002Fapi.weather.com\u002Fv1\u002Fcurrent?city=${city}&key=${process.env.WEATHER_API_KEY}`\n  );\n\n  return Response.json(await response.json());\n}\n```\n\n## Rules\n\n- NEVER expose API keys or secrets in client code\n- ALWAYS validate and sanitize user input\n- Use proper HTTP status codes (200, 201, 400, 401, 404, 500)\n- Handle errors gracefully with try\u002Fcatch\n- Keep API routes focused — one responsibility per endpoint\n- Use TypeScript for type safety\n- Log errors server-side for debugging\n",{"data":37,"body":39},{"name":4,"description":6,"version":38,"license":28},"1.0.0",{"type":40,"children":41},"root",[42,51,57,133,139,144,207,213,235,247,253,412,418,423,996,1002,1152,1158,1165,1486,1492,1797,1803,2114,2120,2133,2706,2711,2750,2756,2761,3118,3124,3458,3464,3469,3496,3509,3514,3593,3599,3605,3648,3654,3673,3678,3684,3756,3762,3775,3781,3786,3792,3853,3859,4185,4191,4196,4249,4254,4583,4589,4911,4917,4923,5547,5553,5888,5894,5932],{"type":43,"tag":44,"props":45,"children":47},"element","h2",{"id":46},"when-to-use-api-routes",[48],{"type":49,"value":50},"text","When to Use API Routes",{"type":43,"tag":52,"props":53,"children":54},"p",{},[55],{"type":49,"value":56},"Use API routes when you need:",{"type":43,"tag":58,"props":59,"children":60},"ul",{},[61,73,83,93,103,113,123],{"type":43,"tag":62,"props":63,"children":64},"li",{},[65,71],{"type":43,"tag":66,"props":67,"children":68},"strong",{},[69],{"type":49,"value":70},"Server-side secrets",{"type":49,"value":72}," — API keys, database credentials, or tokens that must never reach the client",{"type":43,"tag":62,"props":74,"children":75},{},[76,81],{"type":43,"tag":66,"props":77,"children":78},{},[79],{"type":49,"value":80},"Database operations",{"type":49,"value":82}," — Direct database queries that shouldn't be exposed",{"type":43,"tag":62,"props":84,"children":85},{},[86,91],{"type":43,"tag":66,"props":87,"children":88},{},[89],{"type":49,"value":90},"Third-party API proxies",{"type":49,"value":92}," — Hide API keys when calling external services (OpenAI, Stripe, etc.)",{"type":43,"tag":62,"props":94,"children":95},{},[96,101],{"type":43,"tag":66,"props":97,"children":98},{},[99],{"type":49,"value":100},"Server-side validation",{"type":49,"value":102}," — Validate data before database writes",{"type":43,"tag":62,"props":104,"children":105},{},[106,111],{"type":43,"tag":66,"props":107,"children":108},{},[109],{"type":49,"value":110},"Webhook endpoints",{"type":49,"value":112}," — Receive callbacks from services like Stripe or GitHub",{"type":43,"tag":62,"props":114,"children":115},{},[116,121],{"type":43,"tag":66,"props":117,"children":118},{},[119],{"type":49,"value":120},"Rate limiting",{"type":49,"value":122}," — Control access at the server level",{"type":43,"tag":62,"props":124,"children":125},{},[126,131],{"type":43,"tag":66,"props":127,"children":128},{},[129],{"type":49,"value":130},"Heavy computation",{"type":49,"value":132}," — Offload processing that would be slow on mobile",{"type":43,"tag":44,"props":134,"children":136},{"id":135},"when-not-to-use-api-routes",[137],{"type":49,"value":138},"When NOT to Use API Routes",{"type":43,"tag":52,"props":140,"children":141},{},[142],{"type":49,"value":143},"Avoid API routes when:",{"type":43,"tag":58,"props":145,"children":146},{},[147,157,167,177,187,197],{"type":43,"tag":62,"props":148,"children":149},{},[150,155],{"type":43,"tag":66,"props":151,"children":152},{},[153],{"type":49,"value":154},"Data is already public",{"type":49,"value":156}," — Use direct fetch to public APIs instead",{"type":43,"tag":62,"props":158,"children":159},{},[160,165],{"type":43,"tag":66,"props":161,"children":162},{},[163],{"type":49,"value":164},"No secrets required",{"type":49,"value":166}," — Static data or client-safe operations",{"type":43,"tag":62,"props":168,"children":169},{},[170,175],{"type":43,"tag":66,"props":171,"children":172},{},[173],{"type":49,"value":174},"Real-time updates needed",{"type":49,"value":176}," — Use WebSockets or services like Supabase Realtime",{"type":43,"tag":62,"props":178,"children":179},{},[180,185],{"type":43,"tag":66,"props":181,"children":182},{},[183],{"type":49,"value":184},"Simple CRUD",{"type":49,"value":186}," — Consider Firebase, Supabase, or Convex for managed backends",{"type":43,"tag":62,"props":188,"children":189},{},[190,195],{"type":43,"tag":66,"props":191,"children":192},{},[193],{"type":49,"value":194},"File uploads",{"type":49,"value":196}," — Use direct-to-storage uploads (S3 presigned URLs, Cloudflare R2)",{"type":43,"tag":62,"props":198,"children":199},{},[200,205],{"type":43,"tag":66,"props":201,"children":202},{},[203],{"type":49,"value":204},"Authentication only",{"type":49,"value":206}," — Use Clerk, Auth0, or Firebase Auth instead",{"type":43,"tag":44,"props":208,"children":210},{"id":209},"file-structure",[211],{"type":49,"value":212},"File Structure",{"type":43,"tag":52,"props":214,"children":215},{},[216,218,225,227,233],{"type":49,"value":217},"API routes live in the ",{"type":43,"tag":219,"props":220,"children":222},"code",{"className":221},[],[223],{"type":49,"value":224},"app",{"type":49,"value":226}," directory with ",{"type":43,"tag":219,"props":228,"children":230},{"className":229},[],[231],{"type":49,"value":232},"+api.ts",{"type":49,"value":234}," suffix:",{"type":43,"tag":236,"props":237,"children":241},"pre",{"className":238,"code":240,"language":49},[239],"language-text","app\u002F\n  api\u002F\n    hello+api.ts          → GET \u002Fapi\u002Fhello\n    users+api.ts          → \u002Fapi\u002Fusers\n    users\u002F[id]+api.ts     → \u002Fapi\u002Fusers\u002F:id\n  (tabs)\u002F\n    index.tsx\n",[242],{"type":43,"tag":219,"props":243,"children":245},{"__ignoreMap":244},"",[246],{"type":49,"value":240},{"type":43,"tag":44,"props":248,"children":250},{"id":249},"basic-api-route",[251],{"type":49,"value":252},"Basic API Route",{"type":43,"tag":236,"props":254,"children":258},{"className":255,"code":256,"language":257,"meta":244,"style":244},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F app\u002Fapi\u002Fhello+api.ts\nexport function GET(request: Request) {\n  return Response.json({ message: \"Hello from Expo!\" });\n}\n","ts",[259],{"type":43,"tag":219,"props":260,"children":261},{"__ignoreMap":244},[262,274,329,403],{"type":43,"tag":263,"props":264,"children":267},"span",{"class":265,"line":266},"line",1,[268],{"type":43,"tag":263,"props":269,"children":271},{"style":270},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[272],{"type":49,"value":273},"\u002F\u002F app\u002Fapi\u002Fhello+api.ts\n",{"type":43,"tag":263,"props":275,"children":277},{"class":265,"line":276},2,[278,284,290,296,302,308,313,319,324],{"type":43,"tag":263,"props":279,"children":281},{"style":280},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[282],{"type":49,"value":283},"export",{"type":43,"tag":263,"props":285,"children":287},{"style":286},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[288],{"type":49,"value":289}," function",{"type":43,"tag":263,"props":291,"children":293},{"style":292},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[294],{"type":49,"value":295}," GET",{"type":43,"tag":263,"props":297,"children":299},{"style":298},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[300],{"type":49,"value":301},"(",{"type":43,"tag":263,"props":303,"children":305},{"style":304},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[306],{"type":49,"value":307},"request",{"type":43,"tag":263,"props":309,"children":310},{"style":298},[311],{"type":49,"value":312},":",{"type":43,"tag":263,"props":314,"children":316},{"style":315},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[317],{"type":49,"value":318}," Request",{"type":43,"tag":263,"props":320,"children":321},{"style":298},[322],{"type":49,"value":323},")",{"type":43,"tag":263,"props":325,"children":326},{"style":298},[327],{"type":49,"value":328}," {\n",{"type":43,"tag":263,"props":330,"children":332},{"class":265,"line":331},3,[333,338,344,349,354,359,364,369,373,378,384,389,394,398],{"type":43,"tag":263,"props":334,"children":335},{"style":280},[336],{"type":49,"value":337},"  return",{"type":43,"tag":263,"props":339,"children":341},{"style":340},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[342],{"type":49,"value":343}," Response",{"type":43,"tag":263,"props":345,"children":346},{"style":298},[347],{"type":49,"value":348},".",{"type":43,"tag":263,"props":350,"children":351},{"style":292},[352],{"type":49,"value":353},"json",{"type":43,"tag":263,"props":355,"children":357},{"style":356},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[358],{"type":49,"value":301},{"type":43,"tag":263,"props":360,"children":361},{"style":298},[362],{"type":49,"value":363},"{",{"type":43,"tag":263,"props":365,"children":366},{"style":356},[367],{"type":49,"value":368}," message",{"type":43,"tag":263,"props":370,"children":371},{"style":298},[372],{"type":49,"value":312},{"type":43,"tag":263,"props":374,"children":375},{"style":298},[376],{"type":49,"value":377}," \"",{"type":43,"tag":263,"props":379,"children":381},{"style":380},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[382],{"type":49,"value":383},"Hello from Expo!",{"type":43,"tag":263,"props":385,"children":386},{"style":298},[387],{"type":49,"value":388},"\"",{"type":43,"tag":263,"props":390,"children":391},{"style":298},[392],{"type":49,"value":393}," }",{"type":43,"tag":263,"props":395,"children":396},{"style":356},[397],{"type":49,"value":323},{"type":43,"tag":263,"props":399,"children":400},{"style":298},[401],{"type":49,"value":402},";\n",{"type":43,"tag":263,"props":404,"children":406},{"class":265,"line":405},4,[407],{"type":43,"tag":263,"props":408,"children":409},{"style":298},[410],{"type":49,"value":411},"}\n",{"type":43,"tag":44,"props":413,"children":415},{"id":414},"http-methods",[416],{"type":49,"value":417},"HTTP Methods",{"type":43,"tag":52,"props":419,"children":420},{},[421],{"type":49,"value":422},"Export named functions for each HTTP method:",{"type":43,"tag":236,"props":424,"children":426},{"className":255,"code":425,"language":257,"meta":244,"style":244},"\u002F\u002F app\u002Fapi\u002Fitems+api.ts\nexport function GET(request: Request) {\n  return Response.json({ items: [] });\n}\n\nexport async function POST(request: Request) {\n  const body = await request.json();\n  return Response.json({ created: body }, { status: 201 });\n}\n\nexport async function PUT(request: Request) {\n  const body = await request.json();\n  return Response.json({ updated: body });\n}\n\nexport async function DELETE(request: Request) {\n  return new Response(null, { status: 204 });\n}\n",[427],{"type":43,"tag":219,"props":428,"children":429},{"__ignoreMap":244},[430,438,477,531,538,548,594,640,718,726,734,779,819,872,880,888,933,988],{"type":43,"tag":263,"props":431,"children":432},{"class":265,"line":266},[433],{"type":43,"tag":263,"props":434,"children":435},{"style":270},[436],{"type":49,"value":437},"\u002F\u002F app\u002Fapi\u002Fitems+api.ts\n",{"type":43,"tag":263,"props":439,"children":440},{"class":265,"line":276},[441,445,449,453,457,461,465,469,473],{"type":43,"tag":263,"props":442,"children":443},{"style":280},[444],{"type":49,"value":283},{"type":43,"tag":263,"props":446,"children":447},{"style":286},[448],{"type":49,"value":289},{"type":43,"tag":263,"props":450,"children":451},{"style":292},[452],{"type":49,"value":295},{"type":43,"tag":263,"props":454,"children":455},{"style":298},[456],{"type":49,"value":301},{"type":43,"tag":263,"props":458,"children":459},{"style":304},[460],{"type":49,"value":307},{"type":43,"tag":263,"props":462,"children":463},{"style":298},[464],{"type":49,"value":312},{"type":43,"tag":263,"props":466,"children":467},{"style":315},[468],{"type":49,"value":318},{"type":43,"tag":263,"props":470,"children":471},{"style":298},[472],{"type":49,"value":323},{"type":43,"tag":263,"props":474,"children":475},{"style":298},[476],{"type":49,"value":328},{"type":43,"tag":263,"props":478,"children":479},{"class":265,"line":331},[480,484,488,492,496,500,504,509,513,518,523,527],{"type":43,"tag":263,"props":481,"children":482},{"style":280},[483],{"type":49,"value":337},{"type":43,"tag":263,"props":485,"children":486},{"style":340},[487],{"type":49,"value":343},{"type":43,"tag":263,"props":489,"children":490},{"style":298},[491],{"type":49,"value":348},{"type":43,"tag":263,"props":493,"children":494},{"style":292},[495],{"type":49,"value":353},{"type":43,"tag":263,"props":497,"children":498},{"style":356},[499],{"type":49,"value":301},{"type":43,"tag":263,"props":501,"children":502},{"style":298},[503],{"type":49,"value":363},{"type":43,"tag":263,"props":505,"children":506},{"style":356},[507],{"type":49,"value":508}," items",{"type":43,"tag":263,"props":510,"children":511},{"style":298},[512],{"type":49,"value":312},{"type":43,"tag":263,"props":514,"children":515},{"style":356},[516],{"type":49,"value":517}," [] ",{"type":43,"tag":263,"props":519,"children":520},{"style":298},[521],{"type":49,"value":522},"}",{"type":43,"tag":263,"props":524,"children":525},{"style":356},[526],{"type":49,"value":323},{"type":43,"tag":263,"props":528,"children":529},{"style":298},[530],{"type":49,"value":402},{"type":43,"tag":263,"props":532,"children":533},{"class":265,"line":405},[534],{"type":43,"tag":263,"props":535,"children":536},{"style":298},[537],{"type":49,"value":411},{"type":43,"tag":263,"props":539,"children":541},{"class":265,"line":540},5,[542],{"type":43,"tag":263,"props":543,"children":545},{"emptyLinePlaceholder":544},true,[546],{"type":49,"value":547},"\n",{"type":43,"tag":263,"props":549,"children":551},{"class":265,"line":550},6,[552,556,561,565,570,574,578,582,586,590],{"type":43,"tag":263,"props":553,"children":554},{"style":280},[555],{"type":49,"value":283},{"type":43,"tag":263,"props":557,"children":558},{"style":286},[559],{"type":49,"value":560}," async",{"type":43,"tag":263,"props":562,"children":563},{"style":286},[564],{"type":49,"value":289},{"type":43,"tag":263,"props":566,"children":567},{"style":292},[568],{"type":49,"value":569}," POST",{"type":43,"tag":263,"props":571,"children":572},{"style":298},[573],{"type":49,"value":301},{"type":43,"tag":263,"props":575,"children":576},{"style":304},[577],{"type":49,"value":307},{"type":43,"tag":263,"props":579,"children":580},{"style":298},[581],{"type":49,"value":312},{"type":43,"tag":263,"props":583,"children":584},{"style":315},[585],{"type":49,"value":318},{"type":43,"tag":263,"props":587,"children":588},{"style":298},[589],{"type":49,"value":323},{"type":43,"tag":263,"props":591,"children":592},{"style":298},[593],{"type":49,"value":328},{"type":43,"tag":263,"props":595,"children":597},{"class":265,"line":596},7,[598,603,608,613,618,623,627,631,636],{"type":43,"tag":263,"props":599,"children":600},{"style":286},[601],{"type":49,"value":602},"  const",{"type":43,"tag":263,"props":604,"children":605},{"style":340},[606],{"type":49,"value":607}," body",{"type":43,"tag":263,"props":609,"children":610},{"style":298},[611],{"type":49,"value":612}," =",{"type":43,"tag":263,"props":614,"children":615},{"style":280},[616],{"type":49,"value":617}," await",{"type":43,"tag":263,"props":619,"children":620},{"style":340},[621],{"type":49,"value":622}," request",{"type":43,"tag":263,"props":624,"children":625},{"style":298},[626],{"type":49,"value":348},{"type":43,"tag":263,"props":628,"children":629},{"style":292},[630],{"type":49,"value":353},{"type":43,"tag":263,"props":632,"children":633},{"style":356},[634],{"type":49,"value":635},"()",{"type":43,"tag":263,"props":637,"children":638},{"style":298},[639],{"type":49,"value":402},{"type":43,"tag":263,"props":641,"children":643},{"class":265,"line":642},8,[644,648,652,656,660,664,668,673,677,681,686,691,696,700,706,710,714],{"type":43,"tag":263,"props":645,"children":646},{"style":280},[647],{"type":49,"value":337},{"type":43,"tag":263,"props":649,"children":650},{"style":340},[651],{"type":49,"value":343},{"type":43,"tag":263,"props":653,"children":654},{"style":298},[655],{"type":49,"value":348},{"type":43,"tag":263,"props":657,"children":658},{"style":292},[659],{"type":49,"value":353},{"type":43,"tag":263,"props":661,"children":662},{"style":356},[663],{"type":49,"value":301},{"type":43,"tag":263,"props":665,"children":666},{"style":298},[667],{"type":49,"value":363},{"type":43,"tag":263,"props":669,"children":670},{"style":356},[671],{"type":49,"value":672}," created",{"type":43,"tag":263,"props":674,"children":675},{"style":298},[676],{"type":49,"value":312},{"type":43,"tag":263,"props":678,"children":679},{"style":340},[680],{"type":49,"value":607},{"type":43,"tag":263,"props":682,"children":683},{"style":298},[684],{"type":49,"value":685}," },",{"type":43,"tag":263,"props":687,"children":688},{"style":298},[689],{"type":49,"value":690}," {",{"type":43,"tag":263,"props":692,"children":693},{"style":356},[694],{"type":49,"value":695}," status",{"type":43,"tag":263,"props":697,"children":698},{"style":298},[699],{"type":49,"value":312},{"type":43,"tag":263,"props":701,"children":703},{"style":702},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[704],{"type":49,"value":705}," 201",{"type":43,"tag":263,"props":707,"children":708},{"style":298},[709],{"type":49,"value":393},{"type":43,"tag":263,"props":711,"children":712},{"style":356},[713],{"type":49,"value":323},{"type":43,"tag":263,"props":715,"children":716},{"style":298},[717],{"type":49,"value":402},{"type":43,"tag":263,"props":719,"children":721},{"class":265,"line":720},9,[722],{"type":43,"tag":263,"props":723,"children":724},{"style":298},[725],{"type":49,"value":411},{"type":43,"tag":263,"props":727,"children":729},{"class":265,"line":728},10,[730],{"type":43,"tag":263,"props":731,"children":732},{"emptyLinePlaceholder":544},[733],{"type":49,"value":547},{"type":43,"tag":263,"props":735,"children":737},{"class":265,"line":736},11,[738,742,746,750,755,759,763,767,771,775],{"type":43,"tag":263,"props":739,"children":740},{"style":280},[741],{"type":49,"value":283},{"type":43,"tag":263,"props":743,"children":744},{"style":286},[745],{"type":49,"value":560},{"type":43,"tag":263,"props":747,"children":748},{"style":286},[749],{"type":49,"value":289},{"type":43,"tag":263,"props":751,"children":752},{"style":292},[753],{"type":49,"value":754}," PUT",{"type":43,"tag":263,"props":756,"children":757},{"style":298},[758],{"type":49,"value":301},{"type":43,"tag":263,"props":760,"children":761},{"style":304},[762],{"type":49,"value":307},{"type":43,"tag":263,"props":764,"children":765},{"style":298},[766],{"type":49,"value":312},{"type":43,"tag":263,"props":768,"children":769},{"style":315},[770],{"type":49,"value":318},{"type":43,"tag":263,"props":772,"children":773},{"style":298},[774],{"type":49,"value":323},{"type":43,"tag":263,"props":776,"children":777},{"style":298},[778],{"type":49,"value":328},{"type":43,"tag":263,"props":780,"children":782},{"class":265,"line":781},12,[783,787,791,795,799,803,807,811,815],{"type":43,"tag":263,"props":784,"children":785},{"style":286},[786],{"type":49,"value":602},{"type":43,"tag":263,"props":788,"children":789},{"style":340},[790],{"type":49,"value":607},{"type":43,"tag":263,"props":792,"children":793},{"style":298},[794],{"type":49,"value":612},{"type":43,"tag":263,"props":796,"children":797},{"style":280},[798],{"type":49,"value":617},{"type":43,"tag":263,"props":800,"children":801},{"style":340},[802],{"type":49,"value":622},{"type":43,"tag":263,"props":804,"children":805},{"style":298},[806],{"type":49,"value":348},{"type":43,"tag":263,"props":808,"children":809},{"style":292},[810],{"type":49,"value":353},{"type":43,"tag":263,"props":812,"children":813},{"style":356},[814],{"type":49,"value":635},{"type":43,"tag":263,"props":816,"children":817},{"style":298},[818],{"type":49,"value":402},{"type":43,"tag":263,"props":820,"children":822},{"class":265,"line":821},13,[823,827,831,835,839,843,847,852,856,860,864,868],{"type":43,"tag":263,"props":824,"children":825},{"style":280},[826],{"type":49,"value":337},{"type":43,"tag":263,"props":828,"children":829},{"style":340},[830],{"type":49,"value":343},{"type":43,"tag":263,"props":832,"children":833},{"style":298},[834],{"type":49,"value":348},{"type":43,"tag":263,"props":836,"children":837},{"style":292},[838],{"type":49,"value":353},{"type":43,"tag":263,"props":840,"children":841},{"style":356},[842],{"type":49,"value":301},{"type":43,"tag":263,"props":844,"children":845},{"style":298},[846],{"type":49,"value":363},{"type":43,"tag":263,"props":848,"children":849},{"style":356},[850],{"type":49,"value":851}," updated",{"type":43,"tag":263,"props":853,"children":854},{"style":298},[855],{"type":49,"value":312},{"type":43,"tag":263,"props":857,"children":858},{"style":340},[859],{"type":49,"value":607},{"type":43,"tag":263,"props":861,"children":862},{"style":298},[863],{"type":49,"value":393},{"type":43,"tag":263,"props":865,"children":866},{"style":356},[867],{"type":49,"value":323},{"type":43,"tag":263,"props":869,"children":870},{"style":298},[871],{"type":49,"value":402},{"type":43,"tag":263,"props":873,"children":875},{"class":265,"line":874},14,[876],{"type":43,"tag":263,"props":877,"children":878},{"style":298},[879],{"type":49,"value":411},{"type":43,"tag":263,"props":881,"children":883},{"class":265,"line":882},15,[884],{"type":43,"tag":263,"props":885,"children":886},{"emptyLinePlaceholder":544},[887],{"type":49,"value":547},{"type":43,"tag":263,"props":889,"children":891},{"class":265,"line":890},16,[892,896,900,904,909,913,917,921,925,929],{"type":43,"tag":263,"props":893,"children":894},{"style":280},[895],{"type":49,"value":283},{"type":43,"tag":263,"props":897,"children":898},{"style":286},[899],{"type":49,"value":560},{"type":43,"tag":263,"props":901,"children":902},{"style":286},[903],{"type":49,"value":289},{"type":43,"tag":263,"props":905,"children":906},{"style":292},[907],{"type":49,"value":908}," DELETE",{"type":43,"tag":263,"props":910,"children":911},{"style":298},[912],{"type":49,"value":301},{"type":43,"tag":263,"props":914,"children":915},{"style":304},[916],{"type":49,"value":307},{"type":43,"tag":263,"props":918,"children":919},{"style":298},[920],{"type":49,"value":312},{"type":43,"tag":263,"props":922,"children":923},{"style":315},[924],{"type":49,"value":318},{"type":43,"tag":263,"props":926,"children":927},{"style":298},[928],{"type":49,"value":323},{"type":43,"tag":263,"props":930,"children":931},{"style":298},[932],{"type":49,"value":328},{"type":43,"tag":263,"props":934,"children":936},{"class":265,"line":935},17,[937,941,946,950,954,959,963,967,971,976,980,984],{"type":43,"tag":263,"props":938,"children":939},{"style":280},[940],{"type":49,"value":337},{"type":43,"tag":263,"props":942,"children":943},{"style":298},[944],{"type":49,"value":945}," new",{"type":43,"tag":263,"props":947,"children":948},{"style":292},[949],{"type":49,"value":343},{"type":43,"tag":263,"props":951,"children":952},{"style":356},[953],{"type":49,"value":301},{"type":43,"tag":263,"props":955,"children":956},{"style":298},[957],{"type":49,"value":958},"null,",{"type":43,"tag":263,"props":960,"children":961},{"style":298},[962],{"type":49,"value":690},{"type":43,"tag":263,"props":964,"children":965},{"style":356},[966],{"type":49,"value":695},{"type":43,"tag":263,"props":968,"children":969},{"style":298},[970],{"type":49,"value":312},{"type":43,"tag":263,"props":972,"children":973},{"style":702},[974],{"type":49,"value":975}," 204",{"type":43,"tag":263,"props":977,"children":978},{"style":298},[979],{"type":49,"value":393},{"type":43,"tag":263,"props":981,"children":982},{"style":356},[983],{"type":49,"value":323},{"type":43,"tag":263,"props":985,"children":986},{"style":298},[987],{"type":49,"value":402},{"type":43,"tag":263,"props":989,"children":991},{"class":265,"line":990},18,[992],{"type":43,"tag":263,"props":993,"children":994},{"style":298},[995],{"type":49,"value":411},{"type":43,"tag":44,"props":997,"children":999},{"id":998},"dynamic-routes",[1000],{"type":49,"value":1001},"Dynamic Routes",{"type":43,"tag":236,"props":1003,"children":1005},{"className":255,"code":1004,"language":257,"meta":244,"style":244},"\u002F\u002F app\u002Fapi\u002Fusers\u002F[id]+api.ts\nexport function GET(request: Request, { id }: { id: string }) {\n  return Response.json({ userId: id });\n}\n",[1006],{"type":43,"tag":219,"props":1007,"children":1008},{"__ignoreMap":244},[1009,1017,1093,1145],{"type":43,"tag":263,"props":1010,"children":1011},{"class":265,"line":266},[1012],{"type":43,"tag":263,"props":1013,"children":1014},{"style":270},[1015],{"type":49,"value":1016},"\u002F\u002F app\u002Fapi\u002Fusers\u002F[id]+api.ts\n",{"type":43,"tag":263,"props":1018,"children":1019},{"class":265,"line":276},[1020,1024,1028,1032,1036,1040,1044,1048,1053,1057,1062,1067,1071,1075,1079,1084,1089],{"type":43,"tag":263,"props":1021,"children":1022},{"style":280},[1023],{"type":49,"value":283},{"type":43,"tag":263,"props":1025,"children":1026},{"style":286},[1027],{"type":49,"value":289},{"type":43,"tag":263,"props":1029,"children":1030},{"style":292},[1031],{"type":49,"value":295},{"type":43,"tag":263,"props":1033,"children":1034},{"style":298},[1035],{"type":49,"value":301},{"type":43,"tag":263,"props":1037,"children":1038},{"style":304},[1039],{"type":49,"value":307},{"type":43,"tag":263,"props":1041,"children":1042},{"style":298},[1043],{"type":49,"value":312},{"type":43,"tag":263,"props":1045,"children":1046},{"style":315},[1047],{"type":49,"value":318},{"type":43,"tag":263,"props":1049,"children":1050},{"style":298},[1051],{"type":49,"value":1052},",",{"type":43,"tag":263,"props":1054,"children":1055},{"style":298},[1056],{"type":49,"value":690},{"type":43,"tag":263,"props":1058,"children":1059},{"style":304},[1060],{"type":49,"value":1061}," id",{"type":43,"tag":263,"props":1063,"children":1064},{"style":298},[1065],{"type":49,"value":1066}," }:",{"type":43,"tag":263,"props":1068,"children":1069},{"style":298},[1070],{"type":49,"value":690},{"type":43,"tag":263,"props":1072,"children":1073},{"style":356},[1074],{"type":49,"value":1061},{"type":43,"tag":263,"props":1076,"children":1077},{"style":298},[1078],{"type":49,"value":312},{"type":43,"tag":263,"props":1080,"children":1081},{"style":315},[1082],{"type":49,"value":1083}," string",{"type":43,"tag":263,"props":1085,"children":1086},{"style":298},[1087],{"type":49,"value":1088}," })",{"type":43,"tag":263,"props":1090,"children":1091},{"style":298},[1092],{"type":49,"value":328},{"type":43,"tag":263,"props":1094,"children":1095},{"class":265,"line":331},[1096,1100,1104,1108,1112,1116,1120,1125,1129,1133,1137,1141],{"type":43,"tag":263,"props":1097,"children":1098},{"style":280},[1099],{"type":49,"value":337},{"type":43,"tag":263,"props":1101,"children":1102},{"style":340},[1103],{"type":49,"value":343},{"type":43,"tag":263,"props":1105,"children":1106},{"style":298},[1107],{"type":49,"value":348},{"type":43,"tag":263,"props":1109,"children":1110},{"style":292},[1111],{"type":49,"value":353},{"type":43,"tag":263,"props":1113,"children":1114},{"style":356},[1115],{"type":49,"value":301},{"type":43,"tag":263,"props":1117,"children":1118},{"style":298},[1119],{"type":49,"value":363},{"type":43,"tag":263,"props":1121,"children":1122},{"style":356},[1123],{"type":49,"value":1124}," userId",{"type":43,"tag":263,"props":1126,"children":1127},{"style":298},[1128],{"type":49,"value":312},{"type":43,"tag":263,"props":1130,"children":1131},{"style":340},[1132],{"type":49,"value":1061},{"type":43,"tag":263,"props":1134,"children":1135},{"style":298},[1136],{"type":49,"value":393},{"type":43,"tag":263,"props":1138,"children":1139},{"style":356},[1140],{"type":49,"value":323},{"type":43,"tag":263,"props":1142,"children":1143},{"style":298},[1144],{"type":49,"value":402},{"type":43,"tag":263,"props":1146,"children":1147},{"class":265,"line":405},[1148],{"type":43,"tag":263,"props":1149,"children":1150},{"style":298},[1151],{"type":49,"value":411},{"type":43,"tag":44,"props":1153,"children":1155},{"id":1154},"request-handling",[1156],{"type":49,"value":1157},"Request Handling",{"type":43,"tag":1159,"props":1160,"children":1162},"h3",{"id":1161},"query-parameters",[1163],{"type":49,"value":1164},"Query Parameters",{"type":43,"tag":236,"props":1166,"children":1168},{"className":255,"code":1167,"language":257,"meta":244,"style":244},"export function GET(request: Request) {\n  const url = new URL(request.url);\n  const page = url.searchParams.get(\"page\") ?? \"1\";\n  const limit = url.searchParams.get(\"limit\") ?? \"10\";\n\n  return Response.json({ page, limit });\n}\n",[1169],{"type":43,"tag":219,"props":1170,"children":1171},{"__ignoreMap":244},[1172,1211,1261,1343,1421,1428,1479],{"type":43,"tag":263,"props":1173,"children":1174},{"class":265,"line":266},[1175,1179,1183,1187,1191,1195,1199,1203,1207],{"type":43,"tag":263,"props":1176,"children":1177},{"style":280},[1178],{"type":49,"value":283},{"type":43,"tag":263,"props":1180,"children":1181},{"style":286},[1182],{"type":49,"value":289},{"type":43,"tag":263,"props":1184,"children":1185},{"style":292},[1186],{"type":49,"value":295},{"type":43,"tag":263,"props":1188,"children":1189},{"style":298},[1190],{"type":49,"value":301},{"type":43,"tag":263,"props":1192,"children":1193},{"style":304},[1194],{"type":49,"value":307},{"type":43,"tag":263,"props":1196,"children":1197},{"style":298},[1198],{"type":49,"value":312},{"type":43,"tag":263,"props":1200,"children":1201},{"style":315},[1202],{"type":49,"value":318},{"type":43,"tag":263,"props":1204,"children":1205},{"style":298},[1206],{"type":49,"value":323},{"type":43,"tag":263,"props":1208,"children":1209},{"style":298},[1210],{"type":49,"value":328},{"type":43,"tag":263,"props":1212,"children":1213},{"class":265,"line":276},[1214,1218,1223,1227,1231,1236,1240,1244,1248,1253,1257],{"type":43,"tag":263,"props":1215,"children":1216},{"style":286},[1217],{"type":49,"value":602},{"type":43,"tag":263,"props":1219,"children":1220},{"style":340},[1221],{"type":49,"value":1222}," url",{"type":43,"tag":263,"props":1224,"children":1225},{"style":298},[1226],{"type":49,"value":612},{"type":43,"tag":263,"props":1228,"children":1229},{"style":298},[1230],{"type":49,"value":945},{"type":43,"tag":263,"props":1232,"children":1233},{"style":292},[1234],{"type":49,"value":1235}," URL",{"type":43,"tag":263,"props":1237,"children":1238},{"style":356},[1239],{"type":49,"value":301},{"type":43,"tag":263,"props":1241,"children":1242},{"style":340},[1243],{"type":49,"value":307},{"type":43,"tag":263,"props":1245,"children":1246},{"style":298},[1247],{"type":49,"value":348},{"type":43,"tag":263,"props":1249,"children":1250},{"style":340},[1251],{"type":49,"value":1252},"url",{"type":43,"tag":263,"props":1254,"children":1255},{"style":356},[1256],{"type":49,"value":323},{"type":43,"tag":263,"props":1258,"children":1259},{"style":298},[1260],{"type":49,"value":402},{"type":43,"tag":263,"props":1262,"children":1263},{"class":265,"line":331},[1264,1268,1273,1277,1281,1285,1290,1294,1299,1303,1307,1312,1316,1321,1326,1330,1335,1339],{"type":43,"tag":263,"props":1265,"children":1266},{"style":286},[1267],{"type":49,"value":602},{"type":43,"tag":263,"props":1269,"children":1270},{"style":340},[1271],{"type":49,"value":1272}," page",{"type":43,"tag":263,"props":1274,"children":1275},{"style":298},[1276],{"type":49,"value":612},{"type":43,"tag":263,"props":1278,"children":1279},{"style":340},[1280],{"type":49,"value":1222},{"type":43,"tag":263,"props":1282,"children":1283},{"style":298},[1284],{"type":49,"value":348},{"type":43,"tag":263,"props":1286,"children":1287},{"style":340},[1288],{"type":49,"value":1289},"searchParams",{"type":43,"tag":263,"props":1291,"children":1292},{"style":298},[1293],{"type":49,"value":348},{"type":43,"tag":263,"props":1295,"children":1296},{"style":292},[1297],{"type":49,"value":1298},"get",{"type":43,"tag":263,"props":1300,"children":1301},{"style":356},[1302],{"type":49,"value":301},{"type":43,"tag":263,"props":1304,"children":1305},{"style":298},[1306],{"type":49,"value":388},{"type":43,"tag":263,"props":1308,"children":1309},{"style":380},[1310],{"type":49,"value":1311},"page",{"type":43,"tag":263,"props":1313,"children":1314},{"style":298},[1315],{"type":49,"value":388},{"type":43,"tag":263,"props":1317,"children":1318},{"style":356},[1319],{"type":49,"value":1320},") ",{"type":43,"tag":263,"props":1322,"children":1323},{"style":298},[1324],{"type":49,"value":1325},"??",{"type":43,"tag":263,"props":1327,"children":1328},{"style":298},[1329],{"type":49,"value":377},{"type":43,"tag":263,"props":1331,"children":1332},{"style":380},[1333],{"type":49,"value":1334},"1",{"type":43,"tag":263,"props":1336,"children":1337},{"style":298},[1338],{"type":49,"value":388},{"type":43,"tag":263,"props":1340,"children":1341},{"style":298},[1342],{"type":49,"value":402},{"type":43,"tag":263,"props":1344,"children":1345},{"class":265,"line":405},[1346,1350,1355,1359,1363,1367,1371,1375,1379,1383,1387,1392,1396,1400,1404,1408,1413,1417],{"type":43,"tag":263,"props":1347,"children":1348},{"style":286},[1349],{"type":49,"value":602},{"type":43,"tag":263,"props":1351,"children":1352},{"style":340},[1353],{"type":49,"value":1354}," limit",{"type":43,"tag":263,"props":1356,"children":1357},{"style":298},[1358],{"type":49,"value":612},{"type":43,"tag":263,"props":1360,"children":1361},{"style":340},[1362],{"type":49,"value":1222},{"type":43,"tag":263,"props":1364,"children":1365},{"style":298},[1366],{"type":49,"value":348},{"type":43,"tag":263,"props":1368,"children":1369},{"style":340},[1370],{"type":49,"value":1289},{"type":43,"tag":263,"props":1372,"children":1373},{"style":298},[1374],{"type":49,"value":348},{"type":43,"tag":263,"props":1376,"children":1377},{"style":292},[1378],{"type":49,"value":1298},{"type":43,"tag":263,"props":1380,"children":1381},{"style":356},[1382],{"type":49,"value":301},{"type":43,"tag":263,"props":1384,"children":1385},{"style":298},[1386],{"type":49,"value":388},{"type":43,"tag":263,"props":1388,"children":1389},{"style":380},[1390],{"type":49,"value":1391},"limit",{"type":43,"tag":263,"props":1393,"children":1394},{"style":298},[1395],{"type":49,"value":388},{"type":43,"tag":263,"props":1397,"children":1398},{"style":356},[1399],{"type":49,"value":1320},{"type":43,"tag":263,"props":1401,"children":1402},{"style":298},[1403],{"type":49,"value":1325},{"type":43,"tag":263,"props":1405,"children":1406},{"style":298},[1407],{"type":49,"value":377},{"type":43,"tag":263,"props":1409,"children":1410},{"style":380},[1411],{"type":49,"value":1412},"10",{"type":43,"tag":263,"props":1414,"children":1415},{"style":298},[1416],{"type":49,"value":388},{"type":43,"tag":263,"props":1418,"children":1419},{"style":298},[1420],{"type":49,"value":402},{"type":43,"tag":263,"props":1422,"children":1423},{"class":265,"line":540},[1424],{"type":43,"tag":263,"props":1425,"children":1426},{"emptyLinePlaceholder":544},[1427],{"type":49,"value":547},{"type":43,"tag":263,"props":1429,"children":1430},{"class":265,"line":550},[1431,1435,1439,1443,1447,1451,1455,1459,1463,1467,1471,1475],{"type":43,"tag":263,"props":1432,"children":1433},{"style":280},[1434],{"type":49,"value":337},{"type":43,"tag":263,"props":1436,"children":1437},{"style":340},[1438],{"type":49,"value":343},{"type":43,"tag":263,"props":1440,"children":1441},{"style":298},[1442],{"type":49,"value":348},{"type":43,"tag":263,"props":1444,"children":1445},{"style":292},[1446],{"type":49,"value":353},{"type":43,"tag":263,"props":1448,"children":1449},{"style":356},[1450],{"type":49,"value":301},{"type":43,"tag":263,"props":1452,"children":1453},{"style":298},[1454],{"type":49,"value":363},{"type":43,"tag":263,"props":1456,"children":1457},{"style":340},[1458],{"type":49,"value":1272},{"type":43,"tag":263,"props":1460,"children":1461},{"style":298},[1462],{"type":49,"value":1052},{"type":43,"tag":263,"props":1464,"children":1465},{"style":340},[1466],{"type":49,"value":1354},{"type":43,"tag":263,"props":1468,"children":1469},{"style":298},[1470],{"type":49,"value":393},{"type":43,"tag":263,"props":1472,"children":1473},{"style":356},[1474],{"type":49,"value":323},{"type":43,"tag":263,"props":1476,"children":1477},{"style":298},[1478],{"type":49,"value":402},{"type":43,"tag":263,"props":1480,"children":1481},{"class":265,"line":596},[1482],{"type":43,"tag":263,"props":1483,"children":1484},{"style":298},[1485],{"type":49,"value":411},{"type":43,"tag":1159,"props":1487,"children":1489},{"id":1488},"headers",[1490],{"type":49,"value":1491},"Headers",{"type":43,"tag":236,"props":1493,"children":1495},{"className":255,"code":1494,"language":257,"meta":244,"style":244},"export function GET(request: Request) {\n  const auth = request.headers.get(\"Authorization\");\n\n  if (!auth) {\n    return Response.json({ error: \"Unauthorized\" }, { status: 401 });\n  }\n\n  return Response.json({ authenticated: true });\n}\n",[1496],{"type":43,"tag":219,"props":1497,"children":1498},{"__ignoreMap":244},[1499,1538,1599,1606,1638,1721,1729,1736,1790],{"type":43,"tag":263,"props":1500,"children":1501},{"class":265,"line":266},[1502,1506,1510,1514,1518,1522,1526,1530,1534],{"type":43,"tag":263,"props":1503,"children":1504},{"style":280},[1505],{"type":49,"value":283},{"type":43,"tag":263,"props":1507,"children":1508},{"style":286},[1509],{"type":49,"value":289},{"type":43,"tag":263,"props":1511,"children":1512},{"style":292},[1513],{"type":49,"value":295},{"type":43,"tag":263,"props":1515,"children":1516},{"style":298},[1517],{"type":49,"value":301},{"type":43,"tag":263,"props":1519,"children":1520},{"style":304},[1521],{"type":49,"value":307},{"type":43,"tag":263,"props":1523,"children":1524},{"style":298},[1525],{"type":49,"value":312},{"type":43,"tag":263,"props":1527,"children":1528},{"style":315},[1529],{"type":49,"value":318},{"type":43,"tag":263,"props":1531,"children":1532},{"style":298},[1533],{"type":49,"value":323},{"type":43,"tag":263,"props":1535,"children":1536},{"style":298},[1537],{"type":49,"value":328},{"type":43,"tag":263,"props":1539,"children":1540},{"class":265,"line":276},[1541,1545,1550,1554,1558,1562,1566,1570,1574,1578,1582,1587,1591,1595],{"type":43,"tag":263,"props":1542,"children":1543},{"style":286},[1544],{"type":49,"value":602},{"type":43,"tag":263,"props":1546,"children":1547},{"style":340},[1548],{"type":49,"value":1549}," auth",{"type":43,"tag":263,"props":1551,"children":1552},{"style":298},[1553],{"type":49,"value":612},{"type":43,"tag":263,"props":1555,"children":1556},{"style":340},[1557],{"type":49,"value":622},{"type":43,"tag":263,"props":1559,"children":1560},{"style":298},[1561],{"type":49,"value":348},{"type":43,"tag":263,"props":1563,"children":1564},{"style":340},[1565],{"type":49,"value":1488},{"type":43,"tag":263,"props":1567,"children":1568},{"style":298},[1569],{"type":49,"value":348},{"type":43,"tag":263,"props":1571,"children":1572},{"style":292},[1573],{"type":49,"value":1298},{"type":43,"tag":263,"props":1575,"children":1576},{"style":356},[1577],{"type":49,"value":301},{"type":43,"tag":263,"props":1579,"children":1580},{"style":298},[1581],{"type":49,"value":388},{"type":43,"tag":263,"props":1583,"children":1584},{"style":380},[1585],{"type":49,"value":1586},"Authorization",{"type":43,"tag":263,"props":1588,"children":1589},{"style":298},[1590],{"type":49,"value":388},{"type":43,"tag":263,"props":1592,"children":1593},{"style":356},[1594],{"type":49,"value":323},{"type":43,"tag":263,"props":1596,"children":1597},{"style":298},[1598],{"type":49,"value":402},{"type":43,"tag":263,"props":1600,"children":1601},{"class":265,"line":331},[1602],{"type":43,"tag":263,"props":1603,"children":1604},{"emptyLinePlaceholder":544},[1605],{"type":49,"value":547},{"type":43,"tag":263,"props":1607,"children":1608},{"class":265,"line":405},[1609,1614,1619,1624,1629,1633],{"type":43,"tag":263,"props":1610,"children":1611},{"style":280},[1612],{"type":49,"value":1613},"  if",{"type":43,"tag":263,"props":1615,"children":1616},{"style":356},[1617],{"type":49,"value":1618}," (",{"type":43,"tag":263,"props":1620,"children":1621},{"style":298},[1622],{"type":49,"value":1623},"!",{"type":43,"tag":263,"props":1625,"children":1626},{"style":340},[1627],{"type":49,"value":1628},"auth",{"type":43,"tag":263,"props":1630,"children":1631},{"style":356},[1632],{"type":49,"value":1320},{"type":43,"tag":263,"props":1634,"children":1635},{"style":298},[1636],{"type":49,"value":1637},"{\n",{"type":43,"tag":263,"props":1639,"children":1640},{"class":265,"line":540},[1641,1646,1650,1654,1658,1662,1666,1671,1675,1679,1684,1688,1692,1696,1700,1704,1709,1713,1717],{"type":43,"tag":263,"props":1642,"children":1643},{"style":280},[1644],{"type":49,"value":1645},"    return",{"type":43,"tag":263,"props":1647,"children":1648},{"style":340},[1649],{"type":49,"value":343},{"type":43,"tag":263,"props":1651,"children":1652},{"style":298},[1653],{"type":49,"value":348},{"type":43,"tag":263,"props":1655,"children":1656},{"style":292},[1657],{"type":49,"value":353},{"type":43,"tag":263,"props":1659,"children":1660},{"style":356},[1661],{"type":49,"value":301},{"type":43,"tag":263,"props":1663,"children":1664},{"style":298},[1665],{"type":49,"value":363},{"type":43,"tag":263,"props":1667,"children":1668},{"style":356},[1669],{"type":49,"value":1670}," error",{"type":43,"tag":263,"props":1672,"children":1673},{"style":298},[1674],{"type":49,"value":312},{"type":43,"tag":263,"props":1676,"children":1677},{"style":298},[1678],{"type":49,"value":377},{"type":43,"tag":263,"props":1680,"children":1681},{"style":380},[1682],{"type":49,"value":1683},"Unauthorized",{"type":43,"tag":263,"props":1685,"children":1686},{"style":298},[1687],{"type":49,"value":388},{"type":43,"tag":263,"props":1689,"children":1690},{"style":298},[1691],{"type":49,"value":685},{"type":43,"tag":263,"props":1693,"children":1694},{"style":298},[1695],{"type":49,"value":690},{"type":43,"tag":263,"props":1697,"children":1698},{"style":356},[1699],{"type":49,"value":695},{"type":43,"tag":263,"props":1701,"children":1702},{"style":298},[1703],{"type":49,"value":312},{"type":43,"tag":263,"props":1705,"children":1706},{"style":702},[1707],{"type":49,"value":1708}," 401",{"type":43,"tag":263,"props":1710,"children":1711},{"style":298},[1712],{"type":49,"value":393},{"type":43,"tag":263,"props":1714,"children":1715},{"style":356},[1716],{"type":49,"value":323},{"type":43,"tag":263,"props":1718,"children":1719},{"style":298},[1720],{"type":49,"value":402},{"type":43,"tag":263,"props":1722,"children":1723},{"class":265,"line":550},[1724],{"type":43,"tag":263,"props":1725,"children":1726},{"style":298},[1727],{"type":49,"value":1728},"  }\n",{"type":43,"tag":263,"props":1730,"children":1731},{"class":265,"line":596},[1732],{"type":43,"tag":263,"props":1733,"children":1734},{"emptyLinePlaceholder":544},[1735],{"type":49,"value":547},{"type":43,"tag":263,"props":1737,"children":1738},{"class":265,"line":642},[1739,1743,1747,1751,1755,1759,1763,1768,1772,1778,1782,1786],{"type":43,"tag":263,"props":1740,"children":1741},{"style":280},[1742],{"type":49,"value":337},{"type":43,"tag":263,"props":1744,"children":1745},{"style":340},[1746],{"type":49,"value":343},{"type":43,"tag":263,"props":1748,"children":1749},{"style":298},[1750],{"type":49,"value":348},{"type":43,"tag":263,"props":1752,"children":1753},{"style":292},[1754],{"type":49,"value":353},{"type":43,"tag":263,"props":1756,"children":1757},{"style":356},[1758],{"type":49,"value":301},{"type":43,"tag":263,"props":1760,"children":1761},{"style":298},[1762],{"type":49,"value":363},{"type":43,"tag":263,"props":1764,"children":1765},{"style":356},[1766],{"type":49,"value":1767}," authenticated",{"type":43,"tag":263,"props":1769,"children":1770},{"style":298},[1771],{"type":49,"value":312},{"type":43,"tag":263,"props":1773,"children":1775},{"style":1774},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[1776],{"type":49,"value":1777}," true",{"type":43,"tag":263,"props":1779,"children":1780},{"style":298},[1781],{"type":49,"value":393},{"type":43,"tag":263,"props":1783,"children":1784},{"style":356},[1785],{"type":49,"value":323},{"type":43,"tag":263,"props":1787,"children":1788},{"style":298},[1789],{"type":49,"value":402},{"type":43,"tag":263,"props":1791,"children":1792},{"class":265,"line":720},[1793],{"type":43,"tag":263,"props":1794,"children":1795},{"style":298},[1796],{"type":49,"value":411},{"type":43,"tag":1159,"props":1798,"children":1800},{"id":1799},"json-body",[1801],{"type":49,"value":1802},"JSON Body",{"type":43,"tag":236,"props":1804,"children":1806},{"className":255,"code":1805,"language":257,"meta":244,"style":244},"export async function POST(request: Request) {\n  const { email, password } = await request.json();\n\n  if (!email || !password) {\n    return Response.json({ error: \"Missing fields\" }, { status: 400 });\n  }\n\n  return Response.json({ success: true });\n}\n",[1807],{"type":43,"tag":219,"props":1808,"children":1809},{"__ignoreMap":244},[1810,1853,1910,1917,1960,2041,2048,2055,2107],{"type":43,"tag":263,"props":1811,"children":1812},{"class":265,"line":266},[1813,1817,1821,1825,1829,1833,1837,1841,1845,1849],{"type":43,"tag":263,"props":1814,"children":1815},{"style":280},[1816],{"type":49,"value":283},{"type":43,"tag":263,"props":1818,"children":1819},{"style":286},[1820],{"type":49,"value":560},{"type":43,"tag":263,"props":1822,"children":1823},{"style":286},[1824],{"type":49,"value":289},{"type":43,"tag":263,"props":1826,"children":1827},{"style":292},[1828],{"type":49,"value":569},{"type":43,"tag":263,"props":1830,"children":1831},{"style":298},[1832],{"type":49,"value":301},{"type":43,"tag":263,"props":1834,"children":1835},{"style":304},[1836],{"type":49,"value":307},{"type":43,"tag":263,"props":1838,"children":1839},{"style":298},[1840],{"type":49,"value":312},{"type":43,"tag":263,"props":1842,"children":1843},{"style":315},[1844],{"type":49,"value":318},{"type":43,"tag":263,"props":1846,"children":1847},{"style":298},[1848],{"type":49,"value":323},{"type":43,"tag":263,"props":1850,"children":1851},{"style":298},[1852],{"type":49,"value":328},{"type":43,"tag":263,"props":1854,"children":1855},{"class":265,"line":276},[1856,1860,1864,1869,1873,1878,1882,1886,1890,1894,1898,1902,1906],{"type":43,"tag":263,"props":1857,"children":1858},{"style":286},[1859],{"type":49,"value":602},{"type":43,"tag":263,"props":1861,"children":1862},{"style":298},[1863],{"type":49,"value":690},{"type":43,"tag":263,"props":1865,"children":1866},{"style":340},[1867],{"type":49,"value":1868}," email",{"type":43,"tag":263,"props":1870,"children":1871},{"style":298},[1872],{"type":49,"value":1052},{"type":43,"tag":263,"props":1874,"children":1875},{"style":340},[1876],{"type":49,"value":1877}," password",{"type":43,"tag":263,"props":1879,"children":1880},{"style":298},[1881],{"type":49,"value":393},{"type":43,"tag":263,"props":1883,"children":1884},{"style":298},[1885],{"type":49,"value":612},{"type":43,"tag":263,"props":1887,"children":1888},{"style":280},[1889],{"type":49,"value":617},{"type":43,"tag":263,"props":1891,"children":1892},{"style":340},[1893],{"type":49,"value":622},{"type":43,"tag":263,"props":1895,"children":1896},{"style":298},[1897],{"type":49,"value":348},{"type":43,"tag":263,"props":1899,"children":1900},{"style":292},[1901],{"type":49,"value":353},{"type":43,"tag":263,"props":1903,"children":1904},{"style":356},[1905],{"type":49,"value":635},{"type":43,"tag":263,"props":1907,"children":1908},{"style":298},[1909],{"type":49,"value":402},{"type":43,"tag":263,"props":1911,"children":1912},{"class":265,"line":331},[1913],{"type":43,"tag":263,"props":1914,"children":1915},{"emptyLinePlaceholder":544},[1916],{"type":49,"value":547},{"type":43,"tag":263,"props":1918,"children":1919},{"class":265,"line":405},[1920,1924,1928,1932,1937,1942,1947,1952,1956],{"type":43,"tag":263,"props":1921,"children":1922},{"style":280},[1923],{"type":49,"value":1613},{"type":43,"tag":263,"props":1925,"children":1926},{"style":356},[1927],{"type":49,"value":1618},{"type":43,"tag":263,"props":1929,"children":1930},{"style":298},[1931],{"type":49,"value":1623},{"type":43,"tag":263,"props":1933,"children":1934},{"style":340},[1935],{"type":49,"value":1936},"email",{"type":43,"tag":263,"props":1938,"children":1939},{"style":298},[1940],{"type":49,"value":1941}," ||",{"type":43,"tag":263,"props":1943,"children":1944},{"style":298},[1945],{"type":49,"value":1946}," !",{"type":43,"tag":263,"props":1948,"children":1949},{"style":340},[1950],{"type":49,"value":1951},"password",{"type":43,"tag":263,"props":1953,"children":1954},{"style":356},[1955],{"type":49,"value":1320},{"type":43,"tag":263,"props":1957,"children":1958},{"style":298},[1959],{"type":49,"value":1637},{"type":43,"tag":263,"props":1961,"children":1962},{"class":265,"line":540},[1963,1967,1971,1975,1979,1983,1987,1991,1995,1999,2004,2008,2012,2016,2020,2024,2029,2033,2037],{"type":43,"tag":263,"props":1964,"children":1965},{"style":280},[1966],{"type":49,"value":1645},{"type":43,"tag":263,"props":1968,"children":1969},{"style":340},[1970],{"type":49,"value":343},{"type":43,"tag":263,"props":1972,"children":1973},{"style":298},[1974],{"type":49,"value":348},{"type":43,"tag":263,"props":1976,"children":1977},{"style":292},[1978],{"type":49,"value":353},{"type":43,"tag":263,"props":1980,"children":1981},{"style":356},[1982],{"type":49,"value":301},{"type":43,"tag":263,"props":1984,"children":1985},{"style":298},[1986],{"type":49,"value":363},{"type":43,"tag":263,"props":1988,"children":1989},{"style":356},[1990],{"type":49,"value":1670},{"type":43,"tag":263,"props":1992,"children":1993},{"style":298},[1994],{"type":49,"value":312},{"type":43,"tag":263,"props":1996,"children":1997},{"style":298},[1998],{"type":49,"value":377},{"type":43,"tag":263,"props":2000,"children":2001},{"style":380},[2002],{"type":49,"value":2003},"Missing fields",{"type":43,"tag":263,"props":2005,"children":2006},{"style":298},[2007],{"type":49,"value":388},{"type":43,"tag":263,"props":2009,"children":2010},{"style":298},[2011],{"type":49,"value":685},{"type":43,"tag":263,"props":2013,"children":2014},{"style":298},[2015],{"type":49,"value":690},{"type":43,"tag":263,"props":2017,"children":2018},{"style":356},[2019],{"type":49,"value":695},{"type":43,"tag":263,"props":2021,"children":2022},{"style":298},[2023],{"type":49,"value":312},{"type":43,"tag":263,"props":2025,"children":2026},{"style":702},[2027],{"type":49,"value":2028}," 400",{"type":43,"tag":263,"props":2030,"children":2031},{"style":298},[2032],{"type":49,"value":393},{"type":43,"tag":263,"props":2034,"children":2035},{"style":356},[2036],{"type":49,"value":323},{"type":43,"tag":263,"props":2038,"children":2039},{"style":298},[2040],{"type":49,"value":402},{"type":43,"tag":263,"props":2042,"children":2043},{"class":265,"line":550},[2044],{"type":43,"tag":263,"props":2045,"children":2046},{"style":298},[2047],{"type":49,"value":1728},{"type":43,"tag":263,"props":2049,"children":2050},{"class":265,"line":596},[2051],{"type":43,"tag":263,"props":2052,"children":2053},{"emptyLinePlaceholder":544},[2054],{"type":49,"value":547},{"type":43,"tag":263,"props":2056,"children":2057},{"class":265,"line":642},[2058,2062,2066,2070,2074,2078,2082,2087,2091,2095,2099,2103],{"type":43,"tag":263,"props":2059,"children":2060},{"style":280},[2061],{"type":49,"value":337},{"type":43,"tag":263,"props":2063,"children":2064},{"style":340},[2065],{"type":49,"value":343},{"type":43,"tag":263,"props":2067,"children":2068},{"style":298},[2069],{"type":49,"value":348},{"type":43,"tag":263,"props":2071,"children":2072},{"style":292},[2073],{"type":49,"value":353},{"type":43,"tag":263,"props":2075,"children":2076},{"style":356},[2077],{"type":49,"value":301},{"type":43,"tag":263,"props":2079,"children":2080},{"style":298},[2081],{"type":49,"value":363},{"type":43,"tag":263,"props":2083,"children":2084},{"style":356},[2085],{"type":49,"value":2086}," success",{"type":43,"tag":263,"props":2088,"children":2089},{"style":298},[2090],{"type":49,"value":312},{"type":43,"tag":263,"props":2092,"children":2093},{"style":1774},[2094],{"type":49,"value":1777},{"type":43,"tag":263,"props":2096,"children":2097},{"style":298},[2098],{"type":49,"value":393},{"type":43,"tag":263,"props":2100,"children":2101},{"style":356},[2102],{"type":49,"value":323},{"type":43,"tag":263,"props":2104,"children":2105},{"style":298},[2106],{"type":49,"value":402},{"type":43,"tag":263,"props":2108,"children":2109},{"class":265,"line":720},[2110],{"type":43,"tag":263,"props":2111,"children":2112},{"style":298},[2113],{"type":49,"value":411},{"type":43,"tag":44,"props":2115,"children":2117},{"id":2116},"environment-variables",[2118],{"type":49,"value":2119},"Environment Variables",{"type":43,"tag":52,"props":2121,"children":2122},{},[2123,2125,2131],{"type":49,"value":2124},"Use ",{"type":43,"tag":219,"props":2126,"children":2128},{"className":2127},[],[2129],{"type":49,"value":2130},"process.env",{"type":49,"value":2132}," for server-side secrets:",{"type":43,"tag":236,"props":2134,"children":2136},{"className":255,"code":2135,"language":257,"meta":244,"style":244},"\u002F\u002F app\u002Fapi\u002Fai+api.ts\nexport async function POST(request: Request) {\n  const { prompt } = await request.json();\n\n  const response = await fetch(\"https:\u002F\u002Fapi.openai.com\u002Fv1\u002Fchat\u002Fcompletions\", {\n    method: \"POST\",\n    headers: {\n      \"Content-Type\": \"application\u002Fjson\",\n      Authorization: `Bearer ${process.env.OPENAI_API_KEY}`,\n    },\n    body: JSON.stringify({\n      model: \"gpt-4\",\n      messages: [{ role: \"user\", content: prompt }],\n    }),\n  });\n\n  const data = await response.json();\n  return Response.json(data);\n}\n",[2137],{"type":43,"tag":219,"props":2138,"children":2139},{"__ignoreMap":244},[2140,2148,2191,2239,2246,2296,2326,2342,2380,2439,2447,2481,2510,2583,2599,2615,2622,2662,2698],{"type":43,"tag":263,"props":2141,"children":2142},{"class":265,"line":266},[2143],{"type":43,"tag":263,"props":2144,"children":2145},{"style":270},[2146],{"type":49,"value":2147},"\u002F\u002F app\u002Fapi\u002Fai+api.ts\n",{"type":43,"tag":263,"props":2149,"children":2150},{"class":265,"line":276},[2151,2155,2159,2163,2167,2171,2175,2179,2183,2187],{"type":43,"tag":263,"props":2152,"children":2153},{"style":280},[2154],{"type":49,"value":283},{"type":43,"tag":263,"props":2156,"children":2157},{"style":286},[2158],{"type":49,"value":560},{"type":43,"tag":263,"props":2160,"children":2161},{"style":286},[2162],{"type":49,"value":289},{"type":43,"tag":263,"props":2164,"children":2165},{"style":292},[2166],{"type":49,"value":569},{"type":43,"tag":263,"props":2168,"children":2169},{"style":298},[2170],{"type":49,"value":301},{"type":43,"tag":263,"props":2172,"children":2173},{"style":304},[2174],{"type":49,"value":307},{"type":43,"tag":263,"props":2176,"children":2177},{"style":298},[2178],{"type":49,"value":312},{"type":43,"tag":263,"props":2180,"children":2181},{"style":315},[2182],{"type":49,"value":318},{"type":43,"tag":263,"props":2184,"children":2185},{"style":298},[2186],{"type":49,"value":323},{"type":43,"tag":263,"props":2188,"children":2189},{"style":298},[2190],{"type":49,"value":328},{"type":43,"tag":263,"props":2192,"children":2193},{"class":265,"line":331},[2194,2198,2202,2207,2211,2215,2219,2223,2227,2231,2235],{"type":43,"tag":263,"props":2195,"children":2196},{"style":286},[2197],{"type":49,"value":602},{"type":43,"tag":263,"props":2199,"children":2200},{"style":298},[2201],{"type":49,"value":690},{"type":43,"tag":263,"props":2203,"children":2204},{"style":340},[2205],{"type":49,"value":2206}," prompt",{"type":43,"tag":263,"props":2208,"children":2209},{"style":298},[2210],{"type":49,"value":393},{"type":43,"tag":263,"props":2212,"children":2213},{"style":298},[2214],{"type":49,"value":612},{"type":43,"tag":263,"props":2216,"children":2217},{"style":280},[2218],{"type":49,"value":617},{"type":43,"tag":263,"props":2220,"children":2221},{"style":340},[2222],{"type":49,"value":622},{"type":43,"tag":263,"props":2224,"children":2225},{"style":298},[2226],{"type":49,"value":348},{"type":43,"tag":263,"props":2228,"children":2229},{"style":292},[2230],{"type":49,"value":353},{"type":43,"tag":263,"props":2232,"children":2233},{"style":356},[2234],{"type":49,"value":635},{"type":43,"tag":263,"props":2236,"children":2237},{"style":298},[2238],{"type":49,"value":402},{"type":43,"tag":263,"props":2240,"children":2241},{"class":265,"line":405},[2242],{"type":43,"tag":263,"props":2243,"children":2244},{"emptyLinePlaceholder":544},[2245],{"type":49,"value":547},{"type":43,"tag":263,"props":2247,"children":2248},{"class":265,"line":540},[2249,2253,2258,2262,2266,2271,2275,2279,2284,2288,2292],{"type":43,"tag":263,"props":2250,"children":2251},{"style":286},[2252],{"type":49,"value":602},{"type":43,"tag":263,"props":2254,"children":2255},{"style":340},[2256],{"type":49,"value":2257}," response",{"type":43,"tag":263,"props":2259,"children":2260},{"style":298},[2261],{"type":49,"value":612},{"type":43,"tag":263,"props":2263,"children":2264},{"style":280},[2265],{"type":49,"value":617},{"type":43,"tag":263,"props":2267,"children":2268},{"style":292},[2269],{"type":49,"value":2270}," fetch",{"type":43,"tag":263,"props":2272,"children":2273},{"style":356},[2274],{"type":49,"value":301},{"type":43,"tag":263,"props":2276,"children":2277},{"style":298},[2278],{"type":49,"value":388},{"type":43,"tag":263,"props":2280,"children":2281},{"style":380},[2282],{"type":49,"value":2283},"https:\u002F\u002Fapi.openai.com\u002Fv1\u002Fchat\u002Fcompletions",{"type":43,"tag":263,"props":2285,"children":2286},{"style":298},[2287],{"type":49,"value":388},{"type":43,"tag":263,"props":2289,"children":2290},{"style":298},[2291],{"type":49,"value":1052},{"type":43,"tag":263,"props":2293,"children":2294},{"style":298},[2295],{"type":49,"value":328},{"type":43,"tag":263,"props":2297,"children":2298},{"class":265,"line":550},[2299,2304,2308,2312,2317,2321],{"type":43,"tag":263,"props":2300,"children":2301},{"style":356},[2302],{"type":49,"value":2303},"    method",{"type":43,"tag":263,"props":2305,"children":2306},{"style":298},[2307],{"type":49,"value":312},{"type":43,"tag":263,"props":2309,"children":2310},{"style":298},[2311],{"type":49,"value":377},{"type":43,"tag":263,"props":2313,"children":2314},{"style":380},[2315],{"type":49,"value":2316},"POST",{"type":43,"tag":263,"props":2318,"children":2319},{"style":298},[2320],{"type":49,"value":388},{"type":43,"tag":263,"props":2322,"children":2323},{"style":298},[2324],{"type":49,"value":2325},",\n",{"type":43,"tag":263,"props":2327,"children":2328},{"class":265,"line":596},[2329,2334,2338],{"type":43,"tag":263,"props":2330,"children":2331},{"style":356},[2332],{"type":49,"value":2333},"    headers",{"type":43,"tag":263,"props":2335,"children":2336},{"style":298},[2337],{"type":49,"value":312},{"type":43,"tag":263,"props":2339,"children":2340},{"style":298},[2341],{"type":49,"value":328},{"type":43,"tag":263,"props":2343,"children":2344},{"class":265,"line":642},[2345,2350,2355,2359,2363,2367,2372,2376],{"type":43,"tag":263,"props":2346,"children":2347},{"style":298},[2348],{"type":49,"value":2349},"      \"",{"type":43,"tag":263,"props":2351,"children":2352},{"style":356},[2353],{"type":49,"value":2354},"Content-Type",{"type":43,"tag":263,"props":2356,"children":2357},{"style":298},[2358],{"type":49,"value":388},{"type":43,"tag":263,"props":2360,"children":2361},{"style":298},[2362],{"type":49,"value":312},{"type":43,"tag":263,"props":2364,"children":2365},{"style":298},[2366],{"type":49,"value":377},{"type":43,"tag":263,"props":2368,"children":2369},{"style":380},[2370],{"type":49,"value":2371},"application\u002Fjson",{"type":43,"tag":263,"props":2373,"children":2374},{"style":298},[2375],{"type":49,"value":388},{"type":43,"tag":263,"props":2377,"children":2378},{"style":298},[2379],{"type":49,"value":2325},{"type":43,"tag":263,"props":2381,"children":2382},{"class":265,"line":720},[2383,2388,2392,2397,2402,2407,2412,2416,2421,2425,2430,2435],{"type":43,"tag":263,"props":2384,"children":2385},{"style":356},[2386],{"type":49,"value":2387},"      Authorization",{"type":43,"tag":263,"props":2389,"children":2390},{"style":298},[2391],{"type":49,"value":312},{"type":43,"tag":263,"props":2393,"children":2394},{"style":298},[2395],{"type":49,"value":2396}," `",{"type":43,"tag":263,"props":2398,"children":2399},{"style":380},[2400],{"type":49,"value":2401},"Bearer ",{"type":43,"tag":263,"props":2403,"children":2404},{"style":298},[2405],{"type":49,"value":2406},"${",{"type":43,"tag":263,"props":2408,"children":2409},{"style":340},[2410],{"type":49,"value":2411},"process",{"type":43,"tag":263,"props":2413,"children":2414},{"style":298},[2415],{"type":49,"value":348},{"type":43,"tag":263,"props":2417,"children":2418},{"style":340},[2419],{"type":49,"value":2420},"env",{"type":43,"tag":263,"props":2422,"children":2423},{"style":298},[2424],{"type":49,"value":348},{"type":43,"tag":263,"props":2426,"children":2427},{"style":340},[2428],{"type":49,"value":2429},"OPENAI_API_KEY",{"type":43,"tag":263,"props":2431,"children":2432},{"style":298},[2433],{"type":49,"value":2434},"}`",{"type":43,"tag":263,"props":2436,"children":2437},{"style":298},[2438],{"type":49,"value":2325},{"type":43,"tag":263,"props":2440,"children":2441},{"class":265,"line":728},[2442],{"type":43,"tag":263,"props":2443,"children":2444},{"style":298},[2445],{"type":49,"value":2446},"    },\n",{"type":43,"tag":263,"props":2448,"children":2449},{"class":265,"line":736},[2450,2455,2459,2464,2468,2473,2477],{"type":43,"tag":263,"props":2451,"children":2452},{"style":356},[2453],{"type":49,"value":2454},"    body",{"type":43,"tag":263,"props":2456,"children":2457},{"style":298},[2458],{"type":49,"value":312},{"type":43,"tag":263,"props":2460,"children":2461},{"style":340},[2462],{"type":49,"value":2463}," JSON",{"type":43,"tag":263,"props":2465,"children":2466},{"style":298},[2467],{"type":49,"value":348},{"type":43,"tag":263,"props":2469,"children":2470},{"style":292},[2471],{"type":49,"value":2472},"stringify",{"type":43,"tag":263,"props":2474,"children":2475},{"style":356},[2476],{"type":49,"value":301},{"type":43,"tag":263,"props":2478,"children":2479},{"style":298},[2480],{"type":49,"value":1637},{"type":43,"tag":263,"props":2482,"children":2483},{"class":265,"line":781},[2484,2489,2493,2497,2502,2506],{"type":43,"tag":263,"props":2485,"children":2486},{"style":356},[2487],{"type":49,"value":2488},"      model",{"type":43,"tag":263,"props":2490,"children":2491},{"style":298},[2492],{"type":49,"value":312},{"type":43,"tag":263,"props":2494,"children":2495},{"style":298},[2496],{"type":49,"value":377},{"type":43,"tag":263,"props":2498,"children":2499},{"style":380},[2500],{"type":49,"value":2501},"gpt-4",{"type":43,"tag":263,"props":2503,"children":2504},{"style":298},[2505],{"type":49,"value":388},{"type":43,"tag":263,"props":2507,"children":2508},{"style":298},[2509],{"type":49,"value":2325},{"type":43,"tag":263,"props":2511,"children":2512},{"class":265,"line":821},[2513,2518,2522,2527,2531,2536,2540,2544,2549,2553,2557,2562,2566,2570,2574,2579],{"type":43,"tag":263,"props":2514,"children":2515},{"style":356},[2516],{"type":49,"value":2517},"      messages",{"type":43,"tag":263,"props":2519,"children":2520},{"style":298},[2521],{"type":49,"value":312},{"type":43,"tag":263,"props":2523,"children":2524},{"style":356},[2525],{"type":49,"value":2526}," [",{"type":43,"tag":263,"props":2528,"children":2529},{"style":298},[2530],{"type":49,"value":363},{"type":43,"tag":263,"props":2532,"children":2533},{"style":356},[2534],{"type":49,"value":2535}," role",{"type":43,"tag":263,"props":2537,"children":2538},{"style":298},[2539],{"type":49,"value":312},{"type":43,"tag":263,"props":2541,"children":2542},{"style":298},[2543],{"type":49,"value":377},{"type":43,"tag":263,"props":2545,"children":2546},{"style":380},[2547],{"type":49,"value":2548},"user",{"type":43,"tag":263,"props":2550,"children":2551},{"style":298},[2552],{"type":49,"value":388},{"type":43,"tag":263,"props":2554,"children":2555},{"style":298},[2556],{"type":49,"value":1052},{"type":43,"tag":263,"props":2558,"children":2559},{"style":356},[2560],{"type":49,"value":2561}," content",{"type":43,"tag":263,"props":2563,"children":2564},{"style":298},[2565],{"type":49,"value":312},{"type":43,"tag":263,"props":2567,"children":2568},{"style":340},[2569],{"type":49,"value":2206},{"type":43,"tag":263,"props":2571,"children":2572},{"style":298},[2573],{"type":49,"value":393},{"type":43,"tag":263,"props":2575,"children":2576},{"style":356},[2577],{"type":49,"value":2578},"]",{"type":43,"tag":263,"props":2580,"children":2581},{"style":298},[2582],{"type":49,"value":2325},{"type":43,"tag":263,"props":2584,"children":2585},{"class":265,"line":874},[2586,2591,2595],{"type":43,"tag":263,"props":2587,"children":2588},{"style":298},[2589],{"type":49,"value":2590},"    }",{"type":43,"tag":263,"props":2592,"children":2593},{"style":356},[2594],{"type":49,"value":323},{"type":43,"tag":263,"props":2596,"children":2597},{"style":298},[2598],{"type":49,"value":2325},{"type":43,"tag":263,"props":2600,"children":2601},{"class":265,"line":882},[2602,2607,2611],{"type":43,"tag":263,"props":2603,"children":2604},{"style":298},[2605],{"type":49,"value":2606},"  }",{"type":43,"tag":263,"props":2608,"children":2609},{"style":356},[2610],{"type":49,"value":323},{"type":43,"tag":263,"props":2612,"children":2613},{"style":298},[2614],{"type":49,"value":402},{"type":43,"tag":263,"props":2616,"children":2617},{"class":265,"line":890},[2618],{"type":43,"tag":263,"props":2619,"children":2620},{"emptyLinePlaceholder":544},[2621],{"type":49,"value":547},{"type":43,"tag":263,"props":2623,"children":2624},{"class":265,"line":935},[2625,2629,2634,2638,2642,2646,2650,2654,2658],{"type":43,"tag":263,"props":2626,"children":2627},{"style":286},[2628],{"type":49,"value":602},{"type":43,"tag":263,"props":2630,"children":2631},{"style":340},[2632],{"type":49,"value":2633}," data",{"type":43,"tag":263,"props":2635,"children":2636},{"style":298},[2637],{"type":49,"value":612},{"type":43,"tag":263,"props":2639,"children":2640},{"style":280},[2641],{"type":49,"value":617},{"type":43,"tag":263,"props":2643,"children":2644},{"style":340},[2645],{"type":49,"value":2257},{"type":43,"tag":263,"props":2647,"children":2648},{"style":298},[2649],{"type":49,"value":348},{"type":43,"tag":263,"props":2651,"children":2652},{"style":292},[2653],{"type":49,"value":353},{"type":43,"tag":263,"props":2655,"children":2656},{"style":356},[2657],{"type":49,"value":635},{"type":43,"tag":263,"props":2659,"children":2660},{"style":298},[2661],{"type":49,"value":402},{"type":43,"tag":263,"props":2663,"children":2664},{"class":265,"line":990},[2665,2669,2673,2677,2681,2685,2690,2694],{"type":43,"tag":263,"props":2666,"children":2667},{"style":280},[2668],{"type":49,"value":337},{"type":43,"tag":263,"props":2670,"children":2671},{"style":340},[2672],{"type":49,"value":343},{"type":43,"tag":263,"props":2674,"children":2675},{"style":298},[2676],{"type":49,"value":348},{"type":43,"tag":263,"props":2678,"children":2679},{"style":292},[2680],{"type":49,"value":353},{"type":43,"tag":263,"props":2682,"children":2683},{"style":356},[2684],{"type":49,"value":301},{"type":43,"tag":263,"props":2686,"children":2687},{"style":340},[2688],{"type":49,"value":2689},"data",{"type":43,"tag":263,"props":2691,"children":2692},{"style":356},[2693],{"type":49,"value":323},{"type":43,"tag":263,"props":2695,"children":2696},{"style":298},[2697],{"type":49,"value":402},{"type":43,"tag":263,"props":2699,"children":2701},{"class":265,"line":2700},19,[2702],{"type":43,"tag":263,"props":2703,"children":2704},{"style":298},[2705],{"type":49,"value":411},{"type":43,"tag":52,"props":2707,"children":2708},{},[2709],{"type":49,"value":2710},"Set environment variables:",{"type":43,"tag":58,"props":2712,"children":2713},{},[2714,2732],{"type":43,"tag":62,"props":2715,"children":2716},{},[2717,2722,2724,2730],{"type":43,"tag":66,"props":2718,"children":2719},{},[2720],{"type":49,"value":2721},"Local",{"type":49,"value":2723},": Create ",{"type":43,"tag":219,"props":2725,"children":2727},{"className":2726},[],[2728],{"type":49,"value":2729},".env",{"type":49,"value":2731}," file (never commit)",{"type":43,"tag":62,"props":2733,"children":2734},{},[2735,2740,2742,2748],{"type":43,"tag":66,"props":2736,"children":2737},{},[2738],{"type":49,"value":2739},"EAS Hosting",{"type":49,"value":2741},": Use ",{"type":43,"tag":219,"props":2743,"children":2745},{"className":2744},[],[2746],{"type":49,"value":2747},"eas env:create",{"type":49,"value":2749}," or Expo dashboard",{"type":43,"tag":44,"props":2751,"children":2753},{"id":2752},"cors-headers",[2754],{"type":49,"value":2755},"CORS Headers",{"type":43,"tag":52,"props":2757,"children":2758},{},[2759],{"type":49,"value":2760},"Add CORS for web clients:",{"type":43,"tag":236,"props":2762,"children":2764},{"className":255,"code":2763,"language":257,"meta":244,"style":244},"const corsHeaders = {\n  \"Access-Control-Allow-Origin\": \"*\",\n  \"Access-Control-Allow-Methods\": \"GET, POST, PUT, DELETE, OPTIONS\",\n  \"Access-Control-Allow-Headers\": \"Content-Type, Authorization\",\n};\n\nexport function OPTIONS() {\n  return new Response(null, { headers: corsHeaders });\n}\n\nexport function GET() {\n  return Response.json({ data: \"value\" }, { headers: corsHeaders });\n}\n",[2765],{"type":43,"tag":219,"props":2766,"children":2767},{"__ignoreMap":244},[2768,2790,2828,2865,2902,2910,2917,2941,2994,3001,3008,3031,3111],{"type":43,"tag":263,"props":2769,"children":2770},{"class":265,"line":266},[2771,2776,2781,2786],{"type":43,"tag":263,"props":2772,"children":2773},{"style":286},[2774],{"type":49,"value":2775},"const",{"type":43,"tag":263,"props":2777,"children":2778},{"style":340},[2779],{"type":49,"value":2780}," corsHeaders ",{"type":43,"tag":263,"props":2782,"children":2783},{"style":298},[2784],{"type":49,"value":2785},"=",{"type":43,"tag":263,"props":2787,"children":2788},{"style":298},[2789],{"type":49,"value":328},{"type":43,"tag":263,"props":2791,"children":2792},{"class":265,"line":276},[2793,2798,2803,2807,2811,2815,2820,2824],{"type":43,"tag":263,"props":2794,"children":2795},{"style":298},[2796],{"type":49,"value":2797},"  \"",{"type":43,"tag":263,"props":2799,"children":2800},{"style":356},[2801],{"type":49,"value":2802},"Access-Control-Allow-Origin",{"type":43,"tag":263,"props":2804,"children":2805},{"style":298},[2806],{"type":49,"value":388},{"type":43,"tag":263,"props":2808,"children":2809},{"style":298},[2810],{"type":49,"value":312},{"type":43,"tag":263,"props":2812,"children":2813},{"style":298},[2814],{"type":49,"value":377},{"type":43,"tag":263,"props":2816,"children":2817},{"style":380},[2818],{"type":49,"value":2819},"*",{"type":43,"tag":263,"props":2821,"children":2822},{"style":298},[2823],{"type":49,"value":388},{"type":43,"tag":263,"props":2825,"children":2826},{"style":298},[2827],{"type":49,"value":2325},{"type":43,"tag":263,"props":2829,"children":2830},{"class":265,"line":331},[2831,2835,2840,2844,2848,2852,2857,2861],{"type":43,"tag":263,"props":2832,"children":2833},{"style":298},[2834],{"type":49,"value":2797},{"type":43,"tag":263,"props":2836,"children":2837},{"style":356},[2838],{"type":49,"value":2839},"Access-Control-Allow-Methods",{"type":43,"tag":263,"props":2841,"children":2842},{"style":298},[2843],{"type":49,"value":388},{"type":43,"tag":263,"props":2845,"children":2846},{"style":298},[2847],{"type":49,"value":312},{"type":43,"tag":263,"props":2849,"children":2850},{"style":298},[2851],{"type":49,"value":377},{"type":43,"tag":263,"props":2853,"children":2854},{"style":380},[2855],{"type":49,"value":2856},"GET, POST, PUT, DELETE, OPTIONS",{"type":43,"tag":263,"props":2858,"children":2859},{"style":298},[2860],{"type":49,"value":388},{"type":43,"tag":263,"props":2862,"children":2863},{"style":298},[2864],{"type":49,"value":2325},{"type":43,"tag":263,"props":2866,"children":2867},{"class":265,"line":405},[2868,2872,2877,2881,2885,2889,2894,2898],{"type":43,"tag":263,"props":2869,"children":2870},{"style":298},[2871],{"type":49,"value":2797},{"type":43,"tag":263,"props":2873,"children":2874},{"style":356},[2875],{"type":49,"value":2876},"Access-Control-Allow-Headers",{"type":43,"tag":263,"props":2878,"children":2879},{"style":298},[2880],{"type":49,"value":388},{"type":43,"tag":263,"props":2882,"children":2883},{"style":298},[2884],{"type":49,"value":312},{"type":43,"tag":263,"props":2886,"children":2887},{"style":298},[2888],{"type":49,"value":377},{"type":43,"tag":263,"props":2890,"children":2891},{"style":380},[2892],{"type":49,"value":2893},"Content-Type, Authorization",{"type":43,"tag":263,"props":2895,"children":2896},{"style":298},[2897],{"type":49,"value":388},{"type":43,"tag":263,"props":2899,"children":2900},{"style":298},[2901],{"type":49,"value":2325},{"type":43,"tag":263,"props":2903,"children":2904},{"class":265,"line":540},[2905],{"type":43,"tag":263,"props":2906,"children":2907},{"style":298},[2908],{"type":49,"value":2909},"};\n",{"type":43,"tag":263,"props":2911,"children":2912},{"class":265,"line":550},[2913],{"type":43,"tag":263,"props":2914,"children":2915},{"emptyLinePlaceholder":544},[2916],{"type":49,"value":547},{"type":43,"tag":263,"props":2918,"children":2919},{"class":265,"line":596},[2920,2924,2928,2933,2937],{"type":43,"tag":263,"props":2921,"children":2922},{"style":280},[2923],{"type":49,"value":283},{"type":43,"tag":263,"props":2925,"children":2926},{"style":286},[2927],{"type":49,"value":289},{"type":43,"tag":263,"props":2929,"children":2930},{"style":292},[2931],{"type":49,"value":2932}," OPTIONS",{"type":43,"tag":263,"props":2934,"children":2935},{"style":298},[2936],{"type":49,"value":635},{"type":43,"tag":263,"props":2938,"children":2939},{"style":298},[2940],{"type":49,"value":328},{"type":43,"tag":263,"props":2942,"children":2943},{"class":265,"line":642},[2944,2948,2952,2956,2960,2964,2968,2973,2977,2982,2986,2990],{"type":43,"tag":263,"props":2945,"children":2946},{"style":280},[2947],{"type":49,"value":337},{"type":43,"tag":263,"props":2949,"children":2950},{"style":298},[2951],{"type":49,"value":945},{"type":43,"tag":263,"props":2953,"children":2954},{"style":292},[2955],{"type":49,"value":343},{"type":43,"tag":263,"props":2957,"children":2958},{"style":356},[2959],{"type":49,"value":301},{"type":43,"tag":263,"props":2961,"children":2962},{"style":298},[2963],{"type":49,"value":958},{"type":43,"tag":263,"props":2965,"children":2966},{"style":298},[2967],{"type":49,"value":690},{"type":43,"tag":263,"props":2969,"children":2970},{"style":356},[2971],{"type":49,"value":2972}," headers",{"type":43,"tag":263,"props":2974,"children":2975},{"style":298},[2976],{"type":49,"value":312},{"type":43,"tag":263,"props":2978,"children":2979},{"style":340},[2980],{"type":49,"value":2981}," corsHeaders",{"type":43,"tag":263,"props":2983,"children":2984},{"style":298},[2985],{"type":49,"value":393},{"type":43,"tag":263,"props":2987,"children":2988},{"style":356},[2989],{"type":49,"value":323},{"type":43,"tag":263,"props":2991,"children":2992},{"style":298},[2993],{"type":49,"value":402},{"type":43,"tag":263,"props":2995,"children":2996},{"class":265,"line":720},[2997],{"type":43,"tag":263,"props":2998,"children":2999},{"style":298},[3000],{"type":49,"value":411},{"type":43,"tag":263,"props":3002,"children":3003},{"class":265,"line":728},[3004],{"type":43,"tag":263,"props":3005,"children":3006},{"emptyLinePlaceholder":544},[3007],{"type":49,"value":547},{"type":43,"tag":263,"props":3009,"children":3010},{"class":265,"line":736},[3011,3015,3019,3023,3027],{"type":43,"tag":263,"props":3012,"children":3013},{"style":280},[3014],{"type":49,"value":283},{"type":43,"tag":263,"props":3016,"children":3017},{"style":286},[3018],{"type":49,"value":289},{"type":43,"tag":263,"props":3020,"children":3021},{"style":292},[3022],{"type":49,"value":295},{"type":43,"tag":263,"props":3024,"children":3025},{"style":298},[3026],{"type":49,"value":635},{"type":43,"tag":263,"props":3028,"children":3029},{"style":298},[3030],{"type":49,"value":328},{"type":43,"tag":263,"props":3032,"children":3033},{"class":265,"line":781},[3034,3038,3042,3046,3050,3054,3058,3062,3066,3070,3075,3079,3083,3087,3091,3095,3099,3103,3107],{"type":43,"tag":263,"props":3035,"children":3036},{"style":280},[3037],{"type":49,"value":337},{"type":43,"tag":263,"props":3039,"children":3040},{"style":340},[3041],{"type":49,"value":343},{"type":43,"tag":263,"props":3043,"children":3044},{"style":298},[3045],{"type":49,"value":348},{"type":43,"tag":263,"props":3047,"children":3048},{"style":292},[3049],{"type":49,"value":353},{"type":43,"tag":263,"props":3051,"children":3052},{"style":356},[3053],{"type":49,"value":301},{"type":43,"tag":263,"props":3055,"children":3056},{"style":298},[3057],{"type":49,"value":363},{"type":43,"tag":263,"props":3059,"children":3060},{"style":356},[3061],{"type":49,"value":2633},{"type":43,"tag":263,"props":3063,"children":3064},{"style":298},[3065],{"type":49,"value":312},{"type":43,"tag":263,"props":3067,"children":3068},{"style":298},[3069],{"type":49,"value":377},{"type":43,"tag":263,"props":3071,"children":3072},{"style":380},[3073],{"type":49,"value":3074},"value",{"type":43,"tag":263,"props":3076,"children":3077},{"style":298},[3078],{"type":49,"value":388},{"type":43,"tag":263,"props":3080,"children":3081},{"style":298},[3082],{"type":49,"value":685},{"type":43,"tag":263,"props":3084,"children":3085},{"style":298},[3086],{"type":49,"value":690},{"type":43,"tag":263,"props":3088,"children":3089},{"style":356},[3090],{"type":49,"value":2972},{"type":43,"tag":263,"props":3092,"children":3093},{"style":298},[3094],{"type":49,"value":312},{"type":43,"tag":263,"props":3096,"children":3097},{"style":340},[3098],{"type":49,"value":2981},{"type":43,"tag":263,"props":3100,"children":3101},{"style":298},[3102],{"type":49,"value":393},{"type":43,"tag":263,"props":3104,"children":3105},{"style":356},[3106],{"type":49,"value":323},{"type":43,"tag":263,"props":3108,"children":3109},{"style":298},[3110],{"type":49,"value":402},{"type":43,"tag":263,"props":3112,"children":3113},{"class":265,"line":821},[3114],{"type":43,"tag":263,"props":3115,"children":3116},{"style":298},[3117],{"type":49,"value":411},{"type":43,"tag":44,"props":3119,"children":3121},{"id":3120},"error-handling",[3122],{"type":49,"value":3123},"Error Handling",{"type":43,"tag":236,"props":3125,"children":3127},{"className":255,"code":3126,"language":257,"meta":244,"style":244},"export async function POST(request: Request) {\n  try {\n    const body = await request.json();\n    \u002F\u002F Process...\n    return Response.json({ success: true });\n  } catch (error) {\n    console.error(\"API error:\", error);\n    return Response.json({ error: \"Internal server error\" }, { status: 500 });\n  }\n}\n",[3128],{"type":43,"tag":219,"props":3129,"children":3130},{"__ignoreMap":244},[3131,3174,3186,3226,3234,3285,3314,3363,3444,3451],{"type":43,"tag":263,"props":3132,"children":3133},{"class":265,"line":266},[3134,3138,3142,3146,3150,3154,3158,3162,3166,3170],{"type":43,"tag":263,"props":3135,"children":3136},{"style":280},[3137],{"type":49,"value":283},{"type":43,"tag":263,"props":3139,"children":3140},{"style":286},[3141],{"type":49,"value":560},{"type":43,"tag":263,"props":3143,"children":3144},{"style":286},[3145],{"type":49,"value":289},{"type":43,"tag":263,"props":3147,"children":3148},{"style":292},[3149],{"type":49,"value":569},{"type":43,"tag":263,"props":3151,"children":3152},{"style":298},[3153],{"type":49,"value":301},{"type":43,"tag":263,"props":3155,"children":3156},{"style":304},[3157],{"type":49,"value":307},{"type":43,"tag":263,"props":3159,"children":3160},{"style":298},[3161],{"type":49,"value":312},{"type":43,"tag":263,"props":3163,"children":3164},{"style":315},[3165],{"type":49,"value":318},{"type":43,"tag":263,"props":3167,"children":3168},{"style":298},[3169],{"type":49,"value":323},{"type":43,"tag":263,"props":3171,"children":3172},{"style":298},[3173],{"type":49,"value":328},{"type":43,"tag":263,"props":3175,"children":3176},{"class":265,"line":276},[3177,3182],{"type":43,"tag":263,"props":3178,"children":3179},{"style":280},[3180],{"type":49,"value":3181},"  try",{"type":43,"tag":263,"props":3183,"children":3184},{"style":298},[3185],{"type":49,"value":328},{"type":43,"tag":263,"props":3187,"children":3188},{"class":265,"line":331},[3189,3194,3198,3202,3206,3210,3214,3218,3222],{"type":43,"tag":263,"props":3190,"children":3191},{"style":286},[3192],{"type":49,"value":3193},"    const",{"type":43,"tag":263,"props":3195,"children":3196},{"style":340},[3197],{"type":49,"value":607},{"type":43,"tag":263,"props":3199,"children":3200},{"style":298},[3201],{"type":49,"value":612},{"type":43,"tag":263,"props":3203,"children":3204},{"style":280},[3205],{"type":49,"value":617},{"type":43,"tag":263,"props":3207,"children":3208},{"style":340},[3209],{"type":49,"value":622},{"type":43,"tag":263,"props":3211,"children":3212},{"style":298},[3213],{"type":49,"value":348},{"type":43,"tag":263,"props":3215,"children":3216},{"style":292},[3217],{"type":49,"value":353},{"type":43,"tag":263,"props":3219,"children":3220},{"style":356},[3221],{"type":49,"value":635},{"type":43,"tag":263,"props":3223,"children":3224},{"style":298},[3225],{"type":49,"value":402},{"type":43,"tag":263,"props":3227,"children":3228},{"class":265,"line":405},[3229],{"type":43,"tag":263,"props":3230,"children":3231},{"style":270},[3232],{"type":49,"value":3233},"    \u002F\u002F Process...\n",{"type":43,"tag":263,"props":3235,"children":3236},{"class":265,"line":540},[3237,3241,3245,3249,3253,3257,3261,3265,3269,3273,3277,3281],{"type":43,"tag":263,"props":3238,"children":3239},{"style":280},[3240],{"type":49,"value":1645},{"type":43,"tag":263,"props":3242,"children":3243},{"style":340},[3244],{"type":49,"value":343},{"type":43,"tag":263,"props":3246,"children":3247},{"style":298},[3248],{"type":49,"value":348},{"type":43,"tag":263,"props":3250,"children":3251},{"style":292},[3252],{"type":49,"value":353},{"type":43,"tag":263,"props":3254,"children":3255},{"style":356},[3256],{"type":49,"value":301},{"type":43,"tag":263,"props":3258,"children":3259},{"style":298},[3260],{"type":49,"value":363},{"type":43,"tag":263,"props":3262,"children":3263},{"style":356},[3264],{"type":49,"value":2086},{"type":43,"tag":263,"props":3266,"children":3267},{"style":298},[3268],{"type":49,"value":312},{"type":43,"tag":263,"props":3270,"children":3271},{"style":1774},[3272],{"type":49,"value":1777},{"type":43,"tag":263,"props":3274,"children":3275},{"style":298},[3276],{"type":49,"value":393},{"type":43,"tag":263,"props":3278,"children":3279},{"style":356},[3280],{"type":49,"value":323},{"type":43,"tag":263,"props":3282,"children":3283},{"style":298},[3284],{"type":49,"value":402},{"type":43,"tag":263,"props":3286,"children":3287},{"class":265,"line":550},[3288,3292,3297,3301,3306,3310],{"type":43,"tag":263,"props":3289,"children":3290},{"style":298},[3291],{"type":49,"value":2606},{"type":43,"tag":263,"props":3293,"children":3294},{"style":280},[3295],{"type":49,"value":3296}," catch",{"type":43,"tag":263,"props":3298,"children":3299},{"style":356},[3300],{"type":49,"value":1618},{"type":43,"tag":263,"props":3302,"children":3303},{"style":340},[3304],{"type":49,"value":3305},"error",{"type":43,"tag":263,"props":3307,"children":3308},{"style":356},[3309],{"type":49,"value":1320},{"type":43,"tag":263,"props":3311,"children":3312},{"style":298},[3313],{"type":49,"value":1637},{"type":43,"tag":263,"props":3315,"children":3316},{"class":265,"line":596},[3317,3322,3326,3330,3334,3338,3343,3347,3351,3355,3359],{"type":43,"tag":263,"props":3318,"children":3319},{"style":340},[3320],{"type":49,"value":3321},"    console",{"type":43,"tag":263,"props":3323,"children":3324},{"style":298},[3325],{"type":49,"value":348},{"type":43,"tag":263,"props":3327,"children":3328},{"style":292},[3329],{"type":49,"value":3305},{"type":43,"tag":263,"props":3331,"children":3332},{"style":356},[3333],{"type":49,"value":301},{"type":43,"tag":263,"props":3335,"children":3336},{"style":298},[3337],{"type":49,"value":388},{"type":43,"tag":263,"props":3339,"children":3340},{"style":380},[3341],{"type":49,"value":3342},"API error:",{"type":43,"tag":263,"props":3344,"children":3345},{"style":298},[3346],{"type":49,"value":388},{"type":43,"tag":263,"props":3348,"children":3349},{"style":298},[3350],{"type":49,"value":1052},{"type":43,"tag":263,"props":3352,"children":3353},{"style":340},[3354],{"type":49,"value":1670},{"type":43,"tag":263,"props":3356,"children":3357},{"style":356},[3358],{"type":49,"value":323},{"type":43,"tag":263,"props":3360,"children":3361},{"style":298},[3362],{"type":49,"value":402},{"type":43,"tag":263,"props":3364,"children":3365},{"class":265,"line":642},[3366,3370,3374,3378,3382,3386,3390,3394,3398,3402,3407,3411,3415,3419,3423,3427,3432,3436,3440],{"type":43,"tag":263,"props":3367,"children":3368},{"style":280},[3369],{"type":49,"value":1645},{"type":43,"tag":263,"props":3371,"children":3372},{"style":340},[3373],{"type":49,"value":343},{"type":43,"tag":263,"props":3375,"children":3376},{"style":298},[3377],{"type":49,"value":348},{"type":43,"tag":263,"props":3379,"children":3380},{"style":292},[3381],{"type":49,"value":353},{"type":43,"tag":263,"props":3383,"children":3384},{"style":356},[3385],{"type":49,"value":301},{"type":43,"tag":263,"props":3387,"children":3388},{"style":298},[3389],{"type":49,"value":363},{"type":43,"tag":263,"props":3391,"children":3392},{"style":356},[3393],{"type":49,"value":1670},{"type":43,"tag":263,"props":3395,"children":3396},{"style":298},[3397],{"type":49,"value":312},{"type":43,"tag":263,"props":3399,"children":3400},{"style":298},[3401],{"type":49,"value":377},{"type":43,"tag":263,"props":3403,"children":3404},{"style":380},[3405],{"type":49,"value":3406},"Internal server error",{"type":43,"tag":263,"props":3408,"children":3409},{"style":298},[3410],{"type":49,"value":388},{"type":43,"tag":263,"props":3412,"children":3413},{"style":298},[3414],{"type":49,"value":685},{"type":43,"tag":263,"props":3416,"children":3417},{"style":298},[3418],{"type":49,"value":690},{"type":43,"tag":263,"props":3420,"children":3421},{"style":356},[3422],{"type":49,"value":695},{"type":43,"tag":263,"props":3424,"children":3425},{"style":298},[3426],{"type":49,"value":312},{"type":43,"tag":263,"props":3428,"children":3429},{"style":702},[3430],{"type":49,"value":3431}," 500",{"type":43,"tag":263,"props":3433,"children":3434},{"style":298},[3435],{"type":49,"value":393},{"type":43,"tag":263,"props":3437,"children":3438},{"style":356},[3439],{"type":49,"value":323},{"type":43,"tag":263,"props":3441,"children":3442},{"style":298},[3443],{"type":49,"value":402},{"type":43,"tag":263,"props":3445,"children":3446},{"class":265,"line":720},[3447],{"type":43,"tag":263,"props":3448,"children":3449},{"style":298},[3450],{"type":49,"value":1728},{"type":43,"tag":263,"props":3452,"children":3453},{"class":265,"line":728},[3454],{"type":43,"tag":263,"props":3455,"children":3456},{"style":298},[3457],{"type":49,"value":411},{"type":43,"tag":44,"props":3459,"children":3461},{"id":3460},"testing-locally",[3462],{"type":49,"value":3463},"Testing Locally",{"type":43,"tag":52,"props":3465,"children":3466},{},[3467],{"type":49,"value":3468},"Start the development server with API routes:",{"type":43,"tag":236,"props":3470,"children":3474},{"className":3471,"code":3472,"language":3473,"meta":244,"style":244},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","npx expo serve\n","bash",[3475],{"type":43,"tag":219,"props":3476,"children":3477},{"__ignoreMap":244},[3478],{"type":43,"tag":263,"props":3479,"children":3480},{"class":265,"line":266},[3481,3486,3491],{"type":43,"tag":263,"props":3482,"children":3483},{"style":315},[3484],{"type":49,"value":3485},"npx",{"type":43,"tag":263,"props":3487,"children":3488},{"style":380},[3489],{"type":49,"value":3490}," expo",{"type":43,"tag":263,"props":3492,"children":3493},{"style":380},[3494],{"type":49,"value":3495}," serve\n",{"type":43,"tag":52,"props":3497,"children":3498},{},[3499,3501,3507],{"type":49,"value":3500},"This starts a local server at ",{"type":43,"tag":219,"props":3502,"children":3504},{"className":3503},[],[3505],{"type":49,"value":3506},"http:\u002F\u002Flocalhost:8081",{"type":49,"value":3508}," with full API route support.",{"type":43,"tag":52,"props":3510,"children":3511},{},[3512],{"type":49,"value":3513},"Test with curl:",{"type":43,"tag":236,"props":3515,"children":3517},{"className":3471,"code":3516,"language":3473,"meta":244,"style":244},"curl http:\u002F\u002Flocalhost:8081\u002Fapi\u002Fhello\ncurl -X POST http:\u002F\u002Flocalhost:8081\u002Fapi\u002Fusers -H \"Content-Type: application\u002Fjson\" -d '{\"name\":\"Test\"}'\n",[3518],{"type":43,"tag":219,"props":3519,"children":3520},{"__ignoreMap":244},[3521,3534],{"type":43,"tag":263,"props":3522,"children":3523},{"class":265,"line":266},[3524,3529],{"type":43,"tag":263,"props":3525,"children":3526},{"style":315},[3527],{"type":49,"value":3528},"curl",{"type":43,"tag":263,"props":3530,"children":3531},{"style":380},[3532],{"type":49,"value":3533}," http:\u002F\u002Flocalhost:8081\u002Fapi\u002Fhello\n",{"type":43,"tag":263,"props":3535,"children":3536},{"class":265,"line":276},[3537,3541,3546,3550,3555,3560,3564,3569,3573,3578,3583,3588],{"type":43,"tag":263,"props":3538,"children":3539},{"style":315},[3540],{"type":49,"value":3528},{"type":43,"tag":263,"props":3542,"children":3543},{"style":380},[3544],{"type":49,"value":3545}," -X",{"type":43,"tag":263,"props":3547,"children":3548},{"style":380},[3549],{"type":49,"value":569},{"type":43,"tag":263,"props":3551,"children":3552},{"style":380},[3553],{"type":49,"value":3554}," http:\u002F\u002Flocalhost:8081\u002Fapi\u002Fusers",{"type":43,"tag":263,"props":3556,"children":3557},{"style":380},[3558],{"type":49,"value":3559}," -H",{"type":43,"tag":263,"props":3561,"children":3562},{"style":298},[3563],{"type":49,"value":377},{"type":43,"tag":263,"props":3565,"children":3566},{"style":380},[3567],{"type":49,"value":3568},"Content-Type: application\u002Fjson",{"type":43,"tag":263,"props":3570,"children":3571},{"style":298},[3572],{"type":49,"value":388},{"type":43,"tag":263,"props":3574,"children":3575},{"style":380},[3576],{"type":49,"value":3577}," -d",{"type":43,"tag":263,"props":3579,"children":3580},{"style":298},[3581],{"type":49,"value":3582}," '",{"type":43,"tag":263,"props":3584,"children":3585},{"style":380},[3586],{"type":49,"value":3587},"{\"name\":\"Test\"}",{"type":43,"tag":263,"props":3589,"children":3590},{"style":298},[3591],{"type":49,"value":3592},"'\n",{"type":43,"tag":44,"props":3594,"children":3596},{"id":3595},"deployment-to-eas-hosting",[3597],{"type":49,"value":3598},"Deployment to EAS Hosting",{"type":43,"tag":1159,"props":3600,"children":3602},{"id":3601},"prerequisites",[3603],{"type":49,"value":3604},"Prerequisites",{"type":43,"tag":236,"props":3606,"children":3608},{"className":3471,"code":3607,"language":3473,"meta":244,"style":244},"npm install -g eas-cli\neas login\n",[3609],{"type":43,"tag":219,"props":3610,"children":3611},{"__ignoreMap":244},[3612,3635],{"type":43,"tag":263,"props":3613,"children":3614},{"class":265,"line":266},[3615,3620,3625,3630],{"type":43,"tag":263,"props":3616,"children":3617},{"style":315},[3618],{"type":49,"value":3619},"npm",{"type":43,"tag":263,"props":3621,"children":3622},{"style":380},[3623],{"type":49,"value":3624}," install",{"type":43,"tag":263,"props":3626,"children":3627},{"style":380},[3628],{"type":49,"value":3629}," -g",{"type":43,"tag":263,"props":3631,"children":3632},{"style":380},[3633],{"type":49,"value":3634}," eas-cli\n",{"type":43,"tag":263,"props":3636,"children":3637},{"class":265,"line":276},[3638,3643],{"type":43,"tag":263,"props":3639,"children":3640},{"style":315},[3641],{"type":49,"value":3642},"eas",{"type":43,"tag":263,"props":3644,"children":3645},{"style":380},[3646],{"type":49,"value":3647}," login\n",{"type":43,"tag":1159,"props":3649,"children":3651},{"id":3650},"deploy",[3652],{"type":49,"value":3653},"Deploy",{"type":43,"tag":236,"props":3655,"children":3657},{"className":3471,"code":3656,"language":3473,"meta":244,"style":244},"eas deploy\n",[3658],{"type":43,"tag":219,"props":3659,"children":3660},{"__ignoreMap":244},[3661],{"type":43,"tag":263,"props":3662,"children":3663},{"class":265,"line":266},[3664,3668],{"type":43,"tag":263,"props":3665,"children":3666},{"style":315},[3667],{"type":49,"value":3642},{"type":43,"tag":263,"props":3669,"children":3670},{"style":380},[3671],{"type":49,"value":3672}," deploy\n",{"type":43,"tag":52,"props":3674,"children":3675},{},[3676],{"type":49,"value":3677},"This builds and deploys your API routes to EAS Hosting (Cloudflare Workers).",{"type":43,"tag":1159,"props":3679,"children":3681},{"id":3680},"environment-variables-for-production",[3682],{"type":49,"value":3683},"Environment Variables for Production",{"type":43,"tag":236,"props":3685,"children":3687},{"className":3471,"code":3686,"language":3473,"meta":244,"style":244},"# Create a secret\neas env:create --name OPENAI_API_KEY --value sk-xxx --environment production\n\n# Or use the Expo dashboard\n",[3688],{"type":43,"tag":219,"props":3689,"children":3690},{"__ignoreMap":244},[3691,3699,3741,3748],{"type":43,"tag":263,"props":3692,"children":3693},{"class":265,"line":266},[3694],{"type":43,"tag":263,"props":3695,"children":3696},{"style":270},[3697],{"type":49,"value":3698},"# Create a secret\n",{"type":43,"tag":263,"props":3700,"children":3701},{"class":265,"line":276},[3702,3706,3711,3716,3721,3726,3731,3736],{"type":43,"tag":263,"props":3703,"children":3704},{"style":315},[3705],{"type":49,"value":3642},{"type":43,"tag":263,"props":3707,"children":3708},{"style":380},[3709],{"type":49,"value":3710}," env:create",{"type":43,"tag":263,"props":3712,"children":3713},{"style":380},[3714],{"type":49,"value":3715}," --name",{"type":43,"tag":263,"props":3717,"children":3718},{"style":380},[3719],{"type":49,"value":3720}," OPENAI_API_KEY",{"type":43,"tag":263,"props":3722,"children":3723},{"style":380},[3724],{"type":49,"value":3725}," --value",{"type":43,"tag":263,"props":3727,"children":3728},{"style":380},[3729],{"type":49,"value":3730}," sk-xxx",{"type":43,"tag":263,"props":3732,"children":3733},{"style":380},[3734],{"type":49,"value":3735}," --environment",{"type":43,"tag":263,"props":3737,"children":3738},{"style":380},[3739],{"type":49,"value":3740}," production\n",{"type":43,"tag":263,"props":3742,"children":3743},{"class":265,"line":331},[3744],{"type":43,"tag":263,"props":3745,"children":3746},{"emptyLinePlaceholder":544},[3747],{"type":49,"value":547},{"type":43,"tag":263,"props":3749,"children":3750},{"class":265,"line":405},[3751],{"type":43,"tag":263,"props":3752,"children":3753},{"style":270},[3754],{"type":49,"value":3755},"# Or use the Expo dashboard\n",{"type":43,"tag":1159,"props":3757,"children":3759},{"id":3758},"custom-domain",[3760],{"type":49,"value":3761},"Custom Domain",{"type":43,"tag":52,"props":3763,"children":3764},{},[3765,3767,3773],{"type":49,"value":3766},"Configure in ",{"type":43,"tag":219,"props":3768,"children":3770},{"className":3769},[],[3771],{"type":49,"value":3772},"eas.json",{"type":49,"value":3774}," or Expo dashboard.",{"type":43,"tag":44,"props":3776,"children":3778},{"id":3777},"eas-hosting-runtime-cloudflare-workers",[3779],{"type":49,"value":3780},"EAS Hosting Runtime (Cloudflare Workers)",{"type":43,"tag":52,"props":3782,"children":3783},{},[3784],{"type":49,"value":3785},"API routes run on Cloudflare Workers. Key limitations:",{"type":43,"tag":1159,"props":3787,"children":3789},{"id":3788},"missinglimited-apis",[3790],{"type":49,"value":3791},"Missing\u002FLimited APIs",{"type":43,"tag":58,"props":3793,"children":3794},{},[3795,3813,3823,3833,3843],{"type":43,"tag":62,"props":3796,"children":3797},{},[3798,3803,3805,3811],{"type":43,"tag":66,"props":3799,"children":3800},{},[3801],{"type":49,"value":3802},"No Node.js filesystem",{"type":49,"value":3804}," — ",{"type":43,"tag":219,"props":3806,"children":3808},{"className":3807},[],[3809],{"type":49,"value":3810},"fs",{"type":49,"value":3812}," module unavailable",{"type":43,"tag":62,"props":3814,"children":3815},{},[3816,3821],{"type":43,"tag":66,"props":3817,"children":3818},{},[3819],{"type":49,"value":3820},"No native Node modules",{"type":49,"value":3822}," — Use Web APIs or polyfills",{"type":43,"tag":62,"props":3824,"children":3825},{},[3826,3831],{"type":43,"tag":66,"props":3827,"children":3828},{},[3829],{"type":49,"value":3830},"Limited execution time",{"type":49,"value":3832}," — 30 second timeout for CPU-intensive tasks",{"type":43,"tag":62,"props":3834,"children":3835},{},[3836,3841],{"type":43,"tag":66,"props":3837,"children":3838},{},[3839],{"type":49,"value":3840},"No persistent connections",{"type":49,"value":3842}," — WebSockets require Durable Objects",{"type":43,"tag":62,"props":3844,"children":3845},{},[3846,3851],{"type":43,"tag":66,"props":3847,"children":3848},{},[3849],{"type":49,"value":3850},"fetch is available",{"type":49,"value":3852}," — Use standard fetch for HTTP requests",{"type":43,"tag":1159,"props":3854,"children":3856},{"id":3855},"use-web-apis-instead",[3857],{"type":49,"value":3858},"Use Web APIs Instead",{"type":43,"tag":236,"props":3860,"children":3862},{"className":255,"code":3861,"language":257,"meta":244,"style":244},"\u002F\u002F Use Web Crypto instead of Node crypto\nconst hash = await crypto.subtle.digest(\n  \"SHA-256\",\n  new TextEncoder().encode(\"data\")\n);\n\n\u002F\u002F Use fetch instead of node-fetch\nconst response = await fetch(\"https:\u002F\u002Fapi.example.com\");\n\n\u002F\u002F Use Response\u002FRequest (already available)\nreturn new Response(JSON.stringify(data), {\n  headers: { \"Content-Type\": \"application\u002Fjson\" },\n});\n",[3863],{"type":43,"tag":219,"props":3864,"children":3865},{"__ignoreMap":244},[3866,3874,3922,3942,3989,4000,4007,4015,4064,4071,4079,4121,4170],{"type":43,"tag":263,"props":3867,"children":3868},{"class":265,"line":266},[3869],{"type":43,"tag":263,"props":3870,"children":3871},{"style":270},[3872],{"type":49,"value":3873},"\u002F\u002F Use Web Crypto instead of Node crypto\n",{"type":43,"tag":263,"props":3875,"children":3876},{"class":265,"line":276},[3877,3881,3886,3890,3894,3899,3903,3908,3912,3917],{"type":43,"tag":263,"props":3878,"children":3879},{"style":286},[3880],{"type":49,"value":2775},{"type":43,"tag":263,"props":3882,"children":3883},{"style":340},[3884],{"type":49,"value":3885}," hash ",{"type":43,"tag":263,"props":3887,"children":3888},{"style":298},[3889],{"type":49,"value":2785},{"type":43,"tag":263,"props":3891,"children":3892},{"style":280},[3893],{"type":49,"value":617},{"type":43,"tag":263,"props":3895,"children":3896},{"style":340},[3897],{"type":49,"value":3898}," crypto",{"type":43,"tag":263,"props":3900,"children":3901},{"style":298},[3902],{"type":49,"value":348},{"type":43,"tag":263,"props":3904,"children":3905},{"style":340},[3906],{"type":49,"value":3907},"subtle",{"type":43,"tag":263,"props":3909,"children":3910},{"style":298},[3911],{"type":49,"value":348},{"type":43,"tag":263,"props":3913,"children":3914},{"style":292},[3915],{"type":49,"value":3916},"digest",{"type":43,"tag":263,"props":3918,"children":3919},{"style":340},[3920],{"type":49,"value":3921},"(\n",{"type":43,"tag":263,"props":3923,"children":3924},{"class":265,"line":331},[3925,3929,3934,3938],{"type":43,"tag":263,"props":3926,"children":3927},{"style":298},[3928],{"type":49,"value":2797},{"type":43,"tag":263,"props":3930,"children":3931},{"style":380},[3932],{"type":49,"value":3933},"SHA-256",{"type":43,"tag":263,"props":3935,"children":3936},{"style":298},[3937],{"type":49,"value":388},{"type":43,"tag":263,"props":3939,"children":3940},{"style":298},[3941],{"type":49,"value":2325},{"type":43,"tag":263,"props":3943,"children":3944},{"class":265,"line":405},[3945,3950,3955,3959,3963,3968,3972,3976,3980,3984],{"type":43,"tag":263,"props":3946,"children":3947},{"style":298},[3948],{"type":49,"value":3949},"  new",{"type":43,"tag":263,"props":3951,"children":3952},{"style":292},[3953],{"type":49,"value":3954}," TextEncoder",{"type":43,"tag":263,"props":3956,"children":3957},{"style":340},[3958],{"type":49,"value":635},{"type":43,"tag":263,"props":3960,"children":3961},{"style":298},[3962],{"type":49,"value":348},{"type":43,"tag":263,"props":3964,"children":3965},{"style":292},[3966],{"type":49,"value":3967},"encode",{"type":43,"tag":263,"props":3969,"children":3970},{"style":340},[3971],{"type":49,"value":301},{"type":43,"tag":263,"props":3973,"children":3974},{"style":298},[3975],{"type":49,"value":388},{"type":43,"tag":263,"props":3977,"children":3978},{"style":380},[3979],{"type":49,"value":2689},{"type":43,"tag":263,"props":3981,"children":3982},{"style":298},[3983],{"type":49,"value":388},{"type":43,"tag":263,"props":3985,"children":3986},{"style":340},[3987],{"type":49,"value":3988},")\n",{"type":43,"tag":263,"props":3990,"children":3991},{"class":265,"line":540},[3992,3996],{"type":43,"tag":263,"props":3993,"children":3994},{"style":340},[3995],{"type":49,"value":323},{"type":43,"tag":263,"props":3997,"children":3998},{"style":298},[3999],{"type":49,"value":402},{"type":43,"tag":263,"props":4001,"children":4002},{"class":265,"line":550},[4003],{"type":43,"tag":263,"props":4004,"children":4005},{"emptyLinePlaceholder":544},[4006],{"type":49,"value":547},{"type":43,"tag":263,"props":4008,"children":4009},{"class":265,"line":596},[4010],{"type":43,"tag":263,"props":4011,"children":4012},{"style":270},[4013],{"type":49,"value":4014},"\u002F\u002F Use fetch instead of node-fetch\n",{"type":43,"tag":263,"props":4016,"children":4017},{"class":265,"line":642},[4018,4022,4027,4031,4035,4039,4043,4047,4052,4056,4060],{"type":43,"tag":263,"props":4019,"children":4020},{"style":286},[4021],{"type":49,"value":2775},{"type":43,"tag":263,"props":4023,"children":4024},{"style":340},[4025],{"type":49,"value":4026}," response ",{"type":43,"tag":263,"props":4028,"children":4029},{"style":298},[4030],{"type":49,"value":2785},{"type":43,"tag":263,"props":4032,"children":4033},{"style":280},[4034],{"type":49,"value":617},{"type":43,"tag":263,"props":4036,"children":4037},{"style":292},[4038],{"type":49,"value":2270},{"type":43,"tag":263,"props":4040,"children":4041},{"style":340},[4042],{"type":49,"value":301},{"type":43,"tag":263,"props":4044,"children":4045},{"style":298},[4046],{"type":49,"value":388},{"type":43,"tag":263,"props":4048,"children":4049},{"style":380},[4050],{"type":49,"value":4051},"https:\u002F\u002Fapi.example.com",{"type":43,"tag":263,"props":4053,"children":4054},{"style":298},[4055],{"type":49,"value":388},{"type":43,"tag":263,"props":4057,"children":4058},{"style":340},[4059],{"type":49,"value":323},{"type":43,"tag":263,"props":4061,"children":4062},{"style":298},[4063],{"type":49,"value":402},{"type":43,"tag":263,"props":4065,"children":4066},{"class":265,"line":720},[4067],{"type":43,"tag":263,"props":4068,"children":4069},{"emptyLinePlaceholder":544},[4070],{"type":49,"value":547},{"type":43,"tag":263,"props":4072,"children":4073},{"class":265,"line":728},[4074],{"type":43,"tag":263,"props":4075,"children":4076},{"style":270},[4077],{"type":49,"value":4078},"\u002F\u002F Use Response\u002FRequest (already available)\n",{"type":43,"tag":263,"props":4080,"children":4081},{"class":265,"line":736},[4082,4087,4091,4095,4100,4104,4108,4113,4117],{"type":43,"tag":263,"props":4083,"children":4084},{"style":280},[4085],{"type":49,"value":4086},"return",{"type":43,"tag":263,"props":4088,"children":4089},{"style":298},[4090],{"type":49,"value":945},{"type":43,"tag":263,"props":4092,"children":4093},{"style":292},[4094],{"type":49,"value":343},{"type":43,"tag":263,"props":4096,"children":4097},{"style":340},[4098],{"type":49,"value":4099},"(JSON",{"type":43,"tag":263,"props":4101,"children":4102},{"style":298},[4103],{"type":49,"value":348},{"type":43,"tag":263,"props":4105,"children":4106},{"style":292},[4107],{"type":49,"value":2472},{"type":43,"tag":263,"props":4109,"children":4110},{"style":340},[4111],{"type":49,"value":4112},"(data)",{"type":43,"tag":263,"props":4114,"children":4115},{"style":298},[4116],{"type":49,"value":1052},{"type":43,"tag":263,"props":4118,"children":4119},{"style":298},[4120],{"type":49,"value":328},{"type":43,"tag":263,"props":4122,"children":4123},{"class":265,"line":781},[4124,4129,4133,4137,4141,4145,4149,4153,4157,4161,4165],{"type":43,"tag":263,"props":4125,"children":4126},{"style":356},[4127],{"type":49,"value":4128},"  headers",{"type":43,"tag":263,"props":4130,"children":4131},{"style":298},[4132],{"type":49,"value":312},{"type":43,"tag":263,"props":4134,"children":4135},{"style":298},[4136],{"type":49,"value":690},{"type":43,"tag":263,"props":4138,"children":4139},{"style":298},[4140],{"type":49,"value":377},{"type":43,"tag":263,"props":4142,"children":4143},{"style":356},[4144],{"type":49,"value":2354},{"type":43,"tag":263,"props":4146,"children":4147},{"style":298},[4148],{"type":49,"value":388},{"type":43,"tag":263,"props":4150,"children":4151},{"style":298},[4152],{"type":49,"value":312},{"type":43,"tag":263,"props":4154,"children":4155},{"style":298},[4156],{"type":49,"value":377},{"type":43,"tag":263,"props":4158,"children":4159},{"style":380},[4160],{"type":49,"value":2371},{"type":43,"tag":263,"props":4162,"children":4163},{"style":298},[4164],{"type":49,"value":388},{"type":43,"tag":263,"props":4166,"children":4167},{"style":298},[4168],{"type":49,"value":4169}," },\n",{"type":43,"tag":263,"props":4171,"children":4172},{"class":265,"line":821},[4173,4177,4181],{"type":43,"tag":263,"props":4174,"children":4175},{"style":298},[4176],{"type":49,"value":522},{"type":43,"tag":263,"props":4178,"children":4179},{"style":340},[4180],{"type":49,"value":323},{"type":43,"tag":263,"props":4182,"children":4183},{"style":298},[4184],{"type":49,"value":402},{"type":43,"tag":1159,"props":4186,"children":4188},{"id":4187},"database-options",[4189],{"type":49,"value":4190},"Database Options",{"type":43,"tag":52,"props":4192,"children":4193},{},[4194],{"type":49,"value":4195},"Since filesystem is unavailable, use cloud databases:",{"type":43,"tag":58,"props":4197,"children":4198},{},[4199,4209,4219,4229,4239],{"type":43,"tag":62,"props":4200,"children":4201},{},[4202,4207],{"type":43,"tag":66,"props":4203,"children":4204},{},[4205],{"type":49,"value":4206},"Cloudflare D1",{"type":49,"value":4208}," — SQLite at the edge",{"type":43,"tag":62,"props":4210,"children":4211},{},[4212,4217],{"type":43,"tag":66,"props":4213,"children":4214},{},[4215],{"type":49,"value":4216},"Turso",{"type":49,"value":4218}," — Distributed SQLite",{"type":43,"tag":62,"props":4220,"children":4221},{},[4222,4227],{"type":43,"tag":66,"props":4223,"children":4224},{},[4225],{"type":49,"value":4226},"PlanetScale",{"type":49,"value":4228}," — Serverless MySQL",{"type":43,"tag":62,"props":4230,"children":4231},{},[4232,4237],{"type":43,"tag":66,"props":4233,"children":4234},{},[4235],{"type":49,"value":4236},"Supabase",{"type":49,"value":4238}," — Postgres with REST API",{"type":43,"tag":62,"props":4240,"children":4241},{},[4242,4247],{"type":43,"tag":66,"props":4243,"children":4244},{},[4245],{"type":49,"value":4246},"Neon",{"type":49,"value":4248}," — Serverless Postgres",{"type":43,"tag":52,"props":4250,"children":4251},{},[4252],{"type":49,"value":4253},"Example with Turso:",{"type":43,"tag":236,"props":4255,"children":4257},{"className":255,"code":4256,"language":257,"meta":244,"style":244},"\u002F\u002F app\u002Fapi\u002Fusers+api.ts\nimport { createClient } from \"@libsql\u002Fclient\u002Fweb\";\n\nconst db = createClient({\n  url: process.env.TURSO_URL!,\n  authToken: process.env.TURSO_AUTH_TOKEN!,\n});\n\nexport async function GET() {\n  const result = await db.execute(\"SELECT * FROM users\");\n  return Response.json(result.rows);\n}\n",[4258],{"type":43,"tag":219,"props":4259,"children":4260},{"__ignoreMap":244},[4261,4269,4312,4319,4347,4386,4423,4438,4445,4472,4531,4576],{"type":43,"tag":263,"props":4262,"children":4263},{"class":265,"line":266},[4264],{"type":43,"tag":263,"props":4265,"children":4266},{"style":270},[4267],{"type":49,"value":4268},"\u002F\u002F app\u002Fapi\u002Fusers+api.ts\n",{"type":43,"tag":263,"props":4270,"children":4271},{"class":265,"line":276},[4272,4277,4281,4286,4290,4295,4299,4304,4308],{"type":43,"tag":263,"props":4273,"children":4274},{"style":280},[4275],{"type":49,"value":4276},"import",{"type":43,"tag":263,"props":4278,"children":4279},{"style":298},[4280],{"type":49,"value":690},{"type":43,"tag":263,"props":4282,"children":4283},{"style":340},[4284],{"type":49,"value":4285}," createClient",{"type":43,"tag":263,"props":4287,"children":4288},{"style":298},[4289],{"type":49,"value":393},{"type":43,"tag":263,"props":4291,"children":4292},{"style":280},[4293],{"type":49,"value":4294}," from",{"type":43,"tag":263,"props":4296,"children":4297},{"style":298},[4298],{"type":49,"value":377},{"type":43,"tag":263,"props":4300,"children":4301},{"style":380},[4302],{"type":49,"value":4303},"@libsql\u002Fclient\u002Fweb",{"type":43,"tag":263,"props":4305,"children":4306},{"style":298},[4307],{"type":49,"value":388},{"type":43,"tag":263,"props":4309,"children":4310},{"style":298},[4311],{"type":49,"value":402},{"type":43,"tag":263,"props":4313,"children":4314},{"class":265,"line":331},[4315],{"type":43,"tag":263,"props":4316,"children":4317},{"emptyLinePlaceholder":544},[4318],{"type":49,"value":547},{"type":43,"tag":263,"props":4320,"children":4321},{"class":265,"line":405},[4322,4326,4331,4335,4339,4343],{"type":43,"tag":263,"props":4323,"children":4324},{"style":286},[4325],{"type":49,"value":2775},{"type":43,"tag":263,"props":4327,"children":4328},{"style":340},[4329],{"type":49,"value":4330}," db ",{"type":43,"tag":263,"props":4332,"children":4333},{"style":298},[4334],{"type":49,"value":2785},{"type":43,"tag":263,"props":4336,"children":4337},{"style":292},[4338],{"type":49,"value":4285},{"type":43,"tag":263,"props":4340,"children":4341},{"style":340},[4342],{"type":49,"value":301},{"type":43,"tag":263,"props":4344,"children":4345},{"style":298},[4346],{"type":49,"value":1637},{"type":43,"tag":263,"props":4348,"children":4349},{"class":265,"line":540},[4350,4355,4359,4364,4368,4372,4376,4381],{"type":43,"tag":263,"props":4351,"children":4352},{"style":356},[4353],{"type":49,"value":4354},"  url",{"type":43,"tag":263,"props":4356,"children":4357},{"style":298},[4358],{"type":49,"value":312},{"type":43,"tag":263,"props":4360,"children":4361},{"style":340},[4362],{"type":49,"value":4363}," process",{"type":43,"tag":263,"props":4365,"children":4366},{"style":298},[4367],{"type":49,"value":348},{"type":43,"tag":263,"props":4369,"children":4370},{"style":340},[4371],{"type":49,"value":2420},{"type":43,"tag":263,"props":4373,"children":4374},{"style":298},[4375],{"type":49,"value":348},{"type":43,"tag":263,"props":4377,"children":4378},{"style":340},[4379],{"type":49,"value":4380},"TURSO_URL",{"type":43,"tag":263,"props":4382,"children":4383},{"style":298},[4384],{"type":49,"value":4385},"!,\n",{"type":43,"tag":263,"props":4387,"children":4388},{"class":265,"line":550},[4389,4394,4398,4402,4406,4410,4414,4419],{"type":43,"tag":263,"props":4390,"children":4391},{"style":356},[4392],{"type":49,"value":4393},"  authToken",{"type":43,"tag":263,"props":4395,"children":4396},{"style":298},[4397],{"type":49,"value":312},{"type":43,"tag":263,"props":4399,"children":4400},{"style":340},[4401],{"type":49,"value":4363},{"type":43,"tag":263,"props":4403,"children":4404},{"style":298},[4405],{"type":49,"value":348},{"type":43,"tag":263,"props":4407,"children":4408},{"style":340},[4409],{"type":49,"value":2420},{"type":43,"tag":263,"props":4411,"children":4412},{"style":298},[4413],{"type":49,"value":348},{"type":43,"tag":263,"props":4415,"children":4416},{"style":340},[4417],{"type":49,"value":4418},"TURSO_AUTH_TOKEN",{"type":43,"tag":263,"props":4420,"children":4421},{"style":298},[4422],{"type":49,"value":4385},{"type":43,"tag":263,"props":4424,"children":4425},{"class":265,"line":596},[4426,4430,4434],{"type":43,"tag":263,"props":4427,"children":4428},{"style":298},[4429],{"type":49,"value":522},{"type":43,"tag":263,"props":4431,"children":4432},{"style":340},[4433],{"type":49,"value":323},{"type":43,"tag":263,"props":4435,"children":4436},{"style":298},[4437],{"type":49,"value":402},{"type":43,"tag":263,"props":4439,"children":4440},{"class":265,"line":642},[4441],{"type":43,"tag":263,"props":4442,"children":4443},{"emptyLinePlaceholder":544},[4444],{"type":49,"value":547},{"type":43,"tag":263,"props":4446,"children":4447},{"class":265,"line":720},[4448,4452,4456,4460,4464,4468],{"type":43,"tag":263,"props":4449,"children":4450},{"style":280},[4451],{"type":49,"value":283},{"type":43,"tag":263,"props":4453,"children":4454},{"style":286},[4455],{"type":49,"value":560},{"type":43,"tag":263,"props":4457,"children":4458},{"style":286},[4459],{"type":49,"value":289},{"type":43,"tag":263,"props":4461,"children":4462},{"style":292},[4463],{"type":49,"value":295},{"type":43,"tag":263,"props":4465,"children":4466},{"style":298},[4467],{"type":49,"value":635},{"type":43,"tag":263,"props":4469,"children":4470},{"style":298},[4471],{"type":49,"value":328},{"type":43,"tag":263,"props":4473,"children":4474},{"class":265,"line":728},[4475,4479,4484,4488,4492,4497,4501,4506,4510,4514,4519,4523,4527],{"type":43,"tag":263,"props":4476,"children":4477},{"style":286},[4478],{"type":49,"value":602},{"type":43,"tag":263,"props":4480,"children":4481},{"style":340},[4482],{"type":49,"value":4483}," result",{"type":43,"tag":263,"props":4485,"children":4486},{"style":298},[4487],{"type":49,"value":612},{"type":43,"tag":263,"props":4489,"children":4490},{"style":280},[4491],{"type":49,"value":617},{"type":43,"tag":263,"props":4493,"children":4494},{"style":340},[4495],{"type":49,"value":4496}," db",{"type":43,"tag":263,"props":4498,"children":4499},{"style":298},[4500],{"type":49,"value":348},{"type":43,"tag":263,"props":4502,"children":4503},{"style":292},[4504],{"type":49,"value":4505},"execute",{"type":43,"tag":263,"props":4507,"children":4508},{"style":356},[4509],{"type":49,"value":301},{"type":43,"tag":263,"props":4511,"children":4512},{"style":298},[4513],{"type":49,"value":388},{"type":43,"tag":263,"props":4515,"children":4516},{"style":380},[4517],{"type":49,"value":4518},"SELECT * FROM users",{"type":43,"tag":263,"props":4520,"children":4521},{"style":298},[4522],{"type":49,"value":388},{"type":43,"tag":263,"props":4524,"children":4525},{"style":356},[4526],{"type":49,"value":323},{"type":43,"tag":263,"props":4528,"children":4529},{"style":298},[4530],{"type":49,"value":402},{"type":43,"tag":263,"props":4532,"children":4533},{"class":265,"line":736},[4534,4538,4542,4546,4550,4554,4559,4563,4568,4572],{"type":43,"tag":263,"props":4535,"children":4536},{"style":280},[4537],{"type":49,"value":337},{"type":43,"tag":263,"props":4539,"children":4540},{"style":340},[4541],{"type":49,"value":343},{"type":43,"tag":263,"props":4543,"children":4544},{"style":298},[4545],{"type":49,"value":348},{"type":43,"tag":263,"props":4547,"children":4548},{"style":292},[4549],{"type":49,"value":353},{"type":43,"tag":263,"props":4551,"children":4552},{"style":356},[4553],{"type":49,"value":301},{"type":43,"tag":263,"props":4555,"children":4556},{"style":340},[4557],{"type":49,"value":4558},"result",{"type":43,"tag":263,"props":4560,"children":4561},{"style":298},[4562],{"type":49,"value":348},{"type":43,"tag":263,"props":4564,"children":4565},{"style":340},[4566],{"type":49,"value":4567},"rows",{"type":43,"tag":263,"props":4569,"children":4570},{"style":356},[4571],{"type":49,"value":323},{"type":43,"tag":263,"props":4573,"children":4574},{"style":298},[4575],{"type":49,"value":402},{"type":43,"tag":263,"props":4577,"children":4578},{"class":265,"line":781},[4579],{"type":43,"tag":263,"props":4580,"children":4581},{"style":298},[4582],{"type":49,"value":411},{"type":43,"tag":44,"props":4584,"children":4586},{"id":4585},"calling-api-routes-from-client",[4587],{"type":49,"value":4588},"Calling API Routes from Client",{"type":43,"tag":236,"props":4590,"children":4592},{"className":255,"code":4591,"language":257,"meta":244,"style":244},"\u002F\u002F From React Native components\nconst response = await fetch(\"\u002Fapi\u002Fhello\");\nconst data = await response.json();\n\n\u002F\u002F With body\nconst response = await fetch(\"\u002Fapi\u002Fusers\", {\n  method: \"POST\",\n  headers: { \"Content-Type\": \"application\u002Fjson\" },\n  body: JSON.stringify({ name: \"John\" }),\n});\n",[4593],{"type":43,"tag":219,"props":4594,"children":4595},{"__ignoreMap":244},[4596,4604,4652,4692,4699,4707,4755,4783,4830,4896],{"type":43,"tag":263,"props":4597,"children":4598},{"class":265,"line":266},[4599],{"type":43,"tag":263,"props":4600,"children":4601},{"style":270},[4602],{"type":49,"value":4603},"\u002F\u002F From React Native components\n",{"type":43,"tag":263,"props":4605,"children":4606},{"class":265,"line":276},[4607,4611,4615,4619,4623,4627,4631,4635,4640,4644,4648],{"type":43,"tag":263,"props":4608,"children":4609},{"style":286},[4610],{"type":49,"value":2775},{"type":43,"tag":263,"props":4612,"children":4613},{"style":340},[4614],{"type":49,"value":4026},{"type":43,"tag":263,"props":4616,"children":4617},{"style":298},[4618],{"type":49,"value":2785},{"type":43,"tag":263,"props":4620,"children":4621},{"style":280},[4622],{"type":49,"value":617},{"type":43,"tag":263,"props":4624,"children":4625},{"style":292},[4626],{"type":49,"value":2270},{"type":43,"tag":263,"props":4628,"children":4629},{"style":340},[4630],{"type":49,"value":301},{"type":43,"tag":263,"props":4632,"children":4633},{"style":298},[4634],{"type":49,"value":388},{"type":43,"tag":263,"props":4636,"children":4637},{"style":380},[4638],{"type":49,"value":4639},"\u002Fapi\u002Fhello",{"type":43,"tag":263,"props":4641,"children":4642},{"style":298},[4643],{"type":49,"value":388},{"type":43,"tag":263,"props":4645,"children":4646},{"style":340},[4647],{"type":49,"value":323},{"type":43,"tag":263,"props":4649,"children":4650},{"style":298},[4651],{"type":49,"value":402},{"type":43,"tag":263,"props":4653,"children":4654},{"class":265,"line":331},[4655,4659,4664,4668,4672,4676,4680,4684,4688],{"type":43,"tag":263,"props":4656,"children":4657},{"style":286},[4658],{"type":49,"value":2775},{"type":43,"tag":263,"props":4660,"children":4661},{"style":340},[4662],{"type":49,"value":4663}," data ",{"type":43,"tag":263,"props":4665,"children":4666},{"style":298},[4667],{"type":49,"value":2785},{"type":43,"tag":263,"props":4669,"children":4670},{"style":280},[4671],{"type":49,"value":617},{"type":43,"tag":263,"props":4673,"children":4674},{"style":340},[4675],{"type":49,"value":2257},{"type":43,"tag":263,"props":4677,"children":4678},{"style":298},[4679],{"type":49,"value":348},{"type":43,"tag":263,"props":4681,"children":4682},{"style":292},[4683],{"type":49,"value":353},{"type":43,"tag":263,"props":4685,"children":4686},{"style":340},[4687],{"type":49,"value":635},{"type":43,"tag":263,"props":4689,"children":4690},{"style":298},[4691],{"type":49,"value":402},{"type":43,"tag":263,"props":4693,"children":4694},{"class":265,"line":405},[4695],{"type":43,"tag":263,"props":4696,"children":4697},{"emptyLinePlaceholder":544},[4698],{"type":49,"value":547},{"type":43,"tag":263,"props":4700,"children":4701},{"class":265,"line":540},[4702],{"type":43,"tag":263,"props":4703,"children":4704},{"style":270},[4705],{"type":49,"value":4706},"\u002F\u002F With body\n",{"type":43,"tag":263,"props":4708,"children":4709},{"class":265,"line":550},[4710,4714,4718,4722,4726,4730,4734,4738,4743,4747,4751],{"type":43,"tag":263,"props":4711,"children":4712},{"style":286},[4713],{"type":49,"value":2775},{"type":43,"tag":263,"props":4715,"children":4716},{"style":340},[4717],{"type":49,"value":4026},{"type":43,"tag":263,"props":4719,"children":4720},{"style":298},[4721],{"type":49,"value":2785},{"type":43,"tag":263,"props":4723,"children":4724},{"style":280},[4725],{"type":49,"value":617},{"type":43,"tag":263,"props":4727,"children":4728},{"style":292},[4729],{"type":49,"value":2270},{"type":43,"tag":263,"props":4731,"children":4732},{"style":340},[4733],{"type":49,"value":301},{"type":43,"tag":263,"props":4735,"children":4736},{"style":298},[4737],{"type":49,"value":388},{"type":43,"tag":263,"props":4739,"children":4740},{"style":380},[4741],{"type":49,"value":4742},"\u002Fapi\u002Fusers",{"type":43,"tag":263,"props":4744,"children":4745},{"style":298},[4746],{"type":49,"value":388},{"type":43,"tag":263,"props":4748,"children":4749},{"style":298},[4750],{"type":49,"value":1052},{"type":43,"tag":263,"props":4752,"children":4753},{"style":298},[4754],{"type":49,"value":328},{"type":43,"tag":263,"props":4756,"children":4757},{"class":265,"line":596},[4758,4763,4767,4771,4775,4779],{"type":43,"tag":263,"props":4759,"children":4760},{"style":356},[4761],{"type":49,"value":4762},"  method",{"type":43,"tag":263,"props":4764,"children":4765},{"style":298},[4766],{"type":49,"value":312},{"type":43,"tag":263,"props":4768,"children":4769},{"style":298},[4770],{"type":49,"value":377},{"type":43,"tag":263,"props":4772,"children":4773},{"style":380},[4774],{"type":49,"value":2316},{"type":43,"tag":263,"props":4776,"children":4777},{"style":298},[4778],{"type":49,"value":388},{"type":43,"tag":263,"props":4780,"children":4781},{"style":298},[4782],{"type":49,"value":2325},{"type":43,"tag":263,"props":4784,"children":4785},{"class":265,"line":642},[4786,4790,4794,4798,4802,4806,4810,4814,4818,4822,4826],{"type":43,"tag":263,"props":4787,"children":4788},{"style":356},[4789],{"type":49,"value":4128},{"type":43,"tag":263,"props":4791,"children":4792},{"style":298},[4793],{"type":49,"value":312},{"type":43,"tag":263,"props":4795,"children":4796},{"style":298},[4797],{"type":49,"value":690},{"type":43,"tag":263,"props":4799,"children":4800},{"style":298},[4801],{"type":49,"value":377},{"type":43,"tag":263,"props":4803,"children":4804},{"style":356},[4805],{"type":49,"value":2354},{"type":43,"tag":263,"props":4807,"children":4808},{"style":298},[4809],{"type":49,"value":388},{"type":43,"tag":263,"props":4811,"children":4812},{"style":298},[4813],{"type":49,"value":312},{"type":43,"tag":263,"props":4815,"children":4816},{"style":298},[4817],{"type":49,"value":377},{"type":43,"tag":263,"props":4819,"children":4820},{"style":380},[4821],{"type":49,"value":2371},{"type":43,"tag":263,"props":4823,"children":4824},{"style":298},[4825],{"type":49,"value":388},{"type":43,"tag":263,"props":4827,"children":4828},{"style":298},[4829],{"type":49,"value":4169},{"type":43,"tag":263,"props":4831,"children":4832},{"class":265,"line":720},[4833,4838,4842,4846,4850,4854,4858,4862,4867,4871,4875,4880,4884,4888,4892],{"type":43,"tag":263,"props":4834,"children":4835},{"style":356},[4836],{"type":49,"value":4837},"  body",{"type":43,"tag":263,"props":4839,"children":4840},{"style":298},[4841],{"type":49,"value":312},{"type":43,"tag":263,"props":4843,"children":4844},{"style":340},[4845],{"type":49,"value":2463},{"type":43,"tag":263,"props":4847,"children":4848},{"style":298},[4849],{"type":49,"value":348},{"type":43,"tag":263,"props":4851,"children":4852},{"style":292},[4853],{"type":49,"value":2472},{"type":43,"tag":263,"props":4855,"children":4856},{"style":340},[4857],{"type":49,"value":301},{"type":43,"tag":263,"props":4859,"children":4860},{"style":298},[4861],{"type":49,"value":363},{"type":43,"tag":263,"props":4863,"children":4864},{"style":356},[4865],{"type":49,"value":4866}," name",{"type":43,"tag":263,"props":4868,"children":4869},{"style":298},[4870],{"type":49,"value":312},{"type":43,"tag":263,"props":4872,"children":4873},{"style":298},[4874],{"type":49,"value":377},{"type":43,"tag":263,"props":4876,"children":4877},{"style":380},[4878],{"type":49,"value":4879},"John",{"type":43,"tag":263,"props":4881,"children":4882},{"style":298},[4883],{"type":49,"value":388},{"type":43,"tag":263,"props":4885,"children":4886},{"style":298},[4887],{"type":49,"value":393},{"type":43,"tag":263,"props":4889,"children":4890},{"style":340},[4891],{"type":49,"value":323},{"type":43,"tag":263,"props":4893,"children":4894},{"style":298},[4895],{"type":49,"value":2325},{"type":43,"tag":263,"props":4897,"children":4898},{"class":265,"line":728},[4899,4903,4907],{"type":43,"tag":263,"props":4900,"children":4901},{"style":298},[4902],{"type":49,"value":522},{"type":43,"tag":263,"props":4904,"children":4905},{"style":340},[4906],{"type":49,"value":323},{"type":43,"tag":263,"props":4908,"children":4909},{"style":298},[4910],{"type":49,"value":402},{"type":43,"tag":44,"props":4912,"children":4914},{"id":4913},"common-patterns",[4915],{"type":49,"value":4916},"Common Patterns",{"type":43,"tag":1159,"props":4918,"children":4920},{"id":4919},"authentication-middleware",[4921],{"type":49,"value":4922},"Authentication Middleware",{"type":43,"tag":236,"props":4924,"children":4926},{"className":255,"code":4925,"language":257,"meta":244,"style":244},"\u002F\u002F utils\u002Fauth.ts\nexport async function requireAuth(request: Request) {\n  const token = request.headers.get(\"Authorization\")?.replace(\"Bearer \", \"\");\n\n  if (!token) {\n    throw new Response(JSON.stringify({ error: \"Unauthorized\" }), {\n      status: 401,\n      headers: { \"Content-Type\": \"application\u002Fjson\" },\n    });\n  }\n\n  \u002F\u002F Verify token...\n  return { userId: \"123\" };\n}\n\n\u002F\u002F app\u002Fapi\u002Fprotected+api.ts\nimport { requireAuth } from \"..\u002F..\u002Futils\u002Fauth\";\n\nexport async function GET(request: Request) {\n  const { userId } = await requireAuth(request);\n  return Response.json({ userId });\n}\n",[4927],{"type":43,"tag":219,"props":4928,"children":4929},{"__ignoreMap":244},[4930,4938,4982,5081,5088,5116,5193,5213,5261,5276,5283,5290,5298,5335,5342,5349,5357,5397,5404,5447,5495,5539],{"type":43,"tag":263,"props":4931,"children":4932},{"class":265,"line":266},[4933],{"type":43,"tag":263,"props":4934,"children":4935},{"style":270},[4936],{"type":49,"value":4937},"\u002F\u002F utils\u002Fauth.ts\n",{"type":43,"tag":263,"props":4939,"children":4940},{"class":265,"line":276},[4941,4945,4949,4953,4958,4962,4966,4970,4974,4978],{"type":43,"tag":263,"props":4942,"children":4943},{"style":280},[4944],{"type":49,"value":283},{"type":43,"tag":263,"props":4946,"children":4947},{"style":286},[4948],{"type":49,"value":560},{"type":43,"tag":263,"props":4950,"children":4951},{"style":286},[4952],{"type":49,"value":289},{"type":43,"tag":263,"props":4954,"children":4955},{"style":292},[4956],{"type":49,"value":4957}," requireAuth",{"type":43,"tag":263,"props":4959,"children":4960},{"style":298},[4961],{"type":49,"value":301},{"type":43,"tag":263,"props":4963,"children":4964},{"style":304},[4965],{"type":49,"value":307},{"type":43,"tag":263,"props":4967,"children":4968},{"style":298},[4969],{"type":49,"value":312},{"type":43,"tag":263,"props":4971,"children":4972},{"style":315},[4973],{"type":49,"value":318},{"type":43,"tag":263,"props":4975,"children":4976},{"style":298},[4977],{"type":49,"value":323},{"type":43,"tag":263,"props":4979,"children":4980},{"style":298},[4981],{"type":49,"value":328},{"type":43,"tag":263,"props":4983,"children":4984},{"class":265,"line":331},[4985,4989,4994,4998,5002,5006,5010,5014,5018,5022,5026,5030,5034,5038,5043,5048,5052,5056,5060,5064,5068,5073,5077],{"type":43,"tag":263,"props":4986,"children":4987},{"style":286},[4988],{"type":49,"value":602},{"type":43,"tag":263,"props":4990,"children":4991},{"style":340},[4992],{"type":49,"value":4993}," token",{"type":43,"tag":263,"props":4995,"children":4996},{"style":298},[4997],{"type":49,"value":612},{"type":43,"tag":263,"props":4999,"children":5000},{"style":340},[5001],{"type":49,"value":622},{"type":43,"tag":263,"props":5003,"children":5004},{"style":298},[5005],{"type":49,"value":348},{"type":43,"tag":263,"props":5007,"children":5008},{"style":340},[5009],{"type":49,"value":1488},{"type":43,"tag":263,"props":5011,"children":5012},{"style":298},[5013],{"type":49,"value":348},{"type":43,"tag":263,"props":5015,"children":5016},{"style":292},[5017],{"type":49,"value":1298},{"type":43,"tag":263,"props":5019,"children":5020},{"style":356},[5021],{"type":49,"value":301},{"type":43,"tag":263,"props":5023,"children":5024},{"style":298},[5025],{"type":49,"value":388},{"type":43,"tag":263,"props":5027,"children":5028},{"style":380},[5029],{"type":49,"value":1586},{"type":43,"tag":263,"props":5031,"children":5032},{"style":298},[5033],{"type":49,"value":388},{"type":43,"tag":263,"props":5035,"children":5036},{"style":356},[5037],{"type":49,"value":323},{"type":43,"tag":263,"props":5039,"children":5040},{"style":298},[5041],{"type":49,"value":5042},"?.",{"type":43,"tag":263,"props":5044,"children":5045},{"style":292},[5046],{"type":49,"value":5047},"replace",{"type":43,"tag":263,"props":5049,"children":5050},{"style":356},[5051],{"type":49,"value":301},{"type":43,"tag":263,"props":5053,"children":5054},{"style":298},[5055],{"type":49,"value":388},{"type":43,"tag":263,"props":5057,"children":5058},{"style":380},[5059],{"type":49,"value":2401},{"type":43,"tag":263,"props":5061,"children":5062},{"style":298},[5063],{"type":49,"value":388},{"type":43,"tag":263,"props":5065,"children":5066},{"style":298},[5067],{"type":49,"value":1052},{"type":43,"tag":263,"props":5069,"children":5070},{"style":298},[5071],{"type":49,"value":5072}," \"\"",{"type":43,"tag":263,"props":5074,"children":5075},{"style":356},[5076],{"type":49,"value":323},{"type":43,"tag":263,"props":5078,"children":5079},{"style":298},[5080],{"type":49,"value":402},{"type":43,"tag":263,"props":5082,"children":5083},{"class":265,"line":405},[5084],{"type":43,"tag":263,"props":5085,"children":5086},{"emptyLinePlaceholder":544},[5087],{"type":49,"value":547},{"type":43,"tag":263,"props":5089,"children":5090},{"class":265,"line":540},[5091,5095,5099,5103,5108,5112],{"type":43,"tag":263,"props":5092,"children":5093},{"style":280},[5094],{"type":49,"value":1613},{"type":43,"tag":263,"props":5096,"children":5097},{"style":356},[5098],{"type":49,"value":1618},{"type":43,"tag":263,"props":5100,"children":5101},{"style":298},[5102],{"type":49,"value":1623},{"type":43,"tag":263,"props":5104,"children":5105},{"style":340},[5106],{"type":49,"value":5107},"token",{"type":43,"tag":263,"props":5109,"children":5110},{"style":356},[5111],{"type":49,"value":1320},{"type":43,"tag":263,"props":5113,"children":5114},{"style":298},[5115],{"type":49,"value":1637},{"type":43,"tag":263,"props":5117,"children":5118},{"class":265,"line":550},[5119,5124,5128,5132,5136,5141,5145,5149,5153,5157,5161,5165,5169,5173,5177,5181,5185,5189],{"type":43,"tag":263,"props":5120,"children":5121},{"style":280},[5122],{"type":49,"value":5123},"    throw",{"type":43,"tag":263,"props":5125,"children":5126},{"style":298},[5127],{"type":49,"value":945},{"type":43,"tag":263,"props":5129,"children":5130},{"style":292},[5131],{"type":49,"value":343},{"type":43,"tag":263,"props":5133,"children":5134},{"style":356},[5135],{"type":49,"value":301},{"type":43,"tag":263,"props":5137,"children":5138},{"style":340},[5139],{"type":49,"value":5140},"JSON",{"type":43,"tag":263,"props":5142,"children":5143},{"style":298},[5144],{"type":49,"value":348},{"type":43,"tag":263,"props":5146,"children":5147},{"style":292},[5148],{"type":49,"value":2472},{"type":43,"tag":263,"props":5150,"children":5151},{"style":356},[5152],{"type":49,"value":301},{"type":43,"tag":263,"props":5154,"children":5155},{"style":298},[5156],{"type":49,"value":363},{"type":43,"tag":263,"props":5158,"children":5159},{"style":356},[5160],{"type":49,"value":1670},{"type":43,"tag":263,"props":5162,"children":5163},{"style":298},[5164],{"type":49,"value":312},{"type":43,"tag":263,"props":5166,"children":5167},{"style":298},[5168],{"type":49,"value":377},{"type":43,"tag":263,"props":5170,"children":5171},{"style":380},[5172],{"type":49,"value":1683},{"type":43,"tag":263,"props":5174,"children":5175},{"style":298},[5176],{"type":49,"value":388},{"type":43,"tag":263,"props":5178,"children":5179},{"style":298},[5180],{"type":49,"value":393},{"type":43,"tag":263,"props":5182,"children":5183},{"style":356},[5184],{"type":49,"value":323},{"type":43,"tag":263,"props":5186,"children":5187},{"style":298},[5188],{"type":49,"value":1052},{"type":43,"tag":263,"props":5190,"children":5191},{"style":298},[5192],{"type":49,"value":328},{"type":43,"tag":263,"props":5194,"children":5195},{"class":265,"line":596},[5196,5201,5205,5209],{"type":43,"tag":263,"props":5197,"children":5198},{"style":356},[5199],{"type":49,"value":5200},"      status",{"type":43,"tag":263,"props":5202,"children":5203},{"style":298},[5204],{"type":49,"value":312},{"type":43,"tag":263,"props":5206,"children":5207},{"style":702},[5208],{"type":49,"value":1708},{"type":43,"tag":263,"props":5210,"children":5211},{"style":298},[5212],{"type":49,"value":2325},{"type":43,"tag":263,"props":5214,"children":5215},{"class":265,"line":642},[5216,5221,5225,5229,5233,5237,5241,5245,5249,5253,5257],{"type":43,"tag":263,"props":5217,"children":5218},{"style":356},[5219],{"type":49,"value":5220},"      headers",{"type":43,"tag":263,"props":5222,"children":5223},{"style":298},[5224],{"type":49,"value":312},{"type":43,"tag":263,"props":5226,"children":5227},{"style":298},[5228],{"type":49,"value":690},{"type":43,"tag":263,"props":5230,"children":5231},{"style":298},[5232],{"type":49,"value":377},{"type":43,"tag":263,"props":5234,"children":5235},{"style":356},[5236],{"type":49,"value":2354},{"type":43,"tag":263,"props":5238,"children":5239},{"style":298},[5240],{"type":49,"value":388},{"type":43,"tag":263,"props":5242,"children":5243},{"style":298},[5244],{"type":49,"value":312},{"type":43,"tag":263,"props":5246,"children":5247},{"style":298},[5248],{"type":49,"value":377},{"type":43,"tag":263,"props":5250,"children":5251},{"style":380},[5252],{"type":49,"value":2371},{"type":43,"tag":263,"props":5254,"children":5255},{"style":298},[5256],{"type":49,"value":388},{"type":43,"tag":263,"props":5258,"children":5259},{"style":298},[5260],{"type":49,"value":4169},{"type":43,"tag":263,"props":5262,"children":5263},{"class":265,"line":720},[5264,5268,5272],{"type":43,"tag":263,"props":5265,"children":5266},{"style":298},[5267],{"type":49,"value":2590},{"type":43,"tag":263,"props":5269,"children":5270},{"style":356},[5271],{"type":49,"value":323},{"type":43,"tag":263,"props":5273,"children":5274},{"style":298},[5275],{"type":49,"value":402},{"type":43,"tag":263,"props":5277,"children":5278},{"class":265,"line":728},[5279],{"type":43,"tag":263,"props":5280,"children":5281},{"style":298},[5282],{"type":49,"value":1728},{"type":43,"tag":263,"props":5284,"children":5285},{"class":265,"line":736},[5286],{"type":43,"tag":263,"props":5287,"children":5288},{"emptyLinePlaceholder":544},[5289],{"type":49,"value":547},{"type":43,"tag":263,"props":5291,"children":5292},{"class":265,"line":781},[5293],{"type":43,"tag":263,"props":5294,"children":5295},{"style":270},[5296],{"type":49,"value":5297},"  \u002F\u002F Verify token...\n",{"type":43,"tag":263,"props":5299,"children":5300},{"class":265,"line":821},[5301,5305,5309,5313,5317,5321,5326,5330],{"type":43,"tag":263,"props":5302,"children":5303},{"style":280},[5304],{"type":49,"value":337},{"type":43,"tag":263,"props":5306,"children":5307},{"style":298},[5308],{"type":49,"value":690},{"type":43,"tag":263,"props":5310,"children":5311},{"style":356},[5312],{"type":49,"value":1124},{"type":43,"tag":263,"props":5314,"children":5315},{"style":298},[5316],{"type":49,"value":312},{"type":43,"tag":263,"props":5318,"children":5319},{"style":298},[5320],{"type":49,"value":377},{"type":43,"tag":263,"props":5322,"children":5323},{"style":380},[5324],{"type":49,"value":5325},"123",{"type":43,"tag":263,"props":5327,"children":5328},{"style":298},[5329],{"type":49,"value":388},{"type":43,"tag":263,"props":5331,"children":5332},{"style":298},[5333],{"type":49,"value":5334}," };\n",{"type":43,"tag":263,"props":5336,"children":5337},{"class":265,"line":874},[5338],{"type":43,"tag":263,"props":5339,"children":5340},{"style":298},[5341],{"type":49,"value":411},{"type":43,"tag":263,"props":5343,"children":5344},{"class":265,"line":882},[5345],{"type":43,"tag":263,"props":5346,"children":5347},{"emptyLinePlaceholder":544},[5348],{"type":49,"value":547},{"type":43,"tag":263,"props":5350,"children":5351},{"class":265,"line":890},[5352],{"type":43,"tag":263,"props":5353,"children":5354},{"style":270},[5355],{"type":49,"value":5356},"\u002F\u002F app\u002Fapi\u002Fprotected+api.ts\n",{"type":43,"tag":263,"props":5358,"children":5359},{"class":265,"line":935},[5360,5364,5368,5372,5376,5380,5384,5389,5393],{"type":43,"tag":263,"props":5361,"children":5362},{"style":280},[5363],{"type":49,"value":4276},{"type":43,"tag":263,"props":5365,"children":5366},{"style":298},[5367],{"type":49,"value":690},{"type":43,"tag":263,"props":5369,"children":5370},{"style":340},[5371],{"type":49,"value":4957},{"type":43,"tag":263,"props":5373,"children":5374},{"style":298},[5375],{"type":49,"value":393},{"type":43,"tag":263,"props":5377,"children":5378},{"style":280},[5379],{"type":49,"value":4294},{"type":43,"tag":263,"props":5381,"children":5382},{"style":298},[5383],{"type":49,"value":377},{"type":43,"tag":263,"props":5385,"children":5386},{"style":380},[5387],{"type":49,"value":5388},"..\u002F..\u002Futils\u002Fauth",{"type":43,"tag":263,"props":5390,"children":5391},{"style":298},[5392],{"type":49,"value":388},{"type":43,"tag":263,"props":5394,"children":5395},{"style":298},[5396],{"type":49,"value":402},{"type":43,"tag":263,"props":5398,"children":5399},{"class":265,"line":990},[5400],{"type":43,"tag":263,"props":5401,"children":5402},{"emptyLinePlaceholder":544},[5403],{"type":49,"value":547},{"type":43,"tag":263,"props":5405,"children":5406},{"class":265,"line":2700},[5407,5411,5415,5419,5423,5427,5431,5435,5439,5443],{"type":43,"tag":263,"props":5408,"children":5409},{"style":280},[5410],{"type":49,"value":283},{"type":43,"tag":263,"props":5412,"children":5413},{"style":286},[5414],{"type":49,"value":560},{"type":43,"tag":263,"props":5416,"children":5417},{"style":286},[5418],{"type":49,"value":289},{"type":43,"tag":263,"props":5420,"children":5421},{"style":292},[5422],{"type":49,"value":295},{"type":43,"tag":263,"props":5424,"children":5425},{"style":298},[5426],{"type":49,"value":301},{"type":43,"tag":263,"props":5428,"children":5429},{"style":304},[5430],{"type":49,"value":307},{"type":43,"tag":263,"props":5432,"children":5433},{"style":298},[5434],{"type":49,"value":312},{"type":43,"tag":263,"props":5436,"children":5437},{"style":315},[5438],{"type":49,"value":318},{"type":43,"tag":263,"props":5440,"children":5441},{"style":298},[5442],{"type":49,"value":323},{"type":43,"tag":263,"props":5444,"children":5445},{"style":298},[5446],{"type":49,"value":328},{"type":43,"tag":263,"props":5448,"children":5450},{"class":265,"line":5449},20,[5451,5455,5459,5463,5467,5471,5475,5479,5483,5487,5491],{"type":43,"tag":263,"props":5452,"children":5453},{"style":286},[5454],{"type":49,"value":602},{"type":43,"tag":263,"props":5456,"children":5457},{"style":298},[5458],{"type":49,"value":690},{"type":43,"tag":263,"props":5460,"children":5461},{"style":340},[5462],{"type":49,"value":1124},{"type":43,"tag":263,"props":5464,"children":5465},{"style":298},[5466],{"type":49,"value":393},{"type":43,"tag":263,"props":5468,"children":5469},{"style":298},[5470],{"type":49,"value":612},{"type":43,"tag":263,"props":5472,"children":5473},{"style":280},[5474],{"type":49,"value":617},{"type":43,"tag":263,"props":5476,"children":5477},{"style":292},[5478],{"type":49,"value":4957},{"type":43,"tag":263,"props":5480,"children":5481},{"style":356},[5482],{"type":49,"value":301},{"type":43,"tag":263,"props":5484,"children":5485},{"style":340},[5486],{"type":49,"value":307},{"type":43,"tag":263,"props":5488,"children":5489},{"style":356},[5490],{"type":49,"value":323},{"type":43,"tag":263,"props":5492,"children":5493},{"style":298},[5494],{"type":49,"value":402},{"type":43,"tag":263,"props":5496,"children":5498},{"class":265,"line":5497},21,[5499,5503,5507,5511,5515,5519,5523,5527,5531,5535],{"type":43,"tag":263,"props":5500,"children":5501},{"style":280},[5502],{"type":49,"value":337},{"type":43,"tag":263,"props":5504,"children":5505},{"style":340},[5506],{"type":49,"value":343},{"type":43,"tag":263,"props":5508,"children":5509},{"style":298},[5510],{"type":49,"value":348},{"type":43,"tag":263,"props":5512,"children":5513},{"style":292},[5514],{"type":49,"value":353},{"type":43,"tag":263,"props":5516,"children":5517},{"style":356},[5518],{"type":49,"value":301},{"type":43,"tag":263,"props":5520,"children":5521},{"style":298},[5522],{"type":49,"value":363},{"type":43,"tag":263,"props":5524,"children":5525},{"style":340},[5526],{"type":49,"value":1124},{"type":43,"tag":263,"props":5528,"children":5529},{"style":298},[5530],{"type":49,"value":393},{"type":43,"tag":263,"props":5532,"children":5533},{"style":356},[5534],{"type":49,"value":323},{"type":43,"tag":263,"props":5536,"children":5537},{"style":298},[5538],{"type":49,"value":402},{"type":43,"tag":263,"props":5540,"children":5542},{"class":265,"line":5541},22,[5543],{"type":43,"tag":263,"props":5544,"children":5545},{"style":298},[5546],{"type":49,"value":411},{"type":43,"tag":1159,"props":5548,"children":5550},{"id":5549},"proxy-external-api",[5551],{"type":49,"value":5552},"Proxy External API",{"type":43,"tag":236,"props":5554,"children":5556},{"className":255,"code":5555,"language":257,"meta":244,"style":244},"\u002F\u002F app\u002Fapi\u002Fweather+api.ts\nexport async function GET(request: Request) {\n  const url = new URL(request.url);\n  const city = url.searchParams.get(\"city\");\n\n  const response = await fetch(\n    `https:\u002F\u002Fapi.weather.com\u002Fv1\u002Fcurrent?city=${city}&key=${process.env.WEATHER_API_KEY}`\n  );\n\n  return Response.json(await response.json());\n}\n",[5557],{"type":43,"tag":219,"props":5558,"children":5559},{"__ignoreMap":244},[5560,5568,5611,5658,5719,5726,5753,5813,5825,5832,5881],{"type":43,"tag":263,"props":5561,"children":5562},{"class":265,"line":266},[5563],{"type":43,"tag":263,"props":5564,"children":5565},{"style":270},[5566],{"type":49,"value":5567},"\u002F\u002F app\u002Fapi\u002Fweather+api.ts\n",{"type":43,"tag":263,"props":5569,"children":5570},{"class":265,"line":276},[5571,5575,5579,5583,5587,5591,5595,5599,5603,5607],{"type":43,"tag":263,"props":5572,"children":5573},{"style":280},[5574],{"type":49,"value":283},{"type":43,"tag":263,"props":5576,"children":5577},{"style":286},[5578],{"type":49,"value":560},{"type":43,"tag":263,"props":5580,"children":5581},{"style":286},[5582],{"type":49,"value":289},{"type":43,"tag":263,"props":5584,"children":5585},{"style":292},[5586],{"type":49,"value":295},{"type":43,"tag":263,"props":5588,"children":5589},{"style":298},[5590],{"type":49,"value":301},{"type":43,"tag":263,"props":5592,"children":5593},{"style":304},[5594],{"type":49,"value":307},{"type":43,"tag":263,"props":5596,"children":5597},{"style":298},[5598],{"type":49,"value":312},{"type":43,"tag":263,"props":5600,"children":5601},{"style":315},[5602],{"type":49,"value":318},{"type":43,"tag":263,"props":5604,"children":5605},{"style":298},[5606],{"type":49,"value":323},{"type":43,"tag":263,"props":5608,"children":5609},{"style":298},[5610],{"type":49,"value":328},{"type":43,"tag":263,"props":5612,"children":5613},{"class":265,"line":331},[5614,5618,5622,5626,5630,5634,5638,5642,5646,5650,5654],{"type":43,"tag":263,"props":5615,"children":5616},{"style":286},[5617],{"type":49,"value":602},{"type":43,"tag":263,"props":5619,"children":5620},{"style":340},[5621],{"type":49,"value":1222},{"type":43,"tag":263,"props":5623,"children":5624},{"style":298},[5625],{"type":49,"value":612},{"type":43,"tag":263,"props":5627,"children":5628},{"style":298},[5629],{"type":49,"value":945},{"type":43,"tag":263,"props":5631,"children":5632},{"style":292},[5633],{"type":49,"value":1235},{"type":43,"tag":263,"props":5635,"children":5636},{"style":356},[5637],{"type":49,"value":301},{"type":43,"tag":263,"props":5639,"children":5640},{"style":340},[5641],{"type":49,"value":307},{"type":43,"tag":263,"props":5643,"children":5644},{"style":298},[5645],{"type":49,"value":348},{"type":43,"tag":263,"props":5647,"children":5648},{"style":340},[5649],{"type":49,"value":1252},{"type":43,"tag":263,"props":5651,"children":5652},{"style":356},[5653],{"type":49,"value":323},{"type":43,"tag":263,"props":5655,"children":5656},{"style":298},[5657],{"type":49,"value":402},{"type":43,"tag":263,"props":5659,"children":5660},{"class":265,"line":405},[5661,5665,5670,5674,5678,5682,5686,5690,5694,5698,5702,5707,5711,5715],{"type":43,"tag":263,"props":5662,"children":5663},{"style":286},[5664],{"type":49,"value":602},{"type":43,"tag":263,"props":5666,"children":5667},{"style":340},[5668],{"type":49,"value":5669}," city",{"type":43,"tag":263,"props":5671,"children":5672},{"style":298},[5673],{"type":49,"value":612},{"type":43,"tag":263,"props":5675,"children":5676},{"style":340},[5677],{"type":49,"value":1222},{"type":43,"tag":263,"props":5679,"children":5680},{"style":298},[5681],{"type":49,"value":348},{"type":43,"tag":263,"props":5683,"children":5684},{"style":340},[5685],{"type":49,"value":1289},{"type":43,"tag":263,"props":5687,"children":5688},{"style":298},[5689],{"type":49,"value":348},{"type":43,"tag":263,"props":5691,"children":5692},{"style":292},[5693],{"type":49,"value":1298},{"type":43,"tag":263,"props":5695,"children":5696},{"style":356},[5697],{"type":49,"value":301},{"type":43,"tag":263,"props":5699,"children":5700},{"style":298},[5701],{"type":49,"value":388},{"type":43,"tag":263,"props":5703,"children":5704},{"style":380},[5705],{"type":49,"value":5706},"city",{"type":43,"tag":263,"props":5708,"children":5709},{"style":298},[5710],{"type":49,"value":388},{"type":43,"tag":263,"props":5712,"children":5713},{"style":356},[5714],{"type":49,"value":323},{"type":43,"tag":263,"props":5716,"children":5717},{"style":298},[5718],{"type":49,"value":402},{"type":43,"tag":263,"props":5720,"children":5721},{"class":265,"line":540},[5722],{"type":43,"tag":263,"props":5723,"children":5724},{"emptyLinePlaceholder":544},[5725],{"type":49,"value":547},{"type":43,"tag":263,"props":5727,"children":5728},{"class":265,"line":550},[5729,5733,5737,5741,5745,5749],{"type":43,"tag":263,"props":5730,"children":5731},{"style":286},[5732],{"type":49,"value":602},{"type":43,"tag":263,"props":5734,"children":5735},{"style":340},[5736],{"type":49,"value":2257},{"type":43,"tag":263,"props":5738,"children":5739},{"style":298},[5740],{"type":49,"value":612},{"type":43,"tag":263,"props":5742,"children":5743},{"style":280},[5744],{"type":49,"value":617},{"type":43,"tag":263,"props":5746,"children":5747},{"style":292},[5748],{"type":49,"value":2270},{"type":43,"tag":263,"props":5750,"children":5751},{"style":356},[5752],{"type":49,"value":3921},{"type":43,"tag":263,"props":5754,"children":5755},{"class":265,"line":596},[5756,5761,5766,5770,5774,5778,5783,5787,5791,5795,5799,5803,5808],{"type":43,"tag":263,"props":5757,"children":5758},{"style":298},[5759],{"type":49,"value":5760},"    `",{"type":43,"tag":263,"props":5762,"children":5763},{"style":380},[5764],{"type":49,"value":5765},"https:\u002F\u002Fapi.weather.com\u002Fv1\u002Fcurrent?city=",{"type":43,"tag":263,"props":5767,"children":5768},{"style":298},[5769],{"type":49,"value":2406},{"type":43,"tag":263,"props":5771,"children":5772},{"style":340},[5773],{"type":49,"value":5706},{"type":43,"tag":263,"props":5775,"children":5776},{"style":298},[5777],{"type":49,"value":522},{"type":43,"tag":263,"props":5779,"children":5780},{"style":380},[5781],{"type":49,"value":5782},"&key=",{"type":43,"tag":263,"props":5784,"children":5785},{"style":298},[5786],{"type":49,"value":2406},{"type":43,"tag":263,"props":5788,"children":5789},{"style":340},[5790],{"type":49,"value":2411},{"type":43,"tag":263,"props":5792,"children":5793},{"style":298},[5794],{"type":49,"value":348},{"type":43,"tag":263,"props":5796,"children":5797},{"style":340},[5798],{"type":49,"value":2420},{"type":43,"tag":263,"props":5800,"children":5801},{"style":298},[5802],{"type":49,"value":348},{"type":43,"tag":263,"props":5804,"children":5805},{"style":340},[5806],{"type":49,"value":5807},"WEATHER_API_KEY",{"type":43,"tag":263,"props":5809,"children":5810},{"style":298},[5811],{"type":49,"value":5812},"}`\n",{"type":43,"tag":263,"props":5814,"children":5815},{"class":265,"line":642},[5816,5821],{"type":43,"tag":263,"props":5817,"children":5818},{"style":356},[5819],{"type":49,"value":5820},"  )",{"type":43,"tag":263,"props":5822,"children":5823},{"style":298},[5824],{"type":49,"value":402},{"type":43,"tag":263,"props":5826,"children":5827},{"class":265,"line":720},[5828],{"type":43,"tag":263,"props":5829,"children":5830},{"emptyLinePlaceholder":544},[5831],{"type":49,"value":547},{"type":43,"tag":263,"props":5833,"children":5834},{"class":265,"line":728},[5835,5839,5843,5847,5851,5855,5860,5864,5868,5872,5877],{"type":43,"tag":263,"props":5836,"children":5837},{"style":280},[5838],{"type":49,"value":337},{"type":43,"tag":263,"props":5840,"children":5841},{"style":340},[5842],{"type":49,"value":343},{"type":43,"tag":263,"props":5844,"children":5845},{"style":298},[5846],{"type":49,"value":348},{"type":43,"tag":263,"props":5848,"children":5849},{"style":292},[5850],{"type":49,"value":353},{"type":43,"tag":263,"props":5852,"children":5853},{"style":356},[5854],{"type":49,"value":301},{"type":43,"tag":263,"props":5856,"children":5857},{"style":280},[5858],{"type":49,"value":5859},"await",{"type":43,"tag":263,"props":5861,"children":5862},{"style":340},[5863],{"type":49,"value":2257},{"type":43,"tag":263,"props":5865,"children":5866},{"style":298},[5867],{"type":49,"value":348},{"type":43,"tag":263,"props":5869,"children":5870},{"style":292},[5871],{"type":49,"value":353},{"type":43,"tag":263,"props":5873,"children":5874},{"style":356},[5875],{"type":49,"value":5876},"())",{"type":43,"tag":263,"props":5878,"children":5879},{"style":298},[5880],{"type":49,"value":402},{"type":43,"tag":263,"props":5882,"children":5883},{"class":265,"line":736},[5884],{"type":43,"tag":263,"props":5885,"children":5886},{"style":298},[5887],{"type":49,"value":411},{"type":43,"tag":44,"props":5889,"children":5891},{"id":5890},"rules",[5892],{"type":49,"value":5893},"Rules",{"type":43,"tag":58,"props":5895,"children":5896},{},[5897,5902,5907,5912,5917,5922,5927],{"type":43,"tag":62,"props":5898,"children":5899},{},[5900],{"type":49,"value":5901},"NEVER expose API keys or secrets in client code",{"type":43,"tag":62,"props":5903,"children":5904},{},[5905],{"type":49,"value":5906},"ALWAYS validate and sanitize user input",{"type":43,"tag":62,"props":5908,"children":5909},{},[5910],{"type":49,"value":5911},"Use proper HTTP status codes (200, 201, 400, 401, 404, 500)",{"type":43,"tag":62,"props":5913,"children":5914},{},[5915],{"type":49,"value":5916},"Handle errors gracefully with try\u002Fcatch",{"type":43,"tag":62,"props":5918,"children":5919},{},[5920],{"type":49,"value":5921},"Keep API routes focused — one responsibility per endpoint",{"type":43,"tag":62,"props":5923,"children":5924},{},[5925],{"type":49,"value":5926},"Use TypeScript for type safety",{"type":43,"tag":62,"props":5928,"children":5929},{},[5930],{"type":49,"value":5931},"Log errors server-side for debugging",{"type":43,"tag":5933,"props":5934,"children":5935},"style",{},[5936],{"type":49,"value":5937},"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);}",{"items":5939,"total":6059},[5940,5959,5975,5987,6005,6027,6047],{"slug":5941,"name":5941,"fn":5942,"description":5943,"org":5944,"tags":5945,"stars":25,"repoUrl":26,"updatedAt":5958},"accessibility-and-inclusive-visualization","make data visualizations accessible","Make data visualizations accessible and inclusive. Use when the user needs chart or diagram accessibility guidance, text alternatives for complex visuals, color and contrast review, keyboard support, reduced-motion behavior for animation or parallax, or an accessibility QA workflow for exported figures, UML-like diagrams, and dashboards.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5946,5949,5952,5955],{"name":5947,"slug":5948,"type":15},"Accessibility","accessibility",{"name":5950,"slug":5951,"type":15},"Charts","charts",{"name":5953,"slug":5954,"type":15},"Data Visualization","data-visualization",{"name":5956,"slug":5957,"type":15},"Design","design","2026-06-30T19:00:57.102",{"slug":5960,"name":5960,"fn":5961,"description":5962,"org":5963,"tags":5964,"stars":25,"repoUrl":26,"updatedAt":5974},"agent-browser","automate browser interactions for agents","Browser automation CLI for AI agents. Use when the user needs to interact with websites, verify dev server output, test web apps, navigate pages, fill forms, click buttons, take screenshots, extract data, or automate any browser task. Also triggers when a dev server starts so you can verify it visually.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5965,5968,5971],{"name":5966,"slug":5967,"type":15},"Agents","agents",{"name":5969,"slug":5970,"type":15},"Browser Automation","browser-automation",{"name":5972,"slug":5973,"type":15},"Testing","testing","2026-04-06T18:41:03.44016",{"slug":5976,"name":5976,"fn":5977,"description":5978,"org":5979,"tags":5980,"stars":25,"repoUrl":26,"updatedAt":5986},"agent-browser-verify","verify dev server output with automated browser","Automated browser verification for dev servers. Triggers when a dev server starts to run a visual gut-check with agent-browser — verifies the page loads, checks for console errors, validates key UI elements, and reports pass\u002Ffail before continuing.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5981,5982,5985],{"name":5969,"slug":5970,"type":15},{"name":5983,"slug":5984,"type":15},"Local Development","local-development",{"name":5972,"slug":5973,"type":15},"2026-04-06T18:41:17.526867",{"slug":5988,"name":5988,"fn":5989,"description":5990,"org":5991,"tags":5992,"stars":25,"repoUrl":26,"updatedAt":6004},"agents-sdk","build AI agents on Cloudflare Workers","Build AI agents on Cloudflare Workers using the Agents SDK. Load when creating stateful agents, durable workflows, real-time WebSocket apps, scheduled tasks, MCP servers, or chat applications. Covers Agent class, state management, callable RPC, Workflows integration, and React hooks. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5993,5994,5997,6000,6001],{"name":5966,"slug":5967,"type":15},{"name":5995,"slug":5996,"type":15},"Cloudflare Workers","cloudflare-workers",{"name":5998,"slug":5999,"type":15},"SDK","sdk",{"name":23,"slug":24,"type":15},{"name":6002,"slug":6003,"type":15},"WebSockets","websockets","2026-04-06T18:39:51.717063",{"slug":6006,"name":6006,"fn":6007,"description":6008,"org":6009,"tags":6010,"stars":25,"repoUrl":26,"updatedAt":6026},"ai-elements","build chat UIs with AI Elements","AI Elements component library guidance — pre-built React components for AI interfaces built on shadcn\u002Fui. Use when building chat UIs, message displays, tool call rendering, streaming responses, reasoning panels, or any AI-native interface with the AI SDK.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6011,6014,6017,6020,6023],{"name":6012,"slug":6013,"type":15},"Frontend","frontend",{"name":6015,"slug":6016,"type":15},"React","react",{"name":6018,"slug":6019,"type":15},"shadcn\u002Fui","shadcn-ui",{"name":6021,"slug":6022,"type":15},"UI Components","ui-components",{"name":6024,"slug":6025,"type":15},"Vercel","vercel","2026-04-06T18:40:59.619419",{"slug":6028,"name":6028,"fn":6029,"description":6030,"org":6031,"tags":6032,"stars":25,"repoUrl":26,"updatedAt":6046},"ai-gateway","configure Vercel AI Gateway","Vercel AI Gateway expert guidance. Use when configuring model routing, provider failover, cost tracking, or managing multiple AI providers through a unified API.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6033,6036,6039,6042,6045],{"name":6034,"slug":6035,"type":15},"AI Infrastructure","ai-infrastructure",{"name":6037,"slug":6038,"type":15},"Cost Optimization","cost-optimization",{"name":6040,"slug":6041,"type":15},"LLM","llm",{"name":6043,"slug":6044,"type":15},"Performance","performance",{"name":6024,"slug":6025,"type":15},"2026-04-06T18:40:44.377464",{"slug":6048,"name":6048,"fn":6049,"description":6050,"org":6051,"tags":6052,"stars":25,"repoUrl":26,"updatedAt":6058},"ai-generation-persistence","implement persistence patterns for AI generations","AI generation persistence patterns — unique IDs, addressable URLs, database storage, and cost tracking for every LLM generation",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6053,6054,6057],{"name":6037,"slug":6038,"type":15},{"name":6055,"slug":6056,"type":15},"Database","database",{"name":6040,"slug":6041,"type":15},"2026-04-06T18:41:08.513425",600,{"items":6061,"total":6256},[6062,6083,6106,6123,6137,6154,6173,6185,6199,6213,6225,6240],{"slug":6063,"name":6063,"fn":6064,"description":6065,"org":6066,"tags":6067,"stars":6080,"repoUrl":6081,"updatedAt":6082},"prior-auth-packet-builder","build healthcare prior authorization packets","Build a concise prior authorization packet from local case files and payer policy docs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6068,6071,6074,6077],{"name":6069,"slug":6070,"type":15},"Documents","documents",{"name":6072,"slug":6073,"type":15},"Healthcare","healthcare",{"name":6075,"slug":6076,"type":15},"Insurance","insurance",{"name":6078,"slug":6079,"type":15},"Regulatory Compliance","regulatory-compliance",28169,"https:\u002F\u002Fgithub.com\u002Fopenai\u002Fopenai-agents-python","2026-04-16T05:11:39.180399",{"slug":6084,"name":6084,"fn":6085,"description":6086,"org":6087,"tags":6088,"stars":6103,"repoUrl":6104,"updatedAt":6105},"aspnet-core","build ASP.NET Core web applications","Build, review, refactor, or architect ASP.NET Core web applications using current official guidance for .NET web development. Use when working on Blazor Web Apps, Razor Pages, MVC, Minimal APIs, controller-based Web APIs, SignalR, gRPC, middleware, dependency injection, configuration, authentication, authorization, testing, performance, deployment, or ASP.NET Core upgrades.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6089,6092,6094,6097,6100],{"name":6090,"slug":6091,"type":15},".NET","dotnet",{"name":6093,"slug":6084,"type":15},"ASP.NET Core",{"name":6095,"slug":6096,"type":15},"Blazor","blazor",{"name":6098,"slug":6099,"type":15},"C#","csharp",{"name":6101,"slug":6102,"type":15},"Web Development","web-development",23787,"https:\u002F\u002Fgithub.com\u002Fopenai\u002Fskills","2026-04-12T05:07:02.819491",{"slug":6107,"name":6107,"fn":6108,"description":6109,"org":6110,"tags":6111,"stars":6103,"repoUrl":6104,"updatedAt":6122},"chatgpt-apps","build ChatGPT Apps SDK applications","Build, scaffold, refactor, and troubleshoot ChatGPT Apps SDK applications that combine an MCP server and widget UI. Use when Codex needs to design tools, register UI resources, wire the MCP Apps bridge or ChatGPT compatibility APIs, apply Apps SDK metadata or CSP or domain settings, or produce a docs-aligned project scaffold. Prefer a docs-first workflow by invoking the openai-docs skill or OpenAI developer docs MCP tools before generating code.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6112,6115,6118,6121],{"name":6113,"slug":6114,"type":15},"Apps SDK","apps-sdk",{"name":6116,"slug":6117,"type":15},"ChatGPT","chatgpt",{"name":6119,"slug":6120,"type":15},"MCP","mcp",{"name":9,"slug":8,"type":15},"2026-04-12T05:07:05.468097",{"slug":6124,"name":6124,"fn":6125,"description":6126,"org":6127,"tags":6128,"stars":6103,"repoUrl":6104,"updatedAt":6136},"cli-creator","build CLIs from API docs","Build a composable CLI for Codex from API docs, an OpenAPI spec, existing curl examples, an SDK, a web app, an admin tool, or a local script. Use when the user wants Codex to create a command-line tool that can run from any repo, expose composable read\u002Fwrite commands, return stable JSON, manage auth, and pair with a companion skill.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6129,6130,6133],{"name":20,"slug":21,"type":15},{"name":6131,"slug":6132,"type":15},"CLI","cli",{"name":6134,"slug":6135,"type":15},"Codex","codex","2026-04-12T05:07:04.132762",{"slug":6138,"name":6138,"fn":6139,"description":6140,"org":6141,"tags":6142,"stars":6103,"repoUrl":6104,"updatedAt":6153},"cloudflare-deploy","deploy projects to Cloudflare","Deploy applications and infrastructure to Cloudflare using Workers, Pages, and related platform services. Use when the user asks to deploy, host, publish, or set up a project on Cloudflare.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6143,6146,6149,6150],{"name":6144,"slug":6145,"type":15},"Cloudflare","cloudflare",{"name":6147,"slug":6148,"type":15},"Cloudflare Pages","cloudflare-pages",{"name":5995,"slug":5996,"type":15},{"name":6151,"slug":6152,"type":15},"Deployment","deployment","2026-04-12T05:07:14.275118",{"slug":6155,"name":6155,"fn":6156,"description":6157,"org":6158,"tags":6159,"stars":6103,"repoUrl":6104,"updatedAt":6172},"define-goal","define and set measurable project goals","Help the user define a concrete, measurable goal before starting work, especially when they ask to use the goal tool, create a goal, set an objective, clarify success criteria, or turn a fuzzy intention into a quantitative outcome. Use this skill for goal creation and goal refinement only; it does not manage durable snapshots, decision logs, or long-running execution artifacts.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6160,6163,6166,6169],{"name":6161,"slug":6162,"type":15},"Productivity","productivity",{"name":6164,"slug":6165,"type":15},"Project Management","project-management",{"name":6167,"slug":6168,"type":15},"Strategy","strategy",{"name":6170,"slug":6171,"type":15},"Task Management","task-management","2026-05-23T06:17:16.870838",{"slug":6174,"name":6174,"fn":6175,"description":6176,"org":6177,"tags":6178,"stars":6103,"repoUrl":6104,"updatedAt":6184},"figma","translate Figma designs into code","Use the Figma MCP server to fetch design context, screenshots, variables, and assets from Figma, and to translate Figma nodes into production code. Trigger when a task involves Figma URLs, node IDs, design-to-code implementation, or Figma MCP setup and troubleshooting.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6179,6180,6182,6183],{"name":5956,"slug":5957,"type":15},{"name":6181,"slug":6174,"type":15},"Figma",{"name":6012,"slug":6013,"type":15},{"name":6119,"slug":6120,"type":15},"2026-04-12T05:06:47.939943",{"slug":6186,"name":6186,"fn":6187,"description":6188,"org":6189,"tags":6190,"stars":6103,"repoUrl":6104,"updatedAt":6198},"figma-code-connect-components","connect Figma designs to code components","Connects Figma design components to code components using Code Connect mapping tools. Use when user says \"code connect\", \"connect this component to code\", \"map this component\", \"link component to code\", \"create code connect mapping\", or wants to establish mappings between Figma designs and code implementations. For canvas writes via `use_figma`, use `figma-use`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6191,6192,6195,6196,6197],{"name":5956,"slug":5957,"type":15},{"name":6193,"slug":6194,"type":15},"Design System","design-system",{"name":6181,"slug":6174,"type":15},{"name":6012,"slug":6013,"type":15},{"name":6021,"slug":6022,"type":15},"2026-05-10T05:59:52.971881",{"slug":6200,"name":6200,"fn":6201,"description":6202,"org":6203,"tags":6204,"stars":6103,"repoUrl":6104,"updatedAt":6212},"figma-create-design-system-rules","generate design system rules from Figma","Generates custom design system rules for the user's codebase. Use when user says \"create design system rules\", \"generate rules for my project\", \"set up design rules\", \"customize design system guidelines\", or wants to establish project-specific conventions for Figma-to-code workflows. Requires Figma MCP server connection.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6205,6206,6207,6210,6211],{"name":5956,"slug":5957,"type":15},{"name":6193,"slug":6194,"type":15},{"name":6208,"slug":6209,"type":15},"Documentation","documentation",{"name":6181,"slug":6174,"type":15},{"name":6012,"slug":6013,"type":15},"2026-05-16T06:07:47.821474",{"slug":6214,"name":6214,"fn":6215,"description":6216,"org":6217,"tags":6218,"stars":6103,"repoUrl":6104,"updatedAt":6224},"figma-implement-design","translate Figma designs into application code","Translates Figma designs into production-ready application code with 1:1 visual fidelity. Use when implementing UI code from Figma files, when user mentions \"implement design\", \"generate code\", \"implement component\", provides Figma URLs, or asks to build components matching Figma specs. For Figma canvas writes via `use_figma`, use `figma-use`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6219,6220,6221,6222,6223],{"name":5956,"slug":5957,"type":15},{"name":6181,"slug":6174,"type":15},{"name":6012,"slug":6013,"type":15},{"name":6021,"slug":6022,"type":15},{"name":6101,"slug":6102,"type":15},"2026-05-16T06:07:40.583615",{"slug":6226,"name":6226,"fn":6227,"description":6228,"org":6229,"tags":6230,"stars":6103,"repoUrl":6104,"updatedAt":6239},"hatch-pet","create animated pets for Codex","Create, repair, validate, visually QA, and package Codex-compatible animated pets and pet spritesheets from character art, generated images, company or prospect brand cues, or visual references. Use when a user wants a lightweight-worker Codex pet workflow, a non-pixel custom pet style, a prospect or company mascot pet, or a full 8x9 animated pet atlas with transparent unused cells, QA contact sheets, and pet.json packaging. This skill composes the installed $imagegen system skill for visual generation and uses bundled scripts for deterministic spritesheet assembly.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6231,6234,6235,6238],{"name":6232,"slug":6233,"type":15},"Animation","animation",{"name":6134,"slug":6135,"type":15},{"name":6236,"slug":6237,"type":15},"Creative","creative",{"name":5956,"slug":5957,"type":15},"2026-05-02T05:31:48.48485",{"slug":6241,"name":6241,"fn":6242,"description":6243,"org":6244,"tags":6245,"stars":6103,"repoUrl":6104,"updatedAt":6255},"imagegen","generate and edit raster images","Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output should be a bitmap asset rather than repo-native code or vector. Do not use when the task is better handled by editing existing SVG\u002Fvector\u002Fcode-native assets, extending an established icon or logo system, or building the visual directly in HTML\u002FCSS\u002Fcanvas.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[6246,6247,6248,6251,6254],{"name":6236,"slug":6237,"type":15},{"name":5956,"slug":5957,"type":15},{"name":6249,"slug":6250,"type":15},"Image Generation","image-generation",{"name":6252,"slug":6253,"type":15},"Images","images",{"name":9,"slug":8,"type":15},"2026-05-15T06:23:24.312127",675]