
Create a web chatbot using React and Node.js, guided from app overview to deployment on Heroku; learn DialogFlow components, server and frontend integration, rich messages, memory, and fulfillment.
Build a web chatbot that understands natural language processing and responds to user demands. Use rich messages, cards, and quick replies, and connect to databases and web services.
Build a full stack chatbot with a React frontend and a Node.js/Express backend hosted on Heroku, using DialogFlow for NLP and MongoDB for data storage, with Git for versioning.
Explore how a website chatbot uses a frontend React app and a Node.js backend with Express and DialogFlow to process input via HTTP and fetch data from MongoDB.
Explore DialogFlow fulfillment webhooks that trigger backend actions before responding, enabling intents to fetch extra information and perform calculations.
Outline the development stages for a chatbot: create a DialogFlow agent, define intents and entities, build a Node/Express backend, deploy to Heroku, and connect React with cards and quick replies.
Discover Dialogflow, Google's natural language service, and create an agent, a module with intents to recognize, with support for 20+ languages. Sign up, set language, and link a Google project.
Learn how Dialogflow agents connect to a Google project via service accounts, manage settings, languages, and machine learning thresholds to train multilingual intents.
Explore Dialogflow intents basics, including the welcome and fallback intents, how input becomes actions and responses, and how contexts, events, and training phrases trigger conversations.
Create a developer-defined Dialogflow intent and map user phrases to responses. Learn training phrases, testing, and how intents transform input into replies, with Snoopy example.
DialogFlow uses entities to extract parameter values from user input, including system entities, user entities, and developer defined entities like a course with synonyms such as chatbots, JavaScript, and Jekyll.
Define intents with parameters in DialogFlow by using entities to capture a course, from training phrases like Google assistant, JavaScript, or chatbots, and backend lookup to fetch the link.
Explore prebuilt agents with predefined intents and entities, import the dining out agent, review its entities, and learn how to move intents between agents and connect backend logic.
Explore smalltalk in bot design by enabling and customizing common questions like who are you and how old are you, using prebuilt agents with intents and entities for casual conversations.
Explore the bot architecture: a React frontend talks to a Node.js Express backend via endpoints over JSON-based HTTP, which calls DialogFlow for natural language processing and uses MongoDB.
Install and configure Express to create a Node.js backend, set up index.js, add a root route with an arrow function, and run on port 5000 to return json.
Deploy your React and Node.js app to Heroku by configuring dynamic port binding, setting engines in package.json, and defining a start script, then deploy with Git and the Heroku CLI.
Deploy your first chatbot app to Heroku by logging in, creating an app, linking a git remote, and pushing to Heroku master; monitor logs with Heroku logs.
Use nodemon to auto restart a Node and Express backend during development, installed as a dev dependency and run via npm run backend, with Heroku deployment and DialogFlow prep.
Introduce connecting the React frontend to the backend via API routes, sending text requests to DialogFlow for intent detection, and handling events to return responses to the chat UI.
Configure express routes for a chatbot by installing and using body-parser middleware, then create placeholder post routes api/df_text_query and api/df_event_query that direct to DialogFlow, refactoring into a dedicated dialogFlowRoutes file.
Set up DialogFlow authentication for a Node.js chatbot by creating a DialogFlow client service account, granting query permissions, downloading the JSON key, and wiring the Node.js client to detect intents.
Configure DialogFlow authentication in a Node.js app using a config file for project id and language. Set GOOGLE_APPLICATION_CREDENTIALS to the json key file and run backend to complete authentication.
Transform promise-based DialogFlow text query handling into async/await for a cleaner backend and test the endpoint. Authenticate with DialogFlow via GOOGLE_APPLICATION_CREDENTIALS and optimize chained API calls.
Extract chatbot logic into a separate module and expose a textQuery method with parameter support; connect routes to the module and implement a placeholder handleAction for future actions.
Learn how to implement detectIntent with an event request in a chat bot using React and Node.js, converting parameters with jsonToStructProto and structjson, and connecting the backend to DialogFlow.
Set up safe deployment by creating dev.js and prod.js config files, move production credentials to environment variables on Heroku, and load the correct config with NODE_ENV.
Deploy the chatbot to Heroku by committing code and pushing to Heroku master, then update the server address to the Heroku URL and test endpoints.
Review common Heroku deployment errors and diagnose them with Heroku logs. Ensure the Google private key is read correctly by quoting and json parsing in prod.js from environment variables.
Build a chatbot frontend with React, set up a local environment with two servers and a proxy, and design a Materialize UI that connects to the backend.
Learn to generate a React app quickly with Create React App, leveraging npx, Babel, webpack, and JSX to build a production-ready, single-page chatbot.
Learn to run two development servers for a react frontend and node backend with concurrently from the project root, enabling dialogflow queries and database access via API routes in development.
Implement a client-side proxy to route api requests from a React app to the Express backend, replacing hardcoded URLs with a /api/* rule and a target like http://localhost:5000.
Learn to scaffold a React page by creating a components folder, building simple functional components like App, Landing, and About, and organizing pages into a pages subfolder using JSX.
Create and organize page components for a React and Node.js site, including shop, item list, header, and a persistent chatbot, set up routing with react-router-dom, and optimize arrow function code.
Learn to style a React page using Materialize CSS by importing the Materialize CSS file, applying Materialize classes to navigation and layout, and refining the container and responsive layout.
Learn how to build a chatbot interface in React using a class component to manage messages and lifecycle events, and why Redux is overkill for a single component.
Connect a React chatbot to the backend using axios for text and event queries, posting to api/df_text_query and api/df_event_query, and updating the chat state with user and bot messages.
Create a React functional Message component to render text messages with bot and user avatars using Materialize CSS grid. Integrate it into the Chatbot by mapping state.messages with renderMessages.
Trigger the default welcome event from DialogFlow after the Chatbot component mounts, via df_event_query with 'Welcome', and reveal the greeting.
Enable user text input by listening for the enter key in the input field to send messages to DialogFlow and render bot responses in a React chatbot.
Learn to automatically scroll to the bottom of chatbot messages when new messages render, using a ref and componentDidUpdate to smoothly scroll into view.
Generate a unique user id in the React frontend and store it in a cookie. Use this id to build a per-visitor DialogFlow session on the backend.
Add rich messages with product cards and a gallery, plus quick reply buttons, and use DialogFlow features like follow-up intents and context to read parameters via slot filling.
Build a DialogFlow card message feature that returns a gallery of product cards (header, image, description, link, price) via a custom payload in an intent, enabling recommendations such as courses.
Examine how a React chatbot handles DialogFlow card responses by comparing the raw API payload with the cards structure and accessing fields through gRPC struct protocols.
Create a reusable React functional card component to render individual DialogFlow cards by reading payload.structValue data from DialogFlow via gRPC, including header, image, description, price, and link.
Render a gallery of bot cards by mapping messages to a renderOneMessage method that renders Card components in a scrollable, left-floating panel with a bot avatar.
Style the chatbot to sit bottom-right, fix the chat height, and position the input, enabling text messages, cards, and card galleries with quick replies.
Implement quick replies in DialogFlow by defining a json structure with a question and a quick_replies array, and map choices like yes, no, and more info to payloads and actions.
Implement two React components, QuickReplies and QuickReply, wired through the Chatbot component to handle quick reply clicks and trigger DialogFlow text queries, while preventing default link behavior.
Implement rendering of quick replies in the chatbot by building QuickReplies and QuickReply components, wiring click handlers, and displaying avatar, text, and quick reply buttons.
Learn how DialogFlow follow up intents act as predefined shortcuts for common yes, no, and other responses, and see how contexts glue intents to enable natural conversations.
DialogFlow contexts glue intents and enable branching dialogues by using input and output contexts to track previous conversations and trigger follow up intents from quick replies.
Test quick replies and follow-up intents in the React and Node.js chatbot, verify terminal outputs and yes/no interactions. Explore removing quick replies after a click and preview Dialogflow events.
Discover how DialogFlow events trigger intents with a custom event and payload, using quick replies and a masterclass flow; teach event queries and follow-up intents.
Learn how to implement slot filling in a chatbot by collecting name, address, phone, email with system entities, prompts after user clicks yes, then reuse parameters in responses.
Learn to add a show/hide toggle to the React chatbot by introducing a showBot state, show and hide methods, and conditional rendering in the chatbot component.
Configure a shop welcome flow in DialogFlow, greet the user, offer a quick yes/no question for recommendations, and trigger the show recommendations event when the user agrees.
Learn to greet users once by listening to navigation history with react-router-dom, using a shop welcome flag to trigger the welcome message when the user visits /shop.
Implement an asynchronous pause between bot messages using a promise and resolveAfterXSeconds, awaiting two seconds to delay shop recommendations before proceeding to the database section.
Learn to store conversation data in MongoDB, a schema-less NoSQL document database that uses collections and documents. Explore its high performance, high availability, automatic scaling, and JSON-based data modeling.
Set up a MongoDB Atlas cluster on the free tier, add a database user, and obtain the connection string to connect your Node.js app with Mongoose.
Explore how mongoose, a Node.js library for MongoDB, provides schema validation and model translation, then connect, define a person schema, register the model, create an instance, and save.
Install mongoose and connect it to MongoDB. Configure a mongoURI in dev.js and environment variables, then connect with mongoose.connect using useNewUrlParser to maintain a single database connection.
Catch registration information from DialogFlow and save it to a database by handling the action, ensuring all parameters are present, and preparing the schema and model for storage.
Define a Mongoose schema and register a model for registration data with fields like name and email, organize models in a models folder, import the model, and save to MongoDB.
Save registration data by implementing saveRegistration and mapping fields to the Registration model with async/await when allRequiredParamsPresent is true, from DialogFlow.
Explore how fulfillment webhooks in DialogFlow enable intents to trigger backend actions or direct frontend requests, count course selections, and store counts in a database for a React frontend.
Expose your local server with Ngrok to create a public webhook URL for DialogFlow fulfillment and test locally without deploying to Heroku.
Set up DialogFlow fulfillment by installing dialogflow-fulfillment and actions-on-google, creating a fulfillment route, mapping intents to handlers, and returning responses with agent.add.
Implement a fulfillment that writes a course demand counter to MongoDB, creating or updating a Demand document by course name from DialogFlow using a Mongoose schema and intent map.
Read from a database to fetch the requested course's coupon link by querying a MongoDB coupons collection using a simple two-field schema (course and link) with findOne.
Learn how to prepare a React and Node.js chatbot for deployment on Heroku by configuring environment variables, consolidating frontend and backend routing, and building the client for production.
Configure a production server on Heroku to serve html, css, and javascript from client/build, using a static folder and a catch-all route to index.html so frontend routes work.
Add a postbuild script in the root package.json to install client dependencies and run npm run build --prefix client, creating the client build folder.
Optimize chatbot code before deployment by removing production route, adjusting height and margins, converting the app to a functional component, reintroducing service workers, and adding try-catch for DialogFlow outages.
Deploy your chatbot to Heroku using Git, push updates, and verify frontend routing, then configure fulfillment to point to the Heroku app via Dialogflow, validating data storage and responses.
Learn three chatbot architectures: frontend to DialogFlow via backend action, via fulfillment, or direct frontend to DialogFlow with fulfillment; implement token expiry management in React and deploy to Heroku.
Generate a DialogFlow client access token by creating a service account with the DialogFlow client role, generating a key, initializing the Cloud SDK, and printing the token for React integration.
This lecture demonstrates calling DialogFlow directly from the frontend by replacing backend requests with text and event queries using project and session IDs.
Update the web service to DialogFlow, remove gRPC, and refine renderCards and renderOneMessage to align with DialogFlow payload and cards.
Learn how to configure environment variables for a React and Node.js chatbot, including token management, Google project ID, and session values to enable DialogFlow integration.
Enable fulfillment in the registration intent and build a Node.js handler to save user parameters (name, address, phone, email) to the database using DialogFlow parameters.
Deploy the chatbot to heroku, set environment variables for dialogflow, and push the backend and frontend code. Update dialogflow fulfillment to the heroku address to enable end-to-end communication.
Publish the chatbot to Heroku by pushing code and configuring environment variables, then update the DialogFlow fulfillment address to enable the React frontend to talk to the backend.
In this course, you will build a chatbot for a Webpage. We'll use Node.js and React for programming and GIT for deploying and version control. The bot will be hosted on Heroku, but you can simply host it anywhere else where they support Node.js. We'll use DialogFlow to process natural language. DialogFlow will help us understand what users want.
In the course, we'll be building a sample chatbot. Its purpose is only to show you how things work. Our bot on the page will help us sell products. It will give recommendations and measure demand.
In the process of building this chatbot, you'll learn all that is needed to build a great bot. To get the most out of the course, you can work on this sample bot, and in the end, tweak it to suit your needs.
You need to have at least basic knowledge of Node.js and React to start with this course. For versioning, we use GIT; therefore, you need to be familiar at least with basic git commands.
To make it easier for you, I've added git commits with changes to every video that has a change in the code. This way, you can compare your code to mine. And you won't lose time debugging. And remember for any questions I'm available in the Questions and answers. You are not alone.
And remember, I'LL BE THERE FOR YOU.
The bot will be able to remember things, that is store information into a database or connect to other API services. I'll show you different implementations so that you can play and find out what suits you most.
At the end of the course, you'll have a demo chatbot that you can tweak and tailor to your needs.
My name is Jana Bergant, and I'm a developer with over 20 years of experience. I'm an IT instructor teaching people new tech skills. Over 17000 people are already taking my course.
I help all my students at every step of development. And I'll be here for you!
Let me tell you a bit about every section of this course.
In the first section, we'll take an overview of the app and get familiar with the tech stack, which is the technology used in this course. We'll look at application architecture and different ways we can implement it. We'll go through every implementation. And I'll take you through the development stages.
The second section will introduce you to DialogFlow, a natural language processor, that we'll use to understand what our visitors want from the chatbot. We'll go through building blocks of DialogFlow. You'll learn about agents, intents, entities, parameters, prebuild agents, and more.
Then in the third section, we start building the server-side app for the chatbot. We'll install the Express library and generate an express app. After we are trough with configuration, we deploy it to Heroku. To speed up the development process, we'll set up a local development server called Nodemon.
When you have a basic server-side app created, you'll be able to connect it to DialogFlow. And that is what we'll do in section 4.
And frontend will be the next step. In the fifth section, we set up React, configure local servers, create a proxy for communicating with the backend. And we'll develop components. Components for the page and for the chatbot. Our chatbot will begin to look like a chatbot in the 5th section.
But we'll polish it in the 6th section, where we'll create rich messages for the chatbot like cards and quick replies. And also, we'll go deeper into DialogFlow's features, like follow up intents, contexts, events, and slot feelings. Features that make bot creation much easier and much friendlier!
When our bot is polished, we can make it smarter. We want our bot to remember what the user says. Therefore we need to store information that we get from the user. In the 7th section, we'll be saving to the database and also use what we know about the user in a conversation. To make the bot friendlier. We like if people remember our preferences, it is the same with bots.
In the 8th section, I'll show you a different way to implement handling actions. We'll be using DialogFlow's fulfillment. I'll show you how to call fulfillment only for intents that need extra code to be run. Only for intents that need to get information from a database, or that need to call some other API, or maybe connect to a device.
When we master fulfillment, we'll deploy to Heroku. In the 9th section, we'll take care of some extra configuration like routing, postbuild scripts for generating frontend; we'll also go through the code and make sure all is as needed before we deploy.
And finally, in the 10th section, I'll show you how to connect to DialogFlow straight from FrontEnd. To do that, we'll need to make some changes to the architecture. I'll tell you the benefits of every decision.
After the course, you'll have a demo bot that you can tweak and tailor to your needs. And you'll have the knowledge to upgrade it.
See you on the course!
Jana
-------------------------------------------------------
The last update of the course was on 27th February 2020
I added DialogFlow mega agents