Shapescope: A Kids' Kaleidoscope for Any TV

WebFamilyOpen Source
HTML/CSS/JS Canvas Web Audio Node.js WebSockets Cloudflare Tunnel Playwright Claude Code

Project Overview

Who

I built this for my kids. It started with a museum exhibit: a touch table where you build a pattern from shapes and a projector repeats it across the floor.

What

A web app with two sides. On a phone or tablet, kids tap shapes onto a square tile, drag them around, and pinch to resize and twist. On a TV, projector, or laptop, the big screen repeats that tile as a mirrored floor, tiles, a pinwheel, or a kaleidoscope, and it updates as they build.

Several phones and tablets can join the same picture by scanning a QR code on the big screen. Every shape plays a note, shapes can dance, and there is a copy-the-picture game with outlines to fill in.

It opens in a simple mode for little ones. Photos, finger drawing, a mode that dances to music, a corner for each kid, the game, and a saved gallery sit behind a grown-up addition question.

When

Built in late November 2026.

Where

Self-hosted on my homelab and published through Cloudflare Tunnel at scope.alexgreimann.com, with a 20-second tour. Nothing to install and no accounts. The code is on GitHub at alez0101/shapescope under the MIT license, with the browser tests. I built it with Claude Code as my coding agent.

Why

I didn't want to buy hardware to get the museum experience at home. The big screen is just a web page, so a laptop tab cast to a projector works today, and a smart TV browser or a Raspberry Pi would work later.

How It Works

  • The big screen and the controllers are plain HTML, CSS, and JavaScript with no framework or build step. Everything is drawn on a canvas.
  • Every pattern comes from one square tile. The mirrored floor is a mirrored two-by-two block, the kaleidoscopes alternate mirrored wedges around a center, and Kaleido ∞ is six mirrored triangles repeated on a hexagon grid, like a real three-mirror kaleidoscope.
  • One shared module defines the picture and every change that is allowed. The server runs each change through that module before relaying it to the other screens over WebSockets, so a bad message cannot corrupt a room.
  • Sound is generated in the browser with Web Audio. Notes come from a pentatonic scale, so nothing clashes no matter how many shapes go down at once. The music mode uses the big screen's microphone to make the picture pulse.
  • Photos are cropped and shrunk on the device, kept in the server's memory only, and never written to disk.
  • A Suggest an idea button saves feedback with the device type and sends me a message, which is how testers report problems.

Simple by Default

Little kids get shapes, colors, turn, resize, dance, delete, three patterns, Undo, and Surprise. Everything else unlocks with a two-digit addition question that a preschooler can't answer yet, and the unlock is remembered on that device.

The museum table had a palette on each side so several kids could build at once. The corner option works the same way: each device gets its own quarter of the tile, and the server enforces it, so nobody can move someone else's shapes.

Testing

Playwright scripts drive the big screen, an iPad, and a phone at the same time. They check that simple mode hides the grown-up controls, that a wrong answer keeps them locked, and that drawing, photos, the gallery, corners, the copy game through to the win screen, and the music mode all work, with zero script errors allowed.

Still Open

I tested it at home on real devices, and everything worked except the music mode. The big screen's microphone barely registered music from across the room, so I rebuilt it to calibrate itself to the room, pick out the beat from the bass, and show a level meter. Anyone with a room code can join that picture, since there are no logins. It runs on one small server and has not been tested with a crowd.

Stack & Tools

Frontend
HTML, CSS, JavaScript
Drawing
Canvas 2D
Sound
Web Audio
Realtime
Node.js, WebSockets
Hosting
systemd on Linux
Remote Access
Cloudflare Tunnel
Testing
Playwright
Coding Agent
Claude Code