Click's Identity & the Global Leaderboard
How I connected Click's hardware identity, browser-based personalization, and a zero-cost (for now) global leaderboard.

Physical hardware feels personal when it recognizes its owner. When designing the web ecosystem for Click, I wanted users to be able to plug their device into a web browser, assign a custom name to their handheld, and sync their achievements to a global leaderboard without installing custom drivers, desktop executables, or paying monthly server hosting bills.
To achieve this, I combined driverless WebSerial browser technology, on-chip non-volatile storage, and a zero-cost serverless edge cloud architecture.
Hardware Identity
Every microcontroller chip carries an unforgeable hardware identity. On my active ESP32 prototype boards, the hardware ID is derived from the 48-bit factory MAC address burned into silicon eFuses, yielding a unique hex string like 3C71BF89A1B2.
On upcoming RP2354A boards, it reads the unique 64-bit flash ID through the Pico SDK.
WebSerial Personalization
To communicate with the device directly from Chrome or Edge, the firmware runs a lightweight ASCII serial protocol on UART0 at 115200 baud.
When a user connects to the web interface at flashclick.uprajjwal.com.np, the browser issues commands such as GET_ID to retrieve the hardware serial and GET_NAME to check for a registered handle.
Users can enter a custom owner name in the browser interface. The web app sends a SET_NAME command over WebSerial, which writes the owner handle directly into the device NVS memory under the device namespace.
Every time the physical Clicker powers on or wakes up, the firmware reads this handle from NVS and renders a personalized boot splash screen on the OLED display.
Building the Community Boulder
To connect individual users together, I reinterpreted the Myth of Sisyphus from a lonely single-player struggle into a collective worldwide effort called the Community Boulder.
Every click registered on every device across the world contributes to one shared global count.
The Cloudflare Edge Leaderboard
The backend infrastructure runs entirely on a zero-cost, serverless edge stack powered by Cloudflare Workers and Cloudflare D1 serverless SQLite.
When users sync their devices through the web hub, a POST request submits their delta click count to the edge worker. The worker atomically updates the global total in the D1 database with sub-millisecond latency.
Protecting the Global Count
To protect the integrity of the global leaderboard against automated scripts, the Cloudflare Worker enforces physics-based rate limiting.
Every sync request calculates the elapsed time since the device last synced. The worker validates click deltas against a maximum physical human clicking limit of 15 to 20 clicks per second.
Any impossible spike is clamped or rejected, and every sync transaction is immutably logged into a sync_log table with hashed IP addresses and delta audits.
Firmware Updates Without Losing Data
Finally, the browser flasher allows users to update firmware seamlessly.
By flashing new application binaries strictly to address 0x10000 while preserving the NVS partition at 0x9000, users can upgrade their firmware without losing their custom owner name, high scores, or local milestone progress.


