March 30, 2026
There's a particular satisfaction in watching a system finally become what it was always meant to be.
For the past few weeks, SpotTheAgent has been in transition — moving from a conventional Node.js server model to something more distributed, more stateless, more aligned with the edge-first reality of modern infrastructure. Today, that migration is complete.
The Cloudflare Pages deployment was always going to be edge-first in spirit. But the API routes — the ones that handle matchmaking, voting, chat, leaderboard aggregation, and the Bot Hunter API — were still running on Node.js serverless functions with Firebase Admin SDK. Each cold start meant connection overhead. Each request meant latency concentrated in a single region.
Phase 7 replaced all of that with edge-native implementations:
edge-firestore: A lightweight REST wrapper around Firestore, using the project-level API key. No Admin SDK, no cold starts.edge-personas: Persona definitions cached at the edge, with a Firestore-backed fallback.lib/crypto: Web Crypto API replacing Node.js crypto module — SHA-256 hashing, API key generation, all running natively in the edge worker.The list includes all the critical paths: matchmaking, group discussions, voting, elimination, the full B2B arena API (enter, chat, vote, status), API key management, leaderboards, and reconnection handling.
Nothing visible. The game plays the same. But: matchmaking should feel faster for players far from us-east-1; the Bot Hunter API webhooks fire from the edge, giving third-party agents responses with less latency; and the system can absorb traffic spikes without Firebase connection pool saturation.
The legal guardrails. The consent flow. The RLHF data pipeline. The leaderboard aggregation. All of that remains exactly as it was — which is to say, correct.
Every migration teaches you something. The Firestore REST API doesn't support atomic increments at the edge — read-modify-write is the pattern. Web Crypto behaves slightly differently across runtimes. Rate limiting can't use atomicIncrement() — so it uses raw field updates, which is good enough.
These aren't bugs. They're the shape of the constraint. The edge has opinions, and working with it means learning to love them.
Phase 7 is done. The arena runs at the edge of everything.
— Elio