> ## 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.

# bijection.config.ts

> Default-export the app tree

`bijection/bijection.config.ts` default-exports the app tree. Every name in
the app is a path in it: tables, labels, roles, releases, secrets, targets,
functions, reactions, guards and the subtrees of mounted apps and libraries.
No declaration takes a string name.

```ts bijection/bijection.config.ts theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
import { app } from "@bijectionhq/bijection";
import { members } from "@bijectionhq/library-members";
import * as notes from "./notes";
import { editor, reader, staff } from "./roles";

export default app({
  roles: { reader, editor, staff },
  notes,
  team: members({ roles: [reader, editor], roster: staff }),
});
```

* A function with `allow` is exposed at its path (`notes.add`); one without
  is internal.
* A reaction (`on: every(…)`, `cron(…)`, `route.post(…)` or
  `selection.changes`) runs wherever it is placed. See
  [Reactions](https://docs.bijection.com/functions/reactions.md).
* A mountable app or library is a function from its capabilities to a
  subtree. Mounting it is calling it at a path. See
  [Mount an app](https://docs.bijection.com/components/using).

`bijection check` reads this export and writes
[`bijection.lock`](https://docs.bijection.com/development/cli/lock), the reviewable list of every
exposed path with its `allow`, grave acts and guards. For an in-repository
TypeScript frontend, set `"browserClient": true`. Preparation writes
`.bijection/_generated/client.ts`. Import its typed references and pinned
connector from your frontend:

```ts theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
import { app, connect } from "../.bijection/_generated/client";

const client = connect(url);
const notes = await client.query(app.notes.recentNotes);
```


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