Browser AI Chat

AI chat application that runs entirely in the browser using local models like Gemini Nano, Transformers.js, and WebLLM for private, serverless AI.

About

Browser AI Chat runs entirely in your browser. There is no server, no API keys, and your data never leaves your device. It supports multiple local AI backends:

  • Gemini Nano via Chrome’s built-in AI APIs
  • Transformers.js for running Hugging Face models in-browser
  • WebLLM for larger models via WebGPU

Why I built it

I wanted to see how far client-side AI had come. As browser capabilities improve (WebGPU, built-in AI APIs), more AI workloads can run locally without losing too much quality. This project is a testbed for those possibilities.

What I owned

  • Designed the full client-only app architecture
  • Integrated multiple local AI runtimes behind one chat experience
  • Built local persistence for conversation history and attachments
  • Shipped the project as an installable PWA without backend infrastructure

Features

  • Local AI models: Built-in AI (Gemini Nano), Transformers.js, WebLLM
  • Model switching: Move between backends in one chat experience
  • WebGPU acceleration where available
  • Complete privacy: All processing happens in your browser
  • Multi-modal: Text, images, documents, audio
  • Offline: Works without internet after setup
  • PWA: Install like a native app
  • File support: Drag-and-drop attachments
  • Local history: Conversations stored in IndexedDB

Tech stack

  • React + TypeScript + TailwindCSS
  • Vite + PWA
  • TanStack Router
  • IndexedDB (Dexie)

What this shows

This project shows the kind of AI product engineering I enjoy: understanding new platform capabilities, designing a practical abstraction around messy runtime differences, and shipping a product that users can try directly.

Development

Terminal window
git clone https://github.com/bimsina/browser-chat.git
pnpm install
pnpm dev

Model types

Built-in AI: Browser native (Chrome and Edge only), instant startup

Transformers.js: ONNX models, good variety, medium size

WebLLM: Large models, most capable, bigger downloads

Browser support

  • Chrome and Edge: Full support
  • Firefox: Transformers.js + WebLLM
  • Safari: Transformers.js only