commit 20b0f563aab43fc1975f6ec3bbfa3b0077fdcb20
parent 662ee746012bbf8eb82367a838c364678439d17d
Author: maydayv7 <maydayv7@gmail.com>
Date: Fri, 10 Oct 2025 01:48:48 +0530
docs: Update README and add preview images
Diffstat:
8 files changed, 98 insertions(+), 17 deletions(-)
diff --git a/README.md b/README.md
@@ -1,6 +1,79 @@
# Matiru
-For a detailed overview about this project, read [SOLUTION.md](./docs/SOLUTION.md).
-The model is described in [MODEL.md](./docs/MODEL.md).
+**"Trustable Food, Transparent Journey"**
-Read [INSTALL.md](./docs/INSTALL.md) to run the app.
+Matiru is a blockchain-powered agriculture supply chain platform that records every stage of the produce lifecycle - from the farmer to the consumer. Each batch of produce is digitally registered with details like crop type, harvest date, quality, ownership, and movement.
+
+## The Problem
+
+The current agricultural supply chain often suffers from:
+
+- **Opaque pricing:** Farmers have little visibility into the final selling price
+- **Unreliable quality checks:** Certifications can be inconsistent and prone to manipulation
+- **Lack of consumer trust:** Labels like "Organic" are hard to verify
+- **Inefficiencies and waste:** Poor traceability makes it difficult to manage inventory and reduce spoilage
+
+## The Solution
+
+Matiru provides a decentralized platform to track agricultural produce, ensuring transparency in pricing, quality, and origin. Stakeholders (farmers, distributors, retailers, inspectors) can verify transactions, reducing exploitation and fraud in the supply chain. Consumers can instantly access this information by scanning QR codes.
+
+## Key Features
+
+- **Farm-to-Fork Transparency:** Track produce from the farm to the consumer
+- **Role-Based Access:** Different stakeholders have different permissions, ensuring data integrity
+- **QR Code Integration:** Consumers can easily access produce information by scanning a QR code
+- **Secure & Immutable:** Built on Hyperledger Fabric, all transactions are secure and cannot be altered
+- **Cross-Platform App:** A user-friendly mobile app for all stakeholders
+- **Global Chain Access:** A transparent ledger explorer for maximum accountability
+
+## Technology Stack
+
+- **Blockchain:** Hyperledger Fabric
+- **Frontend:** React Native (Expo)
+- **Backend:** Node.js, Express
+- **Database:** CouchDB (for World State)
+
+## Getting Started
+
+To get a local copy up and running follow these steps
+
+### Prerequisites
+
+- Docker & Docker Compose
+- NodeJS & `npm`
+
+### Installation
+
+1. Clone the repo:
+ ```sh
+ git clone https://github.com/maydayv7/matiru
+ cd matiru
+ ```
+2. Follow the detailed instructions in the [INSTALL.md](./docs/INSTALL.md) file to set up the blockchain network, start the server and run the app
+
+## Usage
+
+The application provides different dashboards for each role in the supply chain:
+
+- **Farmer:** Register produce, generate QR codes, and transfer ownership
+- **Distributor:** Update produce location, split batches, and manage resale
+- **Inspector:** Record inspection results and approve or reject batches
+- **Retailer:** Confirm inventory and log sales to consumers
+- **Consumer:** Scan QR codes to view the complete provenance of the produce
+
+Here are some screenshots of the application:
+
+
+
+
+## Documentation
+
+For a more in-depth look at the project, read the following:
+
+- [SOLUTION.md](./docs/SOLUTION.md): Detailed overview of the project
+- [MODEL.md](./docs/MODEL.md): Description of the data model and chaincode functions
+
+## License
+
+Distributed under the MIT License
+See [`LICENSE`](./LICENSE) for more information
diff --git a/docs/INSTALL.md b/docs/INSTALL.md
@@ -3,8 +3,8 @@
1. Install Docker & Docker Compose
2. Install Fabric binaries and Docker images like so:
-```
-cd ..
+```sh
+cd fabric
curl -sSLO https://raw.githubusercontent.com/hyperledger/fabric/main/scripts/install-fabric.sh
chmod +x install-fabric.sh
./install-fabric.sh
@@ -14,29 +14,32 @@ Ensure the `config` directory is present inside `fabric`
3. Install Chaincode dependencies:
-```
+```sh
cd chaincode
npm install
```
4. Start Fabric network:
-```
+```sh
cd ../network
./network.sh up createChannel -ca -c CHANNEL_NAME
./network.sh deployCC -c CHANNEL_NAME -ccn CHAINCODE_NAME -ccp /path/to/chaincode -ccl javascript
```
+> [!NOTE]
+> Internet connection is required for chaincode deployment
+
After initial setup, you can use the following commands:
-```
+```sh
./network.sh up # Start network
./network.sh down # Reset everything -> Need to setup again
```
5. Wallet Creation:
-```
+```sh
DIR=../../backend/connections
mkdir -p $DIR
cp organizations/peerOrganizations/org1.example.com/connection-org1.json $DIR/connection-org1.json
@@ -53,7 +56,7 @@ node initWallet.js org4 ../fabric/network/organizations/peerOrganizations/org4.e
6. The `.env` file must be created in `backend` like so:
-```
+```sh
# Backend server
PORT=4000
@@ -77,11 +80,12 @@ IDENTITY_ORG4="admin-org4"
CCP_PATH_ORG4="./connections/connection-org4.json"
```
-Make sure the port is not blocked by a firewall
+> [!IMPORTANT]
+> Make sure the port is not blocked by a firewall
7. Start `backend`:
-```
+```sh
npm install
npm run init
npm start
@@ -91,14 +95,14 @@ npm start
To start the `frontend` ->
-```
+```sh
cd frontend
npm install
```
Then find your computer's IP address (using `ifconfig`) and execute the following:
-```
+```sh
echo 'export const API_BASE = "http://IP_ADDRESS:4000/api";' >> config.js
npm start
```
diff --git a/docs/SOLUTION.md b/docs/SOLUTION.md
@@ -1,6 +1,7 @@
# Problem Statement
-SIH25045: Blockchain-Based Supply Chain Transparency for Agricultural Produce
+SIH25045: Blockchain-Based Supply Chain Transparency for Agricultural Produce
+-> [Smart India Hackathon](https://www.sih.gov.in/)
### Description
diff --git a/docs/preview-1.jpeg b/docs/preview-1.jpeg
Binary files differ.
diff --git a/docs/preview-2.jpeg b/docs/preview-2.jpeg
Binary files differ.
diff --git a/fabric/.gitignore b/fabric/.gitignore
@@ -1 +1,2 @@
config
+install-fabric.sh
diff --git a/frontend/screens/Inspector.js b/frontend/screens/Inspector.js
@@ -69,7 +69,7 @@ export default function InspectorScreen({ navigation, route }) {
return (
<SafeAreaView style={styles.container}>
<ScreenHeader
- title="Inspector Dashboard"
+ title="Inspect Produce"
navigation={navigation}
role="Inspector"
/>
diff --git a/frontend/screens/Search.js b/frontend/screens/Search.js
@@ -96,7 +96,9 @@ export default function SearchScreen({ navigation }) {
<Text style={{ fontWeight: "600", textTransform: "capitalize" }}>
{a.action.toLowerCase()}
</Text>
- <Text style={local.small}>By: {a.currentOwner}</Text>
+ <Text style={local.small}>
+ {a.action === "SALE" ? "To" : "By"}: {a.currentOwner}
+ </Text>
<Text style={local.small}>
On: {new Date(a.timestamp).toLocaleString()}
</Text>