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

# Cindel — Flutter-First Local Database for Flutter

> Cindel is an ultra-fast local database for Flutter apps with generated typed Dart APIs, a Rust native core, and multi-platform backend support.

Cindel is a local-first database for Flutter and Dart applications. You define your data as ordinary Dart classes, run a code generator, and immediately get a fully-typed API — typed collection getters like `db.todos`, typed query helpers like `where()` and `filter()`, and reactive watchers that rebuild your UI when data changes. Under the hood, Cindel's Rust native core powers MDBX (the default) on native platforms and SQLite Web/OPFS in the browser, so the same application code runs everywhere Flutter runs.

<CardGroup cols={2}>
  <Card title="Introduction" icon="book-open" href="/introduction">
    Learn what Cindel is, how the code-generation model works, and which backend to choose for your platform.
  </Card>

  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Build your first Cindel-powered feature in minutes: add packages, annotate a model, generate code, and run your first query.
  </Card>

  <Card title="Data Modeling" icon="layer-group" href="/modeling/collections">
    Define collections, ids, field types, enums, embedded objects, and Freezed models.
  </Card>

  <Card title="Querying Data" icon="magnifying-glass" href="/querying/queries">
    Use generated `where()` and `filter()` helpers for indexed lookups, sorting, pagination, and aggregates.
  </Card>

  <Card title="Transactions" icon="rotate" href="/features/transactions">
    Group related reads and writes with `readTxn` and `writeTxn` so they commit or roll back together.
  </Card>

  <Card title="Flutter Web" icon="globe" href="/platforms/web">
    Run the same typed Cindel app code in the browser with SQLite Web/OPFS via `cindel_flutter_libs`.
  </Card>
</CardGroup>

## How it works

<Steps>
  <Step title="Add dependencies">
    Add `cindel` and `cindel_flutter_libs` to your `pubspec.yaml`, and `build_runner` plus `cindel_generator` to your dev dependencies.
  </Step>

  <Step title="Annotate a model">
    Decorate a Dart class with `@Collection()`, give it an `Id dbId = autoIncrement` field, and add `@Index` to the fields you want to query by.
  </Step>

  <Step title="Generate code">
    Run `dart run build_runner build` to produce the schema constant, typed collection getter, serializers, and query helpers for every annotated model.
  </Step>

  <Step title="Open the database and query">
    Call `Cindel.open(directory: ..., schemas: [YourSchema])`, then read and write through the generated typed API — `db.todos.put(todo)`, `db.todos.where().findAll()`, and `db.todos.watchCollection()`.
  </Step>
</Steps>
