Web3Tube is a social media platform built on top of Polygon network and The Graph, that allows users to create, share and watch videos, without worrying about their privacy.
- Frontend framework: Next.js
- Smart contracts: Solidity
- Ethereum web client library: Ethers.js
- File storage: IPFS
- Querying data: The Graph
- CSS Framework: TailwindCSS
- Ethereum development environment: Hardhat
- Layer 2 blockchain: Polygon
- Video Infrastructure: Livepeer
To get this application up and and running on your local machine follow these simple steps.
You need to have Node.js, NPM and hardhat installed on your computer, before running this project.
-
Clone the repo
git clone https://github.com/suhailkakar/Decentralized-YouTube
-
Install NPM packages
npm install
or
yarn install
-
Create an
.env
file and get an API key from Livepeer studio, Web3 Storage and Imagekit.PRIVATE_KEY="" NEXT_PUBLIC_LIVEPEER_KEY="" NEXT_PUBLIC_WEB3_STORAGE_KEY= NEXT_PUBLIC_IMAGEKIT_ID=""
-
Compile the smart contract
npx hardhat compile
-
Deploy the smart contract
-
Get your contract address and paste in on
constants/index.ts
-
Deploy subgraph in
indexer
directory by following steps inindexer/README.md
(optional, since it is already deployed in hosted service) -
Get subgraph query endpoint after deployment and update it in
constants/index.t
-
Run the app
npm start