The E-Bike Battery Passport is our own product. It gives every e-bike battery one verified record, shared by the companies that make, import, sell, repair and recycle it, and by the person who owns it. We designed it, built it and run it ourselves. There is no client in this story: what follows is what we decided, why, and where the product stands today.

The problem

An e-bike battery outlives most of the paperwork about it. One company makes it and another imports it. A dealer sells it under a bicycle brand, workshops service it, it may be sold on second-hand, and at the end it is collected for recycling. Each of them keeps records in a system of its own, and none of those records travels with the battery.

That makes simple questions hard to answer. Is this battery the one it claims to be? Has it been recalled? Was it reported stolen? How healthy is it, and who repaired it last? A second-hand buyer cannot easily find out, and neither can a workshop deciding whether a pack is safe to work on.

There is a deadline too. The EU Batteries Regulation (2023/1542) gives batteries for light means of transport, e-bike batteries among them, a digital passport from 18 February 2027, reached through a QR code on the battery. That passport has to live somewhere, and it is only useful if everyone who handles the battery afterwards can read it and add to it.

What we built

One record, reached in three ways.

A business portal, on the web, for the companies. Manufacturers, importers and brands register batteries one at a time or in bulk from a CSV file, build each model’s passport, manage their dealers and workshops, run recalls, and see at a glance which passports are missing data.

The business portal’s overview for a demo importer: 500 registered batteries, 48 under repair, 50 under recall marked as needing attention, 2 reported stolen with ownership transfer blocked, and 6 recycled.
The business portal’s overview for an importer: its batteries, what is under repair or recall, and how complete its passports are. Shown with demo data.

A public passport page, which is what the QR code on a battery opens. Anyone can read it without an account: the model and serial number, the details to check against the battery in front of them, its key figures, and a warning when it has been recalled or reported stolen. That warning is never served from a cache, because the person reading it may be about to hand over money.

A public battery passport on a phone: the model and its serial number, marked as verified by the platform, with no theft reported, no confirmed safety finding and in use, then its capacity, voltage, chemistry and weight.
A public passport as a phone shows it after a scan: the model, the serial number and the details to check against the battery itself. Shown with demo data.

A mobile app for owners and workshops. An owner scans a battery, claims it, keeps the proof of purchase with it, transfers it to the next owner, reports it stolen and receives recall alerts. A workshop opens a battery its owner has shared with it, records a repair or a service, uploads the diagnostic report and adds a state-of-health measurement.

The battery passport mobile app at a workshop: a battery shared with it, whose state of health was measured at 58% before a repair and 97% after.
The app at a workshop: a battery its owner shared, measured at 58% state of health before a repair and 97% after. Shown with demo data.

Behind all three sits one database and a versioned API, so other systems can register batteries and read records without going through a screen. The web is built with Next.js and the app with React Native and Expo, both in TypeScript, and the data lives in PostgreSQL, through Supabase.

Decisions that shaped it

The web first, with the app in mind from day one

We fixed the order of work early: the business portal and the public passport first, the mobile app second. The first phase worked online only, but its API was built for offline use from the first day. Every change carries an idempotency key and an identifier generated on the device, so a change made without a connection can be sent later, or sent twice, and is still recorded once. When the app arrived, nothing in the API had to be reworked.

Offline is not all or nothing. Workshops and warehouses often have poor reception, so the app’s offline design sorts every action into three kinds: work that can be finished offline and sent later; work that can be prepared offline but only becomes final once the server has checked it; and anything that needs current information, another party’s confirmation or a legally sensitive change of status, which waits for a connection. An owner’s app reads offline and changes nothing.

What the app keeps on a phone is always encrypted. A build that cannot encrypt its database does not get one: it falls back to the phone’s secure keystore rather than keep a passport in the clear.

The rules live in the database

A passport is only worth something if it cannot be quietly rewritten. So the rules that make it trustworthy are enforced by the database itself, not by the screens in front of it:

  • A battery’s identifier never changes and is never reused.
  • A published passport is never edited in place. A change creates a new version, and a correction refers to what it corrects. Each battery stays linked to the version of its model that applied when it was registered, so a later change by the manufacturer never rewrites an older battery.
  • A battery’s history is only ever added to. A repair, a transfer or a recall becomes an event that nobody can edit afterwards.
  • A value nobody supplied is shown as unavailable, never stored as zero. A battery whose state of health is unknown is not a battery at 0%.
  • Every imported value records where it came from and when.
  • Every company on the platform is isolated from every other.

