The Traffix is a decentralized application (DApp) that allows users to report road safety issues anonymously. Built using React and Web3, the application interacts with the blockchain to store reports securely. It uses Metamask for wallet connection and IPFS for image storage, providing a trustless and transparent platform for reporting.
- Connect Wallet: Users can connect their Metamask wallet to the app.
- Capture Image: Users can take photos of road safety issues directly from their webcam.
- Add Details: Provide additional information about the issue via a simple report form.
- Submit Report: Submit the report to the blockchain, where it is stored securely and anonymously.
- View Reports: View previously submitted reports and track ongoing issues within the community.
- React: For building the user interface.
- Web3.js: For blockchain interaction and smart contract calls.
- Metamask: For wallet integration and blockchain authentication.
- IPFS: For decentralized image storage.
- Pinata: For IPFS file management.
Users need to connect their Metamask wallet to start using the app.
Capture an image of the road safety issue using your webcam.
Fill in the details like location and issue description.
Submit the report to the blockchain securely and anonymously.
To run this application locally, you will need:
- Node.js: Install it from Node.js Official Website.
- npm: Node Package Manager is bundled with Node.js.
- Metamask Wallet: Install the Metamask extension in your browser.
- Git: To clone the repository.
-
Clone the Repository:
Open your terminal and run the following command to clone the repository:
git clone https://github.com/kichuman28/ipfs-admin-panel.git
-
Navigate to the Project Directory:
cd ipfs-admin-panel
-
Install Dependencies:
Run the following command to install the necessary packages:
npm install
-
Start the Development Server:
After the dependencies have been installed, start the local development server by running:
npm start
This will launch the app in your browser at
http://localhost:3000
.
To deploy this application on GitHub Pages:
-
Install gh-pages:
npm install gh-pages --save-dev
-
Add the deployment script to
package.json
:"scripts": { "predeploy": "npm run build", "deploy": "gh-pages -d build" }
-
Deploy to GitHub Pages:
npm run deploy
- Connect Metamask Wallet: Open the app and connect your Metamask wallet using the "Connect Wallet" button.
- Capture an Image: Use your webcam to capture an image of the issue you want to report.
- Add Report Details: Fill in the necessary details, including a description of the issue and location.
- Submit Report: Once the image and details are ready, click on the "Submit Report" button to submit the report to the blockchain.
- View Existing Reports: You can browse through existing reports submitted by other users.
This project is licensed under the MIT License.
Contributions are welcome! Feel free to fork this project and submit pull requests.