For developers

Project layout

How the code is organised into modules and packages, and the main ideas that tie it together.

TableGrip is a Kotlin project built with Gradle. The UI uses Compose for Desktop with Jewel, JetBrains' IntelliJ look and feel for Compose.

#Modules

ModulePurpose
coreThe UI-free domain: connection profiles and the keychain, Database (pooled, introspection, paging), per-console QuerySessions with cancellation, SQL dialects, the lexer and statement splitter, settings and query history. Everything here is unit tested.
appThe Compose Desktop + Jewel UI, one package per feature.
enginesAdapters for non-JDBC databases (redis, mongodb), shipped as engines/<name>.jar outside the classpath and loaded together with their client's jars.
assets/brandingThe app icon's sources and export scripts.
wwwThis website and its docs.
docsThe original user guide, development notes, and design notes in docs/plans/.

#Packages in core

dev.tablegrip.core is grouped by concern:

PackageHolds
connectionConnection profiles, database types, URL parsing, SSH tunnels, the secret store
driver, driversThe driver catalog, downloads, hash checks and class loaders
sql, dialect, completionLexing, statement splitting, per-engine SQL dialects and completion
metadata, schema, ddlReading catalogs, table structure, schema compare and DDL generation
edit, filterPending grid edits and the typed filter compiler
datafile, importer, imports, exportData files as tables, data import, connection import from other tools, export
activity, backup, toolsServer activity, backup and restore, and locating client tools
agent, assistAI agents (CLI and HTTP providers), mentions, chat storage and fix suggestions
settings, theme, session, history, queriesSettings, themes, workspace sessions, query history and saved queries
testdata, chartThe test data generator and chart data

#Packages in app

dev.tablegrip.app has one package per feature: connections, explorer, workspace, console, table, grid, documents, keyvalue, files, schema, activity, backup, agent, chart, export, search, settings, update and ui. AppState is the root of the UI state: it owns the app-wide services and wires the feature view models together.

#Ideas worth knowing

  • Nothing is bundled that can be downloaded. Drivers and client tools are fetched at runtime and verified; build checks fail if one ends up in the installer.
  • Each driver gets its own class loader, so drivers can't clash with each other or with the app.
  • Pending changes are data. Grid edits, schema changes and imports are built as a list of statements first, shown to the user, and only then run, in one transaction where the database allows.
  • Plain files. Settings, sessions, history, saved queries and chats are JSON or .sql files in the profile folder (TableGripPaths), written atomically.
  • Secrets only in the OS store, through java-keyring, under the service name TableGrip.

#Dependencies

Versions live in gradle/libs.versions.toml. Jewel is pinned to a Compose 1.12.x and Kotlin 2.3.20; bump them together, following the Jewel samples.