Configuring Espresso Chat using Logic Designer will run us through an advanced project setup in just a couple minutes. I'll be illustrating each step with several screenshots, but there are essentially only 4 stages:
All project files are available on github: https://github.com/EspressoLogicCafe/espresso-chat
Included in the project files is the schema for Espresso Chat. Upload "conversations.sql" to your instance of MySQL.
When starting a project from scratch, we can use the "Connect Wizard" to point Logic Designer to the project database, however, we have project JSON package included in the github repository with most of the API already configured.
From the header section, open the project drop down, and upload the "conversations-project.json".
We will also want to update our database authentication configuration, which we can do from within the "Database" section linked from the Designer sidebar. Re-populate your username, and password, and database name as needed.
Espresso Chat uses a custom authentication library, which we will have to upload and configure from within the "Projects" section.
Navigating to the custom libraries section:
A sample of the upload dialog when importing "authProvider.js":
Make sure to check that your uploaded library is "used", by default Logic Designer does not assume your new library needs to be enabled yet.
Because this library handles custom authentication, we will have to tell Designer what to look for by adding a provider:
Finally, we will have to explicitly tell Logic Designer to use our new Authentication Provider, by going to the "Details" tab:
Our sample application will need to know where the API is, which we can find a number of ways. Potentially the most interesting place is from within "RestLab" in the Designer sidebar. RestLab is something of a playground for our generated API endpoints, where we can debug, retool, and test the project. From here, we can copy our API URL ...
... and insert just the API base into Espresso Chat.
In review, we uploaded the database from our project files, pointed Logic Designer to our database, configured our custom authentication library, and then pointed Espresso Chat to Logic Designer. In this example, we explored each side step, and now that the sample is up, we can take a closer look at the rules and security.