This is a chatbot administration web app, it allows users to:
- Create, Read, Update and Delete rivescript chatbots.
- Allow the user to choose an interface to communicate with the said bots.
Tech stack:
- Backend: Express, Prisma ORM
- Frontend: React, TailwindCSS
Clone this repo:
git clone https://github.com/redac/chatbot-admin-app
cd chatbot-admin-app
Instal lnpm dependencies:
npm install
Run the following command to init your SQLite database file. This also initializes the Bot
table that is defined in prisma/schema.prisma
:
cd server/ && npx prisma generate
To start the app (front and back), run the following :
npm run dev
Open http://localhost:3000 and take a look around.
To start a specific part of the app (e.g.frontend), run the following :
npm run front-dev # or npm run back-dev
You can access the REST API of the server at http://localhost:3030
using the following endpoints:
/api/chatbots/:id
: Fetch a single chatbot by itsid
/api/chatbots
: Fetch all chatbots/api/brains
: Fetch all currently loadable rivescript brains/api/interfaces
: Fetch all the currently supported interfaces
/api/chatbots/
: Create a new chatbot- Body:
name: String
: The name of the chatbot
- Body:
/api/chatbots/:id
: Modify a given chatbot- Body:
name: String
: The new name of the chatbotbrain: String
: The filename of the chatbot's new brain (the file has to be in thepublic/brains
folder)web: Boolean
: The state of the bot's web interfacediscord: Boolean
: The state of the bot's discord interface
- Body:
/api/chatbots/:id
: Delete a chatbot by itsid