Skip to content

A sample project that can be used as a base to create bots with Bot Framework v3, Node.js and TypeScript

Notifications You must be signed in to change notification settings

magencio/BaseBotNode_v3

Repository files navigation

Info

A sample project that can be used as a base to create bots.

  • It has been developed with Bot Builder SDK v3 for Node.js, TypeScript and Visual Studio Code.
  • It can be deployed in an Azure Bot Web App with Bot Service for high availability and scalability. Code can be deployed from a git repository from e.g. GitHub or VSTS.
  • It uses LUIS for Natural Language Processing.
  • The bot is instrumented with Microsoft Bot Builder Instrumentation which traces all messages to and from the bot, all intents detected by LUIS, and any custom event we may need in Application Insights. We can then create custom BI dashboards in Ibex Dashboard to consume that data. Bot Builder Instrumentation also performs sentiment analysis with Text Analytics.
  • Bot state data is persisted in CosmosDB.
  • It supports localization.
  • Thanks to Bot Connector we should be able to connect the bot to many channels like Skype, Telegram, Facebook Messenger, Web Chat (to embed the chatbot in any web site), Direct Line (to create our own chatbot client), etc. We can configure this with Bot Service in the Azure portal.

You can find more complete samples using LUIS and Bot Framework v3 for Node.js & TypeScript here: TraktBotNode_V3 & UberBotNode_V3

Try the bot locally

Rename dev.sample.json to dev.private.json and modify it with your own settings.

Then you can run the bot in different ways:

  1. Run and debug the bot with VSCode by pressing Ctrl+Shift+D and selecting "Typescript debug", or by pressing F5). Then connect the Bot Framework Emulator to http://localhost:3977/api/messages.

  2. Run the bot with "npm run-script startdev". Then connect the Bot Framework Emulator to http://localhost:3977/api/messages. Note: if you make any changes in your code, the bot will be restarted automatically.

  3. Get the packages and compile the .ts files to .js with "npm install", and the run the bot with "npm start". Then connect the Bot Framework Emulator to http://localhost:3977/api/messages. Note: this is what Azure does when you commit your code to Git and the bot gets deployed to the Web App.

About

A sample project that can be used as a base to create bots with Bot Framework v3, Node.js and TypeScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published