# @db3.ai/app

> The backend runtime: application services, field-aware records, durable work and optional web delivery.

- Package: `@db3.ai/app`
- Canonical page: [https://db3.ai/docs/package-app](https://db3.ai/docs/package-app)
- Markdown: [https://db3.ai/docs/package-app.md](https://db3.ai/docs/package-app.md)
- Framework source of truth: `packages/app/README.md`

<a id="install"></a>

## Install the matching packages

App depends on the matching Pure version. Use the published package once available, or both maintainer-supplied tarballs for the current preview. The workspace name `@platform/app` is a contributor detail; consumers import `@db3.ai/app`.

The runtime manifest supports Node.js 20+, while these walkthroughs and the starter use Node.js 24+. The package is MIT licensed. A local compiled artifact is not evidence that npm publication or a website deployment has happened.

- [Installation commands and publication status](https://db3.ai/docs/installation.md)
- [Create the app shell](https://db3.ai/docs/starter-app.md)

<a id="imports"></a>

## Supported imports

This exact inventory comes from the staged export map. Choose the service subpath for normal imports; never import an application from Scout or depend on workspace-only source aliases.

### Exported TypeScript entry points

```text
@db3.ai/app
@db3.ai/app/ai
@db3.ai/app/auth
@db3.ai/app/auth/password-hash
@db3.ai/app/cache
@db3.ai/app/config
@db3.ai/app/db
@db3.ai/app/db/ActiveProjection
@db3.ai/app/db/ActiveQueryBuilder
@db3.ai/app/db/ActiveRecord
@db3.ai/app/db/connection
@db3.ai/app/db/Database
@db3.ai/app/db/dialects
@db3.ai/app/db/fields
@db3.ai/app/db/fields/BooleanField
@db3.ai/app/db/fields/CharUuidField
@db3.ai/app/db/fields/ChoiceStringField
@db3.ai/app/db/fields/createField
@db3.ai/app/db/fields/DecimalField
@db3.ai/app/db/fields/EmailField
@db3.ai/app/db/fields/EncryptedJsonField
@db3.ai/app/db/fields/field
@db3.ai/app/db/fields/index
@db3.ai/app/db/fields/IntegerField
@db3.ai/app/db/fields/JsonField
@db3.ai/app/db/fields/JsonStringField
@db3.ai/app/db/fields/LinkField
@db3.ai/app/db/fields/PasswordField
@db3.ai/app/db/fields/resolveFields
@db3.ai/app/db/fields/StringField
@db3.ai/app/db/fields/StringListField
@db3.ai/app/db/fields/TextField
@db3.ai/app/db/fields/TimestampField
@db3.ai/app/db/fields/UlidField
@db3.ai/app/db/fields/UrlField
@db3.ai/app/db/fields/VectorField
@db3.ai/app/db/FieldType
@db3.ai/app/db/migrations
@db3.ai/app/db/queryMonitor
@db3.ai/app/db/test/db
@db3.ai/app/events
@db3.ai/app/flows
@db3.ai/app/flows/blocks
@db3.ai/app/logging
@db3.ai/app/mail
@db3.ai/app/media
@db3.ai/app/media/image
@db3.ai/app/queue
@db3.ai/app/scheduler
@db3.ai/app/security
@db3.ai/app/serialization
@db3.ai/app/server
@db3.ai/app/ssr
@db3.ai/app/ssr/fastify
@db3.ai/app/ssr/vite
@db3.ai/app/storage
@db3.ai/app/url
@db3.ai/app/validation
```

<a id="ownership"></a>

## What belongs in your app

The framework owns reusable service mechanics. Your app owns routes, models, organization membership, billing policy, provider permissions and business workflows. Configure one App at process boot and resolve services through it.

SSR is optional; install its HTTP/build peers only when using those adapters. Flows needs an explicit App extension and registered blocks. The current AI client is text-only; the broader reusable AI platform is still planned.

- [App and request lifecycle](https://db3.ai/docs/app.md)
- [Every service reference](https://db3.ai/docs/api-reference.md)
- [Current AI boundary](https://db3.ai/docs/ai.md)

<a id="examples"></a>

## Use the shipped examples

The tarball includes service-owned example source. Each guide supplies exact copy, run and test commands, plus an isolated cleanup path. Copy examples into your app before changing them; keep application code outside `node_modules`.

- [First HTTP app](https://db3.ai/docs/create-app.md)
- [Private files](https://db3.ai/docs/guide-files.md)
- [Durable report worker](https://db3.ai/docs/guide-background.md)

<a id="testing"></a>

## Verify the consumer boundary

Use your generated app’s `npm test`, type check and build, or the guide’s copied test. Framework maintainers additionally pack the package, install it into a fresh consumer and check runtime imports and TypeScript. Passing through a workspace alias alone does not prove the package works.

- [Testing](https://db3.ai/docs/testing.md)

## Related documentation
- [Install the framework](https://db3.ai/docs/installation.md): Install one runtime package, then build a small HTTP app. Add a database and other services when your feature needs them.
- [Find a public contract](https://db3.ai/docs/api-reference.md): Start with a working guide. Use the emitted TypeScript reference when you need an option, method or return type.
- [@db3.ai/pure](https://db3.ai/docs/package-pure.md): Small portable helpers for ordinary application data. They do not create an App or replace validation and authorization.

## Guidance for AI tools
Use the documented public import `@db3.ai/app` and its exported types. Prefer the source-backed examples and behavioural outcomes above over invented APIs or source-relative internal imports.
