> ## 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.

# Why BoutiqueDB?

> Discover why BoutiqueDB is built specifically for Apple platforms, combining local-first persistence with Turso engine capabilities.

Building modern iOS and macOS applications requires a persistence layer that is **fast, reliable, thread-safe, and offline-ready**. Standard solutions often force developer tradeoffs between complex ORM abstractions and low-level SQL C APIs.

BoutiqueDB combines the local-first ergonomics of SQLite with modern Swift concurrency, Change Data Capture (CDC) observation, and Apple CloudKit sync.

***

## Key Advantages

> [card] Offline & Local-First
>
> Your database lives locally on the user's device. Apps launch instantly and operate seamlessly without network connectivity.

> [card] Swift Concurrency Safe
>
> Built from the ground up with `@MainActor` UI safety and isolated background `DatabaseActor` execution.

> [card] CDC Reactive Updates
>
> UI views update automatically (\< 250ms latency) via native Change Data Capture without heavy polling or manual notifications.

> [card] Zero Server Overhead
>
> Sync data seamlessly across user Apple devices using private CloudKit containers without managing servers or API endpoints.

***

## Comparison Matrix

| Feature | BoutiqueDB | SwiftData / CoreData | GRDB | Raw SQLite3 |
| :- | :-: | :-: | :-: | :-: |
| **Local SQLite File** | \[!TIP] | \[!TIP] | \[!TIP] | \[!TIP] |
| **Swift Concurrency (`async/await`)** | \[!TIP] | \[!TIP] | \[!TIP] | \[!WARNING] Manual |
| **Type-Safe Queries (`@Table`)** | \[!TIP] | \[!TIP] | \[!TIP] | \[!WARNING] Strings |
| **CDC Live Observation** | \[!TIP] | \[!WARNING] KVO / NSFRC | \[!TIP] | \[!WARNING] Manual |
| **CloudKit Private Sync** | \[!TIP] | \[!TIP] | \[!WARNING] Extra setup | \[!WARNING] Custom |
| **Full-Text Search (Tantivy BM25)** | \[!TIP] Native | \[!WARNING] Basic FTS | \[!WARNING] FTS5 | \[!WARNING] FTS5 |
| **Vector Search (AI Embeddings)** | \[!TIP] Native | \[!WARNING] No | \[!WARNING] Extension | \[!WARNING] Extension |
| **Hardware Encryption (AEGIS)** | \[!TIP] Built-in | \[!WARNING] Data Protection | \[!WARNING] SQLCipher | \[!WARNING] Custom |

***

## Architectural Philosophy

1. **Local-First Authority**: The database file inside your app sandbox is the single source of truth. Network synchronization is asynchronous and non-blocking.
2. **Type Safety Without Magic**: Models use compile-time macros (`@Table`) so queries remain standard Swift code.
3. **Explicit Over Implicit**: Schema migrations and experimental engine flags (`TursoOpenOptions`) are explicit and version-controlled.


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