The Supplychain project is a Java-based application designed to manage a courier service. It leverages Hyperledger Fabric for blockchain integration to ensure secure and transparent tracking of parcels.
Supplychain/
├── .gitattributes
├── .gitignore
├── .gradle/
├── .project
├── .settings/
├── bin/
├── build/
├── build.gradle
├── gradle/
├── gradlew
├── gradlew.bat
├── lib/
│ ├── .classpath
│ ├── .project
│ ├── .settings/
│ ├── bin/
│ ├── build/
│ ├── build.gradle
│ ├── src/
├── settings.gradle
├── src/
│ ├── main/
│ ├── test/
- Java Development Kit (JDK) 15 or higher
- Gradle 6.8 or higher
- Hyperledger Fabric
To build the project, run:
./gradlew buildTo run the tests, use:
./gradlew testSupplychain.CourierChain: Implements the main contract for managing parcelsSupplychain.Parcel: Represents a parcel with various properties such as sender, receiver, and delivery status
CourierChain.addParcel: Adds a new parcel to the ledgerCourierChain.queryParcel: Queries a parcel by its IDCourierChain.updateParcelStatus: Updates the status of a parcelCourierChain.deliverParcel: Updates the delivery details of a parcel
// Adding a new parcel
CourierChain courierChain = new CourierChain();
courierChain.addParcel(ctx, "parcelId", "sender", "receiver", "from", "to",
"endDate", "charges", "modeOfDelivery", "deliveredBy", "parcelWeight",
"parcelWorth", "status");
// Querying a parcel
Parcel parcel = courierChain.queryParcel(ctx, "parcelId");
// Updating parcel status
courierChain.updateParcelStatus(ctx, "parcelId", "Delivered");
// Delivering a parcel
courierChain.deliverParcel(ctx, "parcelId", "deliveryHub");This project is licensed under the Apache License, Version 2.0. See the LICENSE file for details.
Contributions are welcome! Please read the CONTRIBUTING guidelines before submitting a pull request.
This README provides a high-level overview of the Supplychain project. For more detailed documentation, please refer to the source code and comments within the project files.