├── .gitignore ├── screenshots ├── 1.png ├── 2.png ├── 3.png ├── 4.png └── 5.png ├── client ├── public │ ├── bot.png │ ├── favicon.ico │ ├── manifest.json │ └── index.html ├── src │ ├── assets │ │ ├── open-ended.mp3 │ │ └── app.css │ ├── setupProxy.js │ ├── components │ │ ├── chatbot │ │ │ ├── Message.js │ │ │ ├── Card.js │ │ │ └── Chatbot.js │ │ ├── App.js │ │ └── Info.js │ ├── index.js │ └── serviceWorker.js ├── .gitignore └── package.json ├── config ├── keys.js └── prod.js ├── routes ├── fulfillment.js └── dialogFlow.js ├── README.md ├── package.json ├── index.js └── chatbot ├── chatbot.js └── structjson.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | config/dev.js 3 | my-chat-bot-3ca01-e3c8fba8580b.json -------------------------------------------------------------------------------- /screenshots/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tanish0019/React-Chatbot/HEAD/screenshots/1.png -------------------------------------------------------------------------------- /screenshots/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tanish0019/React-Chatbot/HEAD/screenshots/2.png -------------------------------------------------------------------------------- /screenshots/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tanish0019/React-Chatbot/HEAD/screenshots/3.png -------------------------------------------------------------------------------- /screenshots/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tanish0019/React-Chatbot/HEAD/screenshots/4.png -------------------------------------------------------------------------------- /screenshots/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tanish0019/React-Chatbot/HEAD/screenshots/5.png -------------------------------------------------------------------------------- /client/public/bot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tanish0019/React-Chatbot/HEAD/client/public/bot.png -------------------------------------------------------------------------------- /client/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tanish0019/React-Chatbot/HEAD/client/public/favicon.ico -------------------------------------------------------------------------------- /client/src/assets/open-ended.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tanish0019/React-Chatbot/HEAD/client/src/assets/open-ended.mp3 -------------------------------------------------------------------------------- /config/keys.js: -------------------------------------------------------------------------------- 1 | if (process.env.NODE_ENV === "production") { 2 | module.exports = require("./prod"); 3 | } 4 | else { 5 | module.exports = require("./dev"); 6 | } 7 | 8 | -------------------------------------------------------------------------------- /client/src/setupProxy.js: -------------------------------------------------------------------------------- 1 | const proxy = require("http-proxy-middleware"); 2 | 3 | module.exports = function(app) { 4 | app.use(proxy("/api/*", { target: "http://localhost:5000/" })); 5 | }; 6 | -------------------------------------------------------------------------------- /config/prod.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | googleProjectID: process.env.GOOGLE_PROJECT_ID, 3 | dialogFlowSessionID: process.env.DIALOGFLOW_SESSION_ID, 4 | dialogFlowSessionLanguageCode: process.env.DIALOGFLOW_LANGUAGE_CODE, 5 | googleClientEmail: process.env.GOOGLE_CLIENT_EMAIL, 6 | googlePrivateKey: JSON.parse(process.env.GOOGLE_PRIVATE_KEY) 7 | }; 8 | -------------------------------------------------------------------------------- /client/src/components/chatbot/Message.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | const Message = (props) => { 4 | return(
7 | Hello!
8 | 11 | This is a simple chatbot built using DialogFlow. You can try asking him questions about me like my likes, dislikes and academics. 12 | You can also ask the bot for its name and have small talk with it. I'll add more training phrases whenever I find some time. 13 | Don't forget to say bye before leaving :D 14 |
15 |