Skip to content
This repository has been archived by the owner on Jun 22, 2023. It is now read-only.
/ integration Public archive

Integration repository demonstrating how to run prosopo services together

License

Notifications You must be signed in to change notification settings

prosopo/integration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Integration

Integrates prosopo repositories in a development environment

Prerequisites

  • ability to run bash scripts
  • docker (tested on v20.10.8 / v20.10.11/ v20.10.14, used 4CPUs, 6GB of memory, 2GB of swap)
  • docker compose v2+

Usage

git clone git@github.com:prosopo-io/integration.git

Development Environment Set Up

The following instructions explain how to set up a developer environment in which changes can be made to the various JavaScript packages.

Pull Submodules

Start by pulling submodules. Run the following command from the root of the integration repository.

git submodule update --init --recursive --force --checkout

Set up Containers

Setup your integration containers by running the following command from the root of the integration repository.

docker compose --file docker-compose.development.yml up -d

This does the following:

  1. Pulls and starts a substrate node container containing pre-deployed protocol, dapp-example, and demo-nft-marketplace contracts.
  2. Pulls and starts up a mongodb container.

Install node modules

Install the node modules and build the workspace by running the following command from the root of the integration repository.

npm i && npm run build

Set up a Provider

Providers are the nodes in the network that supply CATPCHA. Run the following command from the root of the integration repository to register a Provider and a Dapp in the Protocol contract and start the Provider API.

npm run setup && npm run start

You can simply run npm run start on subsequent runs.

Command Details

Command Description
npm run setup Registers the Provider and a Dapp in the Protocol contract
npm run start Starts the provider API

Debugging and Testing a Frontend App

You can now start one of the frontend demos to begin receiving CAPTCHA challenges in the browser. See the READMEs in each of the demos for information on how to run them.

Running Tests

Stop your development environment, if it is running.

docker compose --file docker-compose.development.yml down

Set up the test environment and run the tests by running the following command from the root of the integration repository.

npm run test

This will create a test docker environment, register a test Provider, and create a test env file before running the tests in provider.

About

Integration repository demonstrating how to run prosopo services together

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published