{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "cdc-replication-stream",
  "title": "Cdc Replication Stream",
  "type": "registry:block",
  "files": [
    {
      "path": "packages/registry-react/blocks/cdc-replication-stream/CdcReplicationStream.tsx",
      "content": "'use client'\n\nimport * as React from 'react'\nimport {\n  Activity,\n  ArrowRight,\n  ArrowRightLeft,\n  Check,\n  ChevronDown,\n  ChevronRight,\n  Copy,\n  Database,\n  Download,\n  Filter,\n  Layers,\n  Pause,\n  Play,\n  RefreshCw,\n  Search,\n  Server,\n  ShieldCheck,\n  Terminal,\n  Zap,\n} from 'lucide-react'\nimport { cn } from '@/lib/utils'\nimport { Badge } from '@/components/ui/badge'\nimport { Button } from '@/components/ui/button'\nimport { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'\nimport { Input } from '@/components/ui/input'\nimport { Progress } from '@/components/ui/progress'\nimport { Separator } from '@/components/ui/separator'\nimport { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/components/ui/table'\n\nexport type CdcOperation = 'INSERT' | 'UPDATE' | 'DELETE'\n\nexport interface CdcTableMetric {\n  name: string\n  schema: string\n  primaryKey: string\n  syncedRows: number\n  replicationDelayMs: number\n  status: 'synchronized' | 'syncing' | 'paused'\n  operations: {\n    insertPercent: number\n    updatePercent: number\n    deletePercent: number\n  }\n  mode: string\n}\n\nexport interface CdcStreamEvent {\n  id: string\n  timestamp: string\n  table: string\n  operation: CdcOperation\n  primaryKey: string\n  binlogPosition: string\n  lsn: string\n  txId: string\n  summary: string\n  modifiedFields?: string[]\n  before?: Record<string, unknown>\n  after?: Record<string, unknown>\n}\n\nexport interface CdcReplicationStreamProps {\n  initialEvents?: CdcStreamEvent[]\n  initialTables?: CdcTableMetric[]\n  initialPaused?: boolean\n  initialOperationFilter?: 'all' | CdcOperation\n  initialSearch?: string\n  className?: string\n}\n\nconst defaultTables: CdcTableMetric[] = [\n  {\n    name: 'users',\n    schema: 'public',\n    primaryKey: 'id [UUID]',\n    syncedRows: 1842910,\n    replicationDelayMs: 12,\n    status: 'synchronized',\n    operations: {\n      insertPercent: 65,\n      updatePercent: 30,\n      deletePercent: 5,\n    },\n    mode: 'Continuous WAL',\n  },\n  {\n    name: 'orders',\n    schema: 'public',\n    primaryKey: 'order_id [BIGINT]',\n    syncedRows: 2145820,\n    replicationDelayMs: 16,\n    status: 'synchronized',\n    operations: {\n      insertPercent: 78,\n      updatePercent: 20,\n      deletePercent: 2,\n    },\n    mode: 'Continuous WAL',\n  },\n  {\n    name: 'transactions',\n    schema: 'public',\n    primaryKey: 'tx_hash [VARCHAR]',\n    syncedRows: 624300,\n    replicationDelayMs: 18,\n    status: 'synchronized',\n    operations: {\n      insertPercent: 92,\n      updatePercent: 7,\n      deletePercent: 1,\n    },\n    mode: 'Continuous WAL',\n  },\n  {\n    name: 'subscriptions',\n    schema: 'public',\n    primaryKey: 'sub_id [UUID]',\n    syncedRows: 208440,\n    replicationDelayMs: 14,\n    status: 'synchronized',\n    operations: {\n      insertPercent: 45,\n      updatePercent: 50,\n      deletePercent: 5,\n    },\n    mode: 'Continuous WAL',\n  },\n]\n\nconst defaultEvents: CdcStreamEvent[] = [\n  {\n    id: 'evt-cdc-104',\n    timestamp: '2026-08-21T14:32:05.812Z',\n    table: 'public.subscriptions',\n    operation: 'UPDATE',\n    primaryKey: 'sub_99a8b1c4',\n    binlogPosition: 'mysql-bin.000412 : 8492014',\n    lsn: '0/16B38E0',\n    txId: 'tx_883019',\n    summary: 'status: \"trialing\" → \"active\", plan: \"starter_monthly\" → \"enterprise_annual\", seats: 5 → 25',\n    modifiedFields: ['status', 'plan', 'seats', 'monthly_amount', 'trial_ends_at', 'updated_at'],\n    before: {\n      id: 'sub_99a8b1c4',\n      user_id: 'usr_44018',\n      plan: 'starter_monthly',\n      status: 'trialing',\n      seats: 5,\n      monthly_amount: 49.0,\n      auto_renew: true,\n      trial_ends_at: '2026-08-21T23:59:59Z',\n      updated_at: '2026-08-14T10:00:00Z',\n    },\n    after: {\n      id: 'sub_99a8b1c4',\n      user_id: 'usr_44018',\n      plan: 'enterprise_annual',\n      status: 'active',\n      seats: 25,\n      monthly_amount: 490.0,\n      auto_renew: true,\n      trial_ends_at: null,\n      updated_at: '2026-08-21T14:32:05Z',\n    },\n  },\n  {\n    id: 'evt-cdc-103',\n    timestamp: '2026-08-21T14:32:04.195Z',\n    table: 'public.orders',\n    operation: 'INSERT',\n    primaryKey: 'ord_8819203',\n    binlogPosition: 'mysql-bin.000412 : 8491820',\n    lsn: '0/16B3698',\n    txId: 'tx_883018',\n    summary: 'New checkout order created for $1,280.00 (Customer: usr_99120, 3 line items)',\n    modifiedFields: [],\n    after: {\n      order_id: 'ord_8819203',\n      customer_id: 'usr_99120',\n      currency: 'USD',\n      total_amount: 1280.0,\n      tax_amount: 102.4,\n      status: 'paid',\n      payment_gateway: 'stripe_card',\n      shipping_country: 'US',\n      created_at: '2026-08-21T14:32:04Z',\n    },\n  },\n  {\n    id: 'evt-cdc-102',\n    timestamp: '2026-08-21T14:31:59.604Z',\n    table: 'public.transactions',\n    operation: 'UPDATE',\n    primaryKey: 'tx_0x99b1f41',\n    binlogPosition: 'mysql-bin.000412 : 8491412',\n    lsn: '0/16B3440',\n    txId: 'tx_883017',\n    summary: 'status: \"processing\" → \"settled\", settled_at timestamp set',\n    modifiedFields: ['status', 'settled_at'],\n    before: {\n      tx_hash: 'tx_0x99b1f41',\n      order_id: 'ord_8819198',\n      amount: 349.5,\n      status: 'processing',\n      settled_at: null,\n      fee_cents: 1045,\n    },\n    after: {\n      tx_hash: 'tx_0x99b1f41',\n      order_id: 'ord_8819198',\n      amount: 349.5,\n      status: 'settled',\n      settled_at: '2026-08-21T14:31:59Z',\n      fee_cents: 1045,\n    },\n  },\n  {\n    id: 'evt-cdc-101',\n    timestamp: '2026-08-21T14:31:52.410Z',\n    table: 'public.users',\n    operation: 'INSERT',\n    primaryKey: 'usr_99304',\n    binlogPosition: 'mysql-bin.000412 : 8490980',\n    lsn: '0/16B31F0',\n    txId: 'tx_883016',\n    summary: 'New user registration: elena.rostova@cloudscale.io (Org: org_7720)',\n    modifiedFields: [],\n    after: {\n      id: 'usr_99304',\n      email: 'elena.rostova@cloudscale.io',\n      full_name: 'Elena Rostova',\n      org_id: 'org_7720',\n      role: 'data_engineer',\n      email_verified: true,\n      mfa_enabled: true,\n      created_at: '2026-08-21T14:31:52Z',\n    },\n  },\n  {\n    id: 'evt-cdc-100',\n    timestamp: '2026-08-21T14:31:40.118Z',\n    table: 'public.subscriptions',\n    operation: 'DELETE',\n    primaryKey: 'sub_7718021',\n    binlogPosition: 'mysql-bin.000412 : 8490410',\n    lsn: '0/16B2FA0',\n    txId: 'tx_883015',\n    summary: 'Hard purge of cancelled expired trial subscription sub_7718021',\n    modifiedFields: [],\n    before: {\n      id: 'sub_7718021',\n      user_id: 'usr_22910',\n      plan: 'developer_free',\n      status: 'cancelled',\n      seats: 1,\n      deleted_at: '2026-08-21T14:31:40Z',\n    },\n  },\n]\n\nconst currentBinlog = 'mysql-bin.000412 : 8492014'\n\nfunction matchesSearch(event: CdcStreamEvent, query: string): boolean {\n  if (!query.trim()) return true\n  const q = query.trim()\n\n  if (q.startsWith('/') && q.length > 1) {\n    const lastSlash = q.lastIndexOf('/')\n    if (lastSlash > 0) {\n      const pattern = q.slice(1, lastSlash)\n      const flags = q.slice(lastSlash + 1)\n      try {\n        const re = new RegExp(pattern, flags)\n        return (\n          re.test(event.table) ||\n          re.test(event.operation) ||\n          re.test(event.primaryKey) ||\n          re.test(event.binlogPosition) ||\n          re.test(event.lsn) ||\n          re.test(event.txId) ||\n          re.test(event.summary) ||\n          re.test(JSON.stringify(event.before ?? {})) ||\n          re.test(JSON.stringify(event.after ?? {}))\n        )\n      } catch {\n        // Fall back to plain search on invalid regex\n      }\n    }\n  }\n\n  const lower = q.toLowerCase()\n  return (\n    event.table.toLowerCase().includes(lower) ||\n    event.operation.toLowerCase().includes(lower) ||\n    event.primaryKey.toLowerCase().includes(lower) ||\n    event.binlogPosition.toLowerCase().includes(lower) ||\n    event.lsn.toLowerCase().includes(lower) ||\n    event.txId.toLowerCase().includes(lower) ||\n    event.summary.toLowerCase().includes(lower) ||\n    JSON.stringify(event.before ?? {})\n      .toLowerCase()\n      .includes(lower) ||\n    JSON.stringify(event.after ?? {})\n      .toLowerCase()\n      .includes(lower)\n  )\n}\n\nfunction formatTimestamp(iso: string): string {\n  try {\n    const d = new Date(iso)\n    return d.toISOString().replace('T', ' ').replace('Z', ' UTC')\n  } catch {\n    return iso\n  }\n}\n\nfunction formatNumber(num: number): string {\n  return new Intl.NumberFormat('en-US').format(num)\n}\n\nexport function CdcReplicationStream({\n  initialEvents,\n  initialTables,\n  initialPaused = false,\n  initialOperationFilter = 'all',\n  initialSearch = '',\n  className,\n}: CdcReplicationStreamProps) {\n  const [tables] = React.useState<CdcTableMetric[]>(initialTables ? [...initialTables] : [...defaultTables])\n  const [events, setEvents] = React.useState<CdcStreamEvent[]>(initialEvents ? [...initialEvents] : [...defaultEvents])\n  const [isPaused, setIsPaused] = React.useState(initialPaused)\n  const [isSnapshotting, setIsSnapshotting] = React.useState(false)\n  const [snapshotNotice, setSnapshotNotice] = React.useState(false)\n  const [selectedOperation, setSelectedOperation] = React.useState<'all' | CdcOperation>(initialOperationFilter)\n  const [searchQuery, setSearchQuery] = React.useState(initialSearch)\n  const [expandedIds, setExpandedIds] = React.useState<Record<string, boolean>>({\n    'evt-cdc-104': true,\n  })\n  const [copiedEventId, setCopiedEventId] = React.useState<string | null>(null)\n  const [copiedBinlog, setCopiedBinlog] = React.useState(false)\n  const [exportedNotice, setExportedNotice] = React.useState(false)\n\n  const filteredEvents = React.useMemo(() => {\n    return events.filter((event) => {\n      const matchesOp = selectedOperation === 'all' || event.operation === selectedOperation\n      const matchesText = matchesSearch(event, searchQuery)\n      return matchesOp && matchesText\n    })\n  }, [events, selectedOperation, searchQuery])\n\n  const operationCounts = React.useMemo(() => {\n    return {\n      all: events.length,\n      INSERT: events.filter((e) => e.operation === 'INSERT').length,\n      UPDATE: events.filter((e) => e.operation === 'UPDATE').length,\n      DELETE: events.filter((e) => e.operation === 'DELETE').length,\n    }\n  }, [events])\n\n  const allExpanded = filteredEvents.length > 0 && filteredEvents.every((e) => expandedIds[e.id])\n\n  function togglePause() {\n    setIsPaused((prev) => !prev)\n  }\n\n  function toggleExpand(id: string) {\n    setExpandedIds((prev) => ({\n      ...prev,\n      [id]: !prev[id],\n    }))\n  }\n\n  function toggleAllExpand() {\n    if (allExpanded) {\n      setExpandedIds({})\n    } else {\n      const next: Record<string, boolean> = {}\n      filteredEvents.forEach((e) => {\n        next[e.id] = true\n      })\n      setExpandedIds(next)\n    }\n  }\n\n  function triggerSnapshot() {\n    if (isSnapshotting) return\n    setIsSnapshotting(true)\n    setSnapshotNotice(true)\n\n    setTimeout(() => {\n      setIsSnapshotting(false)\n    }, 2200)\n\n    setTimeout(() => {\n      setSnapshotNotice(false)\n    }, 6000)\n  }\n\n  function clearStream() {\n    setEvents([])\n    setExpandedIds({})\n  }\n\n  function resetStream() {\n    setEvents(initialEvents ? [...initialEvents] : [...defaultEvents])\n    setSearchQuery('')\n    setSelectedOperation('all')\n    setExpandedIds({ 'evt-cdc-104': true })\n  }\n\n  function copyBinlogPosition() {\n    if (typeof navigator !== 'undefined' && navigator.clipboard) {\n      navigator.clipboard.writeText(currentBinlog)\n      setCopiedBinlog(true)\n      setTimeout(() => {\n        setCopiedBinlog(false)\n      }, 2000)\n    }\n  }\n\n  function copyPayload(id: string, payload: Record<string, unknown>) {\n    if (typeof navigator !== 'undefined' && navigator.clipboard) {\n      navigator.clipboard.writeText(JSON.stringify(payload, null, 2))\n      setCopiedEventId(id)\n      setTimeout(() => {\n        setCopiedEventId((current) => (current === id ? null : current))\n      }, 2000)\n    }\n  }\n\n  function exportJson() {\n    const dataStr =\n      'data:text/json;charset=utf-8,' +\n      encodeURIComponent(\n        JSON.stringify(\n          {\n            pipeline: 'Postgres Source (OLTP) -> Snowflake DW (OLAP)',\n            binlog_position: currentBinlog,\n            timestamp: new Date().toISOString(),\n            tables,\n            events: filteredEvents,\n          },\n          null,\n          2,\n        ),\n      )\n    if (typeof document !== 'undefined') {\n      const downloadAnchor = document.createElement('a')\n      downloadAnchor.setAttribute('href', dataStr)\n      downloadAnchor.setAttribute(\n        'download',\n        `cdc-replication-stream-${new Date().toISOString().slice(0, 19).replace(/:/g, '-')}.json`,\n      )\n      document.body.appendChild(downloadAnchor)\n      downloadAnchor.click()\n      downloadAnchor.remove()\n      setExportedNotice(true)\n      setTimeout(() => {\n        setExportedNotice(false)\n      }, 2000)\n    }\n  }\n\n  return (\n    <div data-slot=\"cdc-replication-stream\" className={cn('w-full space-y-4', className)}>\n      {/* Header: Sync Pipeline Overview & Global Controls */}\n      <div className=\"flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between\">\n        <div className=\"flex items-start gap-3 sm:items-center\">\n          <div className=\"bg-card flex size-10 shrink-0 items-center justify-center rounded-lg border shadow-xs\">\n            <ArrowRightLeft className=\"text-primary size-5\" aria-hidden=\"true\" />\n          </div>\n          <div className=\"space-y-1\">\n            <div className=\"flex flex-wrap items-center gap-2\">\n              <h2 className=\"text-foreground text-2xl font-bold tracking-tight\">CDC Replication Stream</h2>\n\n              {/* Real-Time Status Badge */}\n              {isSnapshotting ? (\n                <div className=\"border-info/30 bg-info/10 text-info inline-flex items-center gap-1.5 rounded-full border px-2.5 py-0.5 text-xs font-medium\">\n                  <RefreshCw className=\"size-3 animate-spin\" aria-hidden=\"true\" />\n                  <span>Snapshot Ingest Active</span>\n                </div>\n              ) : !isPaused ? (\n                <div className=\"border-success/30 bg-success/10 text-success inline-flex items-center gap-1.5 rounded-full border px-2.5 py-0.5 text-xs font-medium\">\n                  <span className=\"relative flex size-2 shrink-0\">\n                    <span className=\"bg-success absolute inline-flex h-full w-full rounded-full opacity-75\" />\n                    <span className=\"bg-success relative inline-flex size-2 rounded-full\" />\n                  </span>\n                  <span>Replication Streaming · 18ms Latency</span>\n                </div>\n              ) : (\n                <div className=\"border-warning/30 bg-warning/10 text-warning inline-flex items-center gap-1.5 rounded-full border px-2.5 py-0.5 text-xs font-medium\">\n                  <span className=\"bg-warning relative inline-flex size-2 rounded-full\" />\n                  <span>Replication Paused</span>\n                </div>\n              )}\n            </div>\n\n            {/* Pipeline Architecture Breadcrumb */}\n            <div className=\"flex flex-wrap items-center gap-1.5 text-xs\">\n              <span className=\"text-foreground font-semibold\">Postgres Source (OLTP)</span>\n              <ArrowRight className=\"text-muted-foreground size-3.5\" aria-hidden=\"true\" />\n              <span className=\"text-primary font-semibold\">Snowflake DW (OLAP)</span>\n              <span className=\"text-muted-foreground hidden font-mono sm:inline\">\n                Debezium 2.7 · Apache Kafka · pgoutput\n              </span>\n            </div>\n          </div>\n        </div>\n\n        {/* Header Action Controls & Binlog Pointer */}\n        <div className=\"flex flex-wrap items-center gap-2\">\n          {/* Binlog Position Indicator Chip */}\n          <button\n            type=\"button\"\n            aria-label=\"Copy current binlog position\"\n            className=\"bg-muted/50 hover:bg-muted focus-visible:ring-ring flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs font-medium transition-colors focus-visible:ring-2 focus-visible:outline-none\"\n            onClick={copyBinlogPosition}\n          >\n            <Terminal className=\"text-muted-foreground size-3.5\" aria-hidden=\"true\" />\n            <span className=\"text-muted-foreground\">Binlog:</span>\n            <span className=\"text-foreground font-mono font-medium\">{currentBinlog}</span>\n            {copiedBinlog ? (\n              <Check className=\"text-success size-3\" aria-hidden=\"true\" />\n            ) : (\n              <Copy className=\"text-muted-foreground size-3 opacity-70\" aria-hidden=\"true\" />\n            )}\n          </button>\n\n          <Button variant=\"outline\" size=\"sm\" disabled={isSnapshotting} className=\"gap-1.5\" onClick={triggerSnapshot}>\n            <RefreshCw className={cn('size-3.5', isSnapshotting && 'text-primary animate-spin')} aria-hidden=\"true\" />\n            <span>{isSnapshotting ? 'Syncing Snapshot...' : 'Force Sync Snapshot'}</span>\n          </Button>\n\n          <Button\n            variant=\"outline\"\n            size=\"sm\"\n            className={isPaused ? 'border-warning/40 text-warning' : ''}\n            onClick={togglePause}\n          >\n            {isPaused ? (\n              <Play className=\"size-3.5 fill-current\" aria-hidden=\"true\" />\n            ) : (\n              <Pause className=\"size-3.5\" aria-hidden=\"true\" />\n            )}\n            <span>{isPaused ? 'Resume Stream' : 'Pause Stream'}</span>\n          </Button>\n\n          <Button aria-label=\"Download attachment\" variant=\"default\" size=\"sm\" className=\"gap-1.5\" onClick={exportJson}>\n            {exportedNotice ? (\n              <Check className=\"text-success size-3.5\" aria-hidden=\"true\" />\n            ) : (\n              <Download className=\"size-3.5\" aria-hidden=\"true\" />\n            )}\n            <span>{exportedNotice ? 'Exported' : 'Export JSON'}</span>\n          </Button>\n        </div>\n      </div>\n\n      {/* Snapshot Notification Banner */}\n      {snapshotNotice && (\n        <div className=\"text-foreground border-info/30 bg-info/10 flex items-center justify-between rounded-lg border p-3 text-xs shadow-xs\">\n          <div className=\"flex items-center gap-2.5\">\n            <RefreshCw className=\"text-info size-4 shrink-0\" aria-hidden=\"true\" />\n            <div>\n              <span className=\"text-info font-semibold\">Snapshot sync initiated:</span>\n              <span>\n                {' '}\n                Executing non-blocking logical schema snapshot across 4 tables at WAL offset{' '}\n                <code className=\"font-mono font-medium\">mysql-bin.000412 : 8492014</code>.\n              </span>\n            </div>\n          </div>\n          <Badge variant=\"outline\" className=\"font-mono text-xs\">\n            LSN: 0/16B38E0\n          </Badge>\n        </div>\n      )}\n\n      {/* 4 CDC Telemetry Metric Cards */}\n      <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4\">\n        {/* 1. Replication Lag */}\n        <Card className=\"border-border shadow-xs\">\n          <CardContent className=\"p-4\">\n            <div className=\"flex items-center justify-between\">\n              <span className=\"text-muted-foreground text-xs font-medium\">Replication Lag</span>\n              <div className=\"bg-primary/10 text-primary border-primary/20 flex size-8 items-center justify-center rounded-md border\">\n                <Zap className=\"size-4\" aria-hidden=\"true\" />\n              </div>\n            </div>\n            <div className=\"mt-3 space-y-1.5\">\n              <div className=\"flex items-baseline gap-2\">\n                <span className=\"text-foreground font-mono text-2xl font-bold tracking-tight tabular-nums\">18ms</span>\n                <span className=\"text-muted-foreground text-xs\">p99: 24ms</span>\n              </div>\n              <div className=\"flex items-center gap-2\">\n                <Badge variant=\"success\" className=\"font-mono text-xs\">\n                  Sub-second real-time\n                </Badge>\n              </div>\n              <div className=\"pt-1\">\n                <div className=\"text-muted-foreground flex justify-between text-xs\">\n                  <span>SLA Headroom</span>\n                  <span className=\"font-mono\">96.4%</span>\n                </div>\n                <Progress value={3.6} className=\"mt-1 h-1.5\" />\n              </div>\n            </div>\n          </CardContent>\n        </Card>\n\n        {/* 2. Throughput */}\n        <Card className=\"border-border shadow-xs\">\n          <CardContent className=\"p-4\">\n            <div className=\"flex items-center justify-between\">\n              <span className=\"text-muted-foreground text-xs font-medium\">Throughput</span>\n              <div className=\"border-info/20 bg-info/10 text-info flex size-8 items-center justify-center rounded-md border\">\n                <Activity className=\"size-4\" aria-hidden=\"true\" />\n              </div>\n            </div>\n            <div className=\"mt-3 space-y-1.5\">\n              <div className=\"flex items-baseline gap-1.5\">\n                <span className=\"text-foreground font-mono text-2xl font-bold tracking-tight tabular-nums\">1,420</span>\n                <span className=\"text-muted-foreground text-xs\">events/sec</span>\n              </div>\n              <div className=\"flex items-center gap-2\">\n                <Badge variant=\"info\" className=\"font-mono text-xs\">\n                  380 KB/s bandwidth\n                </Badge>\n              </div>\n              <div className=\"text-muted-foreground flex items-center justify-between pt-1 text-xs\">\n                <span>Hourly Pace</span>\n                <span className=\"text-foreground font-mono font-medium\">5.11M evts/hr</span>\n              </div>\n            </div>\n          </CardContent>\n        </Card>\n\n        {/* 3. Total Synced Today */}\n        <Card className=\"border-border shadow-xs\">\n          <CardContent className=\"p-4\">\n            <div className=\"flex items-center justify-between\">\n              <span className=\"text-muted-foreground text-xs font-medium\">Total Synced Today</span>\n              <div className=\"border-success/20 bg-success/10 text-success flex size-8 items-center justify-center rounded-md border\">\n                <Database className=\"size-4\" aria-hidden=\"true\" />\n              </div>\n            </div>\n            <div className=\"mt-3 space-y-1.5\">\n              <div className=\"flex items-baseline gap-1.5\">\n                <span className=\"text-foreground font-mono text-2xl font-bold tracking-tight tabular-nums\">4.82M</span>\n                <span className=\"text-muted-foreground text-xs\">Row Changes</span>\n              </div>\n              <div className=\"flex items-center gap-2\">\n                <Badge variant=\"outline\" className=\"border-success/30 text-success font-mono text-xs\">\n                  +14.2% vs yesterday\n                </Badge>\n              </div>\n              <div className=\"text-muted-foreground flex items-center justify-between pt-1 text-xs\">\n                <span>WAL Integrity</span>\n                <span className=\"text-success font-mono font-medium\">100% Consistent</span>\n              </div>\n            </div>\n          </CardContent>\n        </Card>\n\n        {/* 4. Error / Dead Letter Queue */}\n        <Card className=\"border-border shadow-xs\">\n          <CardContent className=\"p-4\">\n            <div className=\"flex items-center justify-between\">\n              <span className=\"text-muted-foreground text-xs font-medium\">Error / DLQ</span>\n              <div className=\"border-success/20 bg-success/10 text-success flex size-8 items-center justify-center rounded-md border\">\n                <ShieldCheck className=\"size-4\" aria-hidden=\"true\" />\n              </div>\n            </div>\n            <div className=\"mt-3 space-y-1.5\">\n              <div className=\"flex items-baseline gap-1.5\">\n                <span className=\"text-foreground font-mono text-2xl font-bold tracking-tight tabular-nums\">0</span>\n                <span className=\"text-muted-foreground text-xs\">Failed Events</span>\n              </div>\n              <div className=\"flex items-center gap-2\">\n                <Badge variant=\"success\" className=\"font-mono text-xs\">\n                  DLQ Empty · Healthy\n                </Badge>\n              </div>\n              <div className=\"text-muted-foreground flex items-center justify-between pt-1 text-xs\">\n                <span>Schema Drift</span>\n                <span className=\"text-foreground font-mono font-medium\">0 Violations</span>\n              </div>\n            </div>\n          </CardContent>\n        </Card>\n      </div>\n\n      {/* Active Synced Tables Table */}\n      <Card className=\"border-border shadow-xs\">\n        <CardHeader className=\"pb-3\">\n          <div className=\"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between\">\n            <div>\n              <CardTitle className=\"text-base font-semibold\">Active Synced Tables ({tables.length})</CardTitle>\n              <CardDescription className=\"text-xs\">\n                Per-table WAL change capture distribution, row synchronization counts, and per-table replication latency\n              </CardDescription>\n            </div>\n            <div className=\"text-muted-foreground flex items-center gap-2 text-xs\">\n              <span className=\"flex items-center gap-1\">\n                <span className=\"bg-success size-2 rounded-full\" />\n                INSERT\n              </span>\n              <span className=\"flex items-center gap-1\">\n                <span className=\"bg-info size-2 rounded-full\" />\n                UPDATE\n              </span>\n              <span className=\"flex items-center gap-1\">\n                <span className=\"bg-destructive size-2 rounded-full\" />\n                DELETE\n              </span>\n            </div>\n          </div>\n        </CardHeader>\n        <CardContent className=\"p-0\">\n          <div className=\"overflow-x-auto\">\n            <Table density=\"cozy\">\n              <TableHeader>\n                <TableRow>\n                  <TableHead className=\"text-xs font-semibold\">Table Name & Schema</TableHead>\n                  <TableHead className=\"text-xs font-semibold\">Change Operations Breakdown</TableHead>\n                  <TableHead className=\"text-right text-xs font-semibold\">Synced Rows Count</TableHead>\n                  <TableHead className=\"text-right text-xs font-semibold\">Replication Delay</TableHead>\n                  <TableHead className=\"text-center text-xs font-semibold\">Status</TableHead>\n                </TableRow>\n              </TableHeader>\n              <TableBody>\n                {tables.map((table) => (\n                  <TableRow key={table.name} className=\"group\">\n                    {/* Table Name & Schema */}\n                    <TableCell className=\"py-3\">\n                      <div className=\"space-y-0.5\">\n                        <div className=\"flex items-center gap-2\">\n                          <span className=\"text-foreground font-mono text-xs font-semibold\">\n                            {table.schema}.{table.name}\n                          </span>\n                          <Badge variant=\"outline\" className=\"font-mono text-xs\">\n                            {table.primaryKey}\n                          </Badge>\n                        </div>\n                        <p className=\"text-muted-foreground text-xs font-normal\">Mode: {table.mode}</p>\n                      </div>\n                    </TableCell>\n\n                    {/* Operations Multi-Segment Stacked Progress Bar & Percentages */}\n                    <TableCell className=\"py-3\">\n                      <div className=\"w-full max-w-xs space-y-1.5\">\n                        {/* Stacked Progress Bar */}\n                        <div className=\"bg-muted flex h-2 w-full overflow-hidden rounded-full border\">\n                          <div\n                            className=\"bg-success transition-colors duration-300\"\n                            style={{ width: `${table.operations.insertPercent}%` }}\n                            title={`INSERT: ${table.operations.insertPercent}%`}\n                          />\n                          <div\n                            className=\"bg-info transition-colors duration-300\"\n                            style={{ width: `${table.operations.updatePercent}%` }}\n                            title={`UPDATE: ${table.operations.updatePercent}%`}\n                          />\n                          <div\n                            className=\"bg-destructive transition-colors duration-300\"\n                            style={{ width: `${table.operations.deletePercent}%` }}\n                            title={`DELETE: ${table.operations.deletePercent}%`}\n                          />\n                        </div>\n\n                        {/* Breakdown Text */}\n                        <div className=\"flex items-center gap-2 font-mono text-xs\">\n                          <span className=\"text-success font-medium\">INS {table.operations.insertPercent}%</span>\n                          <span className=\"text-info font-medium\">UPD {table.operations.updatePercent}%</span>\n                          <span className=\"text-destructive font-medium\">DEL {table.operations.deletePercent}%</span>\n                        </div>\n                      </div>\n                    </TableCell>\n\n                    {/* Synced Rows Count */}\n                    <TableCell className=\"py-3 text-right\">\n                      <span className=\"text-foreground font-mono text-xs font-semibold tabular-nums\">\n                        {formatNumber(table.syncedRows)}\n                      </span>\n                      <p className=\"text-muted-foreground text-xs\">rows committed</p>\n                    </TableCell>\n\n                    {/* Replication Delay */}\n                    <TableCell className=\"py-3 text-right\">\n                      <span className=\"text-success text-success font-mono text-xs font-semibold tabular-nums\">\n                        {table.replicationDelayMs}ms\n                      </span>\n                      <p className=\"text-muted-foreground text-xs\">sub-second</p>\n                    </TableCell>\n\n                    {/* Status Badge */}\n                    <TableCell className=\"py-3 text-center\">\n                      <Badge variant=\"success\" className=\"gap-1 font-mono text-xs\">\n                        <span className=\"bg-success size-1.5 animate-pulse rounded-full\" />\n                        Synchronized\n                      </Badge>\n                    </TableCell>\n                  </TableRow>\n                ))}\n              </TableBody>\n            </Table>\n          </div>\n        </CardContent>\n      </Card>\n\n      {/* Live CDC Event Stream Ticker Card */}\n      <Card className=\"border-border shadow-xs\">\n        {/* Terminal Header Bar */}\n        <div className=\"bg-muted/40 flex flex-col gap-3 border-b p-3 sm:flex-row sm:items-center sm:justify-between\">\n          <div className=\"flex items-center gap-2\">\n            <div className=\"flex items-center gap-1.5\">\n              <span className=\"bg-destructive/80 size-2.5 rounded-full\" />\n              <span className=\"bg-warning/80 size-2.5 rounded-full\" />\n              <span className=\"bg-success/80 size-2.5 rounded-full\" />\n            </div>\n            <div>\n              <span className=\"text-foreground text-xs font-semibold\">Live CDC Event Stream Ticker</span>\n              <span className=\"text-muted-foreground hidden font-mono text-xs sm:inline\">\n                {' '}\n                · wal_level=logical · slot: debezium_cdc_01\n              </span>\n            </div>\n          </div>\n\n          <div className=\"flex items-center gap-2\">\n            <span className=\"text-muted-foreground hidden font-mono text-xs sm:inline\">\n              Matches: {filteredEvents.length} / {events.length}\n            </span>\n            <Button\n              variant=\"ghost\"\n              size=\"xs\"\n              className=\"h-7 gap-1 px-2 text-xs\"\n              disabled={filteredEvents.length === 0}\n              onClick={toggleAllExpand}\n            >\n              {allExpanded ? (\n                <ChevronDown className=\"size-3.5\" aria-hidden=\"true\" />\n              ) : (\n                <ChevronRight className=\"size-3.5\" aria-hidden=\"true\" />\n              )}\n              <span>{allExpanded ? 'Collapse All' : 'Expand All'}</span>\n            </Button>\n          </div>\n        </div>\n\n        {/* Stream Filter Toolbar */}\n        <div className=\"border-b p-3\">\n          <div className=\"flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between\">\n            {/* Search Input */}\n            <div className=\"relative flex-1\">\n              <Search\n                className=\"text-muted-foreground pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2\"\n                aria-hidden=\"true\"\n              />\n              <Input\n                value={searchQuery}\n                onChange={(e) => setSearchQuery(e.target.value)}\n                placeholder=\"Search table, operation, primary key, column, or /regex/...\"\n                className=\"pl-9 text-xs\"\n              />\n            </div>\n\n            {/* Operation Filter Buttons */}\n            <div className=\"flex flex-wrap items-center gap-1.5\">\n              <span className=\"text-muted-foreground mr-1 flex items-center gap-1 text-xs font-medium\">\n                <Filter className=\"size-3\" aria-hidden=\"true\" />\n                Op:\n              </span>\n\n              <button\n                type=\"button\"\n                className={cn(\n                  'focus-visible:ring-ring inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-medium transition-colors focus-visible:ring-2 focus-visible:outline-none',\n                  selectedOperation === 'all'\n                    ? 'border-primary bg-primary text-primary-foreground shadow-xs'\n                    : 'border-border bg-card text-muted-foreground hover:bg-accent hover:text-foreground',\n                )}\n                onClick={() => setSelectedOperation('all')}\n              >\n                All\n                <span\n                  className={cn(\n                    'py-0.2 rounded-full px-1.5 text-xs',\n                    selectedOperation === 'all'\n                      ? 'bg-primary-foreground/20 text-primary-foreground'\n                      : 'bg-muted text-muted-foreground',\n                  )}\n                >\n                  {operationCounts.all}\n                </span>\n              </button>\n\n              <button\n                type=\"button\"\n                className={cn(\n                  'focus-visible:ring-ring inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-medium transition-colors focus-visible:ring-2 focus-visible:outline-none',\n                  selectedOperation === 'INSERT'\n                    ? 'border-success bg-success text-white shadow-xs'\n                    : 'border-border bg-card text-muted-foreground hover:border-success/40 hover:text-success dark:hover:text-success',\n                )}\n                onClick={() => setSelectedOperation('INSERT')}\n              >\n                <span className=\"bg-success size-1.5 rounded-full\" />\n                INSERT\n                <span\n                  className={cn(\n                    'py-0.2 rounded-full px-1.5 text-xs',\n                    selectedOperation === 'INSERT' ? 'bg-white/20 text-white' : 'bg-success/10 text-success',\n                  )}\n                >\n                  {operationCounts.INSERT}\n                </span>\n              </button>\n\n              <button\n                type=\"button\"\n                className={cn(\n                  'focus-visible:ring-ring inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-medium transition-colors focus-visible:ring-2 focus-visible:outline-none',\n                  selectedOperation === 'UPDATE'\n                    ? 'border-info bg-info text-white shadow-xs'\n                    : 'border-border bg-card text-muted-foreground hover:border-info/40 hover:text-info dark:hover:text-info',\n                )}\n                onClick={() => setSelectedOperation('UPDATE')}\n              >\n                <span className=\"bg-info size-1.5 rounded-full\" />\n                UPDATE\n                <span\n                  className={cn(\n                    'py-0.2 rounded-full px-1.5 text-xs',\n                    selectedOperation === 'UPDATE' ? 'bg-white/20 text-white' : 'bg-info/10 text-info',\n                  )}\n                >\n                  {operationCounts.UPDATE}\n                </span>\n              </button>\n\n              <button\n                type=\"button\"\n                className={cn(\n                  'focus-visible:ring-ring inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-medium transition-colors focus-visible:ring-2 focus-visible:outline-none',\n                  selectedOperation === 'DELETE'\n                    ? 'border-destructive bg-destructive text-white shadow-xs'\n                    : 'border-border bg-card text-muted-foreground hover:border-destructive/40 hover:text-destructive dark:hover:text-destructive',\n                )}\n                onClick={() => setSelectedOperation('DELETE')}\n              >\n                <span className=\"bg-destructive size-1.5 rounded-full\" />\n                DELETE\n                <span\n                  className={cn(\n                    'py-0.2 rounded-full px-1.5 text-xs',\n                    selectedOperation === 'DELETE' ? 'bg-white/20 text-white' : 'bg-destructive/10 text-destructive',\n                  )}\n                >\n                  {operationCounts.DELETE}\n                </span>\n              </button>\n            </div>\n          </div>\n        </div>\n\n        {/* Event Rows Feed */}\n        <CardContent className=\"p-0\">\n          {/* Empty State */}\n          {filteredEvents.length === 0 ? (\n            <div className=\"flex flex-col items-center justify-center gap-3 px-4 py-16 text-center\">\n              <div className=\"bg-muted flex size-12 items-center justify-center rounded-full\">\n                <Database className=\"text-muted-foreground size-6 opacity-60\" aria-hidden=\"true\" />\n              </div>\n              <div className=\"space-y-1\">\n                <p className=\"text-foreground text-sm font-semibold\">No CDC events match current criteria</p>\n                <p className=\"text-muted-foreground text-xs\">\n                  {events.length === 0\n                    ? 'The replication event stream buffer was cleared.'\n                    : 'Try adjusting your operation filter or search query.'}\n                </p>\n              </div>\n              <Button variant=\"outline\" size=\"sm\" className=\"mt-2 text-xs\" onClick={resetStream}>\n                <RefreshCw className=\"size-3.5\" aria-hidden=\"true\" />\n                Restore CDC stream data\n              </Button>\n            </div>\n          ) : (\n            <ul className=\"divide-border/60 divide-y\">\n              {filteredEvents.map((event) => {\n                const isExpanded = !!expandedIds[event.id]\n                return (\n                  <li\n                    key={event.id}\n                    className={cn('group transition-colors', isExpanded ? 'bg-muted/30' : 'hover:bg-muted/20')}\n                  >\n                    {/* Primary Row Trigger */}\n                    <div\n                      role=\"button\"\n                      tabIndex={0}\n                      aria-expanded={isExpanded}\n                      className=\"focus-visible:ring-ring flex cursor-pointer flex-col gap-3 p-3.5 focus-visible:ring-2 focus-visible:outline-none focus-visible:ring-inset sm:flex-row sm:items-center sm:justify-between\"\n                      onClick={() => toggleExpand(event.id)}\n                      onKeyDown={(e) => {\n                        if (e.key === 'Enter' || e.key === ' ') {\n                          e.preventDefault()\n                          toggleExpand(event.id)\n                        }\n                      }}\n                    >\n                      {/* Left Rail: Chevron + Timestamp + Operation Badge + Table + Summary */}\n                      <div className=\"flex min-w-0 items-start gap-3 sm:items-center\">\n                        <button\n                          type=\"button\"\n                          aria-label=\"Toggle before and after payload diff\"\n                          className={cn(\n                            'text-muted-foreground group-hover:text-foreground mt-0.5 shrink-0 transition-transform sm:mt-0',\n                            isExpanded && 'text-foreground rotate-90',\n                          )}\n                        >\n                          <ChevronRight className=\"size-4\" aria-hidden=\"true\" />\n                        </button>\n\n                        <div className=\"space-y-1 sm:space-y-0.5\">\n                          <div className=\"flex flex-wrap items-center gap-2\">\n                            <span className=\"text-muted-foreground font-mono text-xs whitespace-nowrap\">\n                              {formatTimestamp(event.timestamp)}\n                            </span>\n\n                            {event.operation === 'INSERT' && (\n                              <Badge className=\"bg-success/10 text-success border-transparent font-mono text-xs\">\n                                INSERT\n                              </Badge>\n                            )}\n                            {event.operation === 'UPDATE' && (\n                              <Badge className=\"bg-info/10 text-info border-transparent font-mono text-xs\">\n                                UPDATE\n                              </Badge>\n                            )}\n                            {event.operation === 'DELETE' && (\n                              <Badge className=\"bg-destructive/10 text-destructive border-transparent font-mono text-xs\">\n                                DELETE\n                              </Badge>\n                            )}\n\n                            <span className=\"text-foreground font-mono text-xs font-semibold\">{event.table}</span>\n\n                            <span className=\"bg-muted text-muted-foreground rounded px-1.5 py-0.5 font-mono text-xs\">\n                              {event.primaryKey}\n                            </span>\n                          </div>\n\n                          <p className=\"text-muted-foreground text-xs font-normal\">{event.summary}</p>\n                        </div>\n                      </div>\n\n                      {/* Right Rail: Binlog Offset & Tx ID */}\n                      <div className=\"flex shrink-0 flex-wrap items-center gap-3 sm:justify-end\">\n                        <div className=\"bg-muted/60 flex items-center gap-1.5 rounded-md border px-2 py-1 font-mono text-xs\">\n                          <span className=\"text-muted-foreground\">Tx:</span>\n                          <span className=\"text-foreground font-medium\">{event.txId}</span>\n                        </div>\n\n                        <div className=\"text-muted-foreground flex items-center gap-1.5 font-mono text-xs\">\n                          <span>{event.binlogPosition}</span>\n                          <span className=\"opacity-50\">·</span>\n                          <span className=\"text-foreground/80 font-medium\">{event.lsn}</span>\n                        </div>\n                      </div>\n                    </div>\n\n                    {/* Expanded Payload Diff View */}\n                    {isExpanded && (\n                      <div className=\"bg-muted/15 border-t px-4 py-3.5\">\n                        <div className=\"space-y-3\">\n                          {/* Modified Fields Tag Bar */}\n                          {event.modifiedFields && event.modifiedFields.length > 0 && (\n                            <div className=\"bg-card flex flex-wrap items-center gap-1.5 rounded-md border p-2.5 text-xs\">\n                              <span className=\"text-muted-foreground font-medium\">Modified Columns:</span>\n                              {event.modifiedFields.map((field) => (\n                                <Badge key={field} variant=\"outline\" className=\"text-info font-mono text-xs\">\n                                  {field}\n                                </Badge>\n                              ))}\n                            </div>\n                          )}\n\n                          {/* Side-by-Side or Stacked JSON Diff */}\n                          <div className=\"grid grid-cols-1 gap-3 lg:grid-cols-2\">\n                            {/* Before Payload (For UPDATE and DELETE) */}\n                            {event.before && (\n                              <div className=\"overflow-hidden rounded-md border border-zinc-800 bg-zinc-950 font-mono text-xs text-zinc-100 shadow-inner\">\n                                <div className=\"flex items-center justify-between border-b border-zinc-800 bg-zinc-900/90 px-3 py-1.5\">\n                                  <div className=\"flex items-center gap-2\">\n                                    <span className=\"bg-destructive size-2 rounded-full\" />\n                                    <span className=\"text-destructive text-xs font-semibold\">before_image.json</span>\n                                    <span className=\"text-muted-foreground text-xs font-normal\">(Previous State)</span>\n                                  </div>\n                                  <Button\n                                    variant=\"ghost\"\n                                    size=\"xs\"\n                                    className=\"h-6 gap-1 px-2 text-xs text-zinc-300 hover:bg-zinc-800 hover:text-zinc-100\"\n                                    onClick={() => copyPayload(`${event.id}-before`, event.before!)}\n                                  >\n                                    {copiedEventId === `${event.id}-before` ? (\n                                      <Check className=\"text-success size-3\" aria-hidden=\"true\" />\n                                    ) : (\n                                      <Copy className=\"size-3\" aria-hidden=\"true\" />\n                                    )}\n                                    <span>{copiedEventId === `${event.id}-before` ? 'Copied' : 'Copy'}</span>\n                                  </Button>\n                                </div>\n\n                                <pre className=\"max-h-60 overflow-x-auto overflow-y-auto p-3 text-xs leading-relaxed select-text\">\n                                  <code className=\"text-destructive/90\">{JSON.stringify(event.before, null, 2)}</code>\n                                </pre>\n                              </div>\n                            )}\n\n                            {/* After Payload (For INSERT and UPDATE) */}\n                            {event.after && (\n                              <div\n                                className={cn(\n                                  'overflow-hidden rounded-md border border-zinc-800 bg-zinc-950 font-mono text-xs text-zinc-100 shadow-inner',\n                                  !event.before && 'lg:col-span-2',\n                                )}\n                              >\n                                <div className=\"flex items-center justify-between border-b border-zinc-800 bg-zinc-900/90 px-3 py-1.5\">\n                                  <div className=\"flex items-center gap-2\">\n                                    <span className=\"bg-success size-2 rounded-full\" />\n                                    <span className=\"text-success text-xs font-semibold\">after_image.json</span>\n                                    <span className=\"text-muted-foreground text-xs font-normal\">\n                                      (Replicated Target State)\n                                    </span>\n                                  </div>\n                                  <Button\n                                    variant=\"ghost\"\n                                    size=\"xs\"\n                                    className=\"h-6 gap-1 px-2 text-xs text-zinc-300 hover:bg-zinc-800 hover:text-zinc-100\"\n                                    onClick={() => copyPayload(`${event.id}-after`, event.after!)}\n                                  >\n                                    {copiedEventId === `${event.id}-after` ? (\n                                      <Check className=\"text-success size-3\" aria-hidden=\"true\" />\n                                    ) : (\n                                      <Copy className=\"size-3\" aria-hidden=\"true\" />\n                                    )}\n                                    <span>{copiedEventId === `${event.id}-after` ? 'Copied' : 'Copy'}</span>\n                                  </Button>\n                                </div>\n\n                                <pre className=\"max-h-60 overflow-x-auto overflow-y-auto p-3 text-xs leading-relaxed select-text\">\n                                  <code className=\"text-success\">{JSON.stringify(event.after, null, 2)}</code>\n                                </pre>\n                              </div>\n                            )}\n                          </div>\n                        </div>\n                      </div>\n                    )}\n                  </li>\n                )\n              })}\n            </ul>\n          )}\n        </CardContent>\n\n        {/* Bottom Engine & Ingest Protocol Telemetry Bar */}\n        <div className=\"bg-muted/40 flex flex-col gap-2.5 border-t px-4 py-3 text-xs sm:flex-row sm:items-center sm:justify-between\">\n          <div className=\"text-muted-foreground flex flex-wrap items-center gap-4\">\n            <div className=\"text-foreground flex items-center gap-1.5 font-medium\">\n              <Activity className=\"text-success size-3.5\" aria-hidden=\"true\" />\n              <span>CDC Pipeline:</span>\n              <span className=\"font-mono\">{isPaused ? '0 evt/s (Paused)' : '1,420 events/sec'}</span>\n            </div>\n\n            <Separator orientation=\"vertical\" className=\"hidden h-3.5 sm:block\" />\n\n            <div className=\"flex items-center gap-1.5\">\n              <Layers className=\"size-3.5\" aria-hidden=\"true\" />\n              <span>Sink Topic:</span>\n              <span className=\"text-foreground font-mono\">snowflake.cdc.raw_events</span>\n            </div>\n\n            <Separator orientation=\"vertical\" className=\"hidden h-3.5 sm:block\" />\n\n            <div className=\"flex items-center gap-1.5\">\n              <Server className=\"text-info size-3.5\" aria-hidden=\"true\" />\n              <span>Format:</span>\n              <span className=\"text-foreground font-mono\">JSON + Schema Registry (v2)</span>\n            </div>\n          </div>\n\n          <div className=\"text-muted-foreground flex items-center gap-2 font-mono\">\n            <span className=\"bg-success size-1.5 rounded-full\" />\n            <span>Postgres WAL2JSON · TLS 1.3 · Heartbeat: 1,000ms OK</span>\n          </div>\n        </div>\n      </Card>\n    </div>\n  )\n}\n",
      "type": "registry:block",
      "target": "~/components/blocks/CdcReplicationStream.tsx"
    }
  ],
  "dependencies": [
    "lucide-react"
  ],
  "devDependencies": [],
  "registryDependencies": [
    "https://uipkge.dev/r/react/badge.json",
    "https://uipkge.dev/r/react/button.json",
    "https://uipkge.dev/r/react/card.json",
    "https://uipkge.dev/r/react/input.json",
    "https://uipkge.dev/r/react/progress.json",
    "https://uipkge.dev/r/react/separator.json",
    "https://uipkge.dev/r/react/table.json"
  ],
  "description": "Debezium and Fivetran style Change Data Capture (CDC) replication monitor and binlog sync pipeline with live telemetry metrics, table operation breakdowns, and real-time before/after row diff streaming.",
  "categories": [
    "devops",
    "app"
  ]
}