Build a collaborative drawing app

In this tutorial, you’ll discover how to use PubNub to set up and power collaborative applications.

See CoDoodler in action

Draw on the shared canvas in the demo, or clone the app and run it with your own keys

Demo

CoDoodler

Draw on a shared canvas with others in real time. A PubNub demo built with plain JavaScript and the PubNub JavaScript SDK: messages, signals, and Presence.

GitHub

PubNubDevelopers/collaboration-demo

The complete source. Add your publish and subscribe keys to js/config.js and open index.html

git clone https://github.com/PubNubDevelopers/collaboration-demo.git
View on Github
About this tutorial

A shared canvas with no server code

PubNub can power your application to be able to have multiple users collaborate and interact with each in real time.

Your app will include:

  • Publish: Update users in real-time with mouse positions, drawing, and name updates.
  • Subscribe: Listen for and view other mouse positions, drawing, and name updates in real-time.
  • Presence: Get currently present users and listen to new presence events. Generate new drawing pointers that track other user mouse positions and names.


Tutorial: Build a real-time collaborative drawing app