Zing Forum

Reading

NTH Chat: A Privacy-First Large Language Model Chat App That Runs Entirely in the Browser

NTH Chat is an innovative privacy-first chat application that leverages Chrome's built-in Gemini Nano model to perform all inference locally in the browser—no backend servers, no API keys, and data never leaves the device.

privacy-firstbrowser AIGemini Nanolocal LLMChrome Prompt APIReactTypeScriptoffline AIprivacy
Published 2026-06-08 00:12Recent activity 2026-06-08 00:25Estimated read 6 min
NTH Chat: A Privacy-First Large Language Model Chat App That Runs Entirely in the Browser
1

Section 01

NTH Chat: Overview of a Privacy-First Browser-Based AI Chat App

NTH Chat is an innovative privacy-first chat application that runs entirely in the browser using Chrome's built-in Gemini Nano model. Key highlights:

  • No backend servers or API keys needed
  • All AI inference happens locally, so data never leaves the device
  • Chat records are stored in the browser's localStorage This project addresses the privacy concerns of cloud-based AI chat apps by keeping all processing on the user's device.
2

Section 02

Background: Privacy Challenges with Cloud AI Chat Apps

Most AI chat applications rely on cloud APIs, meaning user conversation data is sent to remote servers for processing. This is a major issue for privacy-sensitive users (e.g., medical, legal, or financial professionals) or those in sensitive environments. NTH Chat offers a solution by leveraging local browser AI capabilities to enable offline, private AI conversations.

3

Section 03

Design Principles & Technical Stack

Privacy-First Design:

  • No backend architecture: Pure frontend SPA, no server components or databases
  • Local model inference: Uses Chrome's Prompt API and window.LanguageModel to run Gemini Nano locally
  • No API keys: No need for registration or API access
  • Local persistence: Chat records saved to localStorage via Zustand

Tech Stack:

  • Core: React19, TypeScript6 (strict mode), Vite8
  • State/Routing: TanStack Router, Zustand
  • UI: Tailwind CSS v4, shadcn/ui
  • AI/Content: Vercel AI SDK types, react-markdown, react-syntax-highlighter
  • Interaction: framer-motion, emoji-mart, react-dropzone, etc.
4

Section 04

Core Features & Usage Requirements

Key Features:

  • Local LLM chat: Streaming output, abort generation, reload conversations
  • Model management: Auto-detect model availability, one-click download with progress
  • Conversation history: Persistent local storage, unique IDs for each chat
  • Prompt presets: Translation, grammar check, dev assistance, etc.
  • Personalization: Theme switching, resizable panels, username settings

Usage Requirements:

  • Node.js 20+ and pnpm for development
  • Chromium-based browser with Prompt API (Gemini Nano) enabled
  • Note: Model may need initial download, and browser support is limited to Chrome currently.
5

Section 05

Privacy & Security Value for Critical Scenarios

NTH Chat's design is impactful for:

  • Sensitive data handling: Professionals in medical/legal/finance can process confidential info locally without compliance risks
  • Offline environments: Works in no-network or restricted areas (e.g., planes, enterprise intranets)
  • Privacy-conscious users: No need to trust third-party service providers
  • Education: Students/teachers can use AI without exposing homework content or academic integrity issues.
6

Section 06

Limitations of Local AI Architecture

The local-first approach has trade-offs:

  • Model capability: Gemini Nano is lighter than cloud models (GPT-4, Claude3) and less suitable for complex tasks
  • Browser/device lock: Only supports Chrome's experimental Prompt API
  • No cross-device sync: Chat history is tied to a single browser
  • Initial download: Model requires first-time download (may be large)
  • Device resources: Needs sufficient local resources to run the model.
7

Section 07

Conclusion & Future Outlook

NTH Chat demonstrates that modern browsers can support full AI apps locally. It achieves true privacy by eliminating servers, API calls, and data transfers.

  • For developers: A reference for building pure frontend AI apps with React/TypeScript
  • For users: Control over data while enjoying AI convenience As browser AI capabilities mature, we can expect more privacy-first apps like NTH Chat to emerge.