smash-karts-chat

SmashKarts Chat

Real-time, mode-based chat for SmashKarts, built as:

What this does

Repository structure

Architecture (high level)

  1. Extension content scripts run on https://smashkarts.io/*
  2. Extension background worker opens WebSocket to backend /ws
  3. Backend authenticates user (google_access_token or play)
  4. Backend routes messages by normalized room (mode)
  5. Messages are broadcast to subscribers in the same room

Local development

Prerequisites

1) Run backend

cd /Users/prakharojha/Desktop/me/personal/smash-karts-chat/server
GOOGLE_CLIENT_ID=local-dev-placeholder BIND_ADDR=127.0.0.1:8080 cargo run

Notes:

2) Load extension unpacked

  1. Open Chrome: chrome://extensions
  2. Enable Developer mode
  3. Click “Load unpacked”
  4. Select /Users/prakharojha/Desktop/me/personal/smash-karts-chat/extension

Current source defaults:

3) Smoke test

curl http://127.0.0.1:8080/health
curl http://127.0.0.1:8080/metrics

Production deployment

Service configuration:

Environment variables:

Once deployed, verify:

curl https://<your-domain>/health
curl https://<your-domain>/metrics

Build production extension artifact

Use the packager to inject production URL + OAuth client ID into a clean release output:

cd /Users/prakharojha/Desktop/me/personal/smash-karts-chat
node scripts/package-extension.mjs \
  --server-url https://<your-domain> \
  --oauth-client-id <your-google-oauth-client-id>

Generated artifacts:

Chrome Web Store submission checklist

Load testing

cd /Users/prakharojha/Desktop/me/personal/smash-karts-chat/load-test
npm install
npm run light
npm run medium

Key endpoints

Troubleshooting

Healthcheck fails after deploy

Extension connects locally instead of production

Google sign-in fails

Security and privacy

License

Add your preferred license in this repository (e.g., MIT) before broad distribution.