Skip to content
This repository was archived by the owner on Mar 22, 2018. It is now read-only.

cbetta/virgil-rails-chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rails Chat application with Virgil Security

This is an example of how to use the Virgil Security APIs using the official JS and Ruby SDKs to implement end to end encryption in a chat application.

Technology

This demo uses

Running the demo locally

  • Clone this repository
  • Run bundle to install all dependencies
  • Run rake db:setup to initialize the database
  • Run rails server to start the app
  • Visit http://localhost:5000/ and register
  • In a separate browser or on a different machine create a second account.
  • Select the other user in the UI
  • Start a conversation

All messages are client side encrypted and can not be read by the server. To inspect this behaviour, open a rails console and run Message.pluck(:content) to inspect the message content.

Before/After encryption

There are 2 special branches of this repo, the before and after branch show the state of this application in their respective before and after adding end-to-end-encryption states.

Here are the exact differences between these 2 branches.

Caveats

This repository includes the app.virgilkey, key password, app ID, and access token. In a production environment these should probably not live with your code but somewhere separated like environment variables.

Useful links

About

End-to-end encrypted messaging using Virgil Security, Rails, ActionCable and jQuery

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published