Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,9 @@ dist-ssr

# Test coverage
coverage/

# TypeScript build info
*.tsbuildinfo

# Agent runtime data
.omo/
20 changes: 20 additions & 0 deletions .impeccable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## Design Context

### Users
**DBAs and ops engineers** managing production database environments. They work under pressure during incidents, late-night maintenance windows, and routine backup/restore operations. Context: dark office, multiple monitors, monitoring dashboards open, Slack/PD alerts firing. They need speed, precision, and trust — the tool must feel reliable enough for `pg_dump`-level confidence.

### Brand Personality
**Precise. Powerful. Clean.** The tool should feel like a high-end instrument — surgical, not decorative. Every pixel has intent. The interface communicates capability through density and clarity, not through ornamentation.

### Aesthetic Direction
- **Visual tone**: Industrial/utilitarian control panel — think Grafana meets a high-end mixing console. Dark-first (DBAs work at night). Steel blue-gray palette with teal/amber accents.
- **Theme**: Dark mode as primary, light mode secondary
- **Key differentiation**: The transfer module should feel like a **control room** — not a form wizard. Source and destination visible simultaneously. Job monitoring persistent. Configuration feels like setting up a pipeline, not filling out paperwork.
- **Anti-references**: No border-left accent stripes, no glassmorphism, no gradient text, no card-within-card nesting, no hero metrics (big numbers with tiny labels)

### Design Principles
1. **Surgical precision** — Every control is exactly where it needs to be. No hunting for options. Proximity groups related things.
2. **At-a-glance awareness** — Source, destination, and status visible simultaneously without scrolling or clicking through steps.
3. **Console not wizard** — DBAs don't need step-by-step handholding. They need configuration panels where all options are visible.
4. **Trust through transparency** — Show what will happen before it happens. Preview data, show row counts, expose SQL.
5. **Monitor without noise** — Job progress is always visible at the bottom but never interrupts flow.
24 changes: 24 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,30 @@ git commit -m "feat: description of changes"
git push
```

## Transfer Module

The transfer module spans frontend and backend with a **console → wizard → background job** architecture:

**Frontend** (`src/components/transfer/`):
- `TransferPage.vue` - Console-style main page with context bar + operation panel + activity bar
- `components/transfer/launcher/` - Quick operation launcher (action picker, source/target picker, options)
- `components/transfer/export/`, `import/`, `migration/`, `structure/` - Detailed step wizards (4-step: source → config → preview → execute)
- `components/transfer/shared/` - Shared selectors (ConnectionSelector, TableSelector, ColumnSelector, etc.)
- `components/transfer/tasks/` - Task manager panel/cards
- `store/transferStore.ts` - Pinia store (jobs, profiles, progress, event subscriptions)
- `types/transfer.ts` - All transfer types (ExportRequest, ImportRequest, MigrationRequest, TransferJob, etc.)
- `datasources/transferApi.ts` - Tauri invoke wrappers (16+ commands)

**Backend** (`src-tauri/src/transfer/`):
- `commands/transfer.rs` - 16 Tauri commands (preview/execute export/import/migration, backup/restore, DDL gen, profiles)
- `transfer/export.rs` - CSV/JSONL/SQL/Excel export with pagination
- `transfer/import.rs` - CSV/JSONL/SQL/Excel import with batch inserts
- `transfer/migration.rs` - Cross-engine migration with type mapping (16 source×target combinations)
- `transfer/restore.rs` - SQL/CSV/Excel restore
- `transfer/types.rs` - Rust types mirroring frontend types

**Pattern**: Commands dispatch by `ActiveConnection` variant (Postgres/MySQL/SQLServer/SQLite). Progress emitted via Tauri events (`transfer://progress/{jobId}`). Profiles persisted via `profile_store.rs`.

## Common Tasks

**Adding a Tauri Command**:
Expand Down
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
<link rel="icon" type="image/png" href="/sqlkit.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>SqlKit</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Sofia+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=Wix+Madefor+Text:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap" rel="stylesheet" />
</head>

<body>
Expand Down
70 changes: 64 additions & 6 deletions src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,8 @@ chrono = "0.4"
rust_decimal = { version = "1", features = [ "db-postgres" ] }
hex = "0.4"
rust_xlsxwriter = "0.64"
calamine = "0.22"
calamine = "0.26"
csv = "1.3"

[dev-dependencies]
tempfile = "3"
4 changes: 2 additions & 2 deletions src-tauri/src/commands/converter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@ mod tests {

#[test]
fn test_convert_query_value_float() {
let value = QueryValue::Float(3.14);
let value = QueryValue::Float(std::f64::consts::PI);
let json = convert_query_value_to_json(&value);
assert_eq!(json, json!(3.14));
assert_eq!(json, json!(std::f64::consts::PI));
}

#[test]
Expand Down
Loading
Loading