Photo by Pankaj Patel on Unsplash
Realtime apps are everywhere. From instant messaging apps to document collaboration software and games. You may have built applications with it using open source library such as SignalR, SocketIO or some other commercial products. I’ve used SignalR and and SocketIO, and most recently building a chat SDK with SocketIO in the last ProductHunt hackathon.
I and some colleagues have had to design state logic around real-time engines like SocketIO and SignalR in the past. Most of the time it’s a project that needs a real-time dashboard. These implementations had similar logic or architecture and it felt like there was a repetitive effort to always designing from scratch. I wanted a way I can:
So I built Hamoni Sync, a real-time state synchronization as a service.
It provides SDK to add real-time state synchronization to a web or mobile. I made just the web SDK at the moment. It persists your application state in the cloud and can serve as the source of truth for your application. It re-synchronizes with the server when a client reconnects.
You can use it to synchronize your application state in real-time. You can build a real-time dashboard, manage game leaderboard or any other game state, and real-time data visualization or chart.
In building this I used ReactJS, NodeJS, RollUp, SocketIO, CouchDB, AWS Lambda, AWS API Gateway, Amazon Cognito, AWS Amplify, AWS ElasticBeanstalk, Gitbook, Git.
I started working on the project on the 1st of March with the goal of finishing everything and launch on March 23rd. That is a total of 20 days because I don’t work on Sundays.
I started out with the dashboard. Bootstrapped the frontend with create-react-app and a Material design React library. Added Authentication with Amazon Cognito and AWS Amplify. Then I created the Lambda functions exposed via API gateway for creating and viewing applications.
Finishing that I moved to work on the JavaScript SDK and backend. I coded the first feature which allowed to create what I called a value primitive. It took about 8 hours to build that which then made it easier to make the rest of the target features. As at March 10, I already have the intended features working.
With the main features working, the next thing was to create a sample application and documentation to guide people on how to use the product. It took me a couple of days to finish the initial draft of the documentation. By March 17, I had finished the documentation and made 2 sample application. Writing code seemed to be the easy part. Writing documentation took slightly longer than I planned. With the progress at this point, what was left was deploying to production. I bought a domain and deployed the website and dashboard using Netlify. Then I finished off with deploying to AWS and publishing to npm.
The hard part of this journey was finding the right words to convey the intent of the project through the documentation and website. Also it was hard learning and using the AWS services I used for this project. AWS Cognito and Amplify weren’t hard to use but the others were. Maybe the documentation was hard for me to follow.
The key learning was knowing how to use various AWS services. I also had to learn to use RollUp to package the JavaScript module and how to deploy to npm. If I would do anything differently it’ll be using a different React Component for Material Design and probably using Slate for documentation.
The journey has been fun and I’ve learned a lot. I’m looking forward to seeing how this project takes off. I will continue working on it because I have other features planned for it, for example, allow users see the current number of connections for an app. I am hoping to get feedback and see how people use it and what features they’d like to see added or removed.
Try it and give your app a real-time boost! Feel free to get in touch and let me know what you think.
Checkout the quickstart guide to see a working example