Inspiration

Most laptops spend most of their lives doing nothing. They sit on desks overnight, through lectures and on weekends: powered on, plugged in and idle. Meanwhile, small teams such as AI startups, studios and university labs pay rising cloud prices for batch work like rendering, data processing and model evaluation.

Volunteer computing projects like Folding@home have shown that pooled personal devices can do real work. That raised a question we couldn't find a straight answer to: how much of an ordinary laptop's idle time is actually usable? We don't mean "the lid is open"; we mean plugged in, untouched, quiet and predictable enough to schedule work on. A compute marketplace built on a guess would overpromise to buyers and underdeliver to contributors, so we decided to measure it first.

What it does

Nightshift is a student-led pilot in Singapore with one job in its first phase: measure usable idle compute on real laptops, without running any jobs on them.

A lightweight desktop agent for Windows, macOS and Linux reports device state only, once a minute: whether the laptop is plugged in, its battery level, how long since the keyboard or mouse was last used, and how busy the processor and memory are. Every six hours it also runs four yes or no safety checks: firewall, antivirus, disk encryption and how long since the last system update. It never sees files, browsing, keystrokes, screens or location.

A contributor dashboard shows each device live, an hour-by-hour heatmap of when it is usable, its capacity, and its estimated value against estimated electricity cost. It also lists security issues with step-by-step fixes, and lets people pause, change how long a laptop must be untouched before it counts as idle, export their data or delete everything.

An operator console shows how much capacity the whole fleet has at each hour of the day, which is the number we would quote a buyer. A market simulator models the next phase: pretend buyers place orders, tasks are sent to idle laptops, results are spot-checked and every dollar is tracked, with no real money involved.

A minute only counts as usable idle when the laptop is plugged in, has been untouched for five minutes, is using less than a fifth of its processor and is not playing full-screen video. Capacity is the number of usable idle hours multiplied by the number of processor cores. Estimated value assumes about two Singapore cents per core per hour, minus a 30 percent platform fee. Estimated electricity cost assumes a working laptop draws about 15 extra watts, at the electricity rate each person sets. Every estimate in the dashboard explains these assumptions, including that real demand will not buy every idle hour.

You can try the live demo with sample data at nightshift-user.vercel.app/demo, visit the website at nightshift-sg.vercel.app, and read the code at github.com/JustinCheokjc/nightshift.

How we built it

The agent is a single Python program that asks the operating system for idle time, power state and the safety checks. GitHub Actions turns it into ready-to-run programs for Windows, macOS and Linux, tests each one, and publishes them to the dashboard's download page.

To keep secrets off people's computers, adding a device creates a setup key that expires after an hour. The agent swaps it for its own signed device token, so no database password ever leaves our server, and deleting a device cancels its token.

The dashboard is built with Next.js and React, hosted on Vercel, with Supabase for the database, sign-in and live updates. The database only lets contributors see their own devices, and only administrators can see the whole fleet. The server decides what counts as usable idle, so changing a setting takes effect without updating the agent.

The website explains the pilot, checks whether a laptop is eligible, answers common questions with a scripted help bot, and shows how the system fits together in a 3D scene. Its 30-second product film was drawn frame by frame as a web page, with an original soundtrack generated by a small Python program, so there are no licensing issues.

The market simulator is a Python model, also rebuilt for the dashboard, in which simulated contributors follow realistic day and night habits. Orders render real fractal images as stand-in work, and a share of the results is recomputed to measure what checking work costs.

Challenges we ran into

Defining idle honestly was harder than it sounds. No mouse movement for five minutes is not enough on its own: a laptop playing a film is untouched but in use, while a locked screen means the person has left even if they touched it seconds ago. We added screen-lock and full-screen detection, and the dashboard shows why each minute did not count, such as "on battery" or "processor busy".

Windows, macOS and Linux each answer the same questions in different ways, so idle time, power state and the safety checks all needed separate code, and some Linux desktops need an extra tool. Anything the agent cannot determine is reported as unknown rather than guessed.

Our first daily summaries used UTC days, which split Singapore nights in half. We moved everything to Singapore time so that "last night" means what people expect.

It is tempting to show big earnings numbers. We kept every figure labelled as an estimate, paid the pilot as a flat S$20, and marked everything that models the future marketplace as simulated with no real money.

Our installers are not code-signed yet, so Windows and macOS show warnings. A clear privacy notice and a plain Python version of the agent help people see exactly what they are running.

Accomplishments that we're proud of

We built a working end-to-end system. A real laptop enrolled through the live dashboard reports every minute, keeps working through internet outages, and can be paused or deleted from the web.

Our privacy design fits in one sentence: device state only, with consent people can see, no database passwords on their computers, and deletion on request.

Anyone can explore the public demo without signing up, and the market simulator turns "would this business work?" into numbers we can test.

What we learned

Measure before you build. The pilot's real result is a single number with a margin of error: usable core-hours per laptop per day, by hour. Everything else depends on it.

Trust is part of the product. People decide whether to install software based on what it will not do, so the list of things we never collect mattered as much as any chart.

Simple rules that anyone can check work best early on. With only a few laptops, an average by hour of day is more trustworthy than a clever model trained on very little data.

Much of the engineering goes into the unglamorous parts: installers, time zones, working offline, database permissions and honest wording.

What's next for Night shift

First, we will run the 30-day pilot with 50 to 200 laptops and publish the real numbers: usable core-hours per laptop per day, and how predictable they are by hour, with a measured margin of error.

Next, we will ship signed installers that update themselves, so joining takes one click with no security warnings, and we will look for design partners: teams with batch work that holds no sensitive data.

Only once the measurements show it is worth building will we move to the next phase: running jobs safely in isolation, double-checking results, and paying contributors through a licensed payment provider.

Built With

Share this project:

Updates

Submission history