fedify icon indicating copy to clipboard operation
fedify copied to clipboard

Real-time ActivityPub debug dashboard

Open dahlia opened this issue 7 months ago • 2 comments

A debug dashboard that shows all ActivityPub activities being sent and received in real-time would greatly improve the developer experience when building federated applications with Fedify.

Proposed features

  • Real-time monitoring of inbound/outbound activities
  • Filtering by activity type, sender, receiver
  • Detailed inspection of JSON-LD content and HTTP headers
  • Signature verification details (HTTP Signatures, LD Signatures, Object Integrity Proofs)
  • Retry queue management for failed deliveries

Implementation options

  1. Embedded web dashboard (accessible at a debug endpoint)
  2. Browser extension/developer tools integration
  3. Enhanced logging visualization

Questions

  • Should this be development-only or configurable for production use?
  • How should we handle potentially sensitive information?
  • Are there specific debugging pain points this should address?

dahlia avatar May 20 '25 10:05 dahlia

I'll take this one 👍

notJoon avatar Jul 20 '25 06:07 notJoon

Great progress on the debug dashboard! @notJoon has implemented a solid foundation in PR #319 with CLI-based debugging, real-time WebSocket updates, and comprehensive activity filtering.

Based on the implementation work, we've refined the architecture approach in #323. Instead of coupling debugger code directly to the core package, we're proposing a FederationObserver interface that provides federation lifecycle hooks, with the debug dashboard implemented as a separate @fedify/debugger package. This keeps the core package lean while enabling the embedded web dashboard approach originally proposed.

The refined approach would allow developers to add debugging with:

import { DebugObserver } from '@fedify/debugger';

const federation = createFederation({
  kv: new MemoryKvStore(),
  observers: [new DebugObserver({ path: '/__debugger__' })],
});

This addresses all the original requirements—real-time monitoring, filtering, detailed inspection—while providing an extensible foundation for future observability features. The next steps are finalizing the observer interface design and integrating it into the federation middleware.

dahlia avatar Jul 23 '25 08:07 dahlia