Proof of Humanity is a bot protection services SDK integrated with the HUMAN Protocol. Utilize our SDK for backend verification, then implement our poh-validators-react
package to effortlessly embed human verification components in your React frontend.
While we're perfecting our SDK documentation, you can delve into our current Beta Documentation.
A walkthrough video for clearer insights into our integrated solution.
Peek into our hackathon memories, strategies, and deliberations in our Compiled Virtual Meetings.
-
To set up the backend, you'll need to create an
.env
file in the root directory of your project. Here's an example structure of the.env
file:VALIDATOR_WALLET_ADDRESS=<Your_Wallet_Address_Here> VALIDATOR_PRIVATE_KEY=<Your_Private_Key_Here> TELEGRAM_BOT_TOKEN=<Your_Telegram_Bot_Token_Here> PASSAGE_APP_ID=<Your_Passage_App_ID_Here> PASSAGE_API_KEY=<Your_Passage_API_Key_Here> WORLDCOIN_ACTION_NAME=<Your_Worldcoin_Action_Name_Here> WORLDCOIN_APP_ID=<Your_Worldcoin_App_ID_Here> DATABASE_URL=<Your_Database_URL_Here>
Replace the placeholder values (
<...>
) with your own respective details.For contributors who already have a
.env
file provided by the team lead, you can skip this step. -
Install the necessary dependencies:
yarn install
-
Run tests to ensure correct setup (known issues of failing tests, but can be ignored):
yarn test
-
Run development server:
yarn dev
To run the bot module and start using Humangram, follow these steps:
- Make sure you created and obtained the Telegram bot token from BotFather.
- Open the .env file in your code editor.
- Add 'TELEGRAM_BOT_TOKEN' environment variable with your actual Telegram bot token obtained from BotFather.
- Save the changes.
Now, you are ready to run the bot module using the command:
node bot.js
The bot will start running, and you can interact with it on Telegram to perform the Proof of Humanity actions.
You can access our own Humangram bot here.
Run and test the react component library in development with Storybook:
cd client-sdk
yarn storybook
Feel free to contribute and improve on the npm package.
Once your backend is up and running with our SDK, enhance your frontend with our React components:
-
Install the
poh-validators-react
package:npm install poh-validators-react
or
yarn add poh-validators-react
-
Start using our human verification components, such as
BiometricsValidator
andHumangramValidator
, in your React applications. Detailed usage can be found in thepoh-validators-react
README.
-
Package Breakage: The
poh-validators-react
package, which is designed for React applications, currently has dependencies on certain Node.js-specific modules. This results in the package breaking when integrated into React applications in browser environments. Errors related to node modules likestream
orutil
are indicative of this problem.We are actively addressing this critical issue. Please stay tuned for updates and check our documentation for any interim solutions.
For those who want to contribute to the npm package, ensure your .env
file also includes the following:
STORYBOOK_WORLDCOIN_APP_ID=<Your_Storybook_Worldcoin_App_ID_Here>
STORYBOOK_PASSAGE_APP_ID=<Your_Storybook_Passage_App_ID_Here>
STORYBOOK_WEBSOCKET_SERVER_URL=<Your_Websocket_Server_URL_Here>
Replace the placeholder values (<...>
) with your own respective details.
To contribute to the project, please follow these steps:
-
Clone the repository to your local machine:
git clone https://github.com/Vernyl/proof-of-humanity.git cd proof-of-humanity
-
Pull the latest changes from the
develop
branch to ensure you have the most up-to-date code:git checkout develop git pull origin develop
-
Create a new feature branch for your contribution. It's recommended to name the branch descriptively:
git checkout -b feature/descriptive-branch-name
-
Make your changes and commit them to the feature branch:
git add . git commit -m "Add your descriptive commit message here"
-
Push your feature branch to the remote repository on GitHub:
git push origin feature/descriptive-branch-name
-
Go to the repository on GitHub and click on the "Compare & pull request" button for your feature branch.
-
Add a title and description for your pull request, outlining the changes you made and any relevant information.
-
Request a review from team members or the Team Lead by mentioning them in the pull request description using
@username
. -
Once your pull request has been reviewed and approved, it will be merged into the
develop
branch. -
Congratulations on your contribution! Your changes are now part of the project.
By following these steps, you can collaborate effectively and contribute to enhancing the Proof of Humanity SDK with the HUMAN Protocol. Happy coding!