# Reference

Version 0.1.0, from Jadpo's `main` branch at `a707efb`. Jadpo's CI compiles every example on these pages, so each one works.

## New to Jadpo?

This path builds one app, a todo list with sign-in, from an empty folder to a deployed server. Each page adds one idea and ends with the app running.

[Learn Jadpo ](/learn)[The one-page primer](/docs/primer)

The primer is the whole language on one page: what an agent reads first, and a summary for you once you've started.

## For agents

Every page is also Markdown: add `.md` to its address. Start at [/llms.txt](/llms.txt), read [/docs/primer.md](/docs/primer.md), follow [/learn.md](/learn.md) to teach a person, then find pages by title and summary in [/docs/index.json](/docs/index.json).

A compiler error names its rule; its page is `/docs/errors/<rule>`. There are 661, listed in the [error index](/docs/errors).

## By task

-   [Build an API](/tasks/build-an-api)
    
    Routes with one typed input and output, the failures callers see, and the OpenAPI document written for you.
    
-   [Store data](/tasks/store-data)
    
    Entities, references and migrations, then the queries and writes that read and change them.
    
-   [Sign people in and decide who sees what](/tasks/sign-people-in)
    
    Sessions, magic links and passkeys; then grants, roles, tenancy and the permissions report.
    
-   [Call another service](/tasks/call-a-service)
    
    Typed provider packages, connections, calls, webhooks, and the fakes your tests use.
    
-   [Run background work](/tasks/background-work)
    
    Schedules, events and subscribers, batches that keep their progress, retries and what an operator sees.
    
-   [Test it](/tasks/test)
    
    Tests beside the code, a real database per test, a controlled clock and provider fakes.
    
-   [Configure and deploy](/tasks/deploy)
    
    Settings and secrets, then a native build or a Cloudflare Workers build.
    

## By part of the language

-   [Project layout and modules](/docs/project-layout-and-modules)
    
    How a Jadpo project is laid out on disk, how one file sees declarations from another, and the naming rules every name follows.
    
-   [Values and types](/docs/values-and-types)
    
    What kinds of value a Jadpo program works with, how you give a value a meaning in your business, and when one type can stand in for another.
    
-   [Logic](/docs/logic)
    
    How you write what your app does: functions and actions, variables and constants, statements, operators, `match`, `attempt` and loops, and what Jadpo allows for passing functions.
    
-   [Failures](/docs/failures)
    
    Your code says what went wrong, by name, and Jadpo decides how each failure reaches whoever called: the HTTP status, the response body and what is logged.
    
-   [Data](/docs/data)
    
    How you declare the records your app keeps, where they are stored, and how their shape changes over time.
    
-   [Reads and writes](/docs/reads-and-writes)
    
    How a program reads and changes stored records: named queries, filters, order and pages, totals, related records, the operations every entity gets, what a refused write reports.
    
-   [HTTP](/docs/http)
    
    A Jadpo app answers HTTP requests with routes.
    
-   [Identity](/docs/identity)
    
    Identity is how Jadpo knows who is calling.
    
-   [Policy](/docs/policy)
    
    Policy says who may do what to which stored records.
    
-   [Configuration and time](/docs/configuration-and-time)
    
    This page covers the values your app reads from its environment, such as a database address or an API key, and everything to do with time: the current time, dates and time zones.
    
-   [External services](/docs/external-services)
    
    An external service is another company's API, such as Stripe, a courier or another Jadpo app, that your actions call.
    
-   [Jobs and events](/docs/jobs-and-events)
    
    This page covers the work your app does outside a request: schedules that run an action on a timer, events an action announces, subscribers that react to them, and what happens when that work fails.
    
-   [Testing](/docs/testing)
    
    A Jadpo test runs your real application against a real database.
    
-   [Tooling](/docs/tooling)
    
    The `jadpo` command and everything around it: the formatter, the editor support, how errors are shown, the generated `build/` folder.
    
-   [Personal data](/docs/personal-data)
    
    Your app says which data is about a person, and Jadpo does the rest: it exports that data when the person asks for a copy, erases it when they ask to be forgotten, deletes it when its time is up.
    
