In development

Buy minutes once. Spend them only while the meter runs.

TimeGate is DataRail's prepaid time system. People pay through Stripe or Square and the minutes land on their account. They spend them on a device that stays locked until someone starts a session on it, or inside a datarail service that only answers during a paid session. An admin sets what a minute costs, and the server, not the device, keeps the time. It tunes itself to the hardware it runs on, from a Legion Go to a Surface to a PS5 on the TV.

How it works

From a payment to an open gate

Money and time travel on separate rails. The processor confirms a payment to the server directly, the server credits the minutes exactly once, and a gate stays open only while the server keeps hearing from the session.

How TimeGate turns a payment into an open gate A buyer picks a package quoted by the server, five dollars for thirty minutes. They pay on Stripe's or Square's hosted checkout, where card details stay. The processor sends a signed webhook to the TimeGate server, which verifies it, credits the minutes once to an append-only ledger, and meters sessions on its own clock. The browser returning from checkout never adds time. The server then opens one of two gates: a device gate, where a Windows, Linux or Android kiosk unlocks and locks again when time stops, or a service gate, where a datarail app such as Harvest or GhostSignal lets the person in only during a paid session. Below, one session on the meter: the device checks in every thirty seconds, the session is billed from start to the last check-in, and if the device goes silent its ninety-second lease runs out and it locks itself, so the silence is never billed. 01 · PAY 02 · CHECKOUT 03 · CONFIRM + CREDIT 04 · SPEND Buyer picks a package $5.00 → 30 min quoted by the server CHECKOUT LINK Hosted checkout Stripe Square card details stay with the processor BROWSER RETURNS · NEVER ADDS TIME SIGNED WEBHOOK TIMEGATE SERVER Signature verified signed by the processor Credited once append-only ledger Metered here server clock only DEVICE GATE A kiosk unlocks WINDOWS · LINUX · ANDROID locks again when time stops SERVICE GATE An app lets you in HARVEST · GHOSTSIGNAL · … only inside a paid session THE METER · ONE SESSION BILLED · START → LAST CHECK-IN START 30 S 60 S 90 S 120 S the device checks in every 30 s last check-in SILENCE · NOT BILLED no check-ins arrive 90 S LEASE ENDS the device locks itself even offline SERVER ENDS IT billed 120 s, not 210 s A session ends when you stop, when the balance reaches zero, or after 90 s of silence. It is billed to the last check-in, never past it. The timer on the device is for display only. How TimeGate turns a payment into an open gate A buyer picks a package quoted by the server and pays on Stripe's or Square's hosted checkout. The processor sends a signed webhook to the TimeGate server, which verifies it, credits the minutes once, and meters sessions on its own clock. The browser returning never adds time. The server then opens a device gate, where a kiosk unlocks, or a service gate, where a datarail app lets the person in during a paid session. A session is billed to its last check-in; a silent device locks itself when its ninety-second lease ends. 01 · PAY Buyer picks a package $5.00 → 30 min quoted by server CHECKOUT LINK 02 · CHECKOUT Hosted checkout Stripe Square card details stay with the processor BROWSER RETURNS NEVER ADDS TIME SIGNED WEBHOOK 03 · TIMEGATE SERVER Signature verified signed by the processor Credited once append-only ledger Metered here server clock only, never the device's 04 · SPEND DEVICE GATE A kiosk unlocks WINDOWS · LINUX · ANDROID and locks again when time stops SERVICE GATE An app lets you in HARVEST · GHOSTSIGNAL · … only inside a paid session THE METER · ONE SESSION BILLED SILENCE start last check-in locks itself check-in every 30 s Billed to the last check-in, never past it. Silent for 90 s, the device locks itself, even offline. Silence is never billed.
Amber is money, cyan is time. The processor's signed message to the server is the only thing that adds minutes. A session is billed from its start to the last time the device checked in, and a device that stops hearing from the server locks itself within 90 seconds.
Gates

Two kinds of gate, one balance

Everything a person buys goes into one balance of minutes. An admin decides which gates exist and how fast each one spends time, so an hour on one can cost more than an hour on another.

Device gate

A machine that stays locked until you start

