Skip to content

Commit 4e9a5cf

Browse files
matej21claude
andcommitted
docs: update CLAUDE.md files to reflect current codebase
Add missing directories (cli), components (bookmarks, comparison, er-diagram, import, search), stores, types, and commands (lint, format, build:server). Remove outdated Electron references. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f6bf7c9 commit 4e9a5cf

File tree

3 files changed

+46
-5
lines changed

3 files changed

+46
-5
lines changed

CLAUDE.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ See also: `src/frontend-shared/CLAUDE.md` (frontend), `src/shared/CLAUDE.md` (sh
66

77
## Project
88

9-
Dotaz is a desktop database client built on **Electrobun** (Bun backend + system webview) with a **Solid.js** frontend. It supports PostgreSQL and SQLite, focused on DML operations (viewing, editing, querying data) — no DDL/schema management.
9+
Dotaz is a database client built on **Electrobun** (Bun backend + system webview) with a **Solid.js** frontend. It supports PostgreSQL and SQLite, focused on DML operations (viewing, editing, querying data) — no DDL/schema management.
1010

1111
Runs in three modes:
1212

1313
- **Desktop** (Electrobun) — native window with RPC transport, app state in backend SQLite
14-
- **Web** — standalone Bun HTTP/WebSocket server (`bun run dev:web`), app state in browser IndexedDB
14+
- **Web** — standalone Bun HTTP/WebSocket server (`bun run dev:web`), app state in browser IndexedDB. Can also be started via CLI (`bunx @dotaz/server`, see `src/cli/`)
1515
- **Demo** — browser-only with WASM SQLite, no server needed (`bun run dev:demo`)
1616

1717
## Commands
@@ -26,12 +26,21 @@ bun run dev:web
2626
# Development — demo mode (browser-only WASM SQLite)
2727
bun run dev:demo
2828

29-
# Production build (desktop)
29+
# Production build (desktop / Electrobun)
3030
bun run build:canary
3131

32+
# Production build (web server)
33+
bun run build:server
34+
3235
# Type checking (must pass with zero errors)
3336
bunx tsc --noEmit
3437

38+
# Lint & format
39+
bun run lint # check lint (biome)
40+
bun run lint:fix # auto-fix lint
41+
bun run format # format (dprint)
42+
bun run format:check # check formatting
43+
3544
# Run all tests
3645
bun test
3746

@@ -61,6 +70,7 @@ src/
6170
backend-types/ ← Type-only re-exports for frontend (import type from backend-shared)
6271
backend-desktop/ ← Electrobun backend entry point
6372
backend-web/ ← HTTP/WebSocket server entry point
73+
cli/ ← CLI entry point (bunx @dotaz/server)
6474
frontend-shared/ ← Solid.js UI: components, stores, lib (transport/storage registries)
6575
frontend-desktop/ ← Desktop entry: setTransport(electrobun) + setStorage(rpc)
6676
frontend-web/ ← Web entry: setTransport(websocket) + setStorage(indexeddb)
@@ -79,6 +89,7 @@ frontend-web ← frontend-shared
7989
frontend-demo ← frontend-shared + backend-shared (runtime — createHandlers/RpcAdapter)
8090
backend-desktop ← backend-shared
8191
backend-web ← backend-shared
92+
cli ← backend-web (starts server with CLI argument parsing)
8293
```
8394

8495
### Transport & storage — registration pattern

src/frontend-shared/CLAUDE.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,35 @@ App.tsx ← Root component
1414
│ ├── edit/ ← InlineEditor, RowDetailDialog, PendingChanges
1515
│ ├── schema/ ← SchemaViewer, ColumnList, IndexList
1616
│ ├── export/ ← ExportDialog
17+
│ ├── import/ ← ImportDialog
1718
│ ├── history/ ← QueryHistory
19+
│ ├── bookmarks/ ← BookmarksDialog
20+
│ ├── comparison/ ← ComparisonDialog, ComparisonView
21+
│ ├── er-diagram/ ← ErDiagram (entity-relationship visualization)
22+
│ ├── search/ ← DatabaseSearchDialog
1823
│ ├── views/ ← SaveViewDialog
1924
│ └── common/ ← CommandPalette, ContextMenu, Dialog, Toast, Icon
2025
├── stores/ ← Solid.js reactive state
2126
│ ├── connections.ts ← Connection list, state, active connection, schema trees
2227
│ ├── tabs.ts ← Open tabs, active tab
23-
│ ├── grid.ts ← Per-tab grid data, pagination, sort, filter, selection, pending changes
28+
│ ├── navigation.ts ← Navigation actions (open table, open query, etc.)
29+
│ ├── session.ts ← Session state
30+
│ ├── settings.ts ← User settings
31+
│ ├── grid.ts ← Per-tab grid data, pagination, sort, filter
32+
│ ├── gridColumns.ts ← Grid column configuration
33+
│ ├── gridEditing.ts ← Inline editing, pending changes
34+
│ ├── gridSelection.ts ← Row/cell selection
35+
│ ├── gridUndoRedo.ts ← Undo/redo for grid edits
36+
│ ├── gridFk.ts ← Foreign key navigation
37+
│ ├── gridAutoJoin.ts ← Auto-join related tables
38+
│ ├── gridHeatmap.ts ← Heatmap visualization for grid
39+
│ ├── gridViews.ts ← Saved views per table
2440
│ ├── editor.ts ← SQL content, query results, transaction state
41+
│ ├── editorAi.ts ← AI-assisted SQL editing
42+
│ ├── editorTransactionLog.ts ← Transaction log tracking
43+
│ ├── comparison.ts ← Data comparison
2544
│ ├── ui.ts ← Sidebar width, dialogs, toasts, command palette
26-
│ └── views.ts ← Saved views per table
45+
│ └── views.ts ← Saved views
2746
├── lib/
2847
│ ├── rpc.ts ← Typed RPC client (namespace access: rpc.connections.list())
2948
│ ├── rpc-errors.ts ← RPC error handling and user-friendly messages

src/shared/CLAUDE.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ Pure types and browser-safe utilities shared across all layers. No backend conce
88
src/shared/
99
types/ ← Domain types shared across all layers
1010
sql/ ← SQL building (dialect interface, query builders, statement splitting)
11+
export/ ← Export formatters
12+
clipboard-paste.ts ← Clipboard paste parsing
13+
column-types.ts ← Column type utilities
14+
comparison.ts ← Data comparison logic
1115
```
1216

1317
## Types (`src/shared/types/`)
@@ -21,6 +25,11 @@ src/shared/
2125
| `query.ts` | `QueryResult`, `QueryHistoryEntry` |
2226
| `tab.ts` | Tab types (data grid, SQL console, schema viewer) |
2327
| `export.ts` | `ExportOptions`, `ExportResult`, export format definitions |
28+
| `import.ts` | Import-related types |
29+
| `errors.ts` | Shared error types |
30+
| `settings.ts` | User settings types |
31+
| `workspace.ts` | Workspace types |
32+
| `comparison.ts` | Data comparison types |
2433

2534
### Adding a new RPC method
2635

@@ -38,6 +47,8 @@ src/shared/
3847
| `dialects.ts` | `PostgresDialect`, `SqliteDialect`, `MysqlDialect` implementations |
3948
| `builders.ts` | `buildSelectQuery()`, `buildCountQuery()`, `generateChangeSql()`, etc. |
4049
| `statements.ts` | `splitStatements()`, `parseErrorPosition()` — zero-dependency SQL parsing |
50+
| `editability.ts`| Query editability analysis |
51+
| `index.ts` | Barrel re-exports |
4152

4253
## Conventions
4354

0 commit comments

Comments
 (0)