DeBook
DeBook is a decentralized social media platform built on Solidity, JavaScript, utilizing technologies such as Hardhat for development and IPFS for metadata storage. It offers a seamless experience for users to post threads and mint nfts as profiles securely on the blockchain.
Technology Stack & Tools
-
Solidity: Writing smart contracts to manage book lending transactions.
-
JavaScript (React & Testing): Frontend development and testing.
-
Ethers: Interacting with the blockchain for book transactions.
-
Hardhat: Development framework for Ethereum smart contracts.
-
IPFS: Storing metadata of books in a decentralized manner.
-
React Routers: Navigational components for the frontend.
Requirements For Initial Setup
Setting Up
1. Clone/Download the Repository.
2. Install Dependencies:
cd debook
npm install
3. Change Credentials in .env File
- Rename the '.env.exaple' file to just '.env'
- Paste your credentials in the inverted commas('')
4. Boot up Local Development Blockchain:
cd debook
npx hardhat node
5. Connect Development Blockchain Accounts to Metamask:
- Copy private keys of the addresses and import them to Metamask.
- Connect Metamask to Hardhat blockchain with network 127.0.0.1:8545.
- If Hardhat is not listed in Metamask networks:
- Open Metamask in your browser.
- Click the fox icon.
- Click the top center dropdown button listing all available networks.
- Click "Add Network" and fill in the following details:
- Network Name: Hardhat
- New RPC URL: http://127.0.0.1:8545
- Chain ID: 31337
- Click "Save".
6. Run Deploy Script to Migrate Smart Contracts:
npx hardhat run scripts/deploy.js --network localhost
or
npx hardhat run scripts/deploy.js --network sepolia
7. Run Tests:
npx hardhat test
8. Launch Frontend:
npm run start
Screenshots