# simolus3/drift

Drift is an easy to use, reactive, typesafe persistence library for Dart & Flutter.

Repository: https://github.com/simolus3/drift
Canonical: https://ross.abutalabs.com/products/drift
Homepage: https://drift.simonbinder.eu/
Language: Dart
License: MIT
License Family: permissive
Topics: dart, flutter, persistence, reactive, sqlite, dart-build-system
Last push: 2026-08-26T20:05:34+00:00

## Health v2 (maintenance only)
Score: 98/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 95, longevity 100
- inputs: {"age_days": 2768, "days_push": 7, "days_rel": 37, "gap_med": 25.5, "n_releases_24m": 25}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3263, forks 460 (observed 2026-08-28T04:07:52.692357+00:00)

## What it is
Drift is a reactive, type-safe persistence library for Dart and Flutter built on top of SQLite. It supports writing queries in both SQL and a fluent Dart API, with compile-time checked queries and auto-updating result streams.

## Use cases
- persist structured data in a Flutter app with SQLite
- watch database queries as reactive streams that update the UI
- write type-safe SQL queries checked at compile time in Dart
- manage schema migrations for a local mobile database
- run database work across isolates for better performance
- build a cross-platform app with local storage on Android, iOS, desktop and web

## When to choose
- you need relational data with joins, transactions, and complex SQL in a Flutter or Dart app
- you want compile-time safety for queries instead of parsing raw maps
- you need reactive UI updates driven by database changes
- you need a battle-tested, production-ready local database layer across all Flutter platforms

## When to avoid
- you only need simple key-value storage with no relational queries
- your project is not Dart or Flutter based
- you need a server-side or cloud-hosted database rather than local persistence

## Facets
- artifact type: library
- maturity: stable
- function: orm, database-driver, database
- domain: databases, mobile-development, cross-platform, developer-tools
- platform: cross-platform, windows
- tags: flutter, sqlite, reactive-queries, code-generation, type-safety, persistence, stream-queries, schema-migrations, android, ios, macos, linux, web-server

## Member repositories
- simolus3/drift (main) score 98

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:52.692357+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:23:12.061552+00:00, confidence not recorded.
  - readme: https://github.com/simolus3/drift (fetched 2026-08-28T04:07:52.692357+00:00, sha 0321eaf2dea3)
  - homepage: https://drift.simonbinder.eu/ (fetched 2026-08-29T09:36:39.767286+00:00, sha 50e544aaf8d3)
  - site_page: https://drift.simonbinder.eu/faq (fetched 2026-08-29T09:36:39.776755+00:00, sha 21e5d5c53c18)
- Data as of 2026-08-30T08:39:29.467469+00:00.
