Implementation: How should cross-tool synchronization be implemented across ...

Documentation for Sessions

⚙️ Implementation: How should cross-tool synchronization be implemented across ...

📋 Decision Context

Question:

How should cross-tool synchronization be implemented across platform builder tools?

Task: Session 28.1: Implement cross-tool synchronization across platform builder tools


🎯 Decision Made

Chosen:

Use existing CrossToolSyncService with BroadcastChannel API

Options Considered:

  1. Create new synchronization service from scratch
  2. Use existing CrossToolSyncService with BroadcastChannel API
  3. Use WebSocket-based real-time sync only
  4. Use NGXS store for cross-tool state

💭 Reasoning

The CrossToolSyncService already existed in core-angular but was underutilized. It uses BroadcastChannel API for same-origin real-time sync between browser tabs/windows, which is perfect for platform builder tools. We injected this service into ModularUniverseBuilderComponent, PageBuilderComponent, VibeUniverseGeneratorComponent, FlowComposerComponent, UniverseHubComponent, and ArchitectStateService. Each tool now broadcasts events on module creation/update/delete and listens for events from other tools to refresh their data. This approach leverages existing infrastructure, requires minimal new code, and provides instant cross-tool synchronization.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation