This project enables validators to verify and approve videos stored on IPFS via Pinata. Reports are automatically removed once a decision is reached.
- Users log in using their Google account for authentication.
- Once logged in, users are provided with two options: Report and Validate.
- Users can report an incident of rash driving by entering details and uploading a video.
- Uploading requires a fee, and once completed, the user gains a reward for successfully reporting the incident.
- Users can verify a video and vote on its validity.
- Once a consensus is reached, the final decision is determined.
- Validators gain rewards for correct decisions and lose tokens for incorrect decisions.
- Users can view their wallet balance at all times within the application.
- Videos are stored on IPFS (Pinata), which generates a CID (hash).
- The CID is stored in the database and used for data retrieval from IPFS later.
- There are two
.solfiles: CampusToken and participate. - CampusToken is the Solidity smart contract for the CampusTokens we wish to create.
- participate handles all the functions that interact with the backend.
- CampusTokens are virtual, non-tradable tokens used within the platform to incentivize and regulate participation.
- Navigate into the
/smartcontractsdirectory. - Run the following command to execute tests:
npx hardhat test - The test cases are located in the
/testfolder. - The results for both CampusTokens and participate can be viewed after running the tests.
Ensure you have the following installed:
- Node.js (v18+)
- MongoDB (Local)
- Pinata Account (For IPFS storage)
- Blockchain Dependencies: Hardhat, ethers.js, waffle, chai
- Frontend Dependencies: React, CSS
git clone https://github.com/sameerdattav/Truestore.gitcd backend
npm installnode index.jsServer running on http://localhost:5000
cd ..
cd frontend
npm runServer running on http://localhost:5173/login
- Backend: Node.js, Express.js
- Database: MongoDB + Mongoose
- Storage: IPFS via Pinata
- Frontend: React.js
- Blockchain: Solidity
- Web3 Interaction: ethers.js
- Sameer Dattav (sameerdattav)
- Abhik (Abhik13)
- Pranit (PRANIT4166)
Feel free to contribute, raise issues, and suggest improvements!