Skip to content

marcovidonis/non-persistent-chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Non-Persistent SignalWire Chat

Inspired by Christian Stuff's talk at CommCon21.

Features:

  • Non-persistent chat for privacy and HIPAA compliance
  • New users receive the chat history automatically when they join
  • When the session ends, chat history is gone

The API provides chat history with chatClient.getMessages(), but we're not using that.

Back-end

Running on codesandbox.io with API credentials. The example back-end on the SignalWire docs doesn't seem to work -- fork the codesandbox project and set the URL as an env variable.

Usage

Run vite to run the app in development, or vite build to build it. In the UI, insert a user name and join the chat. If there are other users in the room, the app will poll a random participant, who will broadcast their chat history object to all participants. This way, all participants always see the same history.

The whole chat history exists as a state variable in the participants' front-ends. When the last participant leaves the room, all history is gone.

Video

video.-.non-persistent.chat.mp4

Licence

GNU LGPLv3

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published