Sanctuary - A secure synchronous lightweight chatroom with zero logging and total transience 
Tags: security, python, privacy, anonymous
Published: 2020-04-16 08:57:48

### Imagine situations when...
* You want to send evidence to the human resource department about workplace harassment but you run the risk of losing your job if you are discovered doing so!
* You have lost all your communication equipment on a secret mission though you need to dispatch a directive securely to your units without anybody else taking a peek!
* You are talking to your sweetheart and suddenly their phone is snatched away - There is probably no way for you to get rid of all conversations from both the sides!

### TL;DR
I have created a secure synchronous lightweight chatroom web application with the following features -
* Provides real-time conversation using synchronous sockets
* Zero logging or data storage to minimize vulnerabilities
* No-frills alias and password-protected chatroom creation
* Refresh, close tab, logout or purge chatroom to cover tracks
* Transient chatrooms stay valid for 60 minutes before auto-purge
* Complete support for HTML5 formatting tags in conversations
* Lightweight and responsive so usable across multiple devices
* State-of-the-art chatroom user session management

### You can find the repository here
[Sanctuary by t0xic0der](https://github.com/astrosonic/sanctuary)

### Using stuffs like
* **Socket.IO** for *real-time, bidirectional and event-based communication*
* **Flask** for *web backbone, complex scalability and WSGI layer*
* **Hashing techniques** for *password protection, identification and authentication*

### Why would I need a tool like this?
* There are not many no-frills messaging applications out there.
* All platforms gather your data and footprints are recorded.
* Most platforms would want you to register at their platform first.
* Application would also require resources for installation.
* All conversations are mostly logged in remote servers.
* Cryptography used in encrypting your messages is not reliable.
* There is no way to maintain anonymity during conversations.

### Okay, I'm listening...
Glad that you are listening! 

I have created a platform hosting lightweight and protected chatrooms for secure synchronous conversations where no data is logged and there is total transience. Using synchronous sockets, I was able to provide for real-time messaging. There are less chances of impending vulnerabilities or risks on data breach as literally nothing is being stored. Being a web application, it does not require any kind of offline installation.
![homepage](https://dev-to-uploads.s3.amazonaws.com/i/undx8fc0p65xi9bgl46n.png)

The no-frills nature of it requires you to provide just an alias - a false identity - and a chatroom name and password to get started. Just enter a secure password of your own and you will be granted with a chatroom link. The chatroom can exist for as long as 60 minutes before self-destructing. You can of course prematurely purge it!
![makeroom](https://dev-to-uploads.s3.amazonaws.com/i/5p8c5dmiyc2psesz8mwp.png)

When the chatroom is created, all you need to do is share the link and the password to it with your allies so that they can roll in for some secure conversation. They can join, chat and leave anytime within the valid duration as many times as they want. As there can be many chatrooms with the same name, special care has been taken to distinguish between them.
![joinroom](https://dev-to-uploads.s3.amazonaws.com/i/0arwvx1k4j7o8v1ujp8y.png)

Now, that you have joined the room - you can chat with the participated members. To spice things up, I have added full support to HTML5 tags so you can extend your experience by sharing images, videos and documents using them. The following can be done from within the chatroom to maintain total safety.
* You can **refresh the page** to get rid of all messages at your end while staying in the chatroom.
* You can **logout from the room** to get rid of all messages at your end while leaving the chatroom.
* You can **purge the chatroom** to get rid of all messages from all the ends while kicking everyone from the chatroom.
![chatroom](https://dev-to-uploads.s3.amazonaws.com/i/c5edxkmkyuzyyazh5gbw.png)

You can of course logout from the room if you are done with your part of the conversation but this would remove all the conversations only from your end. Once this action is performed, the session is invalidated and you cannot backtrack your way to the chatroom unless you decide to log back in again to continue.
![sesskill](https://dev-to-uploads.s3.amazonaws.com/i/t79etd9q5v6xlusied6w.png)

On *chatroom purge*, all conversations are removed from all the ends and every participant is removed from the chatroom. The chatroom is then destroyed - meaning that nobody else can join the chatroom henceforth. This capability is given to every participant as there is no telling that which side can be compromised.
![shutroom](https://dev-to-uploads.s3.amazonaws.com/i/6oz1q0jjs1axuu0czdrl.png)

Well, there would always exist people who like to indulge in the monkey business of finding their way into expired and invalidated sessions. With the state-of-the-art session management system and user-chatroom bind, I was able to create a robust and secure protection for the chatrooms. This is how it would show up when you do the undone.
![exprsess](https://dev-to-uploads.s3.amazonaws.com/i/u1x01e81o5lk9q3gie74.png)

### What are your future plans?
I am planning to build myself a gaming PC - fully equipped with twin RTX2080Tis and get into the streaming business full-time because ....

### Hold on! I am asking about the future of this project
Oh my bad!

The project is currently in its infancy. Bugs are discovered and fixed everyday. New feature requests are made and worked upon continually. It would be sometime before this thing becomes production ready but that definitely does not mean you cannot try it. In fact I would encourage you to do so. 

If you end up liking my work, I would ask you give stars to it and fork it so that you can contribute to the development of the project. This project has been free and it will always be. 

### You can find the repository here
[Sanctuary by t0xic0der](https://github.com/astrosonic/sanctuary)