-   [Built-in services](/docs/built-in-services)
    
    Jadpo gives your app some common backend features itself, so you don't install a library or write your own: feature flags, rate limits, files, an audit trail, telemetry, email, documents.
    
-   [Debugging and review](/docs/debugging-and-review)
    
    Jadpo code is written mainly by coding agents and read by people, so two jobs matter most.
    
-   [Records and manifest](/docs/records-and-manifest)
    
    Besides your running app, the compiler writes two kinds of file, and it keeps them apart so that every change can be reviewed and every production event traced back to its source.
    
-   [Standard library](/docs/standard-library)
    
    The standard library is the set of types and operations every program can use without declaring them, such as `Money`, `list.count(items)` and `temporal.in_zone(at, zone)`.
    
-   [Geospatial](/docs/geospatial)
    
    Geospatial values say where things are, and what is near or inside what: a bakery's position, the patches it delivers to, the shops within five kilometres of a customer.
    
-   [AI](/docs/ai)
    
    Your app can ask a language model for an answer, a stream of text or an embedding (a list of numbers that stands for a text's meaning).
    

## Commands

-   [`jadpo check`](/docs/jadpo-check)
    
    Check the project for errors.
    
-   [`jadpo test`](/docs/jadpo-test)
    
    Run tests.
    
-   [`jadpo dev`](/docs/jadpo-dev)
    
    Run the app and reload on every save.
    
-   [`jadpo build`](/docs/jadpo-build)
    
    Build the app to deploy.
    
-   [`jadpo fmt`](/docs/jadpo-fmt)
    
    Format source files.
    
-   [`jadpo package`](/docs/jadpo-package)
    
    Show, check, import and install packages.
    
-   [`jadpo migrate`](/docs/jadpo-migrate)
    
    Write and apply migrations.
    
-   [`jadpo sql`](/docs/jadpo-sql)
    
    Show the SQL a query or action sends.
    
-   [`jadpo routes`](/docs/jadpo-routes)
    
    List every route.
    
-   [`jadpo ai`](/docs/jadpo-ai)
    
    Show prompts, record, usage.
    
-   [`jadpo calls`](/docs/jadpo-calls)
    
    Show provider calls in dev.
    
-   [`jadpo email`](/docs/jadpo-email)
    
    Read the dev inbox and check mail.
    
-   [`jadpo why`](/docs/jadpo-why)
    
    Explain why a schedule didn't run.
    
-   [`jadpo api`](/docs/jadpo-api)
    
    Rewrite the API records.
    
-   [`jadpo records`](/docs/jadpo-records)
    
    List and update the records.
    
-   [`jadpo declines`](/docs/jadpo-declines)
    
    List or clear declines.
    
-   [`jadpo fix`](/docs/jadpo-fix)
    
    Fix a standard type's finding.
    
-   [`jadpo suggest`](/docs/jadpo-suggest)
    
    Hint where a standard type or operation fits.
    
-   [`jadpo translations`](/docs/jadpo-translations)
    
    Keep translations up to date.
    
-   [`jadpo schedules`](/docs/jadpo-schedules)
    
    Watch and control schedules.
    
-   [`jadpo deliveries`](/docs/jadpo-deliveries)
    
    Retry, dismiss or cancel deliveries.
    
-   [`jadpo runs`](/docs/jadpo-runs)
    
    Check runs before a deploy.
    
-   [`jadpo new`](/docs/jadpo-new)
    
    Start a project.
    
-   [`jadpo config`](/docs/jadpo-config)
    
    Check and set local settings.
    
-   [`jadpo completions`](/docs/jadpo-completions)
    
    Turn on Tab completion.
    
-   [`jadpo toolchain`](/docs/jadpo-toolchain)
    
    Manage Jadpo releases.
    
-   [`jadpo lsp`](/docs/jadpo-lsp)
    
    Run the language server for editors.
    
-   [`jadpo help`](/docs/jadpo-help)
    
    Show commands, flags and examples.
    
-   [`jadpo version`](/docs/jadpo-version)
    
    Print the version.
