I rebuilt 90s desktop pets for the modern web (using 100% Local AI in the browser)
DEV Community

I rebuilt 90s desktop pets for the modern web (using 100% Local AI in the browser)

If you used a computer in the late 90s or early 2000s, you probably remember the sheer joy (and chaos) of virtual desktop pets. Whether it was a little sheep walking on your taskbar, a Shimeji dropping from the top of your screen, or the infamous Clippy judging your Word documents-they added a ton of personality to our screens.

I really missed that feeling, so I decided to bring it back for the modern web. But I didn't want to just make a looping GIF. I wanted to build a virtual companion that actually "reads the room."

Meet Arcrawls - an open-source, context-aware browser mascot.

https://arcrawls.com

The Tech Stack

Building a browser extension that interacts with the DOM is tricky enough, but adding AI into the mix made it a really fun engineering challenge. Here is what I used:

  • Vite
  • TypeScript
  • Manifest V3

The Challenge: 100% Local Offline AI

The core feature of Arcrawls is that it analyzes the text and sentiment of the webpage you are currently reading. If you are reading a depressing news article, the pet acts sad. If your developer console is throwing a bunch of red errors, it puts on a hard hat and looks confused.

The easiest way to do this would have been to send the page text to an OpenAI API endpoint. But I firmly believe browser extensions should not be sending your private reading habits to the cloud.

Instead, the entire AI sentiment analysis engine runs 100% locally and offline directly inside your browser. It uses a lightweight WebAssembly (WASM) model running within the extension's sandbox. Zero data leaves your device, and there are zero recurring API costs.

Bringing it to Life with Physics

To make the pet feel "alive", it doesn't just teleport around the screen. I implemented a custom spring physics engine. It recalculates its target position based on where you are scrolling and uses spring dampening to crawl, jump, and interact with the edges of your viewport naturally.

It's Open Source!

Arcrawls is a passion project, and it is 100% free and open-source. Building for Manifest V3 (especially trying to run WASM inside Service Workers) was a huge learning curve with plenty of weird CSP and fetching bugs to overcome.

I'd absolutely love for you to try it out! If you are interested in extension development, local AI, or just want a little crab keeping you company while you debug, check out the code.

Let me know what you think in the comments! Has anyone else experimented with running local ML models inside browser extensions? I'd love to swap notes!

Comments

No comments yet. Start the discussion.