This is a decentralized courses booking system based on smart contracts, built with hardhat, solidity, Ethers JS ,reactJS as technologies and many third party libraries .
You need to have a crypto Wallet and connect with an account
For web users, you can get a wallet through MetaMask
You need to have a wallet with testnet ethereum on the Goerli network Get free Goerli faucet
to create the student and Session objects in Factory Class
thus creating an abstract interface for the student and use it in the Factory ckass to create the student
then cd Dapforbookingcourses/DapSystem
npm i
create .env
file in the root directory
set up these constants
QUICKNODE_API_URL=YOUR_QUICKNODE_API_KEY
ACCOUNT_PK=YOUR_RINKEBY_ACCOUNT_PK
ETHERSCAN_API_KEY=YOUR_ETHERSCAN_API_KEY
COINMARKETCAP_API_KEY=YOUR_COINMARKETCAP_API_KEY
GOERLI_ALCHEMY_URL=GOERLI_ALCHEMY_URL
compile the contracts
npx hardhat compile
deploy the contracts locally
npx hardhat run scripts/deploy.js
deploy the contracts to goerli network
npx hardhat run scripts/deploy.js --network goerli
Unit Testing for the contract
npx hardhat test
Test coverage report
npx hardhat coverage
Execute Balance task
npx hardhat balance --account account_public_key
Create .env file in the root directory and set up the contract addresses
The contract address are produced by compile the smart contracts from the ../DapSystem
Note : These are the Factory Contracts that creates all the other contracts (15 smart contract in total)
REACT_APP_STUDENT_CONTRACT_ADDRESS=
REACT_APP_STUDENT_LEVEL_CONTRACT_ADDRESS=
REACT_APP_SESSION_CONTRACT_ADDRESS=
REACT_APP_PATH_CONTRACT_ADDRESS=
REACT_APP_LEVEL_CONTRACT_ADDRESS=
REACT_APP_ADMIN_CONTRACT_ADDRESS=
install dependencies
Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.
The page will reload when you make changes.
You may also see any lint errors in the console.
watch this video