Giter Site home page Giter Site logo

statamic / collaboration Goto Github PK

View Code? Open in Web Editor NEW
33.0 7.0 13.0 385 KB

Real-time, multi-user editing with Statamic via websockets

Home Page: https://statamic.com/addons/statamic/collaboration

JavaScript 85.34% PHP 5.88% Vue 8.78%
collaboration collaborative-editing multi-user websockets

collaboration's Introduction

Collaboration

Real-time collaboration and multi-user authoring for Statamic Pro.

Features

  • Presence indicators when multiple people have the same entry opened.
  • Fields get locked when someone else focuses them.
  • Updates to field values are reflected to everyone.

Installation

You can install and configure the Collaboration addon using a single command:

php please install:collaboration

The command will install the statamic/collaboration addon, setup Laravel's broadcast scaffolding and prompt you to select which broadcast driver you wish to use.

For more information on the specifics for each broadcast driver, please review the following:

Laravel Reverb

The install:collaboration command will install Laravel Reverb into your application. After installation, run php artisan reverb:start to run Reverb's WebSockets server, then the Collaboration addon should start working in the Control Panel.

When you deploy your application to a server, you will need to run the Reverb WebSockets server as a daemon (php artisan reverb:start). If you're using Laravel Forge, there's a Reverb toggle in your site's "Application" panel.

For further information on Reverb, please review the Laravel documentation.

Pusher

The install:collaboration command will install Pusher's PHP SDK into your application. After installation, you should add your Pusher credentials to your .env file:

PUSHER_APP_ID="your-pusher-app-id"
PUSHER_APP_KEY="your-pusher-key"
PUSHER_APP_SECRET="your-pusher-secret"
PUSHER_HOST=
PUSHER_PORT=443
PUSHER_SCHEME="https"
PUSHER_APP_CLUSTER="mt1"

You should also ensure you have enabled the "Client Events" setting (found under the "App Settings" page in the Pusher Dashboard).

Other

If you're planning on using a different broadcasting driver, there are a few additional steps you'll need to take to get it working:

  1. Install & configure your broadcasting driver (obviously)
  2. Update the BROADCAST_DRIVER in your .env
  3. Create a resources/js/cp.js file and add it to the Control Panel.
  4. In your resources/js/cp.js file, register a callback to override Statamic's Echo config:
Statamic.booting(() => {
    Statamic.$echo.config(() => ({
        broadcaster: "pusher",
        key: Statamic.$config.get('broadcasting.pusher.key'),
        cluster: Statamic.$config.get('broadcasting.pusher.cluster'),
        wsHost: Statamic.$config.get('broadcasting.pusher.host'),
        wsPort: Statamic.$config.get('broadcasting.pusher.port'),
        wssPort: Statamic.$config.get('broadcasting.pusher.port'),
        forceTLS: false,
        encrypted: true,
        disableStats: true,
        enabledTransports: ["ws", "wss"],
    }));
});

Configuration

Sound Effects

By default, the Collaboration addon plays sound effects when other users join & leave entries.

If you wish to disable these, you may publish the configuration file (via php artisan vendor:publish --tag=collaboration) and set sound_effects to false.

// config/collaboration.php

return [
    'sound_effects' => false,
];

Configuration

Sound Effects

By default, the Collaboration addon plays sound effects when other users join & leave entries.

If you wish to disable these, you may publish the configuration file (via php artisan vendor:publish --tag=collaboration) and set sound_effects to false.

// config/collaboration.php

return [
    'sound_effects' => false,
];

Advanced Usage

When the "meta data" of a fieldtype is updated, it will be broadcast to the other users in the channel. If you have a fieldtype that contains a large amount of meta data, and it gets updated (some may just provide initial state and never change), you may consider specifying the fields that should be broadcast. This could help keep message sizes smaller and improve performance.

In your fieldtype's preload method, you can use the special __collaboration key to list the fields.

public function preload()
{
    return [
        'hello' => 'world',
        'foo' => 'bar',
        '__collaboration' => ['foo'],
    ];
}

When the meta data gets updated, only the foo value will be broadcast. The remaining values will get merged in automatically.

collaboration's People

Contributors

bradfloodx avatar dependabot[bot] avatar duncanmcclean avatar granitibrahimi avatar helloiamlukas avatar jackmcdade avatar jasonvarga avatar jesseleite avatar lotarbo avatar robdekort avatar ryanmitchell avatar sauerbraten avatar theutz avatar wiebkevogel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

