Fully customizable open source chat interface that can be added to any web app.
Built with the Jovo Framework, Vue.js, and Tailwind CSS.
Demo: jovo.tech/demos/starter-web-embeddedchat.
Support Jovo by starring our main repo or joining our Open Collective.
-
Download starter
Use the Jovo CLI to create a new project based on this starter:
# Install latest version of the Jovo CLI $ npm i -g jovo-cli # This will download the template and install the dependencies $ jovo new my-embeddedchat --template starter-web-embeddedchat $ cd my-embeddedchat
Alternatively, you can clone this repository and run
npm install
. -
Start client (Vue.js)
$ cd client # Start Vue frontend $ npm run serve
-
Start app (Jovo) In a new tab:
$ cd app # Start Jovo development server $ jovo run
The first time,
jovo run
will compile the TypeScript code. After making changes, make sure to compile withnpm run tsc
and then start the Jovo development server again. -
Open the starter in your browser at
http://localhost:8080
.
This repository contains:
app
: Backend logic built with the Jovo Framework using its Web Platform integration.client
: Frontend built with Vue.js and Tailwind CSS, communicating with the backend using the Jovo Web Client for Vue.js.
The starter was built for you to have a working example as well as an entry point to get started with the Jovo Web integration.
The following documentation will help you understand how the starter is structured and which components take care of which tasks.
The client is a Vue.js project that consists of a single component "EmbeddedChat" which is styled in Tailwind CSS.
If you are new to Vue.js and want to develop your website starting with this project, you can take a look at the Vue.js guide here. This will give you a quick start to how Vue.js works, so you can start creating right away.
The EmbeddedChat component implements a fully functioning chat body where the user can type in their request and receive a response from the Jovo app. It handles the registration for multiple event listeners, namely ClientEvent.Request
, ClientEvent.Response
, and ClientEvent.Action
.
ClientEvent.Request
: triggered before the request is sent out to the Jovo app. In this case, it is used to display the user's input in the chat body.ClientEvent.Response
: triggered when the client receives the Jovo app's response. In this case, it is used to display the app's response in the chat body.ClientEvent.Action
: triggered when the app's response contains an action. In our case, we expect quick replies that are displayed as buttons on top of text input. It also listens for a custom action that opens a link to a new tab.
The Jovo app the new [Jovo Web Platform integration](TODO: link) as well as NLP.js as its NLU. It implements a simple interaction where the user can be redirected to the Jovo Framework's documentation.
The language model consists of two intents, HelloWorldIntent
and YesIntent
, used to implement the sample interaction.
The app.ts
file contains the initialization of the app and its plugins as well as the basic logic for the sample interaction. It makes use of the Web integrations Custom Actions
to send a redirect
action used to open a link in a new tab.
Take a look at the Vue deployment docs here.
To integrate Jovo Embedded Chat into your existing project, you can use the npm script build
inside of the client/
directory. This will produce a bundle in a dedicated dist/
directory, containing the whole Vue.js client with minified HTML, CSS and JavaScript, ready for dynamic integration into any website.
You can host your Jovo app on almost any platform, whether you choose a hosting provider or to build your own Node.js-based HTTP server. Here are a few examples:
Jovo is the most popular development framework for voice, including platforms like Alexa, Google Assistant, and the web.