1. Install [Node.js](https://www.npmjs.com/get-npm) the current generation General Bots code execution platform;
2. Open a **Terminal** on Linux and Mac or a **Command Prompt** window on Windows;npm
3. Type `npm install -g botserver` and press *ENTER*;
4. Type `gbot` to run the server core.
Notes:
* [*nodejs.install* Chocolatey Package](https://chocolatey.org/packages/nodejs.install) is also available.
* The zip source code of general bots is also available for [Download](https://codeload.github.com/pragmatismo-io/BotServer/zip/master);
### Setup development environment (Windows)
1. [Optional] Install [Chocolatey](https://chocolatey.org/install), a Windows Package Manager;
2. Install [git](`https://git-scm.com/`), a Software Configuration Management (SCM).;
3. Install [Node.js](npmjs.com/get-npm), a [Runtime system](https://en.wikipedia.org/wiki/Runtime_system).
(https://www.npmjs.com/get-npm);
4. Install [Visual Studio Code](https://chocolatey.org/packages/nodejs.install), Brackets or Atom as an editor of your choice;
5. [Fork](https://en.wikipedia.org/wiki/Fork_(software_development)) by visiting https://github.com/pragmatismo-io/BotServer/fork
6. Clone the just forked repository by running `git clone <your-forked-repository-url>/BotServer.git` ;
7. Run `npm install` on Command Prompt or PowerShell on the General Bots source-code folder;
8. Enter './deploy/default.gbui' folder;
9. Run `npm install` folled by `npm run build` (To build default Bot UI);
10. Enter the On the downloaded folder (../..);
11. Run the bot server by `npm start`.
Note:
* Whenever you is ready to your open-source ideas in form of .gbapp (source-code) and artifacts
like .gbkb, .gbtheme, .gbot or the .gbai full package read [CONTRIBUTING.md](https://github.com/pragmatismo-io/BotServer/blob/master/CONTRIBUTING.md) about performing Pull Requests (PR)
and creating other public custom packages repositories of your own personal
or organization General Bots Community Edition powered packages.
### Just copy the source code to your machine
1. [Download] the Zip file of (https://codeload.github.com/pragmatismo-io/BotServer/zip/master)
The subjects.json file contains all information related to the subject tree and can be used to build the menu carrousel as well give a set of words to be used as subject catcher in the conversation. A hierarchy can be specified.
### Creating a new Theme folder (.gbtheme folder)
A theme is composed of some CSS files and images. That set of files can change
everything in the General Bots UI. Use them extensively before going to change
the UI application itself (HTML & JS).
Package Types
-------------
### .gbai
Embraces all packages types (content, logic & conversation) into a pluggable bot
directory.
### .gbapp
The artificial intelligence extensions in form of pluggable apps. Dialogs,
Services and all model related to data. A set of interactions, use cases,
integrations in form of conversationals dialogs.
The .gbapp adds the General Bots base library (botlib) for building Node.js TypeScript Apps packages.
Four components builds up a General Bots App:
* dialogs
* models
* services
* tests
#### Dialogs
All code contained in a dialog builds the flow to custom conversations in
built-in and additional packages .
#### Models
Models builds the foundation of data relationships in form of entities.
#### Services
Services are a façade for bot back-end logic and other custom processing.
#### Tests
Tests try to automate code execution validation before crashing in production.
### .gbot
An expression of an artificial inteligence entity. A .gbot file defines
all bots dependencies related to services and other resources.
### .gbtheme
A theme of a bot at a given time. CSS files & images that can compose all UI
presentation and using it a branding can be done.
### .gbkb
A set of subjects that bot knows.
### .gblib
Shared code that can be used across bot apps.
Reference
---------
### GeneralBots admin commands
General Bots can be controlled by the same chat window people talk to, so
here is a list of admin commands related to deploying .gb* files.