More than a hundred suites of database tests hold those rules, so no screen, import or future feature can break one without a test going red.

Public and private stay apart

A passport is public. The people around a battery are not. The public page cannot read the database’s tables at all: it can only ask a small set of functions, each of which returns just what a buyer may see. An owner’s personal details never go in the QR code, and when a battery is reported stolen the passport says so, but where it was stolen stays private.

Ownership changes hands the same way. The current owner approves a transfer and the new owner accepts it, and neither sees the other’s private details. A battery reported stolen cannot be transferred at all.

One active label at a time

A label can be damaged or lost, so a battery can have several QR codes over its life, but only ever one active. A reprint issues a fresh code and retires the old one, which still opens the passport, with a notice that it has been replaced. That notice also helps expose a cloned label.

Sign-in that keeps the browser out of the database

People sign in with a password, a passkey or their Google account. Each of them runs its exchange on our server, so the browser never talks to the database directly and the page’s strict content policy stays shut. When someone signs in with Google, Google’s own page shows the product’s verified name and logo, not the address of a database host.

Not every option made the cut. Apple and Microsoft sign-in wait until a pilot of this size needs them, and we chose not to offer passkeys as the only way in: every account began with a password, and an account with nothing but a passkey could only be recovered by an emailed link, which is weaker than what it replaced.

Alerts that say nothing about the battery

A recall can apply to particular production batches, and the owners of those batteries hear about it by email and on their phone. We wanted customers’ data to stay in the EU: the database and the server run in Frankfurt, and alert emails go out from Paris. Push notifications could not follow: Google offers no EU-only option for them.

So a push carries one fixed sentence and nothing about the battery, and tapping it opens the alerts in the app, where the details are. The cost is that a recall’s remedy is not on the lock screen. The email and the app carry it.

Dutch where the buyer reads

The pilot is Dutch, so the parts a buyer reads came first: the public passport, the app, and the recall email and push are in Dutch and English. The business portal’s Dutch is written and in review, and it goes live in one piece, once all of it is.

The language comes from the reader’s browser, never from the address, for a reason that is easy to miss. A passport’s address, https://battery.silentpixel.net/p/ followed by a 16-character code, is exactly 50 characters long, which is exactly the most the EU’s passport registry accepts. The usual /nl/ in the address would have made every battery on the platform unregistrable, and the failure would have arrived as a rejected submission in 2027 rather than a failing build today.

Check the limits before the conventions

The usual way to add a language would have broken the product, and nothing would have failed until 2027. Before following a convention, look for the hard limits it has to fit inside.

How it runs

The parts of running a product that never show in a demo are in place:

  • Nothing reaches production until a person promotes it, and only after every check has passed on that exact commit.
  • The live service answers whether it is healthy and in which region it runs, and it is checked from outside, so we hear about a problem before a user has to report it.
  • A firewall at the edge limits how fast anyone can call the API.
  • The database is backed up by a script of our own, and a full backup has been restored in a drill.
  • A security review has been carried out. An independent penetration test is still to come.

Where it stands

The software is complete for its pilot, and what is left is not code. Its specification has 1,126 entries that can be checked off: 995 are built, and 48 were decided against, each with its reason written down. None of the 83 that remain can be done in code alone. Most are partnerships nobody has opened yet; the rest are accounts, an independent penetration test and volumes only a pilot can produce.

The pilot is planned with one importer, one bicycle brand, three dealers, two repair shops and a recycler or refurbisher. The first release has eleven success criteria, and eight are met already. Among them: a business can create 500 passports without a developer’s help, a compliance manager sees at once what data is missing, a stolen battery cannot be transferred, no company can see another’s private records, and a full backup can be restored. The other three are about time: registering a battery in under two minutes, a workshop adding a repair in under two minutes, and a consumer understanding a passport within ten seconds. Those can only be measured with the people they are about.

Android testers install the app directly today. Google Play’s internal testing comes next, under the company’s own Play account, verified in November 2026, and iPhone owners join the pilot in a second wave.

What we take from it

A battery passport is a record that has to stay right for years, read by people its makers will never meet. Most of the work went into making it hard to get wrong: rules the database enforces, a public page that can only see what a buyer may, an address with no character to spare, an alert that says less so that less of a customer’s data leaves the EU. None of that shows in a demo, and all of it is what the product is.

It was also our first product, and what we learned here became the foundation of the next ones. Marnu and Nearwell are released the same way, held to the same kind of checks and tracked on the same kind of project board, which is a large part of why Nearwell went from brief to live in three days.

That is the care we bring to software we build for anyone else.