Skip to content

Latest commit

 

History

History
153 lines (130 loc) · 5.45 KB

File metadata and controls

153 lines (130 loc) · 5.45 KB
[ tr | en ]

❄ Cold Supply Chain

A simple, transparent, but at the same time efficient completely decentralized cold supply chain dedicated to solving centralized database systems where pharmacy/drug theft, temperature deviations during shipping are unavoidable.

📦 Installation

Nodejs and npm requirements

git clone https://github.com/medipolchain/supply-chain.git

cd supply-chain

npm i

Python libraries

pip install -r requirements.txt

📂 Folder structure

+---Arduino-Web3
+---backend
|   +---src
|   |   +---config
|   |   +---contract
|   |   |   +---ABIs
|   |   +---db
|   |   +---middleware
|   |   +---models
|   |   +---routers
|   |   +---web3
+---client
|   +---components
|   |   +---hooks
|   |   +---providers
|   |   |   +---web3
|   |   |   |   +---hooks
|   |   +---ui
|   |   |   +---AdminContent
|   |   |   |   +---base
|   |   |   +---ConnectButton
|   |   |   |   +---base
|   |   |   +---Layout
|   |   |   +---MetamaskSVG
|   |   |   +---RestrictedArea
|   |   |   |   +---base
|   |   |   +---SettingsModal
|   |   |   |   +---base
|   +---pages
|   +---public
|   |   +---contracts
|   +---styles
|   +---utils
+---contracts
+---scripts
+---src
+---test

📍 Flow diagram

Akış diyagramı

📝 Database structure

address owner x
mapping(address => bool) public admins; x
mapping(bytes32 => Product) public products; x

struct Product {
	address _admin,
	address _currentCarrier,
	bool _deliveryDone
} x

event OwnerChanged x 
event AdminAdded x 
event AdminRemoved x
event PackageCarrierChange x
event NewPackageCreated x
event PackageArrived x
event DeletePackage x
event TemperatureViolated x
event SetPackageAdmin x
event SetPackageDeliveryDoneOrUndone x

function addAdmin x Owner
function removeAdmin x Owner
function transferOwnership x Owner
function createDeliveryPackage x Owner, Admin
function deleteDeliveryPackage x Owner, Admin
function changePackageCarrier x Owner, Admin, Current Carrier 
function packageArrived x Owner, Admin, Current Carrier
function temperatureViolate x Owner, Admin

function setPackageDeliveryDoneOrUndone x Owner, Admin
function setPackageAdmin x Owner
function getPackageDeliveryDone x 
function getPackageAdmin x
function getPackageCurrentCarrier x

modifier onlyOwner() x
modifier onlyAdminOrOwner() x

📸 Screenshots

Screen Shot 2022-05-15 at 07 57 42 Screen Shot 2022-05-15 at 07 58 22 Screen Shot 2022-05-15 at 07 58 33

🎥 Recordings

Metamask Connection and Admin Panel Transition Create Product Through Admin Panel Mail Notification Subscription Heat Sensor and Blockchain Transaction IoT
Watch the video Watch the video Watch the video Watch the video

🤝 Team members

Berkay Ermiş - @berkayermis - Frontend / IoT

Mehmet Berat Öztürk - BeratOz01 - Frontend / Backend

Vusal Ismayilov - @woosal1337 - Solidity / IoT

Furkan Boyraz - @hellomrbj - Blockchain / Security

📝 License

MIT: License