Folder Structure

You can get a quick overview of the code structure by looking at the folder structure image below.

I have highlighted the important code files.

index.php is the user interface code

process.php is the middleware code which is responsible for connecting the UI layer to the Dialogflow agent

chatbot.js holds the JavaScript code (which actually does a lot of heavy lifting in our app)

chatbot.css is used for styling the chat window