Git Product home page Git Product logo

raffle-frontend's Introduction

RAFFLE FRONT END ✅

This is a full stack decentralized Raffle App using Chainlink VRF and Chainlink Keepers, Solidity and Next.js from workshop from Chainlink Hackathon Spring 2022 and which is also complemented by Patrick Alpha's Free Code Camp course.

This repo contains all the stuff for the front-end part, the back-end is hold on raffle-frontend.

To achieve fully descentralization the Front-End has been uploaded to IPFS and fleek: ipfs://QmexxqxhViwpFsbWnbMktNhG3qsukTA58rLyLQaCpg8vy3, https://curly-butterfly-3592.on.fleek.co/

The workshop followed to complete this repo is this one.

The used repos from Patricks are the followings:

  1. Hardhat Smart Contract Lottery: Patrick's repo that we are building.
  2. Front-end Smart Contract Lottery: Patrick's repo for the Front-end part.
  3. Patricks Hardhat course video.

DEPENDENCIES AND SET-UP

  • Create Next.js project:
yarn create next-app .
  • Add Moralis to interact with front-end:
yarn add moralis react-moralis
  • Add Moralis web3uikit to interact with front-end:
yarn add web3uikit
  • Add tailwindcss (CSS formarter):
yarn add --dev tailwindcss postcss autoprefixer

or

npm install tailwindcss postcss autoprefixer
  • Initialize tailwindcss:
yarn tailwindcss init -p

or

npx tailwindcss init -p

RUN LOCAL SERVER:

yarn dev

You will have your local server running at: http://localhost:3000.

  • Open new bash terminal to use while yarn server is running

EXPORT CODE

Once our Front-End code is finished..

  1. Export our code to a Bundle.
  2. Upload the Bundle to IPFs to be fully decentralized.
  • Execute:
yarn next build
yarn next export

A file called out is going to be generated with our exported code.

UPLOAD TO IPFS

We want our Front-End to be fully decentralized. To achive this goal we are uploading the out file to IPFS.

  1. Open IPFS.
  2. Go to Files.
  3. Import out directory.
  4. Click 'set pinning'.

DONE! ✅

  1. Copy CID.
  2. Go to Browher and paste ipfs://CID.

NOTICE: It is possible to use fleekhq or pinata to host our ipfs in a normal domain in order to make it easier for people to reach our page.

REMINDER: if you use fleekhq (recomended) -> add: buildcommand: 'yarn install && yarn run build && yarn run export'

RESOURCES

raffle-frontend's People

Contributors

jmariadlcs avatar

Stargazers

 avatar

Watchers

 avatar  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.