{"id":20858947,"url":"https://github.com/secretshardul/complete-shakespeare","last_synced_at":"2025-04-10T21:21:16.581Z","repository":{"id":101006138,"uuid":"308830083","full_name":"secretshardul/complete-shakespeare","owner":"secretshardul","description":null,"archived":false,"fork":false,"pushed_at":"2021-01-29T03:31:33.000Z","size":870,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T18:49:41.024Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/secretshardul.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-31T07:41:45.000Z","updated_at":"2024-02-23T19:58:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"70dbffce-468c-40c9-a1d7-1444d52379fe","html_url":"https://github.com/secretshardul/complete-shakespeare","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secretshardul%2Fcomplete-shakespeare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secretshardul%2Fcomplete-shakespeare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secretshardul%2Fcomplete-shakespeare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secretshardul%2Fcomplete-shakespeare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/secretshardul","download_url":"https://codeload.github.com/secretshardul/complete-shakespeare/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248299008,"owners_count":21080448,"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":[],"created_at":"2024-11-18T04:48:11.997Z","updated_at":"2025-04-10T21:21:16.573Z","avatar_url":"https://github.com/secretshardul.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Complete Shakespeare Alexa skill\n![](https://media-fastly.hackerearth.com/media/hackathon/slash-sprint/images/7af8fd52f7-cover_image_1.png)\n\nAlexa skill that queries the works of Shakespeare from Dgraph's Slash GraphQL database.\n\nThis project is split across 3 repositories:\n1. [**dgraph-shakespeare-data**](https://github.com/secretshardul/dgraph-shakespeare-data): Contains the RDF file and GraphQL schema needed to setup DGraph.\n2. [**complete-shakespeare**](https://github.com/secretshardul/complete-shakespeare) (current repository): Contains code for Alexa skill.\n3. [**GraphiQL explorer**](https://github.com/secretshardul/shakespeare-api)\n\n## GraphiQL explorer\nhttps://secretshardul.github.io/shakespeare-api/\n\n## Update: the skill is live on Amazon\n![](./images/complete-shakespeare-amazon.png)\n\n[Install link](https://www.amazon.in/dp/B08MTC49FQ/ref=sr_1_1?dchild=1\u0026keywords=complete+shakespeare\u0026qid=1604572645\u0026s=digital-skills\u0026sr=1-1)\n\n\n## Demo video\n[![Complete shakespeare demo](images/thumbnail-yt.png)](https://youtu.be/CpnAH6ymal8)\nThe demo was recorded when the skill was pending approval. The skill is now live. You can directly test it on your Alexa device without going to the Alexa console.\n\n## Architecture\n![Architecture](https://lucid.app/publicSegments/view/22f57178-d91d-42ed-9755-eb46218710c5/image.png)\n\n## Instructions to run code\nThese steps are for building the skill from its code.\n\n## Setup Dgraph database (optional)\n1. Follow instructions from [**dgraph-shakespeare-data**](https://github.com/secretshardul/dgraph-shakespeare-data) repository to setup your Dgraph database on Slash.\n2. Fork this repository.\n3. Find the GraphQL endpoint in [`lambda/api.js`](lambda/api.js) and replace it with your own.\n4. Commit changes and  push to github.\n\nAlternately you can use my repository and skip the above steps. The endpoint `https://lowly-statement.ap-south-1.aws.cloud.dgraph.io/graphql` is provided in code. The slash cluster for this endpoint is up and running.\n\n## Setup Alexa skill\n1. Sign up on [Alexa developer portal](https://developer.amazon.com/en-IN/alexa/alexa-skills-kit)\n2. Create new skill: Set model to custom and set hosting method to Alexa hosted(Node.js). Give the skill any name of your choice. Set the default language to **English(IN)** (this is important). Press create skill.\n![Skill type](images/1.skill-type.png)\n3. In the **choose a template** screen, press import skill button. Pass the link to this repository `https://github.com/secretshardul/complete-shakespeare.git`. Alternately if you created your own backend, pass the link of your forked repo. The link must end with `.git`.\n![import repo](images/2.import-skill.png)\n\n4. **Change invocation name**: Go to build \u003e invocation \u003e add the name `complete shakespeare`. Press save and build buttons.\n5. To test this skill: Go to test menu and change `Skill testing is enabled in` option to **development**.\n\n# Usage\nInvoke the skill by saying or typing **complete shakespeare**. Currently the skill has 4 intents:\n1. Who said what and where?\n\n    Valid inputs:\n    ```\n    \"who said {phase}\"\n    \"who said the phase {phase}\"\n    ```\n\n    Eg. Who said et tu, Brute?\n\n    ![who said et tu, Brute?](images/3.who-said-et-tu-brute.png)\n\n2. Who is the character X?\n\n    Valid inputs:\n    ```\n    \"who is {name}\"\n    \"who is the character {name}\"\n    ```\n\n    Eg. who is Orlando?\n\n    ![Who is Orlando?](images/4.who-is-orlando.png)\n\n3. List the works from a particular genre:\n\n    The genres are history, tragedy, comedy, poem and sonnet. The genre word is stemmed, so \"what are the tragedies of shakespeare\" is valid input.\n\n    Valid inputs:\n    ```\n    \"what are the {genre} of shakespeare\",\n    \"tell me about the {genre} of shakespeare\",\n    \"list the {genre} of shakespeare\",\n    \"list the works of shakespeare of the genre {genre}\",\n    \"what are the works of shakespeare of the genre {genre}\"\n    ```\n\n    Eg. What are the tragedies of Shakespeare?\n    ![What are the tragedies of Shakespeare?](images/5.what-are-tragedies.png)\n\n4. Tell a random quote:\n\n    Valid inputs are of formats:\n    ```\n    \"quote\",\n    \"tell me a quote\",\n    \"tell me a shakespeare quote\",\n    \"shakespeare quote\"\n    ```\n\n    Eg. Tell me a quote\n    ![Quote](images/6.quote.png)\n\n# Code structure\n1. [/lambda](/lambda): It contains `Node.js` code. This is executed by AWS Lambda when Alexa sends an intent. AWS Lambda generates the output message and passes it to Alexa for speech generation.\n2. [/skill-package/interactionModels/custom/en-IN.json](/skill-package/interactionModels/custom/en-IN.json): Contains the intents and slots.\n\n# Caveats\n1. For the same email, Alexa hosted skill resources are hosted separately from your AWS account.\n2. Environment variables are not supported in AWS hosted skills. Endpoint needs to be hard coded.\n3. A separate git repository is created in AWS Codecommit when code is imported from git. Any code changes go here and they remain separate from your Github repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecretshardul%2Fcomplete-shakespeare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsecretshardul%2Fcomplete-shakespeare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecretshardul%2Fcomplete-shakespeare/lists"}