Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/samuele-lolli/milkyway
A Dapp for tracking the milk supply chain.
https://github.com/samuele-lolli/milkyway
blockchain ethereum flask mantine python react-native reactjs smart-contracts solidity truffle
Last synced: 3 days ago
JSON representation
A Dapp for tracking the milk supply chain.
- Host: GitHub
- URL: https://github.com/samuele-lolli/milkyway
- Owner: samuele-lolli
- Created: 2024-06-23T23:37:49.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2024-09-17T09:13:39.000Z (5 months ago)
- Last Synced: 2024-09-18T11:17:27.933Z (5 months ago)
- Topics: blockchain, ethereum, flask, mantine, python, react-native, reactjs, smart-contracts, solidity, truffle
- Language: JavaScript
- Homepage:
- Size: 60.3 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MilkyWay
## A supply chain management decentralized application
### Description
The task of this application is to keep track of milk industry's supply chain through a decentralized network. The aim is to have better record of the product path from local farmers to the shelved product, and to increase transparency of the company to final consumer. The application comes with [its companion app](https://github.com/gbekss/MilkChain-Consumer) for smartphones dedicated to consumers.
MilkyWay tracks the production path of milk from collection to distribution dividing the process in a series of steps. Each step is controlled by a supervisor (human or sensor) that is in charge of verifying the correct execution of every part of the job. The supervisors are created and managed by administrators. The dapp allows the company to manage and control all the different processes, from collection to distribution, saving the information on the network in an immutable way. The informations collected for a specific lot can be read by the final consumer upon scanning a QR code placed on the final product's carton in the [mobile application](https://github.com/gbekss/MilkChain-Consumer).### Architecture
The smart contracts, written in Solidity, are deployed using Truffle on the local blockchain network created using Ganache GUI. The frontend employs Web3.js to interact with the smart contract on the local blockchain network and is written using React.
The [mobile app](https://github.com/gbekss/MilkChain-Consumer) uses React-Native.![Project Architecture](https://github.com/user-attachments/assets/6a38368f-5a73-4b2c-abe2-372a798ee5f1)
### Flow
All admins have three fundamental functions in the application:
* Users' role management
* Process creation
* Supervisors designation
In regards to process creation, supervisors will have to distinguish between whole milk and long life milk production lots. The two differ from one another for heat treatment and subsequent storage.
Some of the steps in both the types of process are handled by temperature sensors. In addition, all of the steps in which the milk is moved from one location to another rely on a proof-of-location system that will verify the vehicle's path. The sensor vill verify the lot's position at regular intervals and evaluates the reasonability of it, based on the start and end points of the ride.![MilkyWay Flow](https://github.com/user-attachments/assets/4c7e5e4e-b136-4f37-acc2-b3a361d0624a)
### More informations
For more informations, please refer to the [MilkyWay introduction](https://github.com/samuele-lolli/MilkyWay/blob/master/MilkyWay%20Introduction.pdf)### Installation & Setup
Requires:
* Node.js
* npm#### 1. Install Truffle.js
```
npm install -g truffle
```#### 2. Install and setup Ganache GUI
You can install the program from [this link](https://archive.trufflesuite.com/ganache/)#### 3. Clone the project
Clone the project in the target folder via zip or ``` git clone ```#### 4. Deploy contracts
Deploy the contracts on your local blockchain by running the following command in the backend folder:
```
truffle migrate
```#### 5. Run the dApp
Launch these two commands to install dependencies and run the frontend
```
npm install
npm run dev
```> [!NOTE]
> For the mobile application, refer to MilkChain-Consumer readme