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.
61
screenshots/GALLERY.md
Normal file
@@ -0,0 +1,61 @@
|
||||
# SwiftDBAI Screenshots
|
||||
|
||||
## Query Results
|
||||
|
||||
Bar chart and data table from a natural language query against a GitHub stars database.
|
||||
|
||||

|
||||
|
||||
## 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 |
|
||||
|---|---|
|
||||
|  |  |
|
||||
|
||||
### Dark Theme
|
||||
|
||||
```swift
|
||||
DataChatView(databasePath: path, model: myLLM)
|
||||
.chatViewConfiguration(.dark)
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Compact Theme
|
||||
|
||||
```swift
|
||||
DataChatView(databasePath: path, model: myLLM)
|
||||
.chatViewConfiguration(.compact)
|
||||
```
|
||||
|
||||

|
||||
|
||||
## Presentation Modes
|
||||
|
||||

|
||||
|
||||
### Sheet
|
||||
|
||||
```swift
|
||||
.sheet(isPresented: $showChat) {
|
||||
DataChatSheet(databasePath: path, model: myLLM, title: "GitHub Stars")
|
||||
}
|
||||
```
|
||||
|
||||

|
||||
BIN
screenshots/compact-theme.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
screenshots/custom-results.png
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
screenshots/custom-theme.png
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
screenshots/dark-theme.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
screenshots/iphone-results.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
screenshots/presentation-modes.png
Normal file
|
After Width: | Height: | Size: 69 KiB |
BIN
screenshots/results-chart.png
Normal file
|
After Width: | Height: | Size: 127 KiB |
BIN
screenshots/sheet-presentation.png
Normal file
|
After Width: | Height: | Size: 77 KiB |
BIN
screenshots/tool-api.png
Normal file
|
After Width: | Height: | Size: 144 KiB |