First off, thank you for considering contributing to CropChain! It's people like you who make this tool better for farmers and consumers everywhere.
Before contributing, ensure you are familiar with:
- Frontend: React, TypeScript, Tailwind CSS
- Backend: Node.js, Express, MongoDB
- Blockchain: Solidity, Hardhat, Ethers.js
- Check the Issues Tab to see if the bug is already reported.
- If not, open a new issue. Use a clear title and provide steps to reproduce the error.
- We are always looking for ways to improve the "Farm to Fork" transparency.
- Open an issue with the tag
enhancementto discuss your idea.
- Fork the repository and create your branch from
main. - Install dependencies in both root and
/backendfolders. - If you change Smart Contracts, ensure you run
npx hardhat testto verify logic. - If you change utility functions, run
npm run test:unitto verify logic. - Commit your changes with clear messages (e.g.,
feat: add batch filtering by date). - Push to your fork and submit a Pull Request.
If you are modifying CropChain.sol:
- Ensure you add relevant tests in the
test/directory. - Run
npx hardhat compileto check for Solidity errors.
- We aim for "Apple-level" aesthetics. Please ensure any new components are responsive and use the Tailwind design system defined in
tailwind.config.js.
- TypeScript: Use interfaces for all data models (Batch, Actor, History).
- Solidity: Follow the Official Solidity Style Guide.
- Git: Use imperative mood in commit messages ("Add feature" instead of "Added feature").
Contributors who have their PRs merged will be added to our Acknowledgments section in the README!
Happy Coding, and let's make the food supply chain transparent! π