collaboration's Issues

Doesn't work if site handle has dots)

Hello, I use domain as site handle.
And i have 403 error on broadcasting/auth
I think it because method channelNameMatchesPattern returns false
This is what i have

$channel = entry.c3377fe3-0335-4f7f-9827-36228c855b29.example.com
$pattern = entry.{id}.{site}

Statamic 4.25.0

PHP 8 support (incompatible Pusher lib version)

Hi!

Thanks for your work on this rad plugin ๐Ÿ‘

I'd like to ask for PHP 8 support. statamic/collaboration requires pusher/pusher-php-server "~3.0", however PHP 8 support in this package was introduced in v4.1.5.

Would it be possible to migrate that dependency?

No Locking or Field Updates - Only Presence Indicators

Great add-on. Thanks.

The presence indicators work well, but the Field Locking and Field Updates I cannot get to work.

Any ideas?

Statamic 3.3.26 Pro
Laravel 8.83.23
PHP 8.0.21
aryehraber/statamic-logbook 2.1.0
statamic/collaboration 0.4.0
statamic/ssg 1.1.0
swiftmade/statamic-clear-assets 1.1.0
webographen/statamic-admin-log 1.0.6
withcandour/aardvark-seo 2.0.28

I can see a tonne of console logs...

[Collaboration] ๐Ÿ“ฃ Broadcasting "chunked-saved" ...

But only broadcasts and no receiving. No console errors.

Tested in Safari and Chrome.

Thoughts?

Ensure it is constrained to a single hostname

At the moment, changes will be communicated regardless of the hostname/domain as long as the Pusher credentials are shared.

An example of where usage on a single hostname is important:
A workflow where pull requests for new features result in a newly spun up site. The PR'd site should not communicate with sites on other branches.

Fields doesnt update after another user change some text on random field

So, i just downloaded this package, i can hear the sounds that another user joined the page which im filling, also i can see the user-s icon and etc at the top.

However when another user or me update some field on this page, i cant see the changes in field, still need to refresh the page to see the changes.

No connection for Global content

It seems collaboration does not work for Global content. Perhaps this is because the content is structured differently and stored in the data array?

Screen Shot 2021-08-10 at 4 02 53 pm

Call to undefined method App\Models\User::name()

Hi folks. I'm trying out this package and the installation seem to be ok. But the UI gets stuck trying to connect to the socket.

image

Checking the network I can see that the /broadcasting/auth request is failing do to Call to undefined method App\Models\User::name().

I'm using the Eloquent Driver for the users and here's my configs:

// app/Models/User.php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;

class User extends Authenticatable
{
    use HasApiTokens, HasFactory, Notifiable;

    // ...
}
// config/auth.php

'providers' => [
        'users' => [
            'driver' => 'eloquent',
            'model' => App\Models\User::class,
        ],
]
//config/statamic/users.php

'repository' => 'eloquent',

I tried extending the User model from Statamic\Auth\Eloquent\User but this brought my server down.

Getting a Attempting websocket connection...

I have Statamic 4 deployed with Fly.io and on editing in production, I keep getting this error.

When in dev it is just fine, which I assume has to do with the force_https for Fly.

SyntaxError: Cannot use import statement outside a module

Getting this running again locally and the JS is throwing some errors.

Uncaught SyntaxError: Cannot use import statement outside a module

image

Also, maybe related, the js/audio resources didn't auto-publish, and the vendor:publish script didn't work so I had to manually copy and paste the files into place. maybe this stems from me not copying everything or something, or my symlinked sandbox?

Collaboration Not Working: `TypeError: can't access property "presenceChannel", this.connector is undefined`

Bug description

I just installed collaboration for the first time and it's fully just not functioning. I've tried uninstalling and reinstalling, switching from reverb to pusher etc. I also get the following error in the browser console:

