Skip to content

Commit 8421b1f

Browse files
committed
feat: v0.2.0 release - native pipeline, expanded tools, and UI refinement
This update brings major performance and feature enhancements: - Native Pipeline Engine: multi-step chains now execute entirely in Rust. - Expanded Toolbox: added Parquet Suite (Polars), SQL Formatter, JWT Debugger, Case Converter, Hash Generator, Color Converter, and more (12 total). - Refined UI/UX: full Dark/Light mode support with persistent state and a keyboard-centric Command Palette. - SEO & Web: new feature-specific landing pages and high-authority blog content for better discovery. - High Quality: established Biome linting and achieved 100% Rust unit test coverage for core logic.
1 parent 1feda7f commit 8421b1f

55 files changed

Lines changed: 5520 additions & 1315 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

HLD.md

Lines changed: 54 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# High-Level Design (HLD): Omnitool Architecture
22

3-
**Author:** Principal Software Engineer | **Date:** Feb 13, 2026 | **Version:** 1.0
3+
**Author:** Principal Software Engineer | **Date:** March 21, 2026 | **Version:** 0.2.0
44

55
## 1. Architectural Overview
66

7-
**Omnitool** follows a **hybrid native architecture** using **Tauri**. This provides the performance and system access of a native Rust backend with the flexibility and rapid UI development of a web-based frontend (React/TypeScript).
7+
**Omnitool** follows a **hybrid native architecture** using **Tauri v2**. This provides the performance and system access of a native Rust backend with the flexibility and rapid UI development of a modern React frontend.
88

99
### Key Design Principles:
10-
1. **Rust for Logic:** All heavy lifting (parsing, huge file processing, crypto, plugin execution) happens in the Rust backend to ensure the UI remains responsive (60fps).
11-
2. **Sandboxed Plugins:** Community plugins run in an isolated JavaScript runtime (Deno Core or QuickJS) embedded within the Rust process, *not* in the UI thread.
12-
3. **Stateless Chains:** The "Tool Chain" engine is a functional pipeline. `Output(Tool A) -> Input(Tool B)`.
13-
4. **Local-First AI:** The AI module is an agnostic client that connects to local inference servers (Ollama, LocalAI), treating them as "just another tool."
10+
1. **Rust for Logic:** All transformations (Parquet parsing, SQL formatting, hashing) happen in the Rust backend via a library crate (`omnitool_lib`).
11+
2. **Native Pipeline Execution:** Multi-step tool chains ("Omni-Chains") are executed entirely in Rust to minimize IPC overhead and ensure data integrity.
12+
3. **Atomic Transformations:** Tools implement a shared `Tool` trait, allowing them to be dispatched dynamically by the internal engine.
13+
4. **Privacy-First:** Zero telemetry. Data remains local and is processed in-memory without persistent logging of sensitive inputs.
1414

1515
---
1616

