VelocityPro — Internet Speed Test

A modern, advanced internet speed test application with real-time measurements and global leaderboards

TypeScriptNext.js 15React 19Firebase FirestoreTailwind CSS v4Framer Motionlucide-reactVercel

The Challenge

"Users need an accurate, modern way to test their internet speed and understand connection quality. Existing speed test tools are often outdated, lack real-time visualization, or don't provide meaningful context for different use cases like gaming, video calls, and 4K streaming."

Architectural Solution

Client-server Next.js application with Firebase Firestore backend. The frontend (React 19, TypeScript) handles real-time speed testing via API endpoints for download/upload/ping measurements. Cloudflare's edge network provides global test server distribution. Firebase Firestore manages shared leaderboard data and test history. API routes proxy connection info and provide self-hosted speed test endpoints.

Engineering Deep Dive

An inside look at the structural decisions, trade-offs, and scaling plans devised during implementation.

Context & Constraints

  • Next.js 15 App Router for modern routing
  • React 19 with latest hooks and features
  • Firebase integration for real-time data sync
  • Cloudflare edge network for global coverage
  • Tailwind CSS v4 alpha for advanced styling
  • TypeScript for type safety throughout
  • Vercel deployment for serverless infrastructure

Architecture Trade-offs

Firebase Firestore provides managed real-time leaderboards but limits deep analytics. Cloudflare's edge network ensures global accuracy but introduces external dependency. Client-side speed testing prioritizes user experience over server-controlled precision. Real-time visualization trades performance for engaging UX.

Database Modeling

Firebase Firestore collections: 'speedtests' (test results with userId, speeds, latency, timestamp), 'leaderboard' (aggregated stats by ISP/location), 'users' (profile info). Denormalized structure for fast queries. Real-time listeners on leaderboard for live updates. Composite indexes for filtering by ISP, speed range, and date ranges.

Scaling Plan

Utilize Firestore's auto-scaling on collection reads/writes. Implement caching layer for leaderboard aggregations. Edge functions for regional data processing. Add read replicas for high-traffic regions. Batch CSV exports to prevent memory spikes. Consider Firestore sharding if single collection exceeds 10M documents.

Repository Insights

Initialized2024-07-09
Last Commit2026-07-09
Source Size632 KB
VisibilityPrivate