-
Install git on linux system. I am using windows subsystem for linux (WSL) on windows 11.
-
Clone the repository
git clone https://github.com/Xiaod0ng/zkKYC-Issuer
-
Update
ISSUER_ETHEREUM_URL
variable in .env-issuer. I'm using Alchemy here. -
Follow docker documentation to turn on Docker Desktop for WSL
-
Run
make up
in Linux terminal -
Run the following command to add vault toekn to configuration file
make add-vault-token
- Run the following command to set private key
make private_key=<YOUR_WALLET_PRIVATE_KEY> add-private-key;
- Run the following command to generate a new issuer DID
make generate-issuer-did
- Run
make run-ui
to start the webpage
After the above steps, http://localhost:8088 should work properly.
Open network tab when loading the UI page, you can find that UI page is calling UI API for schemas and status.
To allow connection from Polygon ID wallet, you need to make both UI API (:3002) and UI (:8088) public. For temporary testing purpose, I am using ngrok and localtunnel to establish the public URLs.
-
In
.env-issuer
, editISSUER_SERVER_URL
to ngrok static domain. In my case, the variable value ishttps://usefully-blessed-sunbird.ngrok-free.app/
. You need to set your own value. Related ngrok documentation can be found here. -
In
.env-api
, editISSUER_API_UI_SERVER_URL
to localtunnel public URL. In my case, the variable value ishttps://xd-issuer.loca.lt
. You need to set your own value. Related localtunnel documentation can be found here. -
Run
make restart-ui
to restart the docker services since the environment variables are changed. -
Open a local terminal with administrator rights (localtunnel may return error if not with admin rights), run
lt --subdomain xd-issuer --port 3002
to establish issuer API public URL. You need to use your own value. -
Open
https://xd-issuer.loca.lt
, follow the instructions on the page to whitelist the IP address. -
After finishing the above steps, open ngrok terminal, run
ngrok http --domain usefully-blessed-sunbird.ngrok-free.app 8088
to start ngrok public URL. You need to use your own value. -
Open
https://usefully-blessed-sunbird.ngrok-free.app
in the browser, it should be like this.
-
Run
make down
to remove existing services -
Run
make up
to start the services -
Run
make delete-did
to remove current DID -
Delete the value of ISSUER_API_UI_ISSUER_DID in .env-api
-
Run
make generate-issuer-did
to generate a new issuer DID -
Run
make run
to start API -
Run
make run-ui
to start UI -
Follow Public URLs setup to expose the public access.
If all variables are configured properly, you need to follow the steps below.
-
Start Docker Desktop
-
Go to the issuer-node folder, run
docker rm issuer-ui-1
to remove the image first, then runmake restart-ui
to start the ui again. This is caused by the issue illustrated here. -
Follow Public URLs setup to expose the public access.
You should be able to navigate the sites.
After v2.3.1, the issue has been fixed. Just start docker services and establish the public URLs.
-
Network error after starting UI
Usually because there are docker images not running. Make sure
make run
is executed beforemake run-ui
so that the API image is properly initiated. Check docker logs for more information. Some related information in this issue -
ngrok returns ERR_NGROK_3200 error
Close the terminal and run again.
-
localtunnel returns server error
Run the terminal with administrator rights.