Brush Quest Brushing Game

WebGameCameraAI Automation
React Vite Cloudflare Workers getUserMedia API Canvas Cloudflare KV Claude Code

Project Overview

Who

Kids, and parents tired of negotiating how long they brush. Anyone with a tablet or phone and a toothbrush can play.

What

A tooth brushing game that uses the front camera to detect brushing motion by comparing video frames. Kids blast aliens by moving their toothbrush. More motion means more damage.

It started as Space Blasters and is now Brush Quest. There are 29 themes so far, including pirates, dinosaurs, monster trucks, and a Halloween trick-or-treat mode. Each one has its own look, enemies, and music. There's also a 24-hour leaderboard stored in Cloudflare KV.

The game runs a 2-minute timer split into four 30-second zones (upper left, upper right, lower left, lower right) and tells the player which part of their mouth to brush. It has combo multipliers for steady brushing, the live camera feed behind the game, music with a mute button, and a score screen at the end that breaks down each zone.

When

Built in March 2026. I went from idea to live in one session, including the code, the Cloudflare Workers deploy, and the custom domain.

Since July 2026 it updates itself. Every Thursday a scheduled AI agent (Claude Code) adds a new theme, and every Sunday it makes one improvement. Each change is built, deployed, and checked against the live site. If the check fails it rolls back on its own. Every release is committed to my self-hosted Git server. My one rule for the agent is that every theme gets its own song. If there's no new song that week, it skips.

Where

Hosted on Cloudflare Workers at brush.alexgreimann.com. The camera needs HTTPS, which Cloudflare handles. It works on any device with a front camera, and it's set up for an iPad in the bathroom.

Why

Getting kids to brush for a full two minutes, and to cover all four areas, is a daily fight. Brushing timer apps just sit there. Here the toothbrush is the controller, so kids stay with it the whole time.

It was also a good excuse to try camera access and motion tracking in the browser. A hidden canvas and some pixel math turned out to be enough for a pretty responsive motion tracker.

Stack & Tools

Frontend
React, Vite
Motion Tracking
getUserMedia, Canvas
Hosting
Cloudflare Workers
Build
Vite, Wrangler CLI
Leaderboard
Cloudflare KV
Weekly Updates
Claude Code, scheduled
Release Safety
Health check, auto-rollback
Domain
brush.alexgreimann.com