Skip to content

Conversation

@franklinfollis
Copy link
Collaborator

@franklinfollis franklinfollis commented Oct 17, 2025

Draft Powered by Pull Request Badge

Summary

This PR adds the command db studio, which launches a web-based database management UI that runs entirely on the Elide runtime. It provides a modern interface for viewing and editing databases with support for CRUD operations, schema management, and SQL queries. For now, it only works with SQLite, via Elide's SQLite bindings.

Usage

# Automatic discovery - finds all [.db|.db3|.sqlite|.sqlite3] files in current and immediate directories
elide db studio

# Specific directory
elide db studio path/to/my/databases/

# Specific database
elide db studio path/to/database.db

# Opens browser to http://localhost:8080 with UI

What it does:

  • Extracts all necessary files under .dev/db-studio/ on first run.
  • Launches two servers:
    • API server (port 4984): TypeScript REST API using elide:sqlite
    • UI server (port 8080): React frontend served as static files

Architecture

  • Backend: TypeScript REST API with custom HTTP routing, Zod validation, and SQLite integration via elide:sqlite
  • Frontend: React 19 app built with Vite, shadcn/ui, TailwindCSS 4, and TanStack Query for data management
  • Configuration: Ports and database paths configured via elide.pkl manifests or via CLI args

Directory structure:

.dev/db-studio/
├── api/          # TypeScript API
└── ui/           # Statically built React app

Features

Drizzle Studio was the main inspiration behind many of the operations, including:

  • Query editor/SQL Console to run directly against the database
  • Simple filtering of rows and columns, and sorting when viewing tables
  • Adding, deleting, and editing data directly in tables
  • Creating, dropping, and truncating tables

Future Plans

  • Create a db file through the UI (at the moment db files need to already exist)
  • Data export (CSV/JSON)
  • PostgreSQL/MySQL support

@franklinfollis franklinfollis added this to the Release R18: Beta milestone Oct 17, 2025
@franklinfollis franklinfollis added feature Large PRs or issues with full-blown features 🚧 WIP Works-in-progress. Blocks merge module:cli CLI module issues and features labels Oct 17, 2025
@codecov
Copy link

codecov bot commented Oct 21, 2025

Codecov Report

❌ Patch coverage is 6.97674% with 200 lines in your changes missing coverage. Please review.
✅ Project coverage is 42.57%. Comparing base (a41f42c) to head (c94579c).

Files with missing lines Patch % Lines
...in/kotlin/elide/tool/cli/cmd/db/DbStudioCommand.kt 2.98% 195 Missing ⚠️
...kotlin/elide/tool/cli/cmd/repl/ToolShellCommand.kt 0.00% 3 Missing ⚠️
.../main/kotlin/elide/tooling/runner/ProcessRunner.kt 80.00% 1 Missing ⚠️
...rc/main/kotlin/elide/tool/exec/SubprocessRunner.kt 83.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1699      +/-   ##
==========================================
- Coverage   42.65%   42.57%   -0.09%     
==========================================
  Files         897      898       +1     
  Lines       38473    38682     +209     
  Branches     5989     6011      +22     
==========================================
+ Hits        16411    16468      +57     
- Misses      19834    19983     +149     
- Partials     2228     2231       +3     
Flag Coverage Δ
jvm 42.57% <6.97%> (-0.09%) ⬇️
lib 42.57% <6.97%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ckages/cli/src/main/kotlin/elide/tool/cli/Elide.kt 33.15% <ø> (ø)
.../main/kotlin/elide/tooling/runner/ProcessRunner.kt 34.32% <80.00%> (+34.32%) ⬆️
...rc/main/kotlin/elide/tool/exec/SubprocessRunner.kt 68.68% <83.33%> (+34.66%) ⬆️
...kotlin/elide/tool/cli/cmd/repl/ToolShellCommand.kt 29.21% <0.00%> (-0.29%) ⬇️
...in/kotlin/elide/tool/cli/cmd/db/DbStudioCommand.kt 2.98% <2.98%> (ø)

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a41f42c...c94579c. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@socket-security
Copy link

socket-security bot commented Oct 28, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​react-router-dom@​7.9.41001006598100
Addednpm/​@​radix-ui/​react-separator@​1.1.81001006796100
Addednpm/​class-variance-authority@​0.7.11001006880100
Addednpm/​@​radix-ui/​react-slot@​1.2.31001006996100
Addednpm/​@​elide-dev/​types@​1.0.0-beta10761007089100
Addednpm/​@​radix-ui/​react-switch@​1.2.6991007096100
Addednpm/​@​radix-ui/​react-tabs@​1.1.13991007096100
Addednpm/​@​radix-ui/​react-hover-card@​1.1.15991007196100
Addednpm/​@​radix-ui/​react-checkbox@​1.3.3991007196100
Addednpm/​@​radix-ui/​react-dropdown-menu@​2.1.16991007196100
Addednpm/​@​radix-ui/​react-alert-dialog@​1.1.15991007196100
Addednpm/​@​radix-ui/​react-accordion@​1.2.12991007196100
Addednpm/​@​radix-ui/​react-dialog@​1.1.15991007196100
Addednpm/​@​radix-ui/​react-tooltip@​1.2.8991007296100
Addednpm/​@​tanstack/​react-table@​8.21.31001007385100
Addednpm/​typescript-eslint@​8.46.21001007498100
Addednpm/​@​tanstack/​eslint-plugin-query@​5.91.21001007491100
Addednpm/​@​types/​react-dom@​19.2.21001007592100
Addednpm/​@​types/​react@​19.2.21001007995100
Addednpm/​@​codemirror/​state@​6.5.21001007983100
Addednpm/​clsx@​2.1.11001009480100
Addednpm/​@​types/​node@​24.9.11001008195100
Addednpm/​vite@​7.1.12981008299100
Addednpm/​@​codemirror/​theme-one-dark@​6.1.31001008382100
Addednpm/​@​codemirror/​commands@​6.10.01001008386100
Addednpm/​@​codemirror/​lang-sql@​6.10.09910010084100
Addednpm/​tailwindcss@​4.1.161001008498100
Addednpm/​react@​19.2.01001008497100
Addednpm/​@​codemirror/​view@​6.38.61001008597100
Addednpm/​globals@​16.4.01001008590100
Addednpm/​tailwind-merge@​3.3.11001008695100
Addednpm/​@​heroicons/​react@​2.2.01001009286100
Addednpm/​@​tanstack/​react-query@​5.90.5991008897100
See 16 more rows in the dashboard

View full report

@franklinfollis franklinfollis self-assigned this Oct 29, 2025
@franklinfollis franklinfollis linked an issue Nov 4, 2025 that may be closed by this pull request
@franklinfollis franklinfollis force-pushed the feat/database-ui branch 2 times, most recently from cee455f to 71c2099 Compare November 13, 2025 08:15
@franklinfollis franklinfollis force-pushed the feat/database-ui branch 2 times, most recently from cf16c7a to 803a2fd Compare November 28, 2025 05:06
@franklinfollis franklinfollis removed the 🚧 WIP Works-in-progress. Blocks merge label Dec 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Large PRs or issues with full-blown features module:cli CLI module issues and features

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Database UI

2 participants