TypeError: can't access property "presenceChannel", this.connector is undefined
    value https://crimson.test/vendor/statamic/cp/build/assets/app-4fb7000f.js:14
    M https://crimson.test/vendor/statamic/cp/build/assets/app-4fb7000f.js:21
    initializeEcho https://crimson.test/vendor/collaboration/build/assets/collaboration-df9994a0.js:1
    start https://crimson.test/vendor/collaboration/build/assets/collaboration-df9994a0.js:1
    boot https://crimson.test/vendor/collaboration/build/assets/collaboration-df9994a0.js:1
    boot https://crimson.test/vendor/collaboration/build/assets/collaboration-df9994a0.js:1
    <anonymous> https://crimson.test/vendor/collaboration/build/assets/collaboration-df9994a0.js:1
    start https://crimson.test/vendor/statamic/cp/build/assets/app-4fb7000f.js:21
    start https://crimson.test/vendor/statamic/cp/build/assets/app-4fb7000f.js:21
    mounted https://crimson.test/vendor/statamic/cp/build/assets/app-4fb7000f.js:641
    invokeWithErrorHandling https://crimson.test/vendor/statamic/cp/build/assets/app-4fb7000f.js:5
    callHook$1 https://crimson.test/vendor/statamic/cp/build/assets/app-4fb7000f.js:5
    mountComponent https://crimson.test/vendor/statamic/cp/build/assets/app-4fb7000f.js:5
    $mount https://crimson.test/vendor/statamic/cp/build/assets/app-4fb7000f.js:5
    $mount https://crimson.test/vendor/statamic/cp/build/assets/app-4fb7000f.js:9
    _init https://crimson.test/vendor/statamic/cp/build/assets/app-4fb7000f.js:5
    Vue$3 https://crimson.test/vendor/statamic/cp/build/assets/app-4fb7000f.js:5
    start https://crimson.test/vendor/statamic/cp/build/assets/app-4fb7000f.js:171
    <anonymous> data:text/javascript;base64,U3RhdGFtaWMuY29uZmlnKFN0YXRhbWljQ29uZmlnKTsgU3RhdGFtaWMuc3RhcnQoKQ==:1
