A comprehensive web-based debugging tool for RusticAI's Redis messaging system. This tool provides real-time and historical visualization of message flow through Redis topics and guilds.
- Guild Discovery: Automatic discovery of Redis guilds and topics
- Real-time Monitoring: Live message streaming via WebSocket
- Message Inspection: Detailed view of message payloads, metadata, and routing
- Visual Flow: Message flow visualization with React Flow
- Filtering: Advanced filtering by status, time range, and agents
- Export: Export message data in JSON or CSV format
- Thread View: Track message threads and conversations
- Developer Presence: See which developers are currently monitoring
This is a monorepo project using PNPM workspaces:
rustic-debug/
├── packages/
│ └── types/ # Shared TypeScript types
├── backend/ # Node.js/Fastify backend
├── frontend/ # React frontend
└── specs/ # Project specifications
- Node.js 18+
- PNPM 8+
- Redis 7+ (for production) or tests will use ioredis-mock
-
Install dependencies:
pnpm install
-
Development mode:
pnpm dev
This starts:
- Backend on http://localhost:3001
- Frontend on http://localhost:5173
-
Run tests:
pnpm test
-
Build for production:
pnpm build
Create a .env
file in the backend directory:
# Redis Configuration
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=
REDIS_DB=0
REDIS_KEY_PREFIX=
# Server Configuration
PORT=3001
LOG_LEVEL=info
# CORS Configuration
CORS_ORIGIN=http://localhost:5173
The frontend automatically connects to the backend based on the current host.
The project uses ioredis-mock for testing, eliminating the need for a real Redis instance:
# Run all tests
pnpm test
# Run backend tests
cd backend && pnpm test
# Run frontend tests
cd frontend && pnpm test
To use a real Redis instance for testing instead:
- Start Redis locally
- Remove the ioredis mock from test setup files
- Set Redis environment variables
- Run tests
-
Backend: Fastify-based REST API with WebSocket support
/api/routes/
- HTTP endpoints/api/websocket/
- WebSocket handlers/services/
- Business logic and Redis operations
-
Frontend: React 18 with TypeScript
/components/
- UI components/hooks/
- Custom React hooks/services/
- API and WebSocket clients/stores/
- Zustand state management
GET /health
- Health checkGET /guilds
- List all guildsGET /guilds/:id
- Get guild detailsGET /guilds/:id/topics
- List guild topicsGET /guilds/:id/topics/:name/messages
- Get topic messagesPOST /export
- Export messagesDELETE /cache/:pattern
- Clear cache
Connect to /ws
for real-time updates:
subscribe
- Subscribe to guild/topic messagesunsubscribe
- Unsubscribe from updatesmessage
- Incoming message eventstats
- Connection statistics
-
Build the project:
pnpm build
-
Set production environment variables
-
Start the backend:
cd backend pnpm start
-
Serve the frontend: The frontend build is in
frontend/dist/
- serve with any static file server.
This project follows Test-Driven Development (TDD) principles:
- Write failing tests first
- Implement features to make tests pass
- Refactor while keeping tests green
MIT