DevPortal

The development of a new Local Chat add-on

We’ve just released the renewed Local Chat add-on for SmartBots (see the official blog post for a whats-new list). This article explains the update from the technical point of view.

Besides of a really cool new functionality (scheduled messaging, automatic greeter), this is a completely new experience for us. LocalChat is the first third-party fully-functional add-on created for SmartBots! That’s is, it is a separate website hidden under the hood.

Under the hood

Obviously, the team creating new LocalChat was working in a tight connection with SmartBots developers. However, the technology used and even the hardware is different.

Main SmartBots website uses classic server-side scripts and server-side rendering. Some pages are more or less dynamic (using ajax and websockets), but overall technology is plain: user requests the page => server creates and renders html => user receives the ready-to-use page. If you are interested in our technologies, we can write a separate article.

New LocalChat is different. It is running on a Meteor framework which implies DDP and client-side rendering. Basically, this technology is closer to a web app rather than to a classic website.

Meteor allows creating very fast apps (you can check the page load speed of LocalChat) to display data in real time (instead of reloading the whole page). The server part is running on nodejs, and client part is javascript.

API and security

To archive the connection of these two technologies we’ve extended the SmartBots API. The add-on website can now access the strictly limited bot’s data: displaying the greeter settings, fetching stats and delivering scheduled messages using HTTP API.

We’ve developed a special API for add-on developers, very similar to permission-based applications in your smartphone. The add-on is able to perform only the actions which were previously approved (e.g. receiving local chat messages and sending them in case of LocalChat). Vise versa, LocalChat add-on can not read bot’s balance, give money or even teleport the bot.

What’s next

More custom third add-ons are planned to get released soon, giving more functionality to the bots. If you are interested in creating (and selling) a full-scale bot application, contact us for more info and cooperation terms. We do not provide the public add-on API yet, but we are ready to cooperate.

Leave a Reply

Your email address will not be published. Required fields are marked *