SwiftDBAI: natural language queries for any SQLite database

Drop-in SwiftUI chat view, headless ChatEngine, LLM-agnostic via
AnyLanguageModel. Read-only by default with configurable allowlists.
Robust SQL parser with 63 tests. Includes demo app with GitHub stars dataset.
This commit is contained in:
Krishna Kumar
2026-04-04 09:30:56 -05:00
commit fcd752466a
80 changed files with 18265 additions and 0 deletions

61
screenshots/GALLERY.md Normal file
View File

@@ -0,0 +1,61 @@
# SwiftDBAI Screenshots
## Query Results
Bar chart and data table from a natural language query against a GitHub stars database.
![Results with chart](results-chart.png)
## Customization
### Custom Theme
Purple accent, custom placeholder ("Search GitHub repos..."), custom empty state icon and text.
```swift
var config = ChatViewConfiguration.default
config.userBubbleColor = .purple
config.accentColor = .purple
config.inputPlaceholder = "Search GitHub repos..."
config.emptyStateTitle = "Explore GitHub Data"
config.emptyStateIcon = "star.circle"
DataChatView(databasePath: path, model: myLLM)
.chatViewConfiguration(config)
```
| Empty state | With results |
|---|---|
| ![Custom empty](custom-theme.png) | ![Custom results](custom-results.png) |
### Dark Theme
```swift
DataChatView(databasePath: path, model: myLLM)
.chatViewConfiguration(.dark)
```
![Dark theme](dark-theme.png)
### Compact Theme
```swift
DataChatView(databasePath: path, model: myLLM)
.chatViewConfiguration(.compact)
```
![Compact theme](compact-theme.png)
## Presentation Modes
![Presentation modes](presentation-modes.png)
### Sheet
```swift
.sheet(isPresented: $showChat) {
DataChatSheet(databasePath: path, model: myLLM, title: "GitHub Stars")
}
```
![Sheet presentation](sheet-presentation.png)