Giter Site home page Giter Site logo

oceans404 / vc-gated-website Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 3.0 214 KB

A VC-gated (verifiable credential gated) page; you need to hold a Polygon ID KYCAgeCredential with a birthday before 2023 for access

Home Page: https://birthday-gated-website.on.fleek.co/

JavaScript 83.09% HTML 13.79% CSS 3.12%
polygon polygon-id did verifiable-credentials vc-gated

vc-gated-website's Introduction

This is a Verifiable Credential (VC) Gated Website

The code below still works as of June 2023, but for the best developer experience, use my fullstack template instead - fullstack-polygon-id-vc-gated-dapp - It includes both the server and frontend and is everything you need to set up a KYCAgeCredential VC gated dapp with Polygon ID.


Deprecated repo

(use above repo)

Screenshot 2023-06-06 at 10 30 51 AM

How to run locally

0. Follow Verifier server setup instructions

Read through the server readme and follow local server setup instructions: https://github.com/oceans404/vc-verifier#local-server-setup

1. ⭐ Star this repo so you have it for future reference, then clone it and install dependencies

git clone https://github.com/oceans404/vc-gated-website
cd vc-gated-website
npm i

2. Create a .env file by copying my sample

cp .env.sample .env;

Update the REACT_APP_VERIFICATION_SERVER_URL variable to your hosted server url from step 7: https://github.com/oceans404/vc-verifier#7-hosting-the-server-optional

Or, if you haven't hosted the server using Render, set REACT_APP_VERIFICATION_SERVER_URL="http://localhost:3000" because that's where the you are running the server locally. Don't set REACT_APP_VERIFICATION_SERVER_URL to your ngrok forwarding address or you'll face CORS errors.

3. Start the frontend

npm start

Visit http://localhost:8080/

4. Optional: host your website using Fleek

I've documented a similar hosting process here: https://github.com/oceans404/fullstack-sockets-demo#deploy-your-frontend

Logic flow

This frontend interacts with my verifier server to

vc-gated-website's People

Contributors

oceans404 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.