Menu

A Black Screen Ate a Kid's Screen Time: Billing Play by the Second in a Learning App
📰

A Black Screen Ate a Kid's Screen Time: Billing Play by the Second in a Learning App

DEV Community·Yuriy Stasyuk·14 days ago
#6MybxcoK
#dev#game#time#seconds#worker
Reading 0:00
15s threshold

DadSchool is a home learning site I built for my kids, grades 1 to 5, at dadschool.yuriystasyuk.com . They pass tests, unlock achievements, and each achievement is worth 10 points. One point buys one minute of games or parent-picked videos. The promise on the landing page is that points are spent only once play starts.

In October a kid reported that the slingshot game went black and their gems drained anyway. They were right, and the fix touched every game in the arcade.

How it was billing

The front end is a Next.js static export on Cloudflare Pages. Points and progress live in a Cloudflare Worker with D1. Spending goes through start , checkpoint and end routes for each session.

The arcade billed by wall-clock time from when a game mounted.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.