This repository is for Botfront which is an open source graphical UI for bot whisperers to develop and maintain bots created with Rasa. This is fork of the original Botfront project
Botfront can be run locally or deployed to the Azure cloud as Docker container.
The official documentation of Botfront is hosted on botfront.io. Once you've installed the cli you can also use botfront docs
to open it.
Docker image are deployed to the test and production environments from dev
and main
branches respectively. The pipeline uses Azure Container registry to store created images and later deploys them to run as containers in AKS cluster under Private Network in Azure. The connection credentials are a part of the pipeline and those are fetched from Azure Key Vault as part of the pipeline.
To run the deployment it is enough to merge to dev and main branches after which new version is deployed.
The Azure Devops pipeline is defined in azure-pipelines.yml
file and AKS Kubernetes configs are in kube/
folder.
You can build docker image by running docker build -f Dockerfile -t botfront .
To run the Botfront docker, you also need a MongoDB container for Botfront to startup. For local use, there is docker-compose.local.yml
docker compose file provided for starting up the Botfront together with Mongo. You can start it by running docker compose -f docker-compose.local.yml up -d
!!Development version of Botfront doesn't seem to run on Windows so continue the process below with Linux or Mac!!
- Botfront is a Meteor app, so the first step is to install Meteor
- Then clone this repo and install the dependencies:
git clone [email protected]:v3/turunkaupunki/VmPalvelukonsolidaatio/Botfront
cd botfront/botfront
meteor npm install
- Optional (we don't really use the CLI ever): Install the CLI from the source code:
# if you installed Botfront CLI from npm uninstall it.
npm uninstall -g botfront
# Install the cli from the source code
cd cli && npm link
To run Botfront in local development mode:
- Start local Mongo container or use e.g. Azure Cosmos and set its port and authentication etc in
botfront/package.json
to theMONGO_URL
parameter in row"start:docker-compose.dev": "MODE=development BF_PROJECT_ID=bf MONGO_URL=mongodb://user:password@localhost:27017/bf meteor run"
- Run Botfront with
meteor npm run start:docker-compose.dev
. Botfront will be available at http://localhost:3000 so open your browser and happy development ๐ธ
To help everyone with understanding the commit history of Botfront, we employ commitlint
to enforce the commit styles:
type(scope?): subject
where type
is one of the following:
- build
- ci
- chore
- docs
- feat
- fix
- perf
- refactor
- revert
- style
- test
scope
is optional, represents the module your commit working on.
subject
explains the commit.
As an example, a commit that improved the documentation:
docs(conversation builder): update slots manager screenshot.
Unit tests are running through the meteor mocha package meteortesting:mocha
.
Tests should be stored in *.test.js
files beside the source code js files.
- run
npm ci
to install the dependencies
This will take a while
- run
npm run test-once
This will run all tests, which contain REST:
within the description
- run
npm run test-rest
End to end tests are using the Cypress testing framework.
The first test case 01_initial_setup_dont_change_name/initial_setup.spec.js
drops the mongo database on startup and creates own test user.
The test user is necessary to run the e2e tests.
email: [email protected]
password: aaaaaaaa00
- install
mongo
client as the first testcase will drop the whole database via the mongo client - run
meteor npm install
insidebotfront/cypress
to install the cypress plugins
- run
meteor npm run start:docker-compose.dev
to run botfront in dev mode - run
meteor npx cypress run
- create the aforementioned test user inside the system
- run
npx cypress run --spec cypress/<path_to_spec.js>
- run
npx cypress run --spec cypress/integration/01_initial_setup_dont_change_name/initial_setup.spec.js
to drop the database and create test user one time - run
npx cypress run --spec cypress/<path_to_spec.js>
- create the test user via hand or via the first test case
- run
npx cypress open
Some tests also require Rasa to be available.
Copyright (C) 2021 Dialogue Technologies Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.(C) 2021 Dialogue Technologies Inc. All rights reserved.