This is a reference implementation to show you how to build with and use the Gitcoin Passport to score users for your app.
Gitcoin Passport is a tool that enables developers to build Sybil resistant applications while preserving privacy. The Scorer API used in this example gives developers an easy way of retrieving a wallet's Passport score.
To get started, you must first create an API Key and community using the Gitcoin Scorer API.
You can look through this codebase to see what a simple integration with Gitcoin Passport looks like. For more detailed information check out the documentation
-
Clone the repo and install the dependencies:
git clone git@github.com:dabit3/nextjs-gitcoin-passport.git cd nextjs-gitcoin-passport npm install
-
Configure the environment variables for your Community ID and API key in a file named
.env.local
. (see example configuration at.example.env.local
)NEXT_PUBLIC_GC_API_KEY=<your-api-key> NEXT_PUBLIC_GC_COMMUNITY_ID=<your-community-id>
-
Run the app
npm run dev
Once you've gotten a handle on how the integration works, check out some of the following links for more information on how to integrate Gitcoin Passport into your own application.
If you're interested in getting involved, join Gitcoin's Discord and look for the đź› passport-builders channel.