Over the last weeks I spent my free-time experimenting further with the SAFE DOM API. The result is a small chat app similar to Whatsapp. Inspired by MaidSafe’s mobile showcase chat app all messages are end-to-end encrypted using sealed messages. Feel free to take advantage of the safe.js API wrapper or any other code that might help you for your own projects.
I wrote this to gain further knowledge of the SAFE API and want to share it in the hope that others can benefit from the code. Btw.: I know that the code is by no means perfect / clean or anything but I hope it’s at least structured enough so others can read and understand it.
In order to use the chat, just browse the following URL using SAFE Browser: safe://mind2chat/
Let me know what you think or post if you have any questions or feedback! Of course you can also give me feedback using Mind.Chat My username is: Mindphreaker
Please note: Some actions (registering, etc.) can take a little while, please be patient. ^^ If you are in doubt, open the dev tools which should give quite verbose feedback about the status of the app.
The chat automatically polls for new conversations and / or messages, so you don’t have to refresh the page.
@nice pointed out, that there can occure “NFS file not found” errors for the JS files. It seems this happens if you call the service with a missing slash at the end (like this: safe://mind/chat). This seems to work for the html file itself but not for the linked JS files.
Please make sure, that there is a slash at the end of the URL: safe://mind/chat/
Due to my account limit I had to reupload the code to a new service (domain) in order to keep maintaining it. I took the chance and renamed the app to Mind2Chat because it’s version 2, makes more sense and is kinda funny. It also fixes the bug with the missing slash at the end of the url: safe://mind2chat/
The old url still works and redirects to the new one.
Nice work, @Mindphreaker. Thanks for sharing the code. We would like to get feedbacks in the dev forum for improving the documentation. Can you let us know how helpful it was and also on places that needs more clarity? Your inputs will be very helpful to improve the gaps and help other devs. Thanks again for trying out the APIs.