"oAI" reads as easily confused with OpenAI, both visually and in casual conversation. Renamed to "Confab" throughout: Xcode target/scheme/bundle ID (com.oai.Confab), Info.plist and Help Book identity, all user-facing UI text, internal Log subsystem and color identifiers, localization catalogs (6 languages, including a proper reworded/retranslated Intel-deprecation notice), Help Book HTML content, and docs (README/DEVELOPMENT/PRIVACY/SECURITY). Deliberately cosmetic-only: the on-disk data folder (~/Library/Application Support/oAI/), database/backup filenames, Keychain service identifiers, and EncryptionService's key-derivation inputs are all left untouched so existing conversations, settings, and stored API keys survive the update with zero migration and no re-entering credentials. Verified live: a real signed build successfully decrypted a stored API key and loaded an existing conversation database after the bundle ID change. Also includes a small already-completed, previously uncommitted model-release-date feature (ModelInfo/OpenRouterModels/ OpenRouterProvider/ModelInfoView) that happened to share several files with this rename. Gitignored on this branch and updated on disk but not part of this commit: CLAUDE.md, RELEASE_NOTES.md, and the build*.sh scripts.
4.8 KiB
Confab — Development Guide
Project Structure
oAI/
├── Models/ # Data models
│ ├── Message.swift # Chat message model
│ ├── Conversation.swift # Saved conversation model
│ ├── ModelInfo.swift # AI model metadata
│ └── Settings.swift # App settings enums
│
├── Views/ # SwiftUI views
│ ├── Main/ # Primary UI components
│ │ ├── ChatView.swift # Main chat interface
│ │ ├── MessageRow.swift # Individual message display
│ │ ├── InputBar.swift # Message input with commands
│ │ ├── HeaderView.swift # Top bar (provider/model/status)
│ │ └── FooterView.swift # Bottom stats bar
│ │
│ └── Screens/ # Modal/sheet views
│ ├── SettingsView.swift # Settings with tabs
│ ├── ModelSelectorView.swift
│ ├── ConversationListView.swift
│ └── HelpView.swift
│
├── ViewModels/ # Observable view models
│ └── ChatViewModel.swift # Main chat logic & state
│
├── Providers/ # AI provider implementations
│ ├── Provider.swift # Protocol definition
│ ├── OpenRouterProvider.swift
│ ├── AnthropicProvider.swift
│ ├── OpenAIProvider.swift
│ └── OllamaProvider.swift
│
├── Services/ # Business logic & data
│ ├── DatabaseService.swift # SQLite operations (GRDB)
│ ├── SettingsService.swift # Settings persistence
│ ├── ProviderRegistry.swift # AI provider management
│ ├── MCPService.swift # File access (MCP)
│ ├── WebSearchService.swift # DuckDuckGo/Google search
│ ├── GitSyncService.swift # Git synchronization
│ ├── ContextSelectionService.swift # Smart context
│ ├── EmbeddingService.swift # Semantic search
│ ├── EmailService.swift # Email monitoring (IMAP)
│ └── EmailHandlerService.swift # Email AI responder
│
└── Resources/
└── Confab.help/ # macOS Help Book
Key Technologies
- SwiftUI - Modern declarative UI framework
- GRDB - SQLite database wrapper for persistence
- MarkdownUI - Markdown rendering with syntax highlighting
- os.Logger - Native logging framework
- Network Framework - Pure Swift IMAP/SMTP implementation
- Security Framework - Keychain and encryption services
Database Schema
Conversations: id, name, createdAt, updatedAt Messages: id, conversationId, role, content, tokens, cost, timestamp Message Metadata: message_id, importance_score, user_starred, summary Message Embeddings: message_id, embedding (BLOB), model, dimension Conversation Summaries: id, conversationId, startIndex, endIndex, summary Email Logs: id, sender, subject, status, timestamp
Location: ~/Library/Application Support/oAI/oai_conversations.db
Building
Manual Build Commands
# Clean build
xcodebuild clean -scheme Confab
# Debug build
xcodebuild -scheme Confab -configuration Debug
# Run tests
xcodebuild test -scheme Confab
Output: ~/Library/Developer/Xcode/DerivedData/oAI-*/Build/Products/Debug/Confab.app
In Xcode: ⌘B build, ⌘R run, ⌘⇧K clean, ⌘. stop.
XProtect Note
XProtect 5331 flags Debug builds (bash + IMAP + file access = RAT signature match). Use ./build.sh (Developer ID signed) for all local testing.
Logs
~/Library/Logs/Confab.log
Performance Notes
- Context Selection: 50-80% token reduction for long conversations
- Semantic Search: ~$0.02-0.15/month for heavy users
- Conversation Export: Markdown format for human readability
- Database: Indexed queries for fast conversation retrieval
- Streaming: Efficient memory usage with
AsyncThrowingStream
Contributing
Contributions are welcome! By submitting a pull request you agree that your contribution will be licensed under the PolyForm Noncommercial License 1.0.0, and you grant Rune Olsen the right to relicense your contribution (including for commercial licensing) as part of the project.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Please ensure:
- Code follows Swift style guidelines
- All tests pass
- Documentation is updated
- Commit messages are descriptive
Acknowledgments
- MarkdownUI - Excellent markdown rendering library
- GRDB - Robust SQLite wrapper for Swift
- Anthropic, OpenAI, OpenRouter - AI API providers