An enrolled Windows, Linux or Android device boots into a lock screen. Someone signs in and starts a session; the screen opens and a small meter stays on top. When they stop, run out, or the connection goes quiet for 90 seconds, it locks again and signs them out.

On Android set up as a dedicated device, the operating system holds the lock. On Windows and Linux the app pairs with the system's own kiosk mode.

Service gate

A datarail app that answers only while you're paid up

A datarail service, named by the same app id the Library uses (Harvest, GhostSignal, and so on), asks TimeGate before it answers. The person's app carries a gate token for the running session; the service checks it with its own credential and gets back yes or no, and how much time is left.

A passing check keeps the session billed. A token for a different app is refused without touching the session it belongs to.

Devices

Tuned for the hardware it runs on

The same app sizes, steers and animates itself differently on a handheld, a tablet and a TV across the room. Settings → Device picks the profile, or reads it from the machine's own model string, and a diagnostics check tests the device against it.

TimeGate's device profiles and diagnostics Three devices and how TimeGate tunes itself for each. Legion Go and Legion Go 2: an 8.8-inch 144 hertz handheld; the interface is 1.15 times larger, controls are 56 pixels, input is touch and the detachable controllers, and the background rails are held still to save battery. Surface Pro: a 13-inch 3 by 2 tablet; normal scale, 52 pixel controls for fingers, touch, pen and keyboard, animated rails. A PS5 running Linux on a 1080p TV: a 5 percent margin for TVs that crop the picture, the app laid out 1080 pixels wide so body text is 24 pixels or 2.2 percent of the picture height, a DualSense over USB, and the rails off. Below, the diagnostics check in Settings: profile, screen, text size, controllers, drawing speed, storage, server and device gate. LEGION GO · GO 2 1:29:00 SCREEN 8.8 in · 144 Hz SCALE 1.15× interface CONTROLS 56 px, 64 on screen INPUT touch and controllers RAILS held still on battery SURFACE PRO SCREEN 13 in · 3:2 SCALE 1× interface CONTROLS 52 px for fingers INPUT touch, pen, keyboard RAILS animated PS5 · LINUX · TV SCREEN 1080p TV, 5% margin SCALE laid out 1080 px wide TEXT 24 px: 2.2% of picture INPUT DualSense over USB RAILS off DIAGNOSTICS · SETTINGS → DEVICE PROFILE SCREEN TEXT SIZE CONTROLLERS DRAWING SPEED STORAGE SERVER DEVICE GATE Three seconds of animated rails measure drawing speed against the screen's frame budget. Each check then passes, asks for a look, or fails, with a fix to try. TimeGate's device profiles and diagnostics Legion Go: 1.15 times larger, 56 pixel controls, controllers, still rails. Surface Pro: normal scale, 52 pixel controls, touch and pen, animated rails. PS5 running Linux on a TV: laid out 1080 pixels wide so text is 2.2 percent of the picture, a 5 percent margin, a DualSense over USB, rails off. Below, the diagnostics check in Settings. LEGION GO · GO 2 1:29:00 SCREEN 8.8 in · 144 Hz SCALE 1.15× interface CONTROLS 56 px, 64 on screen INPUT touch and controllers RAILS held still on battery SURFACE PRO SCREEN 13 in · 3:2 SCALE 1× interface CONTROLS 52 px for fingers INPUT touch, pen, keyboard RAILS animated PS5 · LINUX · TV SCREEN 1080p TV, 5% margin SCALE laid out 1080 px wide TEXT 24 px: 2.2% of picture INPUT DualSense over USB RAILS off DIAGNOSTICS · SETTINGS → DEVICE PROFILE SCREEN TEXT SIZE CONTROLLERS DRAWING SPEED STORAGE SERVER DEVICE GATE Measures drawing speed, then each check passes, asks for a look, or fails.
Each profile changes size, input and motion together. With a controller, the D-pad or left stick moves, A selects, B goes back and the bumpers change tab; on a TV, A in a text field opens an on-screen keyboard, so a kiosk can be signed into with only a DualSense.
TimeGate on a Legion Go: the meter with a live session at 1:29:00, everything drawn 1.15 times larger, the background rails held still.
Legion Go. The meter at 1.15×, with the rails held still to save battery.
TimeGate on a Surface Pro in portrait: Settings, Device, with Surface detected from the model string, and the results of a diagnostics run.
Surface, upright. Settings → Device, the profile detected from the model string, and a diagnostics run.
TimeGate on a TV from a PS5 running Linux: the kiosk lock screen with an on-screen keyboard open, the W key focused and qw typed.
PS5 on a TV. Signing in to a kiosk with only a DualSense, through the on-screen keyboard.

