Skip to content

Implement Collaboration Phase 1 (Presence) and Phase 2 (Live Shared Viewing)#20

Open
1754riya wants to merge 3 commits into
FOSSEE:developfrom
1754riya:develop
Open

Implement Collaboration Phase 1 (Presence) and Phase 2 (Live Shared Viewing)#20
1754riya wants to merge 3 commits into
FOSSEE:developfrom
1754riya:develop

Conversation

@1754riya

Copy link
Copy Markdown

Overview

This PR introduces the first two phases of the collaboration system for eSim Cloud.

The goal of these phases is to establish the foundation for future collaborative workflows while keeping the existing editor, simulation, and project management functionality unchanged.

Phase 1 – Presence & Project Rooms

Implemented project-based collaboration rooms where each saved schematic is associated with a unique room.

Features:

  • Automatic room joining when opening a saved/shared project.
  • Online user count.
  • Active user list.
  • Real-time join notifications.
  • Real-time leave notifications.
  • Presence panel in the editor.
  • Shareable project URLs for collaboration sessions.
  • Reconnect handling.
  • Multi-tab handling for authenticated users.

Phase 2 – Live Shared Viewing

Implemented live viewing support on top of the collaboration rooms.

Features:

  • Owner joins as Editor.
  • Other users join as Viewer.
  • Real-time schematic snapshot synchronization using WebSockets.
  • Viewer mode restrictions.
  • Shared project URL based collaboration.
  • Automatic synchronization of editor changes to connected viewers.
  • Exponential backoff reconnect handling.
  • Non-invasive integration with existing editor workflows.

Technical Overview

Backend:

  • Django Channels
  • Redis channel layer
  • PresenceConsumer
  • SyncConsumer
  • Project-specific WebSocket rooms

Frontend:

  • Presence panel
  • Presence Redux state management
  • Presence WebSocket hook
  • Circuit synchronization hook
  • Editor/Viewer role handling

Design Principles

  • No changes to existing save workflow.
  • No changes to existing simulation workflow.
  • No changes to Arduino workflows.
  • No changes to gallery functionality.
  • Collaboration remains an enhancement and not a dependency.
  • Existing editor functionality continues to work even if collaboration services are unavailable.

Current Scope

Included:

  • Presence
  • Project rooms
  • Online users
  • Join/leave notifications
  • Live shared viewing
  • Editor/Viewer roles
  • Snapshot synchronization

Not Included:

  • Collaborative editing
  • Cursor sharing

Testing Status

Architecture and implementation completed.

Full end-to-end validation involving authenticated users is pending integration with the ongoing authentication/sign-in work, since owner/editor/viewer role verification depends on authenticated user identity.

Future Work

Phase 3:

  • Incremental collaboration events
  • Enhanced access control integration
  • Multi-editor collaboration foundations
  • Permission-aware editing workflows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant