Skip to content

DhruvilChauahan0210/local-ghost

Repository files navigation

Local Ghost — Browser-Native AI Components

Natural language data filtering, form auto-fill, and chart generation.
Zero server. Zero API keys. Runs entirely on your GPU.

npm version License: MIT WebGPU


The Problem

Every AI-powered UI component today requires:

  • A backend server to proxy LLM calls
  • An API key (and a monthly bill)
  • Your users' data leaving their browser

The Solution

Local Ghost runs a quantized LLM directly in the browser via WebGPU. No server. No API key. No data leaves the device.

User types query → WebGPU LLM → Filtered results
              0ms server latency | $0 infrastructure | 100% private

Components

<SmartDataGrid />

Natural language queries on tabular data.

<SmartDataGrid data={myData} />
// "show only engineers older than 30, sorted by salary" → filtered table

<SmartForm />

Auto-fills forms from pasted unstructured text.

<SmartForm fields={formFields} onSubmit={handleSubmit} />
// Paste an email → AI extracts name, email, company, role, salary

<SmartAnalytics />

Natural language to Recharts visualizations.

<SmartAnalytics data={myData} />
// "average salary by role" → bar chart
// "employees earning over 100k" → filtered table

Installation

npm install @dhruvil0210/local-ghost

Peer dependencies: react ^18, recharts ^2


Quick Start

import { WebGPUAIProvider, SmartDataGrid } from '@dhruvil0210/local-ghost';

export default function App() {
  return (
    <WebGPUAIProvider>
      <SmartDataGrid data={myData} />
    </WebGPUAIProvider>
  );
}

How It Works

Browser Tab
├── WebGPUAIProvider  ← initializes model pipeline
│   └── Web Worker   ← inference runs off main thread (no UI jank)
│       └── WebGPU   ← GPU acceleration (falls back to WASM)
└── Components
    ├── SmartDataGrid  ← AI generates JS filter/sort code
    ├── SmartForm      ← AI extracts JSON from unstructured text
    └── SmartAnalytics ← AI decides chart vs filter + parameters

Model: onnx-community/Qwen2.5-Coder-0.5B-Instruct (~300MB, cached after first load)
Fallback chain: WebGPU → WASM → optional server API


Browser Support

Browser WebGPU WASM Fallback
Chrome 113+
Edge 113+
Firefox
Safari 18+

Monorepo Structure

/
├── packages/smart-data-grid/   ← npm package (local-ghost)
├── apps/demo/                  ← live demo (Vite)
└── apps/docs/                  ← documentation (Next.js)

License

MIT © 2026 — Local Ghost

About

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages