This project has two applications:
This project is still a work in progress, click here to view the list of TODO's
- None
Candidate.tsx
- Hide the remove candidate button for non-admins.
To clone the repository:
Navigate to the directory where you plan to clone the project in.
git clone https://github.com/cedricquitor/blockchain-web-app.git- Create a .env file in blockchain/
- Click here for Environment Variables setup instructions
- Create a .env file in client/
- Click here for Environment Variables setup instructions
- ALCHEMY_API_KEY: Contact collaborators or @cedricquitor
- PRIVATE_KEY: Click here for instructions on how to get your private key
- Navigate to blockchain
cd blockchain- Start a local node
npx hardhat node- Open a new terminal and run the nft_deploy script using Hardhat
npm run deploy:localhost- Navigate to blockchain
cd blockchain- Run the nft_deploy script using Hardhat
npm run deploy:mumbai- Head to your MetaMask account
- Click the kebab menu (three dots) on the furthest right
- Click Account details

- Click Export private key
- Type in your MetaMask password
- Copy your private key (red text)
- Paste it in your .env file and name it PRIVATE_KEY
Note: Make sure you're in Polygon's Mumbai Testnet (How to add Mumbai Testnet)
- Head to your MetaMask browser extension
- Click your current network

- Click Add network
- On the bottom part of the page, click Add a network manually

- Fill the form with the following details:
| Syntax | Description |
|---|---|
| Network Name | Mumbai Testnet |
| New RPC URL | https://rpc-mumbai.maticvigil.com/ |
| Chain ID | 80001 |
| Currency Symbol | MATIC |
| Block Explorer URL | https://polygonscan.com/ |
- VITE_ALCHEMY_RPC_PROVIDER: Contact collaborators or @cedricquitor
- VITE_CONTRACT_ADDRESS: Deploy the smart contract in Polygon Mumbai testnet (How to deploy the smart contract in Polygon Mumbai testnet) and copy and paste the contract address in your .env file.
Note: Don't forget to replace the contract address if you redeploy your smart contract!
- Navigate to client
cd client- Install dependencies
npm install- Run local dev server script
npm run dev