Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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 .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
jobs:
test:
runs-on: ubuntu-latest
# Note: SQLite tests are self-contained (no service needed).
# They create a temporary database file and seed it in beforeAll().
# better-sqlite3 native module is compiled during pnpm install.

services:
postgres:
image: postgres:16
Expand Down Expand Up @@ -92,6 +96,8 @@ jobs:
REAL_MARIADB_DATABASE: testdb
REAL_MARIADB_SSL: "false"

# SQLite — no env vars needed; tests use a temp file

steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
40 changes: 36 additions & 4 deletions FEATURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

This document provides a comprehensive breakdown of all features and capabilities in RelWave. For installation and setup instructions, see the main [README](README.md).

**Tech Stack:** Tauri + React 18 + TypeScript + Tailwind CSS + shadcn/ui + React Query + ReactFlow + Recharts + CodeMirror
**Tech Stack:** Tauri + React 18 + TypeScript + Tailwind CSS + shadcn/ui + React Query + ReactFlow + Recharts + CodeMirror + better-sqlite3

---

## Table of Contents

- [Supported Databases](#supported-databases)
- [Core Pages and Navigation](#core-pages-and-navigation)
- [Git Version Control](#git-version-control)
- [Visual Tools](#visual-tools)
Expand All @@ -19,6 +20,26 @@ This document provides a comprehensive breakdown of all features and capabilitie

---

## Supported Databases

| Database | Connection Type | Schema Explorer | ER Diagram | Query Builder | Migrations | CRUD |
| -------- | --------------- | --------------- | ---------- | ------------- | ---------- | ---- |
| PostgreSQL | Host/port + SSL | ✅ | ✅ | ✅ | ✅ | ✅ |
| MySQL | Host/port + SSL | ✅ | ✅ | ✅ | ✅ | ✅ |
| MariaDB | Host/port + SSL | ✅ | ✅ | ✅ | ✅ | ✅ |
| SQLite | Local file path | ✅ | ✅ | ✅ | ✅ | ✅ |

### SQLite-Specific Features

- **File-based connections** — no server required; connect directly to `.db`, `.sqlite`, `.sqlite3`, `.s3db` files
- **Native file picker** — Tauri file dialog for browsing and selecting database files
- **Read-only mode** — open databases in read-only mode when write access isn't needed
- **PRAGMA-based introspection** — uses `table_xinfo`, `foreign_key_list`, `index_list`, and `index_info` for full schema discovery
- **Synchronous driver** — uses `better-sqlite3` for efficient, synchronous access to SQLite databases
- **Full test coverage** — 69 tests covering connector operations and caching (38 integration + 31 unit)

---

## Core Pages and Navigation

### 1. Dashboard
Expand All @@ -28,8 +49,9 @@ The main landing page for managing database connections. Features a clean, IDE-i
**Connection Management**

- Add new database connections with detailed configuration (name, type, host, port, user, password, SSL options)
- **SQLite support** — connect to local `.db`, `.sqlite`, `.sqlite3`, `.s3db` files via native file picker
- Connect via URL — paste connection strings like `postgres://user:pass@host:port/db`
- Auto-parse URLs to populate connection form fields
- Auto-parse URLs to populate connection form fields (including `sqlite://` protocol)
- Delete existing database connections
- Test connections with real-time feedback
- Connection status indicators for all databases
Expand All @@ -38,6 +60,7 @@ The main landing page for managing database connections. Features a clean, IDE-i

- Automatically discover databases running on the local machine
- TCP port scanning for PostgreSQL (5432–5434) and MySQL (3306–3308)
- SQLite file-based connections (no host/port — uses native file browser)
- Docker container detection with image recognition
- Docker credential extraction — reads `POSTGRES_USER`, `POSTGRES_PASSWORD`, `MYSQL_ROOT_PASSWORD`, etc. from container environment variables
- One-click add with pre-filled connection details
Expand Down Expand Up @@ -104,7 +127,7 @@ Detailed view for individual database operations with a split-panel layout.
**Search**

- Cross-column search across all table fields
- Case-insensitive matching (ILIKE for PostgreSQL, LIKE for MySQL/MariaDB)
- Case-insensitive matching (ILIKE for PostgreSQL, LIKE for MySQL/MariaDB/SQLite)
- Paginated search results
- Real-time result count display
- Clear search to return to the default view
Expand Down Expand Up @@ -435,6 +458,15 @@ RelWave includes native Git integration powered by `simple-git`, providing a ful
- Toggle to collapse/expand with smooth width transition
- Persistent state across sessions

### Database Engine Colors

| Engine | Color |
| ------ | ----- |
| PostgreSQL | Blue |
| MySQL | Orange |
| MariaDB | Purple |
| SQLite | Cyan |

### Theming

- Dark and light mode with seamless switching
Expand Down Expand Up @@ -542,6 +574,6 @@ All database and Git operations use a JSON-RPC protocol over stdin/stdout. The b

---

**Last Updated:** February 2026
**Last Updated:** March 2026

This document is maintained alongside the application and updated with each release.
29 changes: 28 additions & 1 deletion bridge/__tests__/connectionBuilder.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { describe, it, expect, test } from "@jest/globals";
import { ConnectionBuilder } from "../src/services/connectionBuilder"; // Adjust path as needed
import { DatabaseConfig, DBType } from "../src/types";
import { SQLiteConfig } from "../src/types/sqlite";

// Define a standardized mock database object for inputs
const mockDbInput = {
Expand Down Expand Up @@ -101,7 +102,7 @@ describe("ConnectionBuilder", () => {
dbInput,
password,
DBType.MYSQL
);
) as DatabaseConfig;

// Assert
expect(config.port).toBe(3306);
Expand Down Expand Up @@ -147,4 +148,30 @@ describe("ConnectionBuilder", () => {
expect(config.password).toBe("test");
})
})

describe("static buildSQLiteConnection", () => {
test("should build SQLite config with path from database field", () => {
const dbInput = { database: "/tmp/test.db" };
const config = ConnectionBuilder.buildSQLiteConnection(dbInput);
expect(config.path).toBe("/tmp/test.db");
});

test("should build SQLite config with path from path field", () => {
const dbInput = { path: "/tmp/test.db" };
const config = ConnectionBuilder.buildSQLiteConnection(dbInput);
expect(config.path).toBe("/tmp/test.db");
});

test("should set readonly when specified", () => {
const dbInput = { database: "/tmp/test.db", readonly: true };
const config = ConnectionBuilder.buildSQLiteConnection(dbInput);
expect(config.readonly).toBe(true);
});

test("buildConnection with DBType.SQLITE should return SQLiteConfig", () => {
const dbInput = { database: "/tmp/test.db" };
const config = ConnectionBuilder.buildConnection(dbInput, null, DBType.SQLITE) as SQLiteConfig;
expect(config.path).toBe("/tmp/test.db");
});
})
});
Loading