/nextjs-gitcoin-passport

Next.js + Gitcoin passport example application

Primary LanguageTypeScript

Up and running with Gitcoin Passport

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.

Getting started

To get started, you must first create an API Key and Scorer ID 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

Running the app

  1. Clone the repo and install the dependencies:

    git clone git@github.com:dabit3/nextjs-gitcoin-passport.git
    
    cd nextjs-gitcoin-passport
    
    npm install
  2. Configure the environment variables for your Scorer 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_SCORER_ID=<your-scorer-id>
    
  3. Run the app

    npm run dev

Next Steps

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.

Getting Involved

If you're interested in getting involved, join Gitcoin's Discord and look for the đź› passport-builders channel.