{"id":27098625,"url":"https://github.com/edonosotti/serverless-bot-skeleton-with-analytics","last_synced_at":"2025-04-06T11:50:49.025Z","repository":{"id":50679462,"uuid":"111619150","full_name":"edonosotti/serverless-bot-skeleton-with-analytics","owner":"edonosotti","description":"A multi-platform, serverless chatbot skeleton with Chatbase and Dialogflow integration.","archived":false,"fork":false,"pushed_at":"2017-12-04T20:28:12.000Z","size":6323,"stargazers_count":6,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-10-20T19:36:46.374Z","etag":null,"topics":["analytics","aws-lambda","bot","chatbase","chatbot","chatbots","chatbots-framework","claudia-bot-builder","comprehend","dialogflow","lambda","lex","natural-language-processing","sentiment-analysis","serverless"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/edonosotti.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-22T01:00:04.000Z","updated_at":"2022-07-31T15:53:38.000Z","dependencies_parsed_at":"2022-09-06T12:11:52.177Z","dependency_job_id":null,"html_url":"https://github.com/edonosotti/serverless-bot-skeleton-with-analytics","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edonosotti%2Fserverless-bot-skeleton-with-analytics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edonosotti%2Fserverless-bot-skeleton-with-analytics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edonosotti%2Fserverless-bot-skeleton-with-analytics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edonosotti%2Fserverless-bot-skeleton-with-analytics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edonosotti","download_url":"https://codeload.github.com/edonosotti/serverless-bot-skeleton-with-analytics/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247478295,"owners_count":20945265,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analytics","aws-lambda","bot","chatbase","chatbot","chatbots","chatbots-framework","claudia-bot-builder","comprehend","dialogflow","lambda","lex","natural-language-processing","sentiment-analysis","serverless"],"created_at":"2025-04-06T11:50:48.519Z","updated_at":"2025-04-06T11:50:49.014Z","avatar_url":"https://github.com/edonosotti.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![codebeat badge](https://codebeat.co/badges/62b14117-5fd6-4672-998f-f02fd2c4eb82)](https://codebeat.co/projects/github-com-edonosotti-serverless-bot-skeleton-with-analytics-master)\n\n# serverless-bot-skeleton-with-analytics\n\n## Description\n\nA multi-platform, serverless chatbot skeleton, with support for Natural Language Processing services, Sentiment Analysis and Analytics.\n\nAvailable integrations:\n\n * **Chatbase** (analytics)\n * **Dialogflow** (Natural Language Processing)\n\nUpcoming integrations:\n\n * **Amazon Comprehend** (analytics) + **Amazon Translate** (translation)\n * **Amazon Lex** (Natural Language Processing)\n\n## Features\n\n * Runs on `AWS Lambda`, based on `claudia-bot-builder`\n * Supports multiple messaging platforms: **Facebook**, **Skype**, **Slack**, **Telegram**, **Viber**\n * Supports **Amazon Echo** (Alexa)\n * Built-in **Chatbase** integration for usage analytics\n * Built-in **Dialogflow** integration for Natural Language Processing\n\n## Requirements\n\n * `Node.js 6.10` (depends on available `AWS Lambda` runtimes)\n\n## Deploying\n\n### Prerequisites\n\n* An `Amazon Web Services` account\n\n### Configuring Dialogflow\n\n 1. Create a new `agent`\n 2. Zip the `/config/dialogflow` directory (zip the whole directory from \"outside\")\n 3. Open the `agent` settings\n 4. Go to `Export and Import`\n 5. Choose `Restore from zip`\n 6. Select the `.zip` file created at step #2\n\n### Deploying the bot to AWS Lambda\n\nBeing based on `Claudia.JS` tools and bot framework, deploying the bot is a simple and straightforward operation. Please refer to the [official `claudia-bot-builder` tutorial](https://claudiajs.com/tutorials/hello-world-chatbot.html), paragraph: **Deploying the bot**.\n\nIt's also worth reading the [tutorial on managing multiple environments in Lambda](https://claudiajs.com/tutorials/versions.html).\n\nPlease note that `claudia` commands *MUST* be ran from the `/src` directory. If  is not installed \"globally\", you can use the local copy packaged with the sources: `$ ./node_modules/.bin/claudia`.\n\n### Setting the environment variables\n\nSet the following environment variables in the AWS Lambda function created with `claudia`:\n\n| VARIABLE NAME                  | DESCRIPTION                    |\n|--------------------------------|--------------------------------|\n| `DIALOGFLOW_CLIENT_ACCESS_KEY` | Dialogflow Client Access Token |\n| `CHATBASE_API_KEY`             | Chatbase API Key               |\n\nEnvironment variables can also be set with `claudia`, using the `--set-env` and `--set-env-from-json` option switches.\n\nRun: `$ ./node_modules/.bin/claudia create --help` from the `/src` directory for info.\n\n`claudia` also supports `AWS KMS` to encrypt environment variables values, see the \"help\" for the `--env-kms-key-arn` option switch.\n\n## A note on vendorized dependencies\n\nThis project includes a local copy of its dependencies, stored in the `/src/node_modules` directory. This practice is known as _\"vendoring\"_ and is not generally considered a best practice, but an annoying and dangerous incident happened not even long ago in the `Node.JS` community made me re-evaluate it. You can find good coverage of the incident searching for: _\"node.js broke the internet\"_, such as:\n\n * http://www.businessinsider.com/npm-left-pad-controversy-explained-2016-3\n * http://www.zdnet.com/article/disgruntled-developer-breaks-thousands-of-javascript-node-js-apps/\n * https://medium.com/@Rich_Harris/how-to-not-break-the-internet-with-this-one-weird-trick-e3e2d57fee28\n\nTo perform a fresh installation of all the dependencies, just remove all files from the `/src/node_modules` directory and run: `$ npm install` from the `/src` directory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedonosotti%2Fserverless-bot-skeleton-with-analytics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedonosotti%2Fserverless-bot-skeleton-with-analytics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedonosotti%2Fserverless-bot-skeleton-with-analytics/lists"}