[app-4fb7000f.js:5:38036](https://crimson.test/vendor/statamic/cp/build/assets/app-4fb7000f.js)

This installation is using eloquent-driver to manage entries, I guess it could be an issue with that?

How to reproduce

  1. Install the collaboration plugin
  2. Check the browser console?

Environment

Environment
Application Name: Statamic
Laravel Version: 11.7.0
PHP Version: 8.3.6
Composer Version: 2.7.7
Environment: local
Debug Mode: ENABLED
URL: crimson.test
Maintenance Mode: OFF

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: null
Cache: file
Database: mysql
Logs: stack / single
Mail: smtp
Queue: sync
Session: file

Statamic
Addons: 2
Sites: 1
Stache Watcher: Enabled
Static Caching: Disabled
Version: 5.19.0 PRO

Statamic Addons
statamic/collaboration: 1.0.0
statamic/eloquent-driver: 4.12.2

Statamic Eloquent Driver
Asset Containers: file
Assets: eloquent
Blueprints: file
Collection Trees: file
Collections: file
Entries: eloquent
Forms: file
Global Sets: file
Global Variables: file
Navigation Trees: file
Navigations: file
Revisions: file
Sites: file
Taxonomies: file
Terms: file
Tokens: file

Additional details

No response

Collaboration addon thumbnails appear broken when mixing local and production users

Bug description

The Issue

If you run the Collaboration addon on both local environment production environments, a local user's avatar will appear as a broken thumbnail to the production user.

Here are a couple of screenshots from different Statamic installations

Screenshot 2023-05-15 at 12 16 08
Screenshot 2023-05-15 at 12 18 34

More information

This happens on both v3 and v4

I suppose you could just say "Don't run the addon locally" but since I work locally 90% of the time, including making edits, using Collaboration is really handy to see if a user is editing the same page I'm on, so I know to avoid conflicts.
It works great between local/production apart from this thumbnail issue.

How to reproduce

  1. Set up Collaboration locally
  2. Set up Collaboration on a production environment
  3. Log in as user1 on a particular entry on the local environment
  4. Log in as user2 on the same entry on the production environment
  5. On the production environment, observe user1's avatar appears as a broken thumbnail

Logs

No response

Environment

Environment
Application Name: Statamic
Laravel Version: 9.52.5
PHP Version: 8.1.5
Composer Version: 2.3.3
Environment: local
Debug Mode: ENABLED
URL: thelens.wip
Maintenance Mode: OFF

Cache
Config: CACHED
Events: NOT CACHED
Routes: CACHED
Views: CACHED

Drivers
Broadcasting: pusher
Cache: statamic
Database: mysql
Logs: stack / single
Mail: smtp
Queue: sync
Session: file

Statamic
Addons: 3
Antlers: runtime
Stache Watcher: Enabled
Static Caching: Disabled
Version: 3.4.9 PRO

Statamic Addons
jaygeorge/admin-styler: dev-main
statamic/collaboration: 0.6.0
statamic/seo-pro: 4.0.1

Installation

Fresh statamic/statamic site via CLI

Antlers Parser

runtime (new)

Additional details

No response

Collaboration addon thumbnails appear broken when mixing local and production users

Bug description

The Issue

If you run the Collaboration addon on both local environment production environments, a local user's avatar will appear as a broken thumbnail to the production user.

Here are a couple of screenshots from different Statamic installations

Screenshot 2023-05-15 at 12 16 08
Screenshot 2023-05-15 at 12 18 34

More information

This happens on both v3 and v4

I suppose you could just say "Don't run the addon locally" but since I work locally 90% of the time, including making edits, using Collaboration is really handy to see if a user is editing the same page I'm on, so I know to avoid conflicts.
It works great between local/production apart from this thumbnail issue.

How to reproduce

  1. Set up Collaboration locally
  2. Set up Collaboration on a production environment
  3. Log in as user1 on a particular entry on the local environment
  4. Log in as user2 on the same entry on the production environment
  5. On the production environment, observe user1's avatar appears as a broken thumbnail

Logs

No response

Environment

Environment
Application Name: Statamic
Laravel Version: 9.52.5
PHP Version: 8.1.5
Composer Version: 2.3.3
Environment: local
Debug Mode: ENABLED
URL: thelens.wip
Maintenance Mode: OFF

Cache
Config: CACHED
Events: NOT CACHED
Routes: CACHED
Views: CACHED

Drivers
Broadcasting: pusher
Cache: statamic
Database: mysql
Logs: stack / single
Mail: smtp
Queue: sync
Session: file

Statamic
Addons: 3
Antlers: runtime
Stache Watcher: Enabled
Static Caching: Disabled
Version: 3.4.9 PRO

Statamic Addons
jaygeorge/admin-styler: dev-main
statamic/collaboration: 0.6.0
statamic/seo-pro: 4.0.1

Installation

Fresh statamic/statamic site via CLI

Antlers Parser

runtime (new)

Clarify requirements for basic usage

Tried adding the Collaboration addon (version 0.8.1) to my Statamic project (version 4.5.7.0) on Laravel 10, and the listed addon "features" (presence indicators for multiple people, fields getting locked, etc.), are not working on the site.

I followed every step in the installation documentation, so I am now at a loss why it isn't working as expected. Wondering if there are any additional requirements or "gotchas" that aren't mentioned in the documenation. Here a few guesses I've brainstormed:

  1. When creating a Pusher account, you could create either a "Channels" app or a "Beams" app. I created a Channels app, as that seemed the most appropriate, but maybe I was wrong.
  2. Our site has three different environments (1 domain for each environment), so when initializing our Pusher app, I selected the checkbox to create apps for multiple environments. When adding the app keys to our .env files, I made sure the -development app keys matched the developement .env file and so on, but maybe the addon wasn't intended to be used this way. All of our environments are using Statamic Pro.
  3. Instead of flat files, we are using a database. We have also created symbolic links in config/filesystems.php for content files.
  4. Users do not have an avatar image field, not sure if that is required.

It would also be helpful to have a way to test the addon. I can view my Pusher app (for the development env, where I am testing) and see graphs that show multiple people/users connecting, however this does not have any affect on the control panel when multiple users are editing the same collection entry.

Need to install:broadcasting separately?

Hi

I installed php please install:collaboration, set everything up

  • I've added the Pusher credentials to my .env
  • Enabled the "Client Events" setting in Pusher Dashboard
  • BROADCAST_CONNECTION=pusher

I've ran php artisan config:cache , but I still see a Attempting websocket connection... message

  • Running Statamic 5.8.0
  • Collaboration 1.0.0

I see this error message in Pusher Dashboard

Cannot broadcast client event (connection not subscribed to channel presence-entry.xxxxxxx-xxx-xxxx
x-0a0b38903058.default)

Dev Tools in the /cp shows a missing file?

broadcasting/auth 404 (Not Found)

I asked about this in Discord
https://discord.com/channels/489818810157891584/1252923239307415653

I was advised to install broadcasting manually.

php artisan install:broadcasting

I did, and that fixed it.

However the docs indicate this is done as part of the php please install:collaboration command.

Is there something wrong with the addon, or do the docs need updating?

Data loss when second user enters entry

Description

When a second user opens an entry while an other user is editing a bard field, the typed content will disappear and the cursor will focus to the end of the document.

How to reproduce

  1. User A opens an entry that includes a bard field
  2. The bard field of this entry includes at least two paragraphs/lines
  3. User A writes text in the first paragraph/line of the bard field
  4. While User A is typing, User B is opening the entry in the browser
  5. A part of the typed text of User A will disappear and the focus of the cursor will be at the end of the paragraph/line.

It seems like when the second user enters, an update is broadcasted โ€“ but this update still includes the old content.

Missing functionality

When we installed this addon and tried it out the first part with presence indicators works fine, but the rest is not happening:

  • Fields get locked when someone else focuses them.
  • Updates to field values are reflected to everyone.

Is there anything we need to do to enable / be aware of to make it work?

Vendor publish command fails

Not sure if this is intentional or not but this addon doesn't have the production assets compiled. I think this might be because in the future you're planning on implementing Jason's composer dist package, like in core.

Although, for testing, it might be a good idea to ask users to compile the assets before they publish because it just throws errors.

Can't update to v0.8

I'm seeing this in my CI pipeline after updating from v0.7 to v0.8

In CurlDownloader.php line 630:
                                                                               
  The "https://github.com/statamic/collaboration/releases/download/v0.8.0/dis  
  t.tar.gz" file could not be downloaded (HTTP/2 404 )  

Data loss due to Pusher error

Bug

When having a large document, live updates are chunked. The size of the chunk is set to 8000 characters.

const chunkSize = 8000;

In certain cases this causes updates not to be broadcasted, as the maximum message size of 10kb is exceeded. This error neither shows up in the editor, nor in the console.

This can lead to data loss: As editors will not be able to see changes by others, they might overwrite their content by saving the document.

By turning on Pusher logs via Pusher.logToConsole = true; it is possible to see the full error message

Pusher : Event recd : {"event":"pusher:error","data":{"code":null,"message":"The data content of this event exceeds the allowed maximum (10240 bytes). See https://pusher.com/docs/channels/server_api/http-api#publishing-events for more info"}}

Solution

An easy solution for this would be to decrease the chunk size.

const chunkSize = 8000;

Since one character can have up to 4 bytes, the safest would be to set the chunk size from 8000 to 2500.

Attempting websocket connection - Taxonomies

Bug description

I've configured pusher, it works great on collections - but doesn't seem to work on Taxonomies or Globals? The message below is permanently shown.

Screenshot 2022-03-05 at 07 57 33

Is there additional configuration required to make it work with Taxonomies and Globals?

It appears Pusher is working, just not everywhere?

How to reproduce

  • Install Pusher, login as two users
  • Navigate both users to a collection entry to verify it works
  • Navigate both users to a taxonomy term.

Logs

There are no logs in storage/logs

Versions

Statamic 3.2.36 Pro
Laravel 8.83.2
PHP 8.0.8
statamic/collaboration 0.3.0

Installation

Fresh statamic/statamic site via CLI

Additional details

No response

Temporary connection loss can lead to data loss

When a user A loses connection temporarily and misses changes to a field done by another user B, A will not see the changes by B. When A now changes the field herself, her old state plus her changes are sent to user B, overriding his earlier changes.

Tracking the field state over time, it goes like this:

  1. A and B see foo
  2. A goes offline
  3. B adds bar to the field
  4. A sees foo, B sees foobar
  5. A reconnects, still sees foo
  6. A adds bla to the field
  7. A's change is sent to B
  8. A and B both see foobla

JS error in CP

Client asked if they could work together so good reason to try out this addon :). I got a JS error though:

SyntaxError: Unexpected identifier 'Manager'. import call expects exactly one argument.

Also had to manually publish the assets #25

New contents in stack are deleted after publication

When editing entries with several users, we have the problem that edited entries in a stack can be deleted by publishing them, for example:

User 1: is in the entry and makes a change
User 2: opens another entry from the same entry (Relationship-Fieldtype: edit) in a stack and make some changes
User 1: stores and publishes the new content
User 2: gets a notification and has only the possibility to reload the page and not save its changes any more

Suggestion would be to include a "cancel" button in the dialog, so that user 2 gets the possibility to save or continue. What did you think?

Large Bard field values fail to synchronize

Pusher only supports payloads up to 10KB. Bard fields with a lot of content exceed this limit and changes made by one user are invisible to everyone else.

They suggest a few solutions here: https://support.pusher.com/hc/en-us/articles/360019115473

Another way forward could be to make use of tiptap's/prosemirror's support for collaboration where only the changes instead of the entire new field value is sent to peers, but this requires special casing Bard fields.

Broken bard field after live preview was opened

If several users work in the same entry, the bard field can be broken. Reproducible by:

  1. user 1 blocks bard field and adds a set
  2. user 2 sees set collapsed (at this point, maybe not quite as bad as I thought)
    Bildschirmfoto 2019-11-07 um 09 39 50
  3. user 2 goes to live preview and closes the live preview again
  4. user 2 will not see the sets in the bard field correctly anymore
    Bildschirmfoto 2019-11-07 um 09 42 56

Collaboration Addon - Icons not round?

Super small thing, but I noticed the icon indicating a field is locked isn't round.
Screenshot 2023-06-08 at 11 36 15

Environment
Application Name: Statamic
Laravel Version: 10.13.2
PHP Version: 8.2.6
Composer Version: 2.5.7
Environment: local
Debug Mode: OFF
URL: preview.website.com
Maintenance Mode: OFF

Cache
Config: CACHED
Events: NOT CACHED
Routes: CACHED
Views: CACHED

Drivers
Broadcasting: pusher
Cache: redis
Database: mysql
Logs: stack / single
Mail: smtp
Queue: redis
Session: file

Statamic
Addons: 1
Antlers: runtime
Stache Watcher: Enabled
Static Caching: half
Version: 4.6.0 PRO

Statamic Addons
statamic/collaboration: 0.6.0

Support Statamic 3.3

Would this be as straightforward as updating the version constraints in the composer.json file?

ArgumentCountError: Too few arguments to function Statamic\Providers\RouteServiceProvider::Statamic\Providers\{closure}(), 1 passed and exactly 2 expected

Hi,

I'm getting an odd error from the RouteServiceProvider when the collaboration package attempts to hit /auth for authorizing broadcasting. I can't figure out why this is.

Request POST /broadcasting/auth
socket_id=135853.30805883&channel_name=presence-entry.6dbca0a3-b33e-4382-bd5c-f83e2f4fe74b.default

Error

ArgumentCountError: Too few arguments to function Statamic\Providers\RouteServiceProvider::Statamic\Providers\{closure}(), 1 passed and exactly 2 expected in file C:\Users\marius\OneDrive\Desktop\kunder - custom\redacted\vendor\statamic\cms\src\Providers\RouteServiceProvider.php on line 167

#0 [internal function]: Statamic\Providers\RouteServiceProvider->Statamic\Providers\{closure}('default')
#1 C:\Users\marius\OneDrive\Desktop\kunder - custom\redacted\vendor\laravel\framework\src\Illuminate\Broadcasting\Broadcasters\Broadcaster.php(192): call_user_func(Object(Closure), 'default')
#2 C:\Users\marius\OneDrive\Desktop\kunder - custom\redacted\vendor\laravel\framework\src\Illuminate\Broadcasting\Broadcasters\Broadcaster.php(173): Illuminate\Broadcasting\Broadcasters\Broadcaster->resolveExplicitBindingIfPossible('site', 'default')
#3 C:\Users\marius\OneDrive\Desktop\kunder - custom\redacted\vendor\laravel\framework\src\Illuminate\Broadcasting\Broadcasters\Broadcaster.php(107): Illuminate\Broadcasting\Broadcasters\Broadcaster->resolveBinding('site', 'default', Array)
#4 [internal function]: Illuminate\Broadcasting\Broadcasters\Broadcaster->Illuminate\Broadcasting\Broadcasters\{closure}('default', 'site')
#5 C:\Users\marius\OneDrive\Desktop\kunder - custom\redacted\vendor\laravel\framework\src\Illuminate\Collections\Collection.php(695): array_map(Object(Closure), Array, Array)

New users should get the latest state

If user A is in the middle of editing, and hasn't saved yet
When user B joins they'd see the latest working copy.

When user B joins, user A should broadcast their entire state.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.