{"id":20037381,"url":"https://github.com/animo/paradym-example-achievement-credential","last_synced_at":"2025-09-08T20:40:25.692Z","repository":{"id":213520142,"uuid":"733986942","full_name":"animo/paradym-example-achievement-credential","owner":"animo","description":"This repository contains demo code that shows how to issue an achievement credential using a simple snake game as example.","archived":false,"fork":false,"pushed_at":"2024-04-03T17:33:06.000Z","size":2094,"stargazers_count":0,"open_issues_count":3,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-02T06:26:44.396Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/animo.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2023-12-20T15:37:24.000Z","updated_at":"2023-12-20T15:37:35.000Z","dependencies_parsed_at":"2024-05-08T19:02:13.486Z","dependency_job_id":null,"html_url":"https://github.com/animo/paradym-example-achievement-credential","commit_stats":null,"previous_names":["animo/paradym-example-achievement-credential"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/animo/paradym-example-achievement-credential","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/animo%2Fparadym-example-achievement-credential","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/animo%2Fparadym-example-achievement-credential/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/animo%2Fparadym-example-achievement-credential/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/animo%2Fparadym-example-achievement-credential/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/animo","download_url":"https://codeload.github.com/animo/paradym-example-achievement-credential/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/animo%2Fparadym-example-achievement-credential/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274231505,"owners_count":25245601,"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","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-13T10:19:15.372Z","updated_at":"2025-09-08T20:40:25.660Z","avatar_url":"https://github.com/animo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cbr /\u003e\n\u003cimg src=\"/public/snake-screenshot.png\" alt=\"screenshot-snake\" height=\"200px\" style=\"border-radius: 5px; margin: 5px;\"/\u003e\n\u003cimg src=\"/public/qr-screenshot.png\" alt=\"screenshot-qr\" height=\"200px\" style=\"border-radius: 5px; margin: 5px;\"/\u003e\n\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003e\u003cb\u003eIssue an achievement credential with Paradym\u003c/b\u003e\u003c/h1\u003e\n\nEasily integrate [Paradym](https://paradym.id) workflows into your existing application with this demo. This demo shows how Paradym can be used to issue an achievement credential using a simple snake game example.\n\nThis demo contains two packages: `client` and `server`. Both of these are located in the `/packages` directory. In order to get this demo to work, you will need to create two workflows and configure the environment variables in the `.env.example` file located `/packages/server` directory. To do so, follow the instructions below.\n\n## Before you begin\n\n\u003e Check out the [YouTube video](https://www.youtube.com/watch?v=l_f6be1V-BU) for a complete walkthrough of the demo application and its workflows.\n\nThis demo uses [Paradym](https://paradym.id), a workflow builder for developers that provides the actions, workflows and infrastructure you need to use verifiable credentials in your solution.\n\nIf you don't have an account yet, you can start with our [quick start guide](https://docs.paradym.id/).\n\nThis demo also uses the [Paradym Wallet](https://docs.paradym.id/integrating-with-a-holder-wallet/paradym-wallet), an open source companion app to the Paradym platform available on the [Apple App Store](https://apps.apple.com/nl/app/paradym-wallet/id6449846111?l=en) and [Google Play Store](https://play.google.com/store/apps/details?id=id.paradym.wallet).\n\n## Prerequisites\n\n### Setup your workflows\n\nThe demo app requires 2 workflows. All workflows used for this demo application can be found in the `/paradym` folder.\n\n- **Register Credential Template**: workflow used to register your credential schema and definition. The result of this workflow is used in the issuance workflow.\n- **Issue High Score Badge**: workflow used to issue the achievement credential once the player beats the high score.\n\n#### Step 1: Register your credential information\n\n- Create a new workflow in Paradym with the name Register Credential Template.\n- Copy the contents from `registerCredentialTemplate.yaml` into your created workflow.\n- Publish the workflow.\n- Execute the workflow via the executions tab.\n- Click on the execution to view the result of your workflow.\n- Copy the `credentialDefinitionId` from the result and save the value for later.\n\n#### Step 2: Create the issue high score badge workflow\n\nNext, you need to create the *Issue High Score Badge* workflow.\n\n- Create new workflow in the Paradym dashboard\n- Copy the contents of the `paradym/issueHighScoreBadge.yaml` file\n- Replace the content of the newly created workflow with the value you just copied.\n- Replace the `\u003cYOUR_CREDENTIAL_DEFINITION_ID\u003e` values with the `credentialDefinitionId` value from step 1.\n- Publish the workflow.\n\nOnce you have created the workflow in the Paradym dashboard, you can copy the workflow ID from Paradym and set it as the value for the `PARADYM_WORKFLOW_ID` environment variable in `packages/server/.env.example`.\n\n#### Step 3: Create your Paradym API Key\n\nYou can generate your API key in the settings tab on the Paradym dashboard as described in [here](https://docs.paradym.id/executing-a-workflow/api-execution#api-key). Copy the API key and set it as the value for the `PARADYM_API_KEY` environment variable in `packages/server/.env.example`.\n\n#### Step 4: Setup Paradym Webhook\n\nThe application uses Paradym Webhooks. For this, we need to create a Webhook in the Paradym dashboard (as described [here](https://docs.paradym.id/working-with-executions/using-webhooks)).\n\nFor this to work with your local environment, we'll need to expose port 3000 to the internet. This can be done using [ngrok](https://ngrok.com/). Once you have installed ngrok, you can run the following command to expose port 3000 to the internet.\n\n```bash\nngrok http 3000\n```\n\nUse the **https** url to create your webhook in the Paradym dashboard. Make sure to add `/webhook` after the url (e.g. \u003chttps://107a-217-123-79-23.ngrok-free.app/webhook\u003e).\n\nAfter creating the webhook endpoint, copy the webhook secret and set it as the value for the `PARADYM_HMAC_SIGNATURE` in `packages/server/.env.example`.\n\n\u003e **NOTE:** Keep the ngrok server running and use a different terminal window for the following steps. If you restart the ngrok process, the URL will change and you have to reconfigure the webhook URL in paradym.\n\n#### Step 5: Set the environment variables\n\nThe environment variables consist of your Paradym API Key, and the ID's of the workflows just created. Once you have created the workflows in the Paradym dashboard, you can copy the workflow ID's from Paradym and set them as environment variables.\n\n```bash\ncp packages/server/.env.example packages/server/.env\n```\n\n| Variable                                | Description                                                                                                                                                                                                                                                              |\n| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| `PARADYM_API_KEY`                       | This is the API key used to send request to Paradym. You can generate your API key in the settings tab on the Paradym dashboard as described in [here](https://docs.paradym.id/executing-a-workflow/api-execution#api-key).                                              |\n| `PARADYM_WEBHOOK_SECRET`                | This is a secret that is generated once you create a Webhook in the Paradym dashboard. You can set up a Webhook in the settings tab on the Paradym dashboard as described in [here](https://docs.paradym.id/working-with-executions/using-webhooks#setting-up-webhooks). |\n| `PARADYM_WORKFLOW_ID`  | This is the ID of the issue achievement credential workflow. Once you have created the workflow in Paradym you can copy the ID from the [executions tab](https://docs.paradym.id/executing-a-workflow/api-execution#workflow-id).                                             |                                            |\n\n## Running the demo\n\nNow you have created the workflows and configured the environment variables, the last thing you need to do before you can run the demo is install the dependencies for both the `client` and `server` packages.\n\n```bash\ncd packages/server\nyarn\ncd ../client\nyarn\ncd ../..\n```\n\nNow you need to start the development servers for both packages. Don't forget that\n\nIn your current terminal, run\n\n```bash\ncd packages/server\nyarn dev\n```\n\nOpen up a second terminal window, and run\n\n```bash\ncd packages/client\nyarn dev\n```\n\nThe last command will print a URL to the console. Copy and paste this URL into your browser to open up the snake game.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanimo%2Fparadym-example-achievement-credential","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanimo%2Fparadym-example-achievement-credential","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanimo%2Fparadym-example-achievement-credential/lists"}