All Projects
LiteDB

LiteDB

Maintained

Lightweight Database GUI & AI Agent

TauriRustReactONNXpgvector
Role:Solo Developer
Duration:5 months

Overview

LiteDB is a modern, ultra-fast database viewer and editor built with Tauri and React. Designed as a privacy-first tool, it provides interactive schema visualization and transactional batch operations for PostgreSQL and SQLite. It features a Context-Aware RAG Pipeline that injects database schemas into local LLMs for highly accurate Text-to-SQL generation, alongside an on-device vector search engine for seamless semantic data exploration.

Architecture

The application leverages a Rust backend for efficient database driver integration and file system operations, communicating with a React frontend. The Context-Aware RAG pipeline actively introspects the connected database to format metadata for local Text-to-SQL inference, while Transformers.js handles in-app vector embedding generation.

Key Features

Ultra-Lightweight Architecture

Achieved a 5.4MB idle RAM footprint by migrating to Tauri and Rust, making it exponentially lighter than traditional Electron-based alternatives.

Context-Aware Text-to-SQL

Extracts table definitions and foreign keys to dynamically inject schema context into local models (Ollama) or cloud providers, drastically reducing syntax errors.

On-Device Vector Search

Executes privacy-first semantic matching using Transformers.js (ONNX) and local embedding models (BGE-Large), supporting Cosine, L2, and Inner Product metrics.

Interactive Schema Visualization

Generates dynamic Entity Relationship Diagrams (ERDs) with auto-layout, visual foreign key mapping, and one-click SVG/PNG export capabilities.

Tech Stack

Backend

Tauri & Rust
Systems language and framework for high-performance, low-memory desktop operations

Frontend

React & TypeScript
Modern UI architecture utilizing Vite and Tailwind CSS

AI/ML

ONNX (Transformers.js)
In-browser runtime for local embedding models ensuring 100% data privacy
Ollama
Local LLM inference engine powering the schema-aware Text-to-SQL agent

Database

pgvector
PostgreSQL extension enabling seamless local RAG pipeline validation
PostgreSQL & SQLite
Dual-database support with dedicated driver-specific query validation

Challenges & Solutions

!
Challenge

Standard Text-to-SQL agents often generate invalid or hallucinated queries due to a lack of structural awareness.

Solution

Built a schema introspection system that extracts table structures and data types, injecting them directly into the LLM's system prompt based on the active database driver.

!
Challenge

Validating RAG pipelines usually requires setting up complex external vector services, adding latency and privacy concerns.

Solution

Engineered an on-device Vector Search engine utilizing pgvector and ONNX, allowing developers to execute semantic matching locally without external API calls.

!
Challenge

Maintaining and distributing a cross-platform desktop application manually is error-prone and time-consuming.

Solution

Built an automated CI/CD pipeline via GitHub Actions to cross-compile Rust binaries for Windows, macOS, and Linux, integrating an over-the-air (OTA) update system.

Results

Achieved a 5.4MB idle RAM footprint via Tauri
Enabled 100% local, privacy-first semantic search without external APIs
Automated multi-platform distribution (Windows, macOS, Linux) via GitHub Actions CI/CD
Sub-100ms query execution for standard operations