moody is a decentralized application that allows users to share their mood with everyone on the Polygon network and The Graph.
##Â Installation
- Clone the repo
git clone https://github.com/nurcinozer/moody-dapp.git
- Install dependencies
yarn
- Create an
.env
file in the backend folder and add the following variables
PRIVATE_KEY="YOUR_WALLET_PRIVATE_KEY"
POLYGONSCAN_KEY="YOUR_POLYGONSCAN_API_KEY"
- Create an
.env
file in the frontend folder and add the following variables
NEXT_PUBLIC_WEB3_STORAGE_KEY="YOUR_WEB3_STORAGE_API_KEY"
NEXT_PUBLIC_IMAGEKIT_ID="YOUR_IMAGEKIT_ID"
- Compile the smart contract
npx hardhat compile
- Deploy the smart contract
npx hardhat run scripts/deploy.ts --network mumbai
- Get your contract address and add it to the
frontend/utils/constants.ts
file
export const CONTRACT_ADDRESS = "YOUR_CONTRACT_ADDRESS"
-
Deploy subgraph in
backend/indexer
folder by following the instructions here. (It is optional because the subgraph is already in hosted service) -
Get your subgraph url and add it to the
frontend/utils/constants.ts
file
export const SUB_GRAPH_URL = "YOUR_SUBGRAPH_URL"
- Run the app
yarn dev