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

# Development

> The dev loop: edit the app tree, check it, review its lock file and test it on the real kernel.

## Create or connect a project

Use [Create your first app](https://docs.bijection.com/start/quickstart.md) to create the backend and
frontend. Run `bijection dev` from the project directory to work on them
together.

## The dev loop

An app is one tree of declarations. `bijection/app.ts` exports
`app(tree)`, and every name in the app is a path in that tree: the table
`notes.items`, the query `notes.list`. A function with `allow` is exposed at
its path. A function without `allow` is internal.

```ts bijection/notes.ts theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
import { query, role, t, table } from "@bijectionhq/bijection";

export const items = table({ text: t.string, written: t.instant }, { index: [["written"]] });

export const list = query({ allow: [role.anyone] }, (ctx) =>
  ctx.list(items.by("written").descending().first(20)),
);
```

```ts bijection/app.ts theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
import { app } from "@bijectionhq/bijection";
import * as notes from "./notes";

export default app({ notes });
```

Each time you save, `bijection dev` installs the changed tree on your
development deployment. The client is typed from the tree itself
(`api<typeof App>()`), so your frontend's TypeScript follows the same
change with no generated bindings.

## Before you commit

1. Run [`bijection check`](https://docs.bijection.com/development/cli/check). It checks the tree's
   types, the lexicon and every label flow, and analyzes your guards.
2. If the app's exposure or authority changed, run
   `bijection check --write-lock`, review the
   [`bijection.lock`](https://docs.bijection.com/development/cli/lock) diff and commit it with the
   source. `bijection dev` rewrites it on save and prints the diff. Deploy
   refuses a stale lock.
3. Run your tests on the [real kernel](https://docs.bijection.com/development/testing/test-library.md)
   with `kernel(app)`.

See [TypeScript](https://docs.bijection.com/development/typescript.md), the [CLI](https://docs.bijection.com/development/cli) and
[Working with installations](https://docs.bijection.com/operate/installations).


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