Each App created with FrontM.js has the same basic structure:
The darker boxes are provided by the framework; the lighter boxes are created by the App developer.
The App developer creates a script that talks to an abstraction layer. This layer exposes a number of Objects and Classes to the developers. The abstraction layer also controls the flow of the messages through the system and decides whether to run code on the Edge or in the Cloud.
The FrontM.js capabilities layer deals with the lower layers of the architecture controlling the network, Natural Language Processing engine, storage, API access etc. This layer cannot be called directly by the App developers, since they work with it through the abstraction layer.
The intelligence of the App can be implemented entirely within the script, within the NLP, or a combination of both.
Natural Language Processing (NLP)
The App script is the piece of architecture nearest to the user. However, the script often hands control over to the NLP agent in order to determine the user's Intent.
In doing so the NLP agent will, in some scenarios, send a response back to the user. At present, we are using Google Dialogflow as our NLP engine.