Trace Me is a mobile application developed in flutter which utilises the Ethereum blockchain to keep track of the farm produce and transactions with the intention to help towards food security. It is a secure system which provides transparency and auditing for farmers, supply chain entities, and consumers.
The system is developed using -
- Ethereum Blockchain (Ganache & Remix).
- Solidity (Domain-specific language for smart contract development).
- Python - Flask (for API development).
- Flutter (Cross-platform app development).
- Add backend/smart_contract/product.sol code to remix and connect with Ganache.
- Setup the .env in the root folder with -
- JWT_SECRET_KEY (eg: "keyboard cat"; preferably a randomly generated string using os.urandom())
- GANACHE_ADDRESS (usually: http://127.0.0.1:7545)
- CONTRACT_ADDRESS (The contract address in Ganache)
- Setup .flaskenv in the root folder with -
- FLASK_APP=main, and other config variables which can be found in the Flask documentation
- Install dependencies.
pip install -r requirements.txt
- Run the Flask server (in the root folder).
flask run
- The Flask server is tested using the VSCode HTTP Client extension.
- The HTTP requests are to be contained within the test.http file in Backend/API/Testing.
- Refer the HTTP Client documentation for usage.
- cd to trace_me
cd trace_me
- Connect the phone to the computer with USB Debugging enabled
flutter run
- You can also make the apk for installing directly via flutter build
flutter build apk --release
- Try to conform to the PEP 8 rules (for any python code) as in: https://www.python.org/dev/peps/pep-0008/.
This application has been build as part of the Final year BE project by fate2703, anay121, chumba-wamba, anjum-k