Initial planning docs: CLAUDE.md and ADRs 0000-0008

Captures up-front design decisions for RDBMS Playground:
stack (Rust + Ratatui + SQLite), input modes, project file
format, type vocabulary, undo snapshots and replay log,
sharing/export, and testing approach. ADR-0000 establishes
the ADR practice itself and mandates index upkeep alongside
any ADR change.
This commit is contained in:
claude@clouddev1
2026-05-07 09:27:31 +00:00
commit 3a0c03d781
11 changed files with 785 additions and 0 deletions
@@ -0,0 +1,47 @@
# ADR-0001: Language and TUI framework
## Status
Accepted
## Context
RDBMS Playground is a cross-platform terminal application aimed at
learners. It needs to feel fast, polished, and colourful, install
cleanly on Linux, macOS, and Windows, and ship as a single binary
with no runtime dependencies.
Beyond TUI rendering, the application has substantial SQL-handling
needs: syntax highlighting, parsing user input to distinguish app
DSL commands from SQL, rewriting simplified types into backend
types, and analysing query plans for the teaching features.
Two stacks were realistic candidates:
1. **Rust + Ratatui + Crossterm** — strong cross-platform terminal
support, single static binary, mature ecosystem. Crucially,
`sqlparser-rs` is a high-quality dialect-aware SQL parser
directly applicable to the parsing, highlighting, and query
analysis features.
2. **Go + Bubble Tea (Charm)** — excellent default aesthetics,
single static binary, easy distribution. Lacks an equivalent to
`sqlparser-rs`; SQL parsing would need to be written from
scratch or wrap a less suitable library.
## Decision
Use **Rust with Ratatui and Crossterm** for the TUI, with
`sqlparser-rs` for SQL parsing and `rusqlite` for the database
layer. Distribute as prebuilt binaries via GitHub releases plus
package managers (`cargo binstall`, Homebrew, Scoop, `winget`).
## Consequences
- Single static binary on all three target platforms.
- Strong fit between SQL-heavy features and the Rust SQL ecosystem
(`sqlparser-rs`, `rusqlite`).
- Slightly steeper contributor on-ramp for developers unfamiliar
with Rust compared to Go.
- TUI styling will require explicit work to match the polish that
Bubble Tea / Lipgloss give for free; budget for it in the design
pass.