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

# Build Apps

> Write the code that runs inside a Judt App: a Workers-style JavaScript app on celld, the Judt runtime.

A Judt App is one Worker in the style of Cloudflare Workers. celld, the Judt runtime, runs the App on V8 isolates. It runs the App in the App's sandbox as a dev server while you build, and in production after you deploy. The pages in this tab explain how to write the code that runs inside an App.

To create, deploy, and publish Apps, and to manage their sandboxes, Secrets, and access, see [Manage Apps](https://docs.judt.ai/manage/introduction.md).

## The runtime

celld embeds V8 and implements the Cloudflare Workers runtime APIs. It's a WinterCG web runtime, not workerd, Node.js, or a browser. Write standard web-platform JavaScript, such as `fetch`, `Request`, `Response`, streams, `URL`, and Web Crypto. Reach storage and background work through the bindings that you declare in the `wrangler.json` file.

Most of what you know about Cloudflare Workers applies. Where celld differs, the page for each feature says so and says what to do instead. If this documentation and your knowledge of Cloudflare disagree, follow this documentation. For a summary of the differences, see [Differences from Cloudflare Workers](https://docs.judt.ai/build/cloudflare-differences.md).

## A minimal App

The smallest App is a `wrangler.json` file and an entry module that exports a `fetch` handler:

```json wrangler.json theme={null}
{
  "name": "app",
  "main": "index.js",
  "compatibility_date": "2026-09-17"
}
```

```js index.js theme={null}
export default {
  async fetch(request, env, ctx) {
    return new Response("Hello from Judt.", {
      headers: { "content-type": "text/plain; charset=utf-8" },
    });
  },
};
```

For the full list of files that an App can contain, see [The App contract](https://docs.judt.ai/build/app-contract.md).

## Choose storage and background work

Module-level variables aren't state. Each node runs its own isolates, and celld recycles isolates, so celld doesn't keep a value in a module variable. Keep all durable state in a binding. An App can use many bindings together.

The following table lists what to use for each kind of need:

| Need | Use |
| - | - |
| State for one thing, such as a room, document, cart, game, rate limit, or agent session, that needs order, coordination, or WebSockets | [Durable Objects](https://docs.judt.ai/build/storage/durable-objects.md) with SQLite |
| Relational data that you query across many entities | [D1](https://docs.judt.ai/build/storage/d1.md) |
| Values that you read by key, such as sessions, flags, and cached API responses with a TTL | [KV](https://docs.judt.ai/build/storage/kv.md). KV is strongly consistent on celld, and it has no atomic increment. |
| Files and blobs | [R2](https://docs.judt.ai/build/storage/r2.md). There are no presigned URLs, so all bytes go through the Worker. |
| HTML, CSS, browser JavaScript, icons, and fonts that ship with the code | [Static assets](https://docs.judt.ai/build/static-assets.md) |
| Background work, fan-out, and retries | [Queues](https://docs.judt.ai/build/background/queues.md) |
| Work on a schedule | [Cron Triggers](https://docs.judt.ai/build/background/cron-triggers.md) |
| A timer for one object | A Durable Object alarm. For more information, see [Durable Objects](https://docs.judt.ai/build/storage/durable-objects.md). |
| A process with many steps, sleeps, or waits for events | [Workflows](https://docs.judt.ai/build/background/workflows.md) |
| Code that you didn't write at build time | [Dynamic Workers](https://docs.judt.ai/build/advanced/dynamic-workers.md) |
| A private database for each tenant or plugin | [Durable Object facets](https://docs.judt.ai/build/advanced/facets.md) |
| An AI agent that calls a model and tools in a loop | A Durable Object with alarms. For more information, see [Build an AI agent loop](https://docs.judt.ai/build/advanced/agent-loop.md). |

## Explore the docs

> [card] [The App contract](https://docs.judt.ai/build/app-contract.md)
>
> The files of an App, the source limits, and the rules that keep data attached to your code.

> [card] [Test on the dev server](https://docs.judt.ai/build/dev-server.md)
>
> Run and debug the App in its sandbox before you deploy.

> [card] [Configure wrangler.json](https://docs.judt.ai/build/wrangler-json.md)
>
> The configuration keys and bindings that Judt accepts.

> [card] [npm packages and builds](https://docs.judt.ai/build/npm-and-builds.md)
>
> Add dependencies, TypeScript, JSX, or a frontend bundler.

> [card] [Durable Objects](https://docs.judt.ai/build/storage/durable-objects.md)
>
> Per-entity state with SQLite, alarms, and WebSockets.

> [card] [Runtime reference](https://docs.judt.ai/build/reference/runtime.md)
>
> Handlers, globals, Node.js built-in modules, crypto, and limits.


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