Skip to content

Feature: Session-Based Collaboration (Phase 1 MVP — manual push/pull session) #813

@heidi04aldidi

Description

@heidi04aldidi

Summary

Add a lightweight "collaboration session" feature that allows multiple users to share a diagram via a session ID and manually push/pull the diagram JSON. This is Phase 1 (manual sync) toward a future real-time collaboration feature.

Motivation

Currently users must export/import diagrams to collaborate. A manual session-based sync will allow quick team edits with minimal engineering changes and no WebSocket/OT/CRDT complexity.

Proposed behavior (MVP)

  • Host clicks "Create Session" -> a session ID + shareable link is generated.
  • Collaborators open the link -> diagram loads from the session (if present).
  • Buttons available: "Pull Latest" (import session JSON) and "Push My Changes" (overwrite session JSON).
  • Backend storage is a simple JSON blob store (Supabase / Firebase / serverless DB).
  • "Last push wins" semantics for conflict resolution (no merges in Phase 1).
  • Optional: auto-expire sessions after N hours/days.

Why this is incremental-friendly

  • Uses existing export/import JSON functions.
  • No canvas internals or cursor syncing changes.
  • Provides tangible user value and paves way for future real-time features.

Implementation hints (for maintainers/contributors)

  • Add a Collaboration modal in the toolbar.
  • Create simple REST calls: POST /session, GET /session/:id, PUT /session/:id backed by Supabase or similar.
  • Add URL param support: ?session=<id> for quick join.
  • UI should warn if Pull will overwrite local unsaved changes.

I can implement Phase 1 and open a PR if this seems acceptable. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions