Quick Start

Last updated: Mar 15th, 2021

Download

Install From GitHub

You can download or clone the Lemur Engine code repository from our GitHub

https://github.com/theramenrobotdiscocode/lemurengine

Laravel

The Lemur Engine is written in Laravel and can be developed and deployed like any Laravel application.

For more information visit: https://laravel.com/docs/7.x

To get you going as quickly as possible we have included a vagrant file so you can set Lemur Engine up on your own machine and get testing and developing in no time.

Setup using Vagrant

Prerequisite

You will need the following installed on your machine to run the Lemur Engine locally.

Follow the steps below to set this up on your machine.

Step One

Copy .env.sample to .env and fill in the details.

The .env.sample file has already has the default vagrant DB settings.

You may need to change these to match your settings.

DB_CONNECTION=lemurengine
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=testing
DB_USERNAME=root
DB_PASSWORD=secret

Step Two

Create an entry in your /etc/hosts file

192.168.10.10 lemurengine.local

Step Three

Start the server, login and go to the root directory

vagrant up
vagrant ssh
cd /vagrant

Step Four

Create the database - the login details below are the default vagrant mysql settings. In this example the database is called 'lemurengine'.

mysql -uroot -psecret

create database lemurengine;

Step Five

On the VM inside the /vagrant directory run composer to install the dependencies.

COMPOSER_MEMORY_LIMIT=-1 composer install

Step Six

On the VM inside the /vagrant directory and run the following commands to set up Laravel

php artisan key:generate

php artisan migrate:fresh --seed

php artisan storage:link

If you encounter a symlink() error when running the last command then exit the vm and try to run the same command from the project root in the host machine.

You should now be able to access Lemur Engine locally on http://lemurengine.local

Access

The default local url is http://lemurengine.local

You should be able to log in as an admin the following:

User: admin@lemurengine.local
Password: password

Change this password either directly using tinker. Or using the forgotten email feature at the front of the site.

Testing

Setup

Copy .env to .env-testing

An example .env.testing file has been included with the default vagrant DB settings.

You should change these to match your settings.

DB_CONNECTION=testing
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=testing
DB_USERNAME=root
DB_PASSWORD=secret

Create the testing database - the login details below are the default vagrant mysql settings.

This will create a database which is used during testing so that you dont destroy the data in your actual database.

mysql -uroot -psecret

create database testing;

Run All Tests

Run the to every test in the collection.

From the root directory run:

php artisan test --testsuite=All

AIML Conversations Tests

Run the following to test the AIML conversation flow.

These are high level tests which test that for a given conversation input you get the correct bot output.

From the /vagrant directory run:

php artisan test --testsuite=All

Tag Class Tests

Run the following to test the Tag classes.

From the /vagrant directory run:

php artisan test --testsuite=Tags

Unit Tests

Run the following to run any unit tests.

From the /vagrant directory run:

php artisan test --testsuite=Unit

Request Class Tests

Run the following to unit test the request classes.

From the /vagrant directory run:

php artisan test --testsuite=Requests

Feature Tests

Run the following to run any feature tests.

From the /vagrant directory run:

php artisan test --testsuite=Feature

Repository Tests

Run the following to run any repository tests.

From the /vagrant directory run:

php artisan test --testsuite=Repositories

Controller Tests

Run the following to run any controller tests.

From the /vagrant directory run:

php artisan test --testsuite=Repositories

API Tests

Run the following to run any api tests.

From the /vagrant directory run:

php artisan test --testsuite=APIs

Policy Tests

Run the following to run any policy tests.

From the /vagrant directory run:

php artisan test --testsuite=Policies

Want a Chatbot in the simplest fasts way possible?

Host Bots

Host Solutions

Check out our Hosted Solutions - We have a number of subscription plans available so you can get going in no time - with no coding experience. It's the simplest of way to get going quickly.

Chatbot Consultants

If you need help with customisation or a bespoke feature - then get in touch with us over that theramenrobotdiscocode.com and let's see how we can help.

Get In Touch