How mahisiddhant0-oss/redistack works
Redistack is a TypeScript/Fastify learning application demonstrating Redis-backed patterns through both API routes and standalone demos. The main request workflow enters through the server and API, which dispatches to feature stores and returns results; leaderboard updates also trigger live notifications delivered over WebSockets. The README documents additional job-queue capabilities beyond the sampled routes. Relationships for those features are shown only where documentation or excerpts support them; unsampled route details are not inferred.
Main entry points: app.ts Fastify API · notification-service.ts Notification service · server.ts Server entry · leaderboard-store.ts Leaderboard store
Components 16
API runtime
- Server entry
src/server.ts - Fastify API
src/app.ts - Runtime metrics
src/runtime-metrics.ts - Redis client
src/redis-client.ts - Redis configuration
src/redis-config.ts
Redis patterns
- Cache store
src/cache-store.ts - Session store
src/session-store.ts - Rate limiter
src/rate-limiter.ts - Leaderboard store
src/leaderboard-store.ts
Live notifications
- Notification service
src/notification-service.ts
Background jobs
- Job queue
src/job-queue.ts
Redis visualizer
- Visualizer UI
public/visualizer.js
Other components
- API user
- WebSocket clients
- Browser user
- Redis
Connections 23
- API user → Server entry: sends requests
README.md - Server entry → Fastify API: builds and serves
src/server.ts - Fastify API → Runtime metrics: records and reads
src/app.ts - Fastify API → Cache store: dispatches cache routes
src/app.ts - Fastify API → Session store: dispatches session routes
src/app.ts - Fastify API → Rate limiter: checks request limits
src/app.ts - Fastify API → Leaderboard store: dispatches score queries
src/app.ts - Fastify API → Notification service: registers listeners
src/app.ts - Leaderboard store → Notification service: publishes score event
README.md - Notification service → WebSocket clients: forwards events
README.md - WebSocket clients → Fastify API: opens WebSocket
README.md - Fastify API → Job queue: dispatches job routes
src/app.ts - Browser user → Visualizer UI: uses dashboard
README.md - Visualizer UI → Fastify API: calls API
README.md - Fastify API → Visualizer UI: serves assets
src/app.ts - Redis client → Redis configuration: creates client
src/redis-client.ts - Server entry → Redis client: uses connection
src/server.ts - Cache store → Redis: reads and writes
src/cache-store.ts - Session store → Redis: reads and writes
src/session-store.ts - Rate limiter → Redis: runs atomic counters
src/rate-limiter.ts - Leaderboard store → Redis: reads and writes scores
src/leaderboard-store.ts - Notification service → Redis: publishes and subscribes
src/notification-service.ts - Job queue → Redis: stores and claims jobs
src/job-queue.ts