Skip to content

ny-collins/internet_speed_test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

362 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SpeedCheck ⚑

Test your real-world international internet speed with production-grade performance

Live Demo Regional Demo License: MIT Audit System

πŸš€ Try it live β€’ 🌍 Africa-Optimized β€’ πŸ“š Learn More

🎯 What Makes SpeedCheck Different?

SpeedCheck measures your real-world international connectivity with a distributed global architecture:

Feature SpeedCheck Traditional Speed Tests
Server Location Amsterdam, Netherlands (Primary) + Nairobi, Kenya (Regional) Nearest server
What It Measures Real international performance with geographic optimization Local network capacity
Architecture Production-grade with Web Workers, comprehensive audit system Basic client-side testing
Use Case Global content streaming, international calls, CDN performance Local ISP testing

✨ Key Features

  • ⚑ Real-time Testing - Live gauge with download, upload, latency & jitter using Web Workers
  • πŸ“Š Variance Graph - Real-time speed visualization with bufferbloat detection (stability analysis)
  • 🎯 Measurement Quality - Confidence scoring (0-100%) with detailed quality indicators
  • πŸ§ͺ Physics-Aware Analysis - Educational context explaining latency, jitter, and speed results based on distance and routing
  • πŸ“Š Transparent Metrics - Sample counts, outlier detection, measurement methodology visible
  • 🌍 Geographic Context - Distance calculation, network type detection, server location display
  • πŸ“ˆ History & Statistics - Local storage with averages, trends, and test count (privacy-focused)
  • πŸ› οΈ PWA Support - Add to home screen for app-like experience with background sync
  • πŸ”’ Zero Dependencies - Pure vanilla JavaScript, fast loading, secure by design
  • πŸ“š Comprehensive Audit - Built-in monitoring system for performance & security validation
  • πŸŽ“ Educational Content - Learn page explaining internet concepts and performance metrics
  • β™Ώ Accessibility - Screen reader support, ARIA labels, keyboard navigation
  • πŸ”¬ Scientific Accuracy - TCP slow start compensation with statistical outlier removal (MAD)
  • πŸ’Ž Visual Polish - Smooth animations, loading skeletons, button interactions, tabular numbers
  • 🌐 Dual Deployment - Europe (Railway) + Africa (Cloudflare) for optimized global access
  • πŸ›‘οΈ Production Security - HSTS, CSP, security headers, X-Powered-By removal, helmet.js protection

πŸš€ Quick Start

🌐 Live Demos

πŸ” Run System Audit

# Comprehensive health check (11 test phases)
./audit.sh

πŸ’» Local Development

# Clone repository
git clone https://github.com/ny-collins/internet_speed_test.git
cd internet_speed_test

# Install dependencies
cd backend && npm install
cd ../frontend && npm install

# Run locally
cd backend && npm run dev  # API server on :3000
cd ../frontend && npm start  # Frontend on :8080

⚠️ Important: Test against live deployments for accurate results. Local testing shows unrealistic speeds.

πŸ—οΈ Architecture

SpeedCheck uses a production-grade distributed architecture with Web Workers for optimal performance:

System Components

  • Frontend: Pure HTML/CSS/JS with Web Workers for heavy computation
  • Backend: Node.js + Express API with pre-generated buffers for CPU efficiency
  • Deployment: Railway (EU West) + Cloudflare Pages (Africa regional)
  • Audit System: Comprehensive 11-phase monitoring and health checks

Performance Optimizations

  • 🧡 Web Workers: Heavy stream processing off main thread prevents UI blocking
  • ⚑ Progressive Enhancement: Device-aware update intervals (50-200ms)
  • 🧠 Memory Management: Pre-allocated buffers prevent GC pauses during tests
  • 🎯 Idle Task Scheduling: Non-critical monitoring during browser idle periods
  • πŸ”„ Request Caching: 24-hour CORS preflight caching for instant repeated tests

Geographic Distribution

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Nairobi       β”‚    β”‚   Amsterdam     β”‚
β”‚   (Cloudflare)  │◄──►│   (Railway)     β”‚
β”‚   Frontend      β”‚    β”‚   Backend       β”‚
β”‚   14ms latency  β”‚    β”‚   180ms latency β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β–²                       β–²
         β”‚ 3x faster for         β”‚ Global users
         β”‚ African users         β”‚

πŸ” Audit System

SpeedCheck includes a comprehensive 11-phase audit system for production monitoring:

./audit.sh  # Run complete system health check

Audit Coverage:

  • βœ… Geographical Latency - User perspective performance
  • βœ… Infrastructure Forensics - Cloudflare location verification
  • βœ… Backend Handshake Analysis - Connection overhead measurement
  • βœ… Security & CORS Compliance - Access control validation
  • βœ… Cache Optimization - Preflight caching verification
  • βœ… Performance Deep Dive - Response consistency & cold starts
  • βœ… Security Headers & SSL - Certificate & header validation (HSTS, CSP, X-Frame-Options)
  • βœ… Network & Protocol Tests - IPv6, HTTP/2, compression
  • βœ… Load & Stress Testing - Concurrent requests & rate limiting
  • βœ… Error Handling & Edge Cases - Robustness validation
  • βœ… Frontend Specific Tests - SEO, caching, page optimization

πŸ“‹ Recent Updates

v1.69.0 (Current)

  • πŸ§ͺ Physics-Aware Analysis - Educational explanations replacing subjective quality badges (speed-of-light calculations, routing context)
  • 🎨 UI Refinements - 45:55 split ratio, secondary metrics layout (compact ping/jitter), transparent gauge styling
  • πŸ“Š Complete Graph History - Removed 50-sample limit, all data shown with horizontal compression
  • πŸ› Critical Fixes - JavaScript selectors updated for secondary metrics, eslint compliance achieved
  • πŸ’Ž Gauge Sizing - Increased to 360px for better visual impact, resolved CSS conflicts

v1.66.0

  • 🎨 Desktop UI Overhaul - Two-column layout with sticky gauge and hierarchical results matrix
  • πŸ“Š Real-time Variance Graph - Canvas-based speed visualization with bufferbloat detection (stability <10% excellent, >30% poor)
  • πŸ“– Interactive Accordion Footer - 6 expandable sections for methodology, privacy, and educational content
  • 🎯 Enhanced Start Button - 360px circular gradient design with pulse animation
  • ⚑ Real-time Data Collection - Rolling buffer at 100ms intervals for smooth graph updates

v1.65.0

  • πŸ”¬ Scientific Measurement Accuracy - TCP slow start compensation with byte tracking for professional-grade results
  • πŸ“ˆ Bufferbloat Detection - Loaded latency measurement during active transfers for network quality analysis
  • ⚑ Enhanced Responsiveness - Asynchronous completion handling prevents UI freezing during test results
  • πŸ› Critical Bug Fixes - Race condition resolution, cancellation logic fix, ES module integration

v1.64.0

  • πŸš€ Production-Grade Architecture - Web Workers implementation for smooth 60fps UI during speed tests
  • πŸ“Š Comprehensive Audit System - 11-phase automated monitoring and health checks
  • 🌍 Geographic Optimization - Dual deployment: Europe (Railway) + Africa (Cloudflare)

v1.63.0

  • ⚑ Performance Optimizations - Progressive enhancement, idle task scheduling, frame monitoring
  • πŸ›‘οΈ Security Improvements - PWA update banner security fix
  • πŸ”§ Critical Bug Fixes - Module imports, speed calculations, sparkline rendering

🎨 Recent Enhancements (v1.0.0)

Phase 1-5 Implementation Complete

Measurement Quality Visibility

  • Confidence scoring (0-100%) for all test types (download/upload/latency)
  • Color-coded indicators: High (β‰₯85%), Medium (70-84%), Low (50-69%), Very Low (<50%)
  • Detailed modals with sample counts, outlier info, and methodology
  • 5-factor confidence calculation for speed tests, 3-factor for latency

Geographic Context

  • Real-time distance calculation to Amsterdam server
  • Network type detection (WiFi, 4G, etc.) via Network Information API
  • Test context panel with server location, distance, connection, timestamp
  • Geolocation integration with Great Circle distance formula

Local History & Statistics

  • localStorage-based history (50 test limit)
  • Privacy notice: "History stored locally on this device only"
  • Aggregate statistics: average download/upload/latency, test count
  • Chart visualization with export/clear functionality

Learn Page Integration

  • Tooltip helper functions for contextual education
  • Smooth navigation from results to learning content
  • Enhanced accessibility and mobile responsiveness

Visual Polish

  • Tabular numerals for consistent number display
  • Smooth number counting animations with easing
  • Button ripple effects and micro-interactions
  • Loading skeletons with shimmer animations
  • Professional tooltip system with positioning
  • Pulse animations for loading states

See DEPLOYMENT_CHECKLIST.md for complete implementation details.

πŸ“„ License

MIT License - see LICENSE for details.


πŸ“š Documentation

  • Architecture - System architecture, test flow, and API reference
  • Design - Design decisions and technical rationale
  • Deployment - Deployment guide and environment configuration
  • Security - Security architecture and audit results
  • Changelog - Version history and release notes

About

Resources

License

Security policy

Stars

Watchers

Forks

Contributors