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

# BoutiqueDB for Swift

> The local-first database for Swift apps, with reactive queries, CloudKit synchronization, and Turso-powered capabilities.

Swift 6 · iOS · macOS

# The local-first database built for Swift apps.

BoutiqueDB combines SQLite-compatible local persistence, CDC-backed `LiveQuery`, CloudKit synchronization, and Turso engine capabilities in one native Swift package.

[Get started](https://boutiquedb.mintlify.site/getting-started/quick-start.md)

[Explore architecture](https://boutiquedb.mintlify.site/advanced/boutiquedb-architecture.md)

Local-first
SQLite-compatible
Reactive SwiftUI
Optional CloudKit

Turso engine
SQLite · FTS · vectors · encryption

BoutiqueDB actor
Queries · migrations · transactions

![BoutiqueDB](https://mintcdn.com/boutiquedb/WqVS8D_w5UWknscf/icon.png?fit=max\&auto=format\&n=WqVS8D_w5UWknscf\&q=85\&s=88d4cb8956e96bfd9b0b96732611b28b)

BoutiqueDB
Native persistence for Apple platforms

&#x20;LiveQuery CloudKit Swift

One native data layer
Start simple. Keep the ceiling high.

BoutiqueDB handles the local database path first, then lets the app adopt reactive observation, private synchronization, search, vectors, and encryption only when they are useful.

[Core engine
Local-first by construction
Durable storage lives inside the app sandbox, with actor-isolated access and type-safe Structured Queries.
Explore the engine ](https://boutiquedb.mintlify.site/core-concepts.md)

[Reactive UI
CDC-backed live queries
`@LiveQuery` and `@LiveQueryOne` update SwiftUI from database changes without a manual refresh pipeline.
Build reactive views ](https://boutiquedb.mintlify.site/guides/live-queries)

[Apple sync
CloudKit without a backend
Keep the local database authoritative while optionally synchronizing private user data through `CKSyncEngine`.
Configure synchronization ](https://boutiquedb.mintlify.site/guides/cloudkit-sync)

[Engine extensions
Search, vectors, views, encryption
Opt into Tantivy FTS, dense and sparse vectors, incremental materialized views, and AEGIS encryption.
See Turso capabilities ](https://boutiquedb.mintlify.site/turso-features-in-apple-apps.md)

Designed as a system
A predictable path from SwiftUI to durable data.

The public API stays Swift-native. BoutiqueDB owns isolation and observation, the Turso engine owns storage, and CloudKit remains an optional synchronization layer.

[Read the architecture guide ](https://boutiquedb.mintlify.site/advanced/boutiquedb-architecture.md)

**SwiftUI**Views and app state

→

**LiveQuery**CDC observation

![](https://mintcdn.com/boutiquedb/WqVS8D_w5UWknscf/icon.png?fit=max\&auto=format\&n=WqVS8D_w5UWknscf\&q=85\&s=88d4cb8956e96bfd9b0b96732611b28b)

**BoutiqueDB actor**Queries · migrations · transactions · isolation

**Turso engine**Local durable storage

**CloudKit**Optional private sync

Swift-native API
Define the model. Query it reactively.

Schema macros, structured queries, and property wrappers keep database code legible without hiding the underlying persistence model.

&#x20;Type-safe query construction
&#x20;Local operation without a service
&#x20;Reactive SwiftUI observation

NotesView\.swift
Swift

```swift theme={"theme":{"light":"github-light","dark":"github-dark"}}
@Table
struct Note {
    @Column(primaryKey: true) let id: UUID
    var title: String
}

struct NotesView: View {
    @LiveQuery var notes: [Note]

    init(db: BoutiqueDB) {
        _notes = LiveQuery(db) {
            Note.order { $0.title }.asSelect()
        }
    }
}
```

Why BoutiqueDB
Native ergonomics without a low ceiling.

01
Apple-platform shaped
Swift concurrency, SwiftUI observation, CloudKit, and app-sandbox storage are first-class constraints.

02
SQLite-compatible foundation
Begin with familiar local persistence and selectively adopt advanced engine features as the product grows.

03
No backend requirement
The application remains useful offline before synchronization or remote infrastructure is introduced.

[Compare persistence options ](https://boutiquedb.mintlify.site/sqlite-comparison.md)

Start with the local database
Build the first reactive model in minutes.
Add the package, define a table, open the database, and connect the result to SwiftUI.

[Open Quick Start ](https://boutiquedb.mintlify.site/getting-started/quick-start.md)

[ GitHub](https://github.com/tuliopc23/BoutiqueDB-Swift)


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