🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

Realtime Dashboard

by @wpank

Complete guide to building real-time dashboards with streaming data, WebSocket/SSE, and live updates. Orchestrates dual-stream architecture, React hooks, and data visualization. Use when building trading dashboards, monitoring UIs, or live analytics. Triggers on realtime dashboard, live data, streaming dashboard, trading UI, monitoring.

Versionv1.0.0
Downloads1,673
TERMINAL
clawhub install realtime-dashboard

πŸ“– About This Skill


name: realtime-dashboard model: reasoning description: Complete guide to building real-time dashboards with streaming data, WebSocket/SSE, and live updates. Orchestrates dual-stream architecture, React hooks, and data visualization. Use when building trading dashboards, monitoring UIs, or live analytics. Triggers on realtime dashboard, live data, streaming dashboard, trading UI, monitoring.

Real-Time Dashboard (Meta-Skill)

Complete guide to building real-time dashboards with streaming data.

Installation

OpenClaw / Moltbot / Clawbot

npx clawhub@latest install realtime-dashboard


When to Use

  • Building trading or financial dashboards
  • Monitoring and analytics UIs
  • Any dashboard needing live data updates
  • Systems with server-to-client push requirements

  • Architecture Overview

    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚                    Data Sources                              β”‚
    β”‚  APIs, Databases, Message Queues                            β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                β”‚
                                β–Ό
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚                    Backend Services                          β”‚
    β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
    β”‚  Kafka (durable)     β”‚     Redis Pub/Sub (real-time)       β”‚
    β”‚  See: dual-stream-architecture                               β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                β”‚
                                β–Ό
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚                    WebSocket/SSE Gateway                     β”‚
    β”‚  See: websocket-hub-patterns                                 β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                β”‚
                                β–Ό
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚                    React Application                         β”‚
    β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
    β”‚  Real-time Hooks          β”‚  Data Visualization             β”‚
    β”‚  See: realtime-react-hooksβ”‚  See: financial-data-visualization
    β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
    β”‚  Animated Displays        β”‚  Connection Handling            β”‚
    β”‚  See: animated-financial  β”‚  See: resilient-connections     β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
    


    Implementation Steps

    Step 1: Event Publishing

    Set up dual-stream publishing for durability + real-time.

    Read: ai/skills/realtime/dual-stream-architecture

    func (p *DualPublisher) Publish(ctx context.Context, event Event) error {
        // 1. Kafka: Must succeed (durable)
        err := p.kafka.WriteMessages(ctx, kafka.Message{...})
        if err != nil {
            return err
        }

    // 2. Redis: Best-effort (real-time) p.publishToRedis(ctx, event) return nil }

    Step 2: WebSocket Gateway

    Create horizontally-scalable WebSocket connections.

    Read: ai/skills/realtime/websocket-hub-patterns

    type Hub struct {
        connections   map[*Connection]bool
        subscriptions map[string]map[*Connection]bool
        redisClient   *redis.Client
    }

    // Lazy Redis subscriptions func (h *Hub) subscribeToChannel(conn *Connection, channel string) { // Only subscribe to Redis on first local subscriber }

    Step 3: React Hooks

    Connect React to real-time data.

    Read: ai/skills/realtime/realtime-react-hooks

    const { data, isConnected } = useSSE({ 
      url: '/api/events',
      onMessage: (data) => updateState(data),
    });

    // Or with SWR integration const { data } = useRealtimeData('metrics', fetchMetrics);

    Step 4: Resilient Connections

    Handle connection failures gracefully.

    Read: ai/skills/realtime/resilient-connections

    const { isConnected, send } = useWebSocket({
      url: 'wss://api/ws',
      reconnect: true,
      maxRetries: 5,
      onMessage: handleMessage,
    });
    

    Step 5: Data Visualization

    Build dark-themed financial charts.

    Read: ai/skills/design-systems/financial-data-visualization

    = 0} 
    />
    

    Step 6: Animated Displays

    Add smooth number animations.

    Read: ai/skills/design-systems/animated-financial-display

    
    
    


    Component Skills Reference

    | Skill | Purpose | |-------|---------| | dual-stream-architecture | Kafka + Redis publishing | | websocket-hub-patterns | Scalable WebSocket server | | realtime-react-hooks | SSE/WebSocket React hooks | | resilient-connections | Retry, circuit breaker | | financial-data-visualization | Chart theming | | animated-financial-display | Number animations |


    Key Patterns

    Streaming Over Blocking

    Never wait for all data. Show immediately, improve progressively:

    Phase 1: Initial data + hints      β†’ Immediate display
    Phase 2: Background refinement     β†’ Prices update in place
    Phase 3: Historical data           β†’ Charts populate
    

    Additive-Only Updates

    Never zero out data when refinement fails. Only update when you have *better* data.

    Connection Status

    Always show users their connection state:

    
    


    NEVER Do

  • Never block on data fetching β€” Show immediately, refine progressively
  • Never skip connection status indicators β€” Users need to know they're live
  • Never use polling when SSE/WebSocket available β€” Real-time means push, not pull
  • Never forget graceful degradation β€” System should work (degraded) when connection lost
  • Never zero out data on refinement failure β€” Only update when you have *better* data
  • Never reconnect without exponential backoff β€” Prevents thundering herd
  • Never skip Redis Pub/Sub failure handling β€” Redis is best-effort; log and continue
  • Never send full payloads over Redis β€” Send IDs only, clients fetch from API
  • Never share WebSocket pubsub across channels β€” Each channel needs own subscription
  • Never forget ping/pong on WebSocket β€” Load balancers close "idle" connections

  • Checklist

  • [ ] Set up dual-stream publishing (Kafka + Redis)
  • [ ] Create WebSocket/SSE gateway
  • [ ] Implement React hooks for real-time data
  • [ ] Add reconnection with exponential backoff
  • [ ] Build dark-themed chart components
  • [ ] Add animated number displays
  • [ ] Show connection status to users
  • [ ] Handle errors gracefully
  • ⚑ When to Use

    TriggerAction
    - Monitoring and analytics UIs
    - Any dashboard needing live data updates
    - Systems with server-to-client push requirements
    ---