> ## Documentation Index
> Fetch the complete documentation index at: https://docs.base44.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Base44 backend functions

> Base44 server-side code: backend functions (HTTP handlers in base44/functions/<name>/entry.ts on Cloudflare Workers) for Vite SPA apps, or TanStack Start server functions and server routes. Secrets, the Base44 SDK on the server, auth and service role, webhooks, admin-only handlers, frontend invocation, testing, and the InvokeLLM model table. Use when the app needs external APIs, privileged logic or scheduled work.

> [!WARNING]
>
> This page is part of an AI coding agent skill and is written for agents, not humans. For the human-readable Base44 docs, see the [developer documentation](https://docs.base44.com/developers).

# Base44 backend functions

A Vite SPA app runs server code as backend functions; a TanStack Start app runs it as server functions and server routes inside its own project. Writing the file deploys it.

> **Requires the Builder plan or above.** The workspace's entitlement is reported by the agent-profile endpoint; on a lower plan the platform rejects the deploy.

## Pick the reference for this app

Determine the app profile first. Call `GET /api/apps/{app_id}/agent-profile` (over the Base44 MCP `execute_api`
tool, or with your Base44 CLI token); it returns the framework, app type, runtime,
entitlements and the exact reference files to read. Without it, detect from the project files:
`src/routes/__root.*` and `src/routeTree.gen.ts` mean TanStack Start; `app/_layout.*` means a
native mobile (Expo) app; otherwise it is a Vite SPA.

| Profile | Read |
| - | - |
| Web app, Vite SPA (the default web template) | [Backend functions (Vite SPA)](https://docs.base44.com/developers/skills/base44-platform-backend-functions/references/web-spa.md) |
| Web app, TanStack Start | [Server functions and server routes (TanStack Start)](https://docs.base44.com/developers/skills/base44-platform-backend-functions/references/web-tanstack.md) |
| Native mobile app (Expo, React Native) | [Backend functions (mobile apps)](https://docs.base44.com/developers/skills/base44-platform-backend-functions/references/mobile.md) |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.