This repo implements an Collab.Land action that adds /rarimo-verify
command to your Discord server and
allow members to verify their humanity using the Rarimo Proof of Humanity case.
- Getting Started
- Configuration
- Setup
- Run with Docker
- Installing the Collab.Land actions
- API Specifications
- Contributing
- Changelog
- License
- Set
APP_URL
to the URL of your application in the.env
file. This URL will be used to redirect users after they verify their humanity. By default, it should behttp://localhost:8000
if you didn't change the port (check Starting the server) - Set
POH_APP_URL
to the according url of the Rarimo Proof of Humanity application in the.env
file. By default, it should behttps://robotornot.mainnet-beta.rarimo.com
for thedevnet
andhttps://robotornot.rarimo.com
for themainnet
. - (Optional) In order to verify the webhook requests coming from the Collab.Land bot, please set
the
SKIP_VERIFICATION
variable in your.env
file tofalse
. - Please, fetch the public key from the [Collab.Land Config], and replace
COLLABLAND_ED25519_PUBLIC_KEY_HEX
variables in the.env
file. - (Optional) Set
LOG_LEVEL
todebug
orinfo
in the.env
file to specify the log level. By default, it will bedebug
.
Check the full .env
file example config for more details.
- Clone the repository to your machine
- Open the folder in a code editor of your choice
- Install dependencies:
yarn install
- Run Postgres in Docker:
docker-compose up -d
- Start the server (The server starts in port
8000
by default):yarn dev
- If the server fails due to the port being occupied, change the server port in the package.json
file and in the
.env
file accordingly:// file: package.json { "scripts": { "dev": "next dev -p <PORT>" } }
# file: .env APP_URL="http://localhost:<PORT>"
- To expose your localhost API to public domain, open a new terminal and start NGROK:
ngrok http <PORT>
- Copy the
.ngrok.io
link shown in your terminal:# Example: https://0c49-2601-646-9e00-80-3964-47d-7146-ff13.ngrok.io/
To build the Docker image, run the following command:
docker build . -t rarimo-poh:latest
Run the following command:
docker-compose up -d
Application will be available at http://localhost:8000
, if you didn't change the port in the
package.json file and in the .env
file, otherwise, you have to change the port accordingly in
the docker-compose.yml
file in the ports
section:
# file: docker-compose.yml
services:
rarimo-poh:
image: rarimo-poh:latest
restart: unless-stopped
entrypoint: sh -c "node_modules/.bin/next start"
ports:
- "<PORT>:8000"
- Follow these steps to install the Collab.Land actions: Test the Actions in a Discord server
- Verify your humanity with the
/rarimo-verify
command
- The API exposes two routes per slash command:
- GET
/verify/metadata
: To provide the metadata for the/rarimo-verify
command - POST
/verify/interactions
: To handle the Discord interactions corresponding to the/rarimo-verify
command
- GET
- The slash commands provide example codes for the following Discord interactions:
/rarimo-verify
: Verify your humanity with Rarimo Proof of Humanity use case and get the verified role in your Discord server.
We welcome contributions from the community! To contribute to this project, follow these steps:
- Please go through the following "build a custom action" article to understand the deep technical details regarding building on the Collab.Land actions platform.
- Fork the repository.
- Create a new branch with a descriptive name for your feature or bug fix.
- Make your changes and commit them.
- Push your changes to your branch on your GitHub fork.
- Create a pull request from your branch to the
main
branch of this repository.
Please ensure your pull request adheres to the following guidelines:
- Add a clear pull request title;
- Add a comprehensive pull request description that includes the motivation behind the changes, steps needed to test them, etc;
- Update the CHANGELOG.md accordingly;
- Keep the codebase clean and well-documented;
- Make sure your code is properly tested;
- Reference any related issues in your pull request;
The maintainers will review your pull request and may request changes or provide feedback before merging. We appreciate your contributions!
For the changelog, see CHANGELOG.md.
This project is under the MIT License — see the LICENSE file for details.