$ show TableProApp/TablePro
TablePro is a native macOS and iOS database client built with SwiftUI and AppKit, designed as an open-source alternative to commercial tools like TablePlus. It supports a vast array of database engines (PostgreSQL, MySQL, MSSQL, Oracle, MongoDB, Redis, Snowflake, ClickHouse, DuckDB, Teradata, Trino, etc.) through a plugin-based driver architecture defined in TableProPluginKit. The application features a custom code editor (CodeEditSourceEditor) with tree-sitter syntax highlighting, line folding, minimap, and Vim mode; a powerful data grid for inline editing; SSH tunneling with multi-factor authentication; CloudKit-based sync for connections and settings; and an integrated AI assistant with MCP (Model Context Protocol) server support for agentic database interactions. The codebase is actively maintained, demonstrates high engineering craftsmanship with clean protocols, extensive unit and UI tests, and many reusable components that could be extracted into independent libraries.
The LLM identified 4 files worth highlighting for reuse:
Defines the core PluginDatabaseDriver protocol and supporting types that allow third-party developers to implement database drivers as loadable bundles. The protocol is minimal, well-documented, and includes optional capabilities via PluginCapabilities option set. This abstraction enables the application to support any SQL or NoSQL database without tight coupling to the UI or query execution engine. The pattern is a textbook example of a stable plugin ABI and can be reused for any application needing extensible driver backends.
A fully self-contained SwiftUI/AppKit code editor package that provides syntax highlighting via TreeSitter, line folding, a minimap, find/replace panel, code suggestions, and bracket matching. It is designed as a standalone Swift Package (CodeEditSourceEditor) with its own CI, documentation, and example app. The editor is decoupled from TablePro's domain logic, making it directly reusable in any macOS application requiring a high-performance source code editor.
Implements a generic CloudKit synchronization engine with a declarative schema registry (SyncSchemaRegistry) that maps Swift types to CKRecord fields. It handles push/pull, conflict resolution, tombstone marking, and error classification. The SyncSchemaField protocol and SyncRecordCache provide a clean abstraction for syncing any entity. This framework can be extracted and reused in any iOS/macOS app requiring CloudKit-based data synchronization with minimal adaptation.
Orchestrates multiple SSH authentication methods (password, public key, keyboard-interactive, TOTP) using a chain-of-responsibility pattern. Each authenticator can succeed, fail, or pass to the next, with configurable `endsChainOn` behavior. The composite authenticator is self-contained, testable, and solves the common problem of SSH multi-factor authentication across different server configurations. It can be reused in any Swift SSH client.