@@ -21,102 +21,79 @@ graph TD
2121
User[User Interaction] -->|Events| UI[Frontend (React/TS)]
2222
2323
subgraph "Tauri Bridge (IPC)"
24-
UI <-->|Invoke/Events| Core[Rust Backend Main Loop]
24+
UI <-->|Invoke: execute_pipeline| Core[Rust Backend Main Loop]
2525
end
2626
27-
subgraph "Rust Core Services"
28-
Core --> Dispatcher[Command Dispatcher]
27+
subgraph "Rust Core (omnitool_lib)"
28+
Core --> Dispatcher[Internal Dispatcher]
2929
30-
Dispatcher --> NativeTools[Native Tool Registry]
31-
Dispatcher --> ChainEngine[Pipeline Execution Engine]
32-
Dispatcher --> PluginSys[Plugin System]
33-
Dispatcher --> AI[AI Gateway]
30+
Dispatcher --> NativeTools[Tool Registry]
31+
Dispatcher --> PipelineEngine[Pipeline Engine]
3432
35-
NativeTools -- "Impl: Tool Trait" --> BuiltIn[Built-in Tools (JSON, JWT, etc.)]
33+
NativeTools -- "Impl: Tool Trait" --> BuiltIn[Base64, JSON, Parquet, etc.]
3634
37-
ChainEngine -- "Orchestrates" --> NativeTools
38-
ChainEngine -- "Orchestrates" --> PluginSys
39-
40-
PluginSys -->|Embedded| JSRuntime[Deno Core / QuickJS Runtime]
35+
PipelineEngine -- "Iterative Execution" --> NativeTools
4136
end
4237
43-
subgraph "Data & I/O"
44-
Core -->|Read/Write| ConfigStore[Settings & History (SQLite/sled)]
45-
Core -->|OS API| Clipboard[System Clipboard]
46-
Core -->|FS| FileSys[Local File System]
38+
subgraph "Heavy Engines"
39+
BuiltIn --> Polars[Polars DataFrame Engine]
40+
BuiltIn --> SQLFormat[sqlformat-rs]
41+
BuiltIn --> Heck[Heck Case Converter]
4742
end
4843
49-
subgraph "External Integrations"
50-
AI -->|HTTP/REST| Ollama[Local LLM (Ollama/LlamaEdge)]
51-
JSRuntime -.->|Sandboxed| UserScripts[User/Community Plugins]
44+
subgraph "Data & I/O"
45+
Core -->|Poll| Clipboard[System Clipboard]
46+
Core -->|Detect| Detector[Smart Detection Logic]
5247
end
5348
```
5449

5550
---
5651

5752
## 3. Module Details
5853

59-
### 3.1 The Frontend (View Layer)
60-
* **Tech:** React, TailwindCSS, Zustand (State), Radix UI (Primitives).
61-
* **Responsibility:** Rendering the UI, capturing user input, and displaying results. **No business logic.**
62-
* **Communication:** Sends standardized JSON commands to Rust via `tauri::invoke`.
63-
* *Example:* `invoke('execute_tool', { tool_id: 'json_fmt', input: '...' })`
54+
### 3.1 The Frontend (React + Biome)
55+
* **Tech:** React 19, Tailwind CSS v4, Lucide Icons, Framer Motion.
56+
* **Responsibility:** UI rendering, workspace orchestration, and category filtering.
57+
* **Optimization:** Uses standard CSS variables for instant Dark/Light mode switching.
6458

65-
### 3.2 The Rust Core (Controller Layer)
66-
* **Tech:** Rust, Tauri, Serde.
67-
* **Responsibility:** App lifecycle, window management, global shortcuts, and routing commands.
59+
### 3.2 The Pipeline Engine (`pipeline.rs`)
60+
The core differentiator of Omnitool. It executes a sequence of `PipelineStep` structs.
61+
* **Efficiency:** Instead of sending results back to the frontend between each step (costly IPC), the engine passes the output of Step N directly to the input of Step N+1 within the Rust runtime.
62+
* **Error Handling:** If any step fails, the pipeline halts immediately and returns the partial results along with the error message.
6863

69-
### 3.3 The Tool Registry & Trait System
70-
To standardize "Native" and "Plugin" tools, we define a strict Rust Trait:
64+
### 3.3 The Tool Trait (`tools/mod.rs`)
65+
Standardizes how tools interact with the engine:
7166

7267
```rust
73-
trait Tool {
74-
fn id(&self) -> &str;
75-
fn name(&self) -> &str;
68+
pub trait Tool {
69+
fn id(&self) -> &'static str;
70+
fn name(&self) -> &'static str;
7671
fn category(&self) -> ToolCategory;
77-
fn input_type(&self) -> DataType; // e.g., String, Number, JSON, Blob
78-
fn output_type(&self) -> DataType;
7972

80-
// The core execution logic
81-
fn execute(&self, input: ToolInput, context: &Context) -> Result<ToolOutput, ToolError>;
73+
fn execute(&self, input: ToolInput) -> ToolOutput;
8274
}
8375
```
8476

85-
### 3.4 The Chain Engine (Pipeline)
86-
The "Killer Feature." It treats tools as nodes in a directed graph.
87-
* **Logic:**
88-
1. Receive `Input`.
89-
2. Iterate through `ChainStep[]`.
90-
3. Pass `Result(Step N)` as `Input(Step N+1)`.
91-
4. Stop on `Error`.
92-
* **Concurrency:** If a chain splits (e.g., "Generate 3 variants of this UUID"), use Rust's `Rayon` for parallel execution.
93-
94-
### 3.5 The Plugin System (Extensibility)
95-
We cannot rely on `eval()` in the WebView (security risk + main thread blocking).
96-
* **Engine:** **deno_core** (Rust crate).
97-
* **Mechanism:**
98-
1. Load user `.js` / `.ts` file.
99-
2. Instantiate a fresh V8 Isolate.
100-
3. Inject a restricted API ( `omni.readClipboard()`, `omni.log()`). **Network access is blocked by default.**
101-
4. Execute the transformation.
102-
5. Return the string/object.
103-
104-
### 3.6 Local AI Gateway
105-
* **Design:** A standardized interface for "Smart" operations.
106-
* **Adapter Pattern:**
107-
* `OllamaAdapter`
108-
* `OpenAIAdapter` (for users who want to use API keys)
109-
* **Privacy:** The gateway strips PII (if configured) before sending to the model (even local ones, as a best practice).
77+
### 3.4 Smart Detection (`detector.rs`)
78+
* **Mechanism:** Periodically polls the system clipboard (when focused).
79+
* **Logic:** Uses pattern matching (magic bytes, headers, regex) to identify data types (JWT, JSON, Base64, URL).
80+
* **Integration:** Returns a `DetectionResult` that the UI uses to display the "Magic Suggestion" banner.
11081

111-
---
112-
113-
## 4. Data Storage
114-
* **Preferences:** `settings.json` (Theme, Default Keybindings).
115-
* **Tool Chains:** `chains.json` (Saved pipeline configurations).
116-
* **History:** `history.db` (SQLite) - Encrypted. Stores the last 50 inputs/outputs for "Undo" functionality.
82+
### 3.5 Data Engineering Layer (Polars)
83+
* Used for the **Parquet Suite**.
84+
* Leverages Rust's memory safety to handle large datasets natively without the overhead of a Python runtime.
11785

118-
## 5. Security Considerations
119-
1. **Plugin Sandbox:** Plugins have **no** FS access and **no** Network access unless explicitly granted via a manifest file (`plugin.json` permissions).
120-
2. **Clipboard Monitoring:** Only active when the app is focused or when "Global Auto-Paste" is explicitly enabled by the user.
121-
3. **Update Mechanism:** Signed binaries via Tauri's Updater.
86+
---
12287

88+
## 4. Data Flow (Omni-Chain)
89+
1. **UI:** User types data into the "Initial Input" area.
90+
2. **UI:** User adds 3 steps: `Base64 Decode``JSON Format``Hash SHA-256`.
91+
3. **IPC:** A single `execute_pipeline` call is sent to Rust with the initial string and the array of 3 steps.
92+
4. **Rust:** The `Pipeline` struct iterates through the steps, calling the respective `Tool::execute` methods.
93+
5. **IPC:** Rust returns a `Vec<ToolOutput>` containing the intermediate and final results.
94+
6. **UI:** React renders each step's output in its respective card.
95+
96+
## 5. Security Architecture
97+
1. **Offline Execution:** No `fetch` or `reqwest` calls are made to external services during data transformation.
98+
2. **Memory Safety:** Rust ensures that malformed inputs (e.g., deep JSON nesting or invalid Parquet) do not cause buffer overflows or memory leaks.
99+
3. **Local Storage:** User preferences (Theme) are stored in `localStorage` only.

IMPLEMENTATION_PLAN.md

Lines changed: 47 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,62 @@
11
# Implementation Plan: Omnitool
22

3-
**Status:** Draft | **Author:** Principal Software Engineer | **Date:** Feb 13, 2026
3+
**Status:** Alpha (v0.2.0) | **Author:** Principal Software Engineer | **Date:** March 21, 2026
44

5-
## Phase 1: Foundation & "Hello World" (Week 1-2)
5+
## Phase 1: Foundation & "Hello World" (COMPLETED)
66
**Goal:** A running Tauri app that can execute one native Rust function from the UI.
77

8-
1. **Repository Setup:**
9-
* Initialize `cargo` workspace.
10-
* Initialize `npm` project (Vite + React + TS).
11-
* Configure `tauri.conf.json`.
12-
2. **Core Architecture (Rust):**
13-
* Define the `Tool` trait in `src-tauri/src/tools/mod.rs`.
14-
* Implement the `Base64` tool (Encoder/Decoder) as the first proof-of-concept.
15-
* Create a `CommandDispatcher` struct to route frontend requests.
16-
3. **Frontend Skeleton:**
17-
* Set up the main layout (Sidebar, Main Area).
18-
* Create a `CommandPalette` component (Command+K style).
19-
* Wire up the `invoke('execute_tool')` call.
20-
21-
## Phase 2: The Tool Registry & Smart Paste (Week 3-4)
22-
**Goal:** 20+ basic tools and automatic detection.
23-
24-
1. **Tool Implementation:**
25-
* **Formatters:** JSON, SQL, XML, YAML.
26-
* **Generators:** UUID (v4/v7), Lorem Ipsum, Random Password.
27-
* **Converters:** Unix Timestamp <-> Date, Hex <-> RGB.
28-
2. **Smart Detection Logic:**
29-
* Create a `Detector` module in Rust.
30-
* Implement regex-based scoring:
31-
* `^\{.*\}$` -> High confidence JSON.
32-
* `^[0-9]{10}$` -> High confidence Unix Timestamp.
33-
* Expose `detect_content(clipboard_text)` to the frontend.
34-
3. **UI Polish:**
35-
* "Smart Paste" button in the search bar.
36-
* Keyboard navigation (Up/Down/Enter).
37-
38-
## Phase 3: The "Omni-Chain" Engine (Week 5-6)
39-
**Goal:** Piping output from Tool A to Tool B.
40-
41-
1. **Pipeline Structs:**
42-
* Define `Pipeline` and `PipelineStep` structs in Rust.
43-
* Implement `Pipeline::execute(initial_input) -> Result<FinalOutput>`.
44-
2. **Chain UI:**
45-
* Drag-and-drop interface for building chains.
46-
* "Add Step" button next to tool results.
47-
3. **Serialization:**
48-
* Save/Load chains from `chains.json`.
49-
50-
## Phase 4: Plugin System (The Hard Part) (Week 7-8)
51-
**Goal:** Running user-provided JavaScript safely.
8+
1.**Repository Setup:** Cargo workspace + Vite/React/TS.
9+
2.**Core Architecture:** `Tool` trait and dynamic dispatcher.
10+
3.**Frontend Skeleton:** Sidebar, Main Area, and Command Palette.
11+
12+
## Phase 2: The Tool Registry & Smart Detection (COMPLETED)
13+
**Goal:** Essential tools and automatic clipboard detection.
14+
15+
1.**Tool Implementation:** 12+ tools including JSON, SQL, JWT, UUID, and the **Parquet Suite**.
16+
2.**Smart Detection:** Rust-based `Detector` module with high-confidence pattern matching.
17+
3.**UX:** "Magic Suggestion" system and ⌘K fuzzy search.
18+
4.**Dark/Light Mode:** Full theme support with persistent state.
19+
20+
## Phase 3: The "Omni-Chain" Engine (COMPLETED)
21+
**Goal:** Piping output from Tool A to Tool B natively in Rust.
22+
23+
1.**Pipeline Engine:** Native `pipeline.rs` execution to minimize IPC latency.
24+
2.**Chain UI:** Functional "Add Workflow Step" interface with intermediate result cards.
25+
3.**Verification:** Red-Green TDD enforced for all transformation logic.
5226

53-
1. **Runtime Integration:**
54-
* Add `deno_core` or `boa_engine` to `Cargo.toml`.
55-
* Create a `JsRuntime` struct that initializes the V8 Isolate.
56-
2. **API Bridge:**
57-
* Expose `omni` global object to the JS context.
58-
* Implement `omni.readInput()` and `omni.writeOutput()`.
59-
3. **Plugin Loader:**
60-
* Scan `~/.omnitool/plugins/*.js`.
61-
* Register found scripts as `Tool` implementations dynamically.
62-
63-
## Phase 5: Local AI Integration (Week 9)
27+
## Phase 4: SEO & Content Strategy (COMPLETED)
28+
**Goal:** Public-facing documentation and discovery.
29+
30+
1.**Landing Pages:** Tailwind-based SEO pages for all core tools.
31+
2.**Blog:** Security-focused content regarding data privacy.
32+
3.**Infrastructure:** `sitemap.xml` and `robots.txt` configuration.
33+
34+
## Phase 5: Local AI Integration (Upcoming)
6435
**Goal:** "Explain this code" using Ollama.
6536

66-
1. **Ollama Client:**
67-
* Implement a simple HTTP client in Rust to talk to `http://localhost:11434`.
68-
* Create an `AiTool` struct that wraps the prompt generation.
69-
2. **Prompt Templates:**
70-
* "Explain Code", "Refactor", "Find Bug", "Convert to JSON".
71-
3. **Streaming UI:**
72-
* Handle streaming responses from the LLM in the frontend.
37+
1. **Ollama Client:** Implement HTTP client in Rust to talk to local inference servers.
38+
2. **AI Tools:** "Summarize Data", "Explain Code", "Extract JSON from Text".
39+
3. **UI:** Handle streaming responses for low-latency feedback.
40+
41+
## Phase 6: Plugin System (Upcoming)
42+
**Goal:** Running user-provided JavaScript safely.
43+
44+
1. **Runtime Integration:** Add `deno_core` or `boa` for sandboxed execution.
45+
2. **Plugin API:** Expose restricted system hooks to user scripts.
46+
3. **Marketplace:** Support for loading community-made `.js` tools.
7347

74-
## Phase 6: Release Engineering (Week 10)
75-
**Goal:** Alpha Release.
48+
## Phase 7: Release Engineering (In Progress)
49+
**Goal:** Alpha Release stability.
7650

77-
1. **CI/CD:** GitHub Actions to build binaries for macOS (.dmg), Windows (.msi), Linux (.AppImage).
78-
2. **Code Signing:** Set up Apple Developer ID signing.
79-
3. **Documentation:** Write `CONTRIBUTING.md` for plugin developers.
51+
1. **CI/CD:** GitHub Actions for multi-platform builds.
52+
2. **Version Sync:** v0.2.0 synchronized across all configs.
53+
3. **Notarization:** macOS app signing.
8054

8155
---
8256

8357
## Technical Risks & Spikes
8458

85-
* **Risk:** `deno_core` adds 20MB+ to the binary size.
86-
* *Mitigation:* Evaluate `quickjs-rs` or `boa` for smaller footprint if full Deno compatibility isn't required.
87-
* **Risk:** Tauri IPC overhead for large files (10MB+ JSON).
88-
* *Mitigation:* Use sidecar commands or shared memory mapping for large payloads, avoiding JSON serialization over IPC.
59+
* **Binary Size:** Adding Polars and future JS runtimes.
60+
* *Status:* Polars integrated; binary size managed via LTO and feature-stripping.
61+
* **Large Data IPC:**
62+
* *Strategy:* Currently using Base64 for Parquet; monitoring performance for datasets > 50MB.

0 commit comments

Comments
 (0)