About the PS5. Linux runs on a jailbroken PS5 only on firmware 13.60 or older, and restarting the console boots the PS5's own system. So on a PS5 a locked device holds only until someone restarts it; it is best as a member app on the TV and for datarail services. The profiles are tested at each device's screen size, not yet on the hardware.

Use cases

What it's for

Anywhere time is the thing being sold, and the place selling it shouldn't have to stand there with a stopwatch.

  1. 01 · DEVICE Computers by the minute A library, makerspace or café lends a PC that unlocks for whoever has time on their account, and locks the moment it runs out.
  2. 02 · DEVICE Tablets and phones on loan Android devices set up as kiosks, so the operating system keeps people at the lock screen until they start a session.
  3. 03 · SERVICE Pay as you go, no membership Try a members-only datarail feature, such as the Harvest live dashboard, for an hour instead of joining for a month.
  4. 04 · SERVICE Timed play at events Sell play time at the door for a GhostSignal hunt or a pop-up station. Every session stops when its time is up.
Guarantees

Rules the server keeps

Each of these is held by the server and its database, and each has tests that try to break it.

  • Only the processor's signed word adds time.The browser coming back from checkout never does, and neither does anything the app claims.
  • A payment is credited once.However many times the processor calls, and in whatever order its messages arrive.
  • The price is fixed when you start paying.Changing prices later never touches time already bought or already quoted.
  • Only the server's clock counts.Time is billed to the device's last check-in. Silence is never billed, and changing the device's clock changes nothing.
  • Devices fail closed.A device that stops hearing from the server locks itself within 90 seconds, even with no connection.
  • History is never edited.The ledger and the admin log only grow. A correction is a new entry, with the admin's reason attached.
The app

One app for members, admins and kiosks

Built with Flutter for Windows, Linux and Android, in the same style as this site, circuit rails included. Members buy time and run sessions; admins set prices, gates and devices; an enrolled device boots straight into its lock screen.

The TimeGate app on desktop: a live Signal Room session with 1:29:00 remaining on a glowing meter, a Stop session button, and the list of gates.
A live session on desktop. The meter counts down between check-ins; the server's figure is the one that's billed.
A device gate on a phone: a lock screen reading Device locked, Front desk PC, Sign in to unlock this device, with a sign-in form.
A device gate, locked until someone signs in.
Specs

What it's built from

Server

Language
TypeScript on Node.js, with Fastify
Database
PostgreSQL; an append-only ledger with every balance checked against it
Admin
Prices, packages, gates, devices, refunds flagged for review, a searchable audit log
Tests
99, run against a real PostgreSQL

Payments

Processors
Stripe Checkout and Square payment links, each switched on by an admin
Confirmation
Signed webhooks, verified on the server; card details never reach it
Safety nets
Re-checks with the processor when a webhook is late; a fake processor for development only

App

Toolkit
Flutter
Platforms
Windows, Linux, Android, with profiles for the Legion Go, Surface and a PS5 running Linux
Input
Touch, pen, keyboard and game controllers; an on-screen keyboard for controller-only use
Locking
Android lock task as the device owner; a full-screen kiosk window on desktop
Tests
41, including the whole kiosk cycle and every screen on each device's screen

Metering

Clock
The server's, never the device's
Check-ins
Every 30 seconds
Lease
90 seconds; after that the device locks itself
Billing
Whole seconds, from start to the last check-in
Status

Where it stands

In development. The server, the app and their tests are built, the app is tuned for the Legion Go, Surface and a PS5 running Linux, and it has not taken a real payment yet. Before it does: a full run through each processor's test mode, a refund policy, and a decision on how the Android app is distributed, because Google Play has its own rules for selling digital time.