@fuelex/speedy-spot
v0.1.0
Published
Distributed worker and cluster framework for Discord music bots with Spotify integration
Readme
Speedy-Spot
Speedy-Spot is an open-source custom worker and cluster system for high-traffic Discord music bots using Spotify login and playlist access.
Goals
- Isolate workloads with workers and cluster orchestration
- Reduce load and improve request latency under heavy traffic
- Provide resilient queue processing with retries and dead-letter handling
- Expose operational metrics and health endpoints
- Deliver complete MkDocs documentation hosted on GitHub Pages
Project Status
Foundation bootstrapped in JavaScript with:
src/clustershard and worker orchestrationsrc/workersworker runtime and job executionsrc/queuepluggable queue provider (memoryandredis)src/authSpotify OAuth session, retry-aware token refresh, and playlist sync pipelinesrc/lavalinkLavalink client, node failover, shard/cluster routing, voice updates, and player dispatchsrc/apioperational HTTP API with strict job validation and admin token authsrc/playbackguild-level execution coordinationsrc/telemetrystructured logging + in-memory metrics
Quick Start
npm install
npm run startServer defaults to http://localhost:3000.
Useful Endpoints
GET /healthGET /metricsGET /clustersGET /auth/spotify/url?userId=<id>POST /jobsenqueue validated jobsPOST /auth/spotify/callbackexchange auth code for token
Key Environment Variables
QUEUE_PROVIDER=memory|redis(defaultmemory)REDIS_URL=redis://localhost:6379REDIS_KEY_PREFIX=speedyspotTOKEN_STORE_PROVIDER=memory|file|encrypted-file(defaultmemory)TOKEN_STORE_FILE=./.speedyspot-tokens.jsonTOKEN_STORE_ENCRYPTION_KEY=<32-byte base64 or 64-char hex>required forencrypted-fileADMIN_API_TOKEN=<secret>(optional; enables header auth for control endpoints)SPOTIFY_MOCK_MODE=true|false(defaulttrue)SPOTIFY_CLIENT_ID,SPOTIFY_CLIENT_SECRET,SPOTIFY_REDIRECT_URISPOTIFY_MAX_RETRIES,SPOTIFY_RETRY_BASE_MSLAVALINK_NODESJSON array of nodes, example:[{"id":"main","url":"http://127.0.0.1:2333","password":"youshallnotpass","sessionId":"abc123"}]LAVALINK_DEFAULT_SOURCE(defaultspsearch)
Documentation
- Sources:
docs/ - MkDocs config:
mkdocs.yml - Local docs serve:
npm run docs:serve
