Part 5: Cloudflare KV Telemetry, Security Hardening & the GitHub Update Engine
Part 5: Cloudflare KV Telemetry, Security Hardening & the GitHub Update Engine
Getting the two Chrome extensions working locally was only half the job of shipping SpringBored as an open-source project. Because unpacked developer-mode extensions are downloaded from **GitHub Releases** instead of auto-updating silently through the Chrome Web Store, I needed three more pieces of infrastructure to round out the core architecture:
1. A Zero-PII Live Telemetry Dashboard (springbored.ojasdeshpande.in): I wanted the project website to show real-time community counters—downloads, hours saved, lectures completed, questions solved—and a 52-week GitHub-style activity heatmap, without ever collecting a single piece of personal data, course title, or question text.
2. A Defense-in-Depth Security Model (Security.md): Every API key header, DOM scraper boundary, and runtime message listener needed to be locked down against key leaks and prompt injection.
3. An Automatic GitHub Releases Update Engine (checkForExtensionUpdate): Users needed a built-in NEW badge and banner inside both the popup and the fullscreen HUD whenever a new release shipped on GitHub.
In this fifth and final core architecture post of the Building SpringBored series (before we dive into the version-by-version release blogs starting in Part 6), we will look at how all three systems work under the hood.
1. Zero-PII Telemetry & the 52-Week Heatmap on Cloudflare Workers KV
The companion site at springbored.ojasdeshpande.in runs on a Cloudflare Worker backed by Cloudflare Workers KV (SPRINGBORED_KV). It exposes three lightweight JSON routes:
POST /api/telemetry: Once you accept the first-run Privacy & Terms card, finishing a lecture, module, course, question, or assessment updates your local stats strip inchrome.storage.local(personalStats) and sends a small anonymous delta payload:
{
"event": "question_solved",
"edition": "assessment",
"version": "1.1.0",
"clientId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"metrics": {
"questions": 1,
"savedSeconds": 45,
"useTimeSeconds": 2
},
"timestamp": "2026-11-06T10:15:00.000Z"
}
Notice what is never in that JSON: no name, no email, no Springboard URL, no course title, no question text, and no Gemini API key.
GET /api/stats: Returns the aggregate community totals (Total Downloads,Estimated Hours Saved,Questions Solved,Assessments Completed,Lectures Completed,Modules Completed,Courses Completed) plus a 365-daydailySeriesarray that renders the interactive 52-week GitHub-style usage heatmap on the homepage (with filters for All Editions, Course Runner, and Assessment Solver). It also syncs release assetdownload_countnumbers directly fromhttps://api.github.com/repos/OjasD07/SpringBored/releases.GET /api/version: Returns cached version metadata (courseVersion,assessmentVersion,releaseUrl,changelog) so both extensions can check for updates without hitting GitHub's unauthenticated REST API rate limit.
2. Security Audit & Prompt-Injection Defenses (Security.md)
In commit a46092b ("Fix DOM scraping edge cases, sequential navigation, and security audit findings"), I audited both extensions and documented the security controls in