In the example of the Spotify music recommendations, we need to keep track of data from the user like genre of music and number of recommendations they want. Knowing that, we model the initial state with a genre and numberOfRecs property. When we get the information we need, we call the update function on the store and update the user’s state data.
Stores are server-side, just like the rest of the system. In the case of conversational interfaces, chat messengers like Telegram and KiK are what I consider the client. The API that handles the webhooks and events fired from the clients is the server.
Note: The commands property inside the store state might be a bit confusing. All it does is keep track of where the system is in terms of the conversation tree.