Skip to content

animo/paradym-example-university-courses

Repository files navigation


screenshot-demo

Issue and verify credentials with Paradym

Easily integrate Paradym workflows into your frontend application with this demo. Enroll in university courses by proving prior course completions.

Before you begin

Check out the YouTube video for a complete walkthrough of the demo application and its workflows.

This demo uses Paradym, a workflow builder for developers that provides the actions, workflows and infrastructure you need to use verifiable credentials in your solution.

If you don't have an account yet, you can start with our quick start guide.

This demo also uses the Paradym Wallet, an open source companion app to the Paradym platform available on the Apple App Store and Google Play Store.

Prerequisites

Setup your workflows

The demo app requires 3 workflows. All workflows used for this demo application can be found in the /paradym folder.

  • Register Credential Template: workflow used to register your credential schema and definition. The result of this workflow is used in the other 2 workflows.
  • Issue Cource Certificate: workflow used to issue a course credential once the course is completed.
  • Verify Course Certificate: workflow used to request and validate the required credentials for a course.

Step 1: Register your credential information

  • Create a new workflow in Paradym with the name Register Credential Template.
  • Copy the contents from registerCredentialTemplate.yaml into your created workflow.
  • Publish the workflow.
  • Execute the workflow via the executions tab.
  • Click on the execution to view the result of your workflow.
  • Copy the credentialDefinitionId from the result and save the value for later.

Step 2: Create the other workflows

Next, you need to create the other 2 workflows: Issue Course Certificate and Verify Course Certificate.

  • Copy the contents from .yaml files from the paradym directory and create the workflows.
  • Replace the <YOUR_CREDENTIAL_DEFINITION_ID> values with the credentialDefinitionId value from step 1 for both workflows.
  • Publish the workflows.

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.

Step 3: Set your Paradym Project ID

You can find your Paradym Project ID in the settings tab on the Paradym dashboard as described here.

Step 4: Create your Paradym API Key

You can generate your API key in the settings tab on the Paradym dashboard as described in here.

Step 5: Setup Paradym Webhook

The application uses Paradym Webhooks. For this, we need to create a Webhook in the Paradym dashboard (as described here).

For this to work with your local environment, we'll need to expose port 3000 to the internet. This can be done using ngrok. Once you have installed ngrok, you can run the following command to expose port 3000 to the internet.

ngrok http 3000

Use the https url to create your webhook in the Paradym dashboard. Make sure to add /api after the url (e.g. https://107a-217-123-79-23.ngrok-free.app/api).

You'll need set the webhook secret in your environment variables.

Step 6: Set the environment variables

The environment variables consist of your Paradym API Key, your Paradym project ID, your Paradym webhook secret, 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.

cp .env.example .env.local
Variable Description
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.
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.
PARADYM_PROJECT_ID This is your Paradym project identifier. It can be located in the settings tab on the Paradym dashboard as described here.
ISSUE_COURSE_CERTIFICATE_WORKFLOW_ID This is the ID of the issue course credential workflow. Once you have created the workflow in Paradym you can copy the ID from the executions tab.
VERIFY_COURSE_CERTIFICATE_WORKFLOW_ID This is the ID of the verify course credential workflow. Once you have created the workflow in Paradym you can copy the ID from the executions tab.

Running the demo

First, run yarn to install the dependencies:

yarn

You can then run the development server:

yarn dev

Open http://localhost:3000 with your browser to see the result.

About

A demo website for Paradym workflows

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published