Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
e8d2aed
chore: remove duplicate extension files from server directory
ajithakdev Mar 19, 2026
b9b8f0f
feat: restructure to npm workspaces monorepo
ajithakdev Mar 19, 2026
abef331
security: harden server with CORS, rate limiting, and input validation
ajithakdev Mar 19, 2026
8fd5785
feat: migrate extension and server to TypeScript
ajithakdev Mar 19, 2026
07e3da7
feat: complete UI/UX overhaul with gauges, history, and accessibility
ajithakdev Mar 19, 2026
ed1348a
chore: add CI/CD, testing, and open-source documentation
ajithakdev Mar 19, 2026
bb64140
fix: add start and dev scripts to root package.json
ajithakdev Mar 19, 2026
0e1253c
feat: redesign UI with glassmorphic dark theme and ring gauges
ajithakdev Mar 19, 2026
20319f5
feat: compact UI redesign — smaller popup, speed bars, no scrollbar
ajithakdev Mar 19, 2026
4a8ae9a
feat: add Cloudflare Worker for edge speed testing + fix server trust…
ajithakdev Mar 20, 2026
2883597
feat: configurable server URL + accuracy improvements in speed test
ajithakdev Mar 20, 2026
eacf2f3
feat: add settings page with server configuration
ajithakdev Mar 20, 2026
8d8ed03
feat: popup UI polish — use-case labels, PDF export, close/settings b…
ajithakdev Mar 20, 2026
a4e719a
chore: switch license from MIT to AGPL-3.0
ajithakdev Mar 20, 2026
921ada2
docs: rewrite all documentation for current architecture
ajithakdev Mar 20, 2026
6a77af5
chore: add trademark policy to protect MeterX brand
ajithakdev Mar 20, 2026
59bda32
docs: fix CI badge, add author contact details
ajithakdev Mar 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Bug Report
about: Report a bug in MeterX
title: "[Bug] "
labels: bug
---

**Browser & Version:**


**Extension Version:**


**Steps to Reproduce:**
1.
2.
3.

**Expected Behavior:**


**Actual Behavior:**


**Console Errors (if any):**

```

```
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: Feature Request
about: Suggest a feature for MeterX
title: "[Feature] "
labels: enhancement
---

**Description:**


**Use Case:**


**Proposed Solution (optional):**

69 changes: 69 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
lint-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20, 22]

steps:
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint

- name: Type check server
run: cd packages/server && npx tsc --noEmit

- name: Type check extension
run: cd packages/extension && npx tsc --noEmit

- name: Build
run: npm run build

- name: Test server
run: npm run test

build-extension:
runs-on: ubuntu-latest
needs: lint-and-test
if: github.ref == 'refs/heads/main'

steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build extension
run: npm run build

- name: Package extension
run: cd packages/extension/dist && zip -r ../../../meterx-extension.zip .

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: meterx-extension
path: meterx-extension.zip
23 changes: 21 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,27 @@
# .gitignore
# Dependencies
node_modules/

# Build output
dist/
test-files/

# Environment
.env

# Logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
extension/node_modules/

# IDE
.idea/
.vscode/
*.swp

# OS
.DS_Store
Thumbs.db

# Extension package
*.zip
*.crx
10 changes: 10 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# MeterX — Authors & Contributors
#
# This file lists everyone who has contributed to MeterX.
# If you submit a PR, add your name here.

# Creator & Maintainer
Ajith Kumar K <ajithkumarks2579@gmail.com> (https://github.com/ajithakdev)

# Contributors
# Your name here — PRs welcome!
98 changes: 98 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# Changelog

## 2026.0.320-MR1.1 — "Edge Migration" — 2026-03-20

### Added
- Cloudflare Worker (`packages/worker/`) — serverless edge speed test server
- Streaming download via ReadableStream (1/5/10/25 MB)
- Upload endpoint (drains body, no storage)
- Ping endpoint (HEAD/GET) for latency
- Health endpoint with edge location from cf-ray header
- CORS support for browser extensions
- Deployed at 300+ edge locations globally, zero cold starts
- Use-case readiness labels — Calls, Streaming, Gaming, Uploads with color indicators
- PDF health report export (html2canvas + jsPDF)
- Dark theme matching the extension UI
- Quality assessment, trend analysis, anomaly detection
- Use-case assessment with color-coded cards
- Full test history table with pagination
- Watermark, footer with version and license
- Settings page (`options.html`) for server configuration
- Radio presets: Cloudflare Edge vs Custom Server
- Auto-checks connection status with edge location display
- Latency measurement to configured server
- Runtime host permission request for custom URLs
- Configurable server URL via `chrome.storage.sync`
- Connection warm-up (HEAD /ping) before download and upload tests
- Streaming download with live speed updates during test
- Buffer drain delay between upload and ping (prevents bufferbloat)
- Close button (SVG icon, glass style) on popup and settings page
- Settings gear icon in popup header
- Heart icon next to author name in footer
- Animated number counting on hero speed display
- Progress step animation (DL -> UL -> Ping) with connecting line fills
- Last test result persisted and shown on popup reopen
- "Last test: Xm ago" timestamp display
- History quality dots (color-coded by test quality)

### Changed
- Default server: Render -> Cloudflare Worker edge network
- Download test size: 5 MB -> 10 MB for better TCP ramp-up accuracy
- History display: 20 -> 7 most recent (200 stored for 30-day reports)
- License: MIT -> AGPL-3.0
- Popup width reduced for cleaner toolbar integration
- Speed unit display: "MBPS" corrected to "Mbps"
- PDF export: jsPDF coordinate-based -> html2canvas + jsPDF image-based
- Privacy policy updated for Cloudflare Workers architecture

### Fixed
- Express trust proxy setting for Render rate-limit error
- Bufferbloat inflating ping/jitter measurements after upload test
- PDF table headers forced to uppercase via CSS text-transform
- Extension UI briefly shrinking during PDF generation
- Blank PDF pages when container used opacity:0

### Removed
- Render as default/primary server (kept as self-host option)
- jsPDF coordinate-based PDF generation (replaced with html2canvas approach)

---

## 2026.0.319-MR1.0 — "Major Rewrite One" — 2026-03-19

### Added
- Monorepo structure with npm workspaces (`packages/server`, `packages/extension`)
- TypeScript for both server and extension with esbuild bundling
- Compact UI with speed bars, quality badge, and glassmorphic dark theme
- Test history persisted to `chrome.storage.local` (last 200 results)
- Cancel button to abort tests mid-run
- Connection quality rating (Excellent / Good / Fair / Poor)
- Packet loss percentage reporting
- Segmented progress bar (Download -> Upload -> Ping)
- Offline detection with automatic UI updates
- Badge indicator showing last download speed on extension icon
- Server rate limiting (ping: 60/min, download/upload: 10/min)
- CORS restricted to known origins and browser extensions
- Input validation on all server endpoints
- Health check endpoint (`GET /health`)
- Variable download test sizes (1, 5, 10, 25 MB)
- Vitest + supertest server test suite (8 tests)
- GitHub Actions CI pipeline (lint, type-check, build, test)
- Content Security Policy in extension manifest
- Accessibility improvements (aria-live, aria-label, keyboard navigation)

### Changed
- Migrated from vanilla JavaScript to TypeScript
- Restructured from flat layout to npm workspace monorepo
- Reduced upload body limit from 200MB to 10MB

### Removed
- Duplicate extension files from server directory

---

## 0.2.0 — Initial Development

- Basic speed test extension with download, upload, ping, jitter
- Express.js server with test file generation
- Simple popup UI
86 changes: 86 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Contributing to MeterX

Here's how to get set up and contribute.

## Dev Setup

```bash
git clone https://github.com/ajithakdev/meterx-server.git
cd meterx-server
npm install
npm run build
```

## Load the Extension

1. Go to `chrome://extensions` (or `edge://extensions`)
2. Enable "Developer mode"
3. Click "Load unpacked"
4. Select `packages/extension/dist/`

Rebuild with `npm run build` after changes, then hit reload on the extensions page.

## Run the Worker Locally

```bash
cd packages/worker
npx wrangler dev
```

This starts a local Cloudflare Worker on `http://localhost:8787`. Update the server URL in the extension settings to point here.

## Run the Server Locally

```bash
npm start
```

Starts the Express.js self-host server. Useful for LAN testing or when you don't want to touch the worker.

## Project Structure

```text
packages/
extension/ # Browser extension (TypeScript, Manifest V3, esbuild)
worker/ # Cloudflare Worker — primary serverless backend
server/ # Express.js server — self-host fallback
```

## Commands

| Command | What it does |
|---------|-------------|
| `npm install` | Install all workspace deps |
| `npm run build` | Build all packages |
| `npm start` | Run self-host server |
| `npm test` | Run all tests |
| `npm run lint` | ESLint check |
| `npm run lint:fix` | Auto-fix lint issues |
| `npm -w @meterx/server run test` | Run server tests only |
| `cd packages/worker && npx wrangler dev` | Run worker locally |
| `cd packages/worker && npx wrangler deploy` | Deploy worker to Cloudflare |

## Code Style

- TypeScript everywhere — no plain JS
- ESLint with strict rules, run `npm run lint` before committing
- Prefix unused parameters with `_`
- Keep functions short and focused
- Throw errors, don't return sentinel values
- No `any` unless absolutely necessary

## Pull Requests

1. Fork the repo, branch from `main`
2. Make your changes
3. Run `npm run lint && npm run build && npm test` — all must pass
4. Open a PR with a clear description of what changed and why
5. One approval required to merge

## Reporting Bugs

Open an issue with:
- Browser and version
- Steps to reproduce
- Expected vs actual behavior
- Console errors if applicable
Loading
Loading