nitya / Xavibot

Fullstack chatbot application

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fullstack chatbot

This project was bootstrapped with React Chatbot kit on the frontend.

The backend is developedin Node.js and uses OpenAI's Assistant API.

Available Scripts

In the project directory, you can run:

npm startor npm start-server

Runs the server. Open http://localhost:3001 to view the different endpoints. Note that the actual URL for the server should be defined in the REACT_APP_API_URL of your .env file.

npm start-frontend

Launches the React frontend. Open http://localhost:3000

npm dev-server

Launches the server using nodemon so that it will restart whenever you change code while developing.

npm dev

Uses concurrently to launch both the server and the frontend.

npm build

Builds react front-end

npm deploy

Builds react front-end and deploys to github. Note that if you use this script you should edit the remote github URL to yours and possibly define GH_TOKEN locally if you are using token based authentication.

Environment variables

OPENAI_API_KEY

You can copy your OpenAI key here directly for local development

AZURE_CLIENT_ID, AZURE_TENANT_ID, and AZURE_CLIENT_SECRET

I am using Azure to deploy the server and store the OpenAI key remotely. You might not need this. Make sure to modify the app.js file accordingly.

REACT_APP_API_URL

Where you want to deploy the server. I recommend http://localhost:3001 for development.

About

Fullstack chatbot application

License:Apache License 2.0


Languages

Language:JavaScript 86.7%Language:HTML 8.6%Language:CSS 4.7%