A hosted version of this demo can be found at https://pubnub-healthcare.netlify.app/
Demo | Description | PubNub APIs used |
---|---|---|
HIPAA and GDPR compliant Chat | Uses the PubNub SDK to show how a chat application could be implemented compliant with both HIPAA and GDPR, with features such as group In-App Messaging, typing indicators, message reactions, unread message counts and presence indicators. | Publish & Subscribe, Presence, Message Persistence (for Message Persistence & unread message counts), App Context, Message Reactions (message reactions & read indicators), Functions (for moderation) |
Live Healthcare Events | Shows how PubNub can make a high-occupancy live event interactive, with polls and live chat | Publish & Subscribe for chat and Signals for reactions |
Vehicle Dispatch | Share vehicle location or the location of any asset securely over PubNub. Track those vehicles and assets as they move in real-time | Publish & Subscribe |
Doctor-Patient Collaboration | Real-time collaboration is demonstrated with a whiteboard app | Publish & Subscribe (for drawing), User State (for cursor position) |
Medical Devices | Control medical devices and infrastructure as well as see the state of your own devices using PubNub | Publish & Subscribe |
Firefox will not allow you to share storage between pages. This is a feature and not a bug. Please load the demo from a local server to use with Firefox, e.g. python3 -m http.server 8001
. Be sure to use localhost
rather than the IP address when doing this, for full compatibility with the IoT demo. These are only issues running locally, you will not experience issues running a hosted version of this app
To run this project yourself you will need a PubNub account. Generate a Google API key by following these instructions. When you restrict your key, make sure the following APIs are enabled under the API restrictions section:
- PubNub Account (Free)
-
You’ll first need to sign up for a PubNub account. Once you sign up, you can get your unique PubNub keys from the PubNub Developer Portal.
-
Sign in to your PubNub Dashboard.
-
Click Apps, then Create New App.
-
Give your app a name, and click Create.
-
Click your new app to open its settings, then click its keyset.
-
Enable the Presence feature on your keyset (check 'Presence Deltas' and 'Generate Leave on TCP FIN or RST')
-
Enable the Message Persistence feature on your keyset and choose a duration
-
Enable the Stream Controller feature on your keyset
-
Enable the Files feature on your keyset and choose a retention duration
-
Enable the App Context feature on your keyset. Make sure you check all the checkboxes related to events, i.e. User and Channel Metadata Events as well as Membership Events.
-
The hosted variant of this app uses Functions for moderation, specifically https://www.pubnub.com/integrations/chat-message-profanity-filter/.
-
Copy the Publish and Subscribe keys and paste them into your app as specified in the next step.
-
Clone the repository
-
Under the
shared
folder, openkeys.js
and add your keys here, replacing the existing placeholder data.
Please fork the repository if you'd like to contribute. Pull requests are always welcome.
The application is designed primarily to be used by two different users in separate tabs (so one user can talk with the other). If you want to have the same user running in multiple tabs, for example to demonstrate medical device messages in one tab being received in the private chat channel in another tab, then do the following:
- Log in as a user as normal
Duplicate
the tab
You can now experience the showcase as the same user in both the original and duplicated tabs. Be aware that if you log out of one tab, the application will not automatically log you out of the duplicated tab.