Thank you for your interest in contributing to Gardens v2! We're excited to have you help build the future of modular governance and community-driven decision making.
Gardens v2 is a modular governance framework that enables communities to create and manage multiple governance pools with customizable parameters and voting mechanisms. As an open-source project, we welcome contributions from developers, designers, writers, and community members of all skill levels.
👉 Need help or want to chat before you start? Join our Discord community to meet maintainers, ask questions, and sync with other contributors.
Before you begin, ensure you have:
-
Fork the repository on GitHub
-
Clone your fork locally:
git clone https://github.com/your-username/gardens-v2.git cd gardens-v2 -
Add the upstream remote:
git remote add upstream https://github.com/1Hive/gardens-v2.git
-
Install dependencies:
pnpm install
-
Open the workspace in VSCode (recommended):
code gardens-v2.code-workspace
Gardens v2 is a monorepo with several packages:
For frontend contributions:
-
Navigate to the web app:
cd apps/web -
Set up environment variables:
cp .env.example .env
Fill in the required environment variables (contact us in Discord for help with API keys)
-
Start the development server:
pnpm dev
-
Open your browser to http://localhost:3000
For smart contract contributions:
-
Install Foundry (required for contract development):
curl -L https://foundry.paradigm.xyz | bash foundryup -
Navigate to contracts package:
cd pkg/contracts -
Build contracts:
forge build
-
Run tests:
forge test
Note: Foundry is only required for smart contract development. Frontend contributors can skip this setup.
For subgraph contributions:
-
Navigate to subgraph package:
cd pkg/subgraph -
Build the subgraph:
pnpm build
We welcome various types of contributions:
- 🐛 Bug fixes: Help us squash bugs in the codebase
- ✨ New features: Implement new governance features or improvements
- 📖 Documentation: Improve guides, API docs, or code comments
- 🎨 UI/UX improvements: Enhance the user experience
- 🧪 Testing: Add or improve test coverage
- 🌐 Translations: Help make Gardens accessible globally
- 🔍 Code review: Review pull requests from other contributors
- Check existing issues on GitHub to see if your idea is already being worked on
- Join our Discord to discuss your contribution idea with the community
- Review our New Contributor Onboarding guide
- Write clear, self-documenting code
- Follow existing patterns and conventions in the codebase
- Add comments for complex logic
- Keep functions small and focused
- Use meaningful variable and function names
- Use TypeScript for all new code
- Follow the existing ESLint configuration
- Use functional components with hooks
- Implement proper error handling
- Write responsive designs using Tailwind CSS
- Follow the established folder structure
- Follow the Solidity Style Guide
- Use NatSpec documentation for all public functions
- Write comprehensive test coverage
- Use proper access modifiers
- Follow established patterns for upgradeable contracts
cd apps/web
pnpm lint
pnpm buildcd pkg/contracts
forge testcd ../../
pnpm lintcd ../../
pnpm buildNote: The full
pnpm buildcommand will fail without Foundry installed, but this doesn't affect frontend development. Frontend contributors can work with individual package builds.
- Write unit tests for new functionality
- Test edge cases and error conditions
- Update tests when modifying existing functionality
main: Production-ready codedevelop: Integration branch for new features- Name your branches based on the feature or fix (e.g.,
feature/new-governance-pool,fix/vote-weight-bug)
- Features are merged into
develop - Release candidates are created from
develop - After testing, releases are merged into
main
- Discord: Join our Discord Community
- Documentation: Check our docs
- GitHub Issues: Search existing issues or create a new one
- New Contributor Guide: See our Notion guide
We are committed to providing a welcoming and inclusive environment. Please be respectful in all interactions and follow our community guidelines.
Contributors are recognized in our:
- Discord community roles
- Community calls and updates
If you discover a security vulnerability, please follow our Security Policy and report it responsibly through our private channels.
By contributing to Gardens v2, you agree that your contributions will be licensed under the GPL-3.0 License.
If you have questions about contributing, don't hesitate to:
- Ask in our Discord Community
- Open a GitHub issue with the "question" label
- Check our documentation
Thank you for helping make Gardens v2 better for everyone! 🌱