{"id":20821971,"url":"https://github.com/internetarchive/internet-archive-voice-apps","last_synced_at":"2025-04-09T06:13:15.175Z","repository":{"id":28345022,"uuid":"117132991","full_name":"internetarchive/internet-archive-voice-apps","owner":"internetarchive","description":"Voice Apps (Actions on Google, Alexa Skill) of Internet Archive. Just say: \"Ok Google, Ask Internet Archive to Play Jazz\" or \"Alexa, Ask Internet Internet Archive to play Instrumental Music\"","archived":false,"fork":false,"pushed_at":"2025-02-19T13:56:19.000Z","size":5704,"stargazers_count":49,"open_issues_count":111,"forks_count":42,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-04-02T04:08:03.543Z","etag":null,"topics":["actions-on-google","alexa-skill","dialog-flow","internet-archive","voice-assistant"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/internetarchive.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG-Actions-on-Google.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-11T17:48:45.000Z","updated_at":"2025-02-02T00:04:30.000Z","dependencies_parsed_at":"2024-10-25T05:35:41.958Z","dependency_job_id":"17680bbd-f985-4633-99db-ebac64096d99","html_url":"https://github.com/internetarchive/internet-archive-voice-apps","commit_stats":null,"previous_names":[],"tags_count":56,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/internetarchive%2Finternet-archive-voice-apps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/internetarchive%2Finternet-archive-voice-apps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/internetarchive%2Finternet-archive-voice-apps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/internetarchive%2Finternet-archive-voice-apps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/internetarchive","download_url":"https://codeload.github.com/internetarchive/internet-archive-voice-apps/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247987285,"owners_count":21028895,"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":["actions-on-google","alexa-skill","dialog-flow","internet-archive","voice-assistant"],"created_at":"2024-11-17T22:13:36.091Z","updated_at":"2025-04-09T06:13:15.151Z","avatar_url":"https://github.com/internetarchive.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Internet Archive Google Action [![Build Status](https://travis-ci.org/internetarchive/internet-archive-voice-apps.svg?branch=master)](https://travis-ci.org/internetarchive/internet-archive-voice-apps) [![Coverage Status](https://coveralls.io/repos/github/internetarchive/internet-archive-google-action/badge.svg?branch=master)](https://coveralls.io/github/internetarchive/internet-archive-google-action?branch=master)\n\n## Setup Instructions\nSee the developer guide and release notes at https://developers.google.com/actions/ for more details.\n\n### Steps for testing with Google Assistant\n#### Create and setup project in Actions Console\n1. Use the [Actions on Google](https://console.actions.google.com/) Console to add a new project with a name of your choosing and click Create Project.\n2. Click `skip` \n3. Go to actions under build, and click `Add your first action`\n4. select custom intent, then `build`\n#### Create Action for the project\n1. Click `CREATE` (continued from above step)\n2. Go to `settings` and click `export and import`, then click `restore from zip`.\n3. zip the contents of `models/dialogflow/` and use that zip to restore the project. \n#### Run Local Server\nRun server local with colorful logs\n1. `npm install -g firebase-tools`\n2. `touch functions/.runtimeconfig.json` and add fake keys (temporary workaround) refer [this](https://github.com/internetarchive/internet-archive-voice-apps/issues/434#issuecomment-453114249)\n2. `firebase init` (remove .firebaserc first)\n3. `firebase use --add` (and choose your own firebase project)\n4. `cd functions` and `npm install`\n4. `DEBUG=ia:* npm start` \n#### Expose local server\nTo expose server to google assistant use [ngrok](https://ngrok.com/)\nits free plan should be enough.\n\nTo publish 5000 port use:\n\n```bash\nngrok http 5000\n```\n\nyou should find url `https://\u003cid\u003e.ngrok.io/`.\n\n#### Connect webhook to dialogflow\nGo to the fullfillment section of your dialogflow draft copy of our app and after that you should use this url:\n\n```bash\nhttps://\u003cid\u003e.ngrok.io/\u003cyour project name\u003e/us-central1/assistant\n```\n\n### Steps for testing with Alexa\nThe Alexa app workflow for dev/production is the following:\n* We create a zip file with the app code.\n* We upload the zip to an AWS S3 bucket.\n* We edit the AWS Lambda app to load the new app zip file.\n* In case the AWS Lambda app changes a lot (e.g. we upgrade Node version), its Lambda ID will change.\nIn that case, we need to edit the Alexa skill in https://developer.amazon.com/alexa/console/ask# to load the new Lambda app.\nThis final step is not required most of the times.\n* We use https://developer.amazon.com/alexa/console/ask# to test the app.\n\nMore details follow.\n\nNode 12 is required. There is a problem with newer Node versions, `bespoken-tools`\nwhich is a key dependency, is not supporting it. Use `nvm install 12` and `nvm use 12`\nto switch to Node 12 before running any other command.\n\nThe general idea is that there are 2 AWS S3 buckets, `dev` and `production`.\nYou can access them via https://aws.amazon.com/ -\u003e sign in -\u003e S3.\nYou need to create a `zip` with the app, you upload it to the relevant S3 bucket\nand then you go to AWS Lambda `dev` / `production` to select which app\nshould be loaded via its S3 URL.\n(AWS -\u003e Lambda -\u003e edit app -\u003e \"upload from S3 .zip file\").\n\nS3 buckets have multiple app versions. This way, you can also easily rollback to a previous version if needed.\n\nThe script that produces the `app.zip` that we upload to S3 is `bin/deploy-to-alexa-skill.sh`.\nAn important AWS Lambda limitation is that the unzip code filesize should be \u003c 250MB.\nTo achieve that, we do:\n```\n(cd ./deploy/alexa/; npm install --production; rm -rf node_modules/aws-sdk; node-prune node_modules)\n```\n`aws-sdk` is already preinstalled in AWS Lambda, so we don't need it.\n\n`npm install -g node-prune` is a pre-requisite. This tool removes files that are useless in production\nand reduces the total filesize a lot.\n\nAfter deploying to dev or production, use https://developer.amazon.com/alexa/console/ask#\n`ACTIONS -\u003e Test` for testing.\n\n### Setup Env\n\n#### Options\n\n - profile performance of requests\n   Env Variable: `PROFILE_REQUESTS=true` (`false` by default)\n   `firebase functions:config:set performance.requests=true`\n\n### How to make contributions?\n\n:mag: get [one good first issue](https://github.com/internetarchive/internet-archive-google-action/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)\nassign yourself (if you have access) or write comment that you'd like to work on this issue.\nThat's help to prevent work overlapping.\n\n_create git branch `feature/\u003cname-of-feature\u003e`, [more](http://nvie.com/posts/a-successful-git-branching-model/)_\n\n:computer: working on it\n\n_Use [Mocha](https://mochajs.org/) for continuous checking of\nyour code quality and cover functionality by tests_\n\n```\nnpm run mocha -- --watch\n```\n\n:coffee: Complete checking of code by run unit tests and code style checking\n\n```\nnpm test\n```\n\n:star2: We follow [standard javascript code style](https://standardjs.com/).\n\n_Automatic style fixing, it doesn't solve all problems but could be very helpful_\n\n```\nnpm run lint -- --fix\n```\n\n:tada: Finally make Pull Request and give complete description what have you done\nand link the addressed issue.\n\n_Also it could be good practice to create your Pull Request earlier,\nbut add `WIP:` at the beginning of its name! This way other developers\ncould see what are you working right now._\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finternetarchive%2Finternet-archive-voice-apps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finternetarchive%2Finternet-archive-voice-apps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finternetarchive%2Finternet-archive-voice-apps/lists"}