git404hub

what is ondevice-ai fr?

thatbeautifuldream/ondevice-ai — explained in plain English

Analysis updated 2026-05-18

0TypeScriptAudience · developerComplexity · 2/5Setup · moderate

tl;dr

A private, fully on-device chat app powered by Chrome's built-in Gemini Nano model, with playgrounds for structured output, translation, and writing tools.

vibe map

mindmap
  root((On-device AI Chat))
    What it does
      Private on-device chat
      Structured JSON output
      Offline translation
    Tech stack
      Astro
      React
      Tailwind CSS
      Gemini Nano
    Use cases
      Chat with no server
      Constrain model output
      Translate offline
    Audience
      Developers
      Privacy focused users

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Chat privately with an AI model that runs entirely on-device, with nothing sent to a server.

VIBE 2

Force a Chrome built-in AI model to return valid JSON using a custom schema.

VIBE 3

Translate text offline in the browser using Chrome's built-in Translator API.

what's the stack?

AstroReactTypeScriptTailwind CSSGemini Nano

how it stacks up fr

thatbeautifuldream/ondevice-ai0xradioac7iv/tempfs7vignesh/pgpulse
Stars000
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderatemoderatemoderate
Complexity2/53/54/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · moderate time til it works · 30min

Requires Chrome 137+ with built-in AI flags enabled and Gemini Nano downloaded via chrome://components.

in plain english

This project is a private chat application that runs entirely on your own computer through Chrome's built in Gemini Nano model, rather than sending your messages to a server. Because the AI model itself ships inside the browser, every question and answer stays on your device, with no API key to set up and no external service involved. Beyond the basic chat page, the project includes a few extra playgrounds that show off different parts of Chrome's built in AI features. One page demonstrates structured output, where you can give the model a JSON schema and it is forced to reply with valid, parseable data instead of free form text, and it lets you compare that constrained answer side by side with a normal unconstrained one. Another page is a translation tool that automatically detects what language you are typing in and then streams a translation, downloading each language pair only when needed so it can keep working offline afterward. A third page brings together three writing assistance tools built into Chrome: one that drafts new text from a prompt with tone and length options, one that rewrites existing text to be more formal, more casual, shorter, or longer, and one that proofreads for grammar and spelling and shows each correction inline. The chat page itself keeps track of conversation history in the browser's local storage, streams responses formatted as Markdown, and automatically summarizes older parts of a long conversation on device when the context window starts filling up. To use this project you need a fairly recent version of Chrome with a few experimental flags turned on so the Gemini Nano model can download and run locally, and the app walks you through enabling them if it detects the model is missing. It is built with Astro, React, and Tailwind CSS. This is a small demo project aimed at developers curious about on device AI in the browser, currently with no stars.

prompts (copy fr)

prompt 1
Explain how the on-device context compaction works in this chat app's agent.ts file.
prompt 2
Help me add a new writing tool page to this project using Chrome's built-in AI APIs.
prompt 3
Walk me through enabling the Chrome flags needed to run Gemini Nano locally for this app.
prompt 4
Show me how the structured output playground validates JSON against a schema.

Frequently asked questions

what is ondevice-ai fr?

A private, fully on-device chat app powered by Chrome's built-in Gemini Nano model, with playgrounds for structured output, translation, and writing tools.

What language is ondevice-ai written in?

Mainly TypeScript. The stack also includes Astro, React, TypeScript.

How hard is ondevice-ai to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is ondevice-ai for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.