Skip to content

feat: add Teddybox, a kids mode for phones and tablets - #371

Open
ditschi wants to merge 3 commits into
toniebox-reverse-engineering:developfrom
ditschi:feature/teddybox
Open

ditschi wants to merge 3 commits into
toniebox-reverse-engineering:developfrom
ditschi:feature/teddybox

Conversation

@ditschi

@ditschi ditschi commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

A Teddybox is a virtual Toniebox that runs full screen in the browser of a phone or tablet. A child picks a Tonie from a collection and listens, without reading and without leaving the Teddybox. Only a parent can end it.

Why

The idea is to make the TeddyCloud content available on the go: on a trip in the car, at grandma's or on holiday, a child can listen to its Tonies from an old phone or tablet. No physical box is needed, and the child still uses a "box" it can operate by itself.

What's included

  • Kids view: tap a Tonie or drag it onto the box. The ears change the volume, knocking beside the box switches tracks, and tapping the Tonie on the box takes it off (pause, the position is remembered). Track lights and volume are shown on the box.
  • Collections: shown on a shelf (2–4 per row) or in a circle around the box, each with its own background. There are 12 scenes (incl. seasons, Christmas, Easter), a plain color or an own picture.
  • Switching collections, each option can be turned on separately: picture buttons at the bottom, an overview, swiping, or automatically by time of day (per device).
  • Parent lock: hold the lock, then slide to a randomly placed target ("Settings" or "Exit"), with an optional PIN. Back navigation and reloads stay inside the Teddybox.
  • Setup on the device with a live preview in the device's aspect ratio. Touch-friendly Tonie picker. Own menu section with a setup guide (6 languages).
  • Installable as its own app (PWA). Includes a small fix so the manifest is fetched with cookies (crossorigin="use-credentials"); without it, installing fails behind a login proxy such as Authelia.
  • Hint plus a button to turn on image caching: cdn.tonies.de sends no CORS headers, and with caching the Teddybox can trim the transparent margins of official figures.
  • Stored as library/TeddyBox/teddyboxes.json, so no backend change is required.

A small optional backend change (toniebox-reverse-engineering/teddycloud#607) makes /api/auth/refresh-token extend the session (sliding session), so a child's device stays logged in while it is used. The Teddybox works without it.

Style rules: a deliberate exception for the kids view

The kids view intentionally does not follow the TeddyCloud UI conventions: no antd theme, own colors, fixed sizes, own SVG graphics and sounds. A UI for 2–5 year olds needs big touch targets, pictures instead of text and a playful look, and the admin style doesn't work for that. All parent-facing views (the Teddyboxes page, the setup drawer, modals) follow the usual conventions: antd tokens and icons, translations, mobile layout.

How it was built and tested

  • Built entirely with AI (Claude Code), with me reviewing, steering and testing every iteration.
  • Tested manually:
    • locally on desktop, phone and tablet;
    • on my TeddyCloud test instance behind my reverse proxy (Traefik + Authelia), including installing the Teddybox as an app.
  • npm run build, npm test (146 tests) and npm run check:translations pass.

Screenshots

Kids view (phone): circle, shelf, playing, overview, parent lock

01-kids-circle-phone 02-kids-shelf-phone 03-kids-playing-phone 05-kids-overview-phone 06-unlock-phone

Settings on the phone, with the live preview on top: backgrounds, collections, editing a collection, its Tonies, the Tonie picker

p07-setup-backgrounds p08-setup-collections p09-setup-collection-edit p10-setup-collection-tonies p11-tonie-picker

Schedule by time of day, ways to switch collections, volume and lock, the Teddyboxes page

p12-setup-schedule p12b-setup-switching p13-setup-volume-lock p14-teddyboxes-page

Tablet and desktop (setup with the preview in the device's aspect ratio)

04-kids-bedtime-tablet 08-setup-collections

Video

Phone, 67 s: picking a Tonie, volume, taking it off, switching collections, knocking for the next track, overview, parent lock, settings with live preview.

demo-phone.mp4

🤖 Generated with Claude Code

Christian Ditscher and others added 2 commits November 11, 2026 23:18
A Teddybox is a virtual Toniebox that runs full screen in the browser of
a phone or tablet, independent of any physical box. A child picks a Tonie
(tap it or drag it onto the box), taps the ears for the volume and knocks
on or beside the box to switch tracks. Taking the Tonie off pauses and
remembers the position; track lights and volume are shown on the box.

- Collections: each Teddybox has one or more collections of Tonies, shown
  on a shelf (2 to 4 per row) or in a circle around the box. Figures stand
  on shelf and box (transparent margins are trimmed); in the circle they
  sit on a milky disc that stays as the placeholder while the Tonie plays.
- Backgrounds: scenes (incl. spring, summer, autumn, winter, Christmas and
  Easter), a plain color or an own picture, for the box and per
  collection; the box always stands on the floor and as much of the scene
  as possible is visible.
- Switching collections, ordered from easiest: automatically by time of
  day (per device), picture buttons (mini shelf or ring of figures), an
  overview, swiping (also two-finger swipe on a touchpad). Each can be
  enabled separately; collections can be switched while a Tonie plays. A
  hint shows when a second collection cannot be reached.
- Parent lock: hold the lock and slide it into a target at a random
  position, to the settings or to exit; an optional 4 digit PIN follows.
  Back navigation, other routes and reloads stay in the Teddybox until a
  parent ends it.
- Device settings: start collection, schedule, install as an own app
  (only offered when the browser supports it), hint on restricting the
  device on phones and tablets. With web login enabled the session is
  refreshed regularly while the Teddybox is open.
- Management: own menu section "Teddyboxes" with a setup guide and a tab
  on the start page; create, open (double click, QR code), set up and
  delete. Setup happens on the device with a live preview that keeps the
  device proportions and ends with "to the overview" or "to the
  Teddybox". Tonies are picked from a touch-friendly grid, named Tonies
  first. Stored as library/TeddyBox/teddyboxes.json; older data is
  migrated when the editor opens.
- Hint with a button to turn on image caching, which the Teddybox needs
  to measure official Tonie pictures (cdn.tonies.de sends no CORS
  headers).
- Home: shorter tab titles so Tonies, Tonieboxes and Teddyboxes fit.
- Own audio element with a Web Audio gain node (iOS ignores
  HTMLAudioElement.volume) and synthesized feedback sounds that follow the
  volume; screen wake lock while open.
- Own SVG graphics, web manifest and icons, so the Teddybox installs as a
  separate app.

The kids UI intentionally uses its own colors, sizes and graphics instead
of the antd theme; the parent views follow the usual UI conventions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d a login proxy

Browsers fetch the web app manifest without credentials unless the link
has crossorigin="use-credentials", even on the same origin. Behind a
login proxy (Authelia, oauth2-proxy, basic auth) the request is then
redirected to the login page and the app cannot be installed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@henryk86

Copy link
Copy Markdown
Collaborator

I think this is ugly, runs completely against the idea of a toniebox (screenfree for kids). Just because ai can do it you should not do it. 🫣😶‍🌫️😝🤪

But as I don't need to use it, feel free to add it 😁

Comment thread public/translations/en.json Resolved
Comment thread public/translations/en.json Resolved
@ditschi

ditschi commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

Fair point – for everyday use at home a real box is the better choice. The Teddybox is meant for the cases where there is no box: in the car, on holiday, at grandma's. It's opt-in and doesn't change anything for people who don't use it. Thanks for being open to it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants