# Introduction (/docs)



<AlphaNotice />

Chelabase is a database-as-a-service control plane on [Neon](https://neon.tech). Each database gets its own Neon tenant, timeline and compute, plus branches, login roles, encrypted and re-revealable credentials, a data API with row-level security, and app-user auth. Studio is the only user-facing app.

It is for app developers (full-stack and product engineers) who build on Postgres. You use the typed client, `@chelabase/client`, and the data API from your app, and Studio while you build: projects, databases, branches, schema, data, API keys, row-level security and your app's users.

Success is going from sign-up to a working, secured database that your app queries through the typed client, without reaching for a second tool.

## What you get [#what-you-get]

* **Databases and branches.** A database is a Postgres cluster with its own storage and compute. Branch it at any point in its history, reset a branch to its parent, or restore it. See [Projects and databases](/docs/using/projects-and-databases) and [Branches](/docs/using/branches).
* **Login roles.** Create Postgres roles in Studio, through the API or in plain SQL; their passwords are stored encrypted and can be shown again. See [Login roles](/docs/using/login-roles).
* **A data API.** A typed JSON query endpoint, `POST /data/v1/query`, with a builder client and generated types. It runs as the `anon` and `authenticated` roles, so row-level security decides what rows come back. See [Data API](/docs/using/data-api) and [TypeScript client](/docs/using/client).
* **App users.** Sign-up, sign-in and sessions for your own app's users, so their identity reaches your row-level security policies. See [App users](/docs/using/app-users).
* **Studio.** The browser app for all of the above, including a SQL editor. See [SQL editor](/docs/using/sql-editor) and [Studio tour](/docs/using/studio).

## Principles [#principles]

1. **Safe by default.** The secure option is the default and the easiest one. Risky states, such as missing row-level security or exposed keys, are shown rather than hidden.
2. **Developer flow first.** Building, querying and inspecting happen in one place.
3. **Postgres stays legible.** Branches, roles and policies are shown as what they are, not behind abstractions.
4. **Our own design.** Chelabase solves each problem directly. The data API is a typed query endpoint, not a URL grammar; auth is its own.

## Modes [#modes]

Chelabase runs in one of two modes, set with `CHELABASE_MODE`.

| Mode                    | What it is                                                                                                                                                            |
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `self-hosted` (default) | What runs today, and the dev mode. Email verification is off, everyone who signs up shares one tenant, and some safety checks (such as password strength) are opt-in. |
| `platform`              | The hosted cloud. Not built yet; where this page mentions it, it describes what the code already does when the mode is set.                                           |

## Limits today [#limits-today]

* **The Management API takes only a member access token** (from Studio's sign-in, or `POST /auth/v1/token`). There are no API keys for it yet. Data API keys exist, but they open only the data API.
* **The gateway does not terminate TLS.** It serves plain HTTP on `:8000` and rejects `https://` upstreams; put a TLS-terminating proxy in front of it for anything beyond local use. It sets `X-Forwarded-Proto` for the services from `CHELABASE_PUBLIC_SCHEME` and ignores any value a client or proxy sends.
* **No tenant per sign-up.** In self-hosted mode everyone who joins (by invite, or by sign-up when an admin opens it) is in the same tenant, a shared team workspace.
* **Postgres wire access is Neon's proxy.** Connections go through Neon's proxy (`<endpoint>.localtest.me:5432` with the default Compose install); Chelabase has no wire proxy of its own.

## Where to start [#where-to-start]

Follow the [Quickstart](/docs/using/quickstart) to bring the stack up, create a database and query it. The [error codes](/docs/reference/errors) are listed in the Reference section, along with every endpoint, and [Architecture](/docs/architecture) explains how the pieces fit.
