.gbapp Guide
Introduction
.gbapp is the folder extension for the General Bots Application package type.
Anything inside a folder considered a .gbapp will be consumed by the server
like a TypeScript application. This conversational application will contain
the source code for custom dialogs and behaviour for any .gbot that associate
this deployed .gbapp.
A good way to start a .gbapp is to find a NPM package to create a .gbapp that
asks for data and output the result. For example, a temperature package can
be installed via npm install temperature
and then have its methods
convertToKelvin or convertToCelsius called when user asks for conversion. A
.gbapp can persist and read data from database according to the conversation
session.
Preparing Environment
Windows
- [Optional] Install Chocolatey, a Windows Package Manager;
- Install git, a Software Configuration Management (SCM);
- Install Node.js, a Runtime system;
- Install Visual Studio Code Insiders, Brackets or Atom as an editor of your choice;
- Fork the repository by visiting https://github.com/pragmatismo-io/BotServer/fork;
- Clone the just forked repository by running
git clone <your-forked-repository-url>/BotServer.git
;
- Run
npm install -g typescript
;
- Run the bot server by
gbot.cmd
.
cinst git --confirm
cinst nodejs --confirm
cinst 7zip.install --confirm
cinst tortoisegit --confirm
cinst winscp --confirm
cinst sysinternals --confirm
cinst putty --confirm
cinst pandoc --confirm
cinst curl --confirm
cinst micro --confirm
cinst ccleaner --confirm
cinst notepadplusplus --confirm
cinst sql-server-management-studio --confirm
npm install -g npm-check-updates

Specifications
Dialogs
The dialog is built by specifing series of methods, disposed as an array as seen
on Figure 1. Each dialog has also an identifier that can be called by several
engines like kb.gbapp, which handles cloud based search for documents and other
knowledge base information and also routes for the natural language processing
(NLP) engine.
static getDialogs(bot: BotAdapter, min: GBMinInstance) {
return [{name:"/convertTemperature", waterfall: [
async step => {
},
async step => {
},
async step => {
}]
},{name:"/convertCurrency", waterfall: [
async step => {
},
async step => {
},
async step => {
}]
}
]
*Figure 1 - How to build dialogs in General Bots using TypeScript*
How To...
Debugging .gbapp deployed on Azure
- Visit https://.scm.azurewebsites.net/api/vfs/LogFiles/Application/index.html
Tooling
JavaScript
Packages
Visual Studio Code Extensions
Title |
Description |
mbinic.tgit-cmds |
Set of commands for launching TortoiseGit dialogs |
tomashubelbauer.vscode-markdown-table-format |
Formats MarkDown tables so that all columns have the same width |
esbenp.prettier-vscode |
VS Code plugin for prettier/prettier (wraps at column 80) |
mikestead.dotenv |
.env support |
abhinavk99.codewall |
Description here |
christian-kohler.npm-intellisense |
Description here |
csholmq.excel-to-markdown-table |
Description here |
davidanson.vscode-markdownlint |
Description here |
eg2.ts-tslint |
Description here |
eg2.vscode-npm-script |
Description here |
esbenp.prettier-vscode |
Description here |
formulahendry.auto-rename-tag- |
Description here |
gruntfuggly.align-mode |
Description here |
jmfirth.vsc-space-block-jumper |
Description here |
kaiwood.indentation-level-movement |
Description here |
mbinic.tgit-cmds |
Description here |
mechatroner.rainbow-csv |
Description here |
mikestead.dotenv |
Description here |
sirtori.indenticator |
Description here |
tandy.color-basic |
Description here |
Common tasks
Task |
Description |
npm update -g |
Updates NPM |
node -v |
Checks node version |
ncu -a |
Update all packages in package.json |