AllTraxx

Private beta diagnostics

AllTraxx Mission Control

The field inbox for Darren's module data: phone bundles upload to R2, Discord pings the team, and every zip stays downloadable for firmware, BLE, GPS, battery, and OTA analysis.

App Default
Auto-send on
Network
Wi-Fi only
Storage
Private R2
Alerts
Discord webhook

What this is

A field recorder inbox, not a public product backend.

The app stays local-first. This cloud path exists for the private beta cohort so free test devices can send engineering evidence while the riders are away from us. The upload receiver is small, private, and replaceable.

Data flow

From BLE stream to a zip you can inspect.

  1. 01

    Module streams facts

    The Heltec sends PXTRX/PXTRX2 diagnostics over BLE: GNSS, battery, CPU, heap, counters, boot reason, and command ACKs.

  2. 02

    Phone records locally

    SQLite stores app boots, BLE sessions, module samples, GPS source switches, OTA attempts, and recording quality events.

  3. 03

    Auto-send builds zip

    On Wi-Fi, at most every six hours, Settings auto-send creates a standalone diagnostics bundle for the last seven days.

  4. 04

    Worker stores first

    Cloudflare R2 receives the zip and a JSON sidecar before the Discord alert is queued, so notification failure never loses data.

Setup

Create the inbox once.

These commands create the private bucket, store the Discord webhook as a Worker secret, and deploy the upload endpoint the app points at.

Paste the webhook only into Wrangler's secret prompt. It should never appear in repo files, shell history, or public env vars.

1. Cloudflare bucket

WRANGLER="npm exec --yes --ignore-scripts --package wrangler@4.107.0 -- wrangler"
$WRANGLER login
$WRANGLER r2 bucket create alltraxx-diagnostics

2. Worker secret

WRANGLER="npm exec --yes --ignore-scripts --package wrangler@4.107.0 -- wrangler"
cd scripts/diagnostics-worker
$WRANGLER secret put DISCORD_WEBHOOK_URL

3. Deploy receiver

WRANGLER="npm exec --yes --ignore-scripts --package wrangler@4.107.0 -- wrangler"
cd scripts/diagnostics-worker
$WRANGLER deploy

4. App endpoint

EXPO_PUBLIC_ALLTRAXX_DIAGNOSTICS_UPLOAD_URL=https://alltraxx-diagnostics.codingfoxcorp.workers.dev/upload

After Discord pings

Pull the exact bundle by R2 key.

The Discord embed includes the object key and a ready-to-run command. Store downloads outside the repo when doing ad hoc triage.

Download and inspect

mkdir -p downloads
npm exec --yes --ignore-scripts --package wrangler@4.107.0 -- wrangler r2 object get alltraxx-diagnostics/<key-from-discord> --file downloads/<bundle-name>.zip --remote
unzip -l downloads/<bundle-name>.zip
unzip -p downloads/<bundle-name>.zip manifest.json | jq .
unzip -p downloads/<bundle-name>.zip telemetry/events.json | jq '.[-20:]'

First-pass triage

What to open when something feels weird.

Question Start here Signal
Did the module reboot or brown out? module-samples.json kind: "BOOT", reset, wake, boot count
Was GPS degraded? module-samples.json GNSS sats, HDOP, fix, hAcc/vAcc merge
Did BLE drop? ble-sessions.json status, RSSI samples, parse errors
Did the app fall back to phone GPS? events.json gps/source_switch
Did OTA get blocked or fail? ota-attempts.json status, blocked reason, bytes sent
Was the recorder itself strained? manifest.json telemetry queue depth and drop counters

Beta defaults

Good data without making Darren babysit it.

Auto-send is on by default for the private beta, Wi-Fi only by default, and manual share appears when auto-send is turned off. Route sharing is also opt-in controlled in Settings.

Auto-send module diagnostics On
Upload network Wi-Fi
Send interval 6h minimum
Route sharing On for beta

Preorder inbox

Supabase only when it earns its keep.

The public preorder form posts to /api/preorder. It writes to the AllTraxx Supabase project, then sends a Discord alert so new interest does not disappear into a quiet table.

Never expose the service-role key in static HTML or client-side JavaScript. The browser calls our Vercel function; the function calls Supabase.

1. Supabase project

Project: AllTraxx
Ref: gqtlwaktiexgnblnybss
Migration: admin-site/supabase/migrations/20260702204000_preorder_intents.sql

2. Vercel env vars

Installed in coding-fox-corp/alltraxx-admin production:
ALLTRAXX_SUPABASE_URL
ALLTRAXX_SUPABASE_SERVICE_ROLE_KEY
ALLTRAXX_PREORDER_DISCORD_WEBHOOK_URL

3. Smoke test

/usr/bin/curl -sS https://alltraxx.codingfox.ai/api/preorder \
  -H 'content-type: application/json' \
  --data '{"name":"Smoke Test","email":"smoke@example.com","quantity":"1"}' | jq .

Admin site

Claim alltraxx.codingfox.ai.

This site is static and deploys from admin-site/. Vercel owns hosting; GoDaddy only needs the subdomain DNS record.

Deploy to Vercel

cd admin-site
npx vercel --prod

DNS target

Type
A
Name
alltraxx
Value
76.76.21.21
Host
alltraxx.codingfox.ai
AllTraxx map HUD screenshot

Source docs in repo

The detailed runbooks live in docs/: telemetry flight recorder, field checklist, R2 pipeline, and diagnostics ingestion.