redac / chatbot-admin-app

Administration dashboard for Rivescript based chatbots.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Chatbot Administration CRUD App

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.

Screenshot of the example app

Tech stack:

Getting started

1. Clone the repo and install the dependencies

Clone this repo:

git clone https://github.com/redac/chatbot-admin-app
cd chatbot-admin-app

Instal lnpm dependencies:

npm install

2. Initialize the database

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

3. Launch the application

To start the app (front and back), run the following :

npm run dev

Open http://localhost:3000 and take a look around.

Launch the front/back end in dev mode

To start a specific part of the app (e.g.frontend), run the following :

npm run front-dev # or npm run back-dev

Using the REST API

You can access the REST API of the server at http://localhost:3030 using the following endpoints:

GET

  • /api/chatbots/:id: Fetch a single chatbot by its id
  • /api/chatbots: Fetch all chatbots
  • /api/brains: Fetch all currently loadable rivescript brains
  • /api/interfaces: Fetch all the currently supported interfaces

POST

  • /api/chatbots/: Create a new chatbot
    • Body:
      • name: String : The name of the chatbot

PATCH

  • /api/chatbots/:id: Modify a given chatbot
    • Body:
      • name: String : The new name of the chatbot
      • brain: String : The filename of the chatbot's new brain (the file has to be in the public/brains folder)
      • web: Boolean : The state of the bot's web interface
      • discord: Boolean : The state of the bot's discord interface

DELETE

  • /api/chatbots/:id: Delete a chatbot by its id

About

Administration dashboard for Rivescript based chatbots.

License:GNU Affero General Public License v3.0


Languages

Language:TypeScript 52.2%Language:JavaScript 29.3%Language:HTML 15.6%Language:CSS 2.9%