Green Goods is a decentralized platform for biodiversity conservation, enabling Garden Operators and Gardeners to document and get approval for conservation work through blockchain-based attestations.
The project is organized as a monorepo using pnpm workspaces:
green-goods/
├── packages/
│ ├── client/ # Frontend React application
│ ├── contracts/ # Smart contracts and deployment scripts
│ └── server/ # Backend services and APIs
├── apps/ # Additional applications
└── docs/ # Documentation
- React-based Progressive Web App (PWA)
- Built with Vite, TypeScript, and Tailwind CSS
- Handles user authentication, garden management, and blockchain interactions
- Solidity smart contracts for garden management
- Foundry-based deployment scripts
- Integration with Privy for wallet management
- Backend services and APIs
- Handles data persistence and business logic
- Integrates with blockchain networks
- Node.js (v20 or higher)
- pnpm (v9.x)
- Foundry (for smart contract development)
- Git
-
Clone the repository:
git clone https://github.com/your-org/green-goods.git cd green-goods
-
Install dependencies:
pnpm install
-
Set up environment variables:
# Copy example env files cp packages/client/.env.example packages/client/.env cp packages/contracts/.env.example packages/contracts/.env cp packages/server/.env.example packages/server/.env
-
Configure environment variables:
PRIVY_CLIENT_ID
: Your Privy application IDPRIVY_APP_SECRET_ID
: Privy app secretPRIVY_AUTHORIZATION_PRIVATE_KEY
: Privy authorization keyPINATA_JWT
: Pinata API JWT tokenPRIVATE_KEY
: Ethereum private key for deployments
-
Start the client:
pnpm --filter client dev
-
Start the server:
pnpm --filter server dev
-
Deploy contracts (if needed):
pnpm --filter contracts deploy
Run tests across all packages:
pnpm test
Run tests for a specific package:
pnpm --filter <package-name> test
# Lint all packages
pnpm lint
# Type check all packages
pnpm typecheck
- React: UI library
- Vite: Build tool and dev server
- TypeScript: Type safety
- Tailwind CSS: Styling
- TanStack Query: Data fetching and caching
- Privy: Authentication and wallet management
- Radix UI: Accessible UI components
- React Hook Form: Form management
- Solidity: Smart contract language
- Foundry: Development framework
- Hardhat: Alternative development environment
- Node.js: Runtime
- Express: Web framework
- TypeScript: Type safety
- Prisma: Database ORM
# Add to specific package
pnpm --filter <package-name> add <dependency>
# Add dev dependency
pnpm --filter <package-name> add -D <dependency>
# Run script in specific package
pnpm --filter <package-name> <script-name>
# Run script in all packages
pnpm -r <script-name>
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature-name
- Make your changes
- Run tests and linting:
pnpm test pnpm lint
- Commit your changes:
git commit -m "feat: your feature description"
- Push to your fork
- Create a pull request
We follow the Conventional Commits specification:
feat
: New featurefix
: Bug fixdocs
: Documentation changesstyle
: Code style changesrefactor
: Code refactoringtest
: Adding or modifying testschore
: Maintenance tasks
- Update documentation if needed
- Add tests for new features
- Ensure all tests pass
- Update the changelog
- Get code review approval
- Merge after approval
- Report security vulnerabilities to [email protected]
- Do not disclose security-related issues publicly
This project is licensed under the MIT License - see the LICENSE file for details.