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.
green-goods/
βββ packages/
β βββ client/ # React PWA frontend (Gardener/Operator app)
β βββ admin/ # Admin dashboard (Garden & contract management)
β βββ indexer/ # GraphQL blockchain indexer
β βββ contracts/ # Solidity smart contracts
βββ docs/ # Documentation
βββ tests/ # End-to-end testing (Playwright)
βββ scripts/ # Setup and utility scripts
- Node.js v20+ β’ bun v9.x β’ Docker β’ Foundry
# Clone and install
git clone https://github.com/your-org/green-goods.git
cd green-goods
bun install
# Configure environment (REQUIRED - all packages use root .env)
cp .env.example .env
# Edit .env with your API keys (see .env.example)
# Start all services (pm2: client, admin, indexer)
bun dev
# Tail logs
bun exec pm2 logs client
bun exec pm2 logs admin
bun exec pm2 logs indexerAll packages use a single root .env file for configuration β no package-level .env files are used.
# Client & Admin (Vite)
VITE_PRIVY_APP_ID=your_privy_app_id
VITE_CHAIN_ID=42161 # Default chain (84532=Base Sepolia, 42161=Arbitrum, 42220=Celo)
VITE_ENVIO_INDEXER_URL=http://localhost:8080/v1/graphql
VITE_WALLETCONNECT_PROJECT_ID=your_project_id
VITE_PINATA_JWT=your_pinata_jwt
# Contracts (Foundry)
FOUNDRY_KEYSTORE_ACCOUNT=green-goods-deployer
BASE_SEPOLIA_RPC_URL=https://sepolia.base.org
ARBITRUM_RPC_URL=https://arb1.arbitrum.io/rpc
CELO_RPC_URL=https://forno.celo.org
ETHERSCAN_API_KEY=your_etherscan_api_key
# Indexer (Envio)
# Most config in packages/indexer/config.yaml
# Add any overrides here if neededHow it works:
- Vite packages (client, admin) load
.envviavite.config.ts - Contracts load
.envvia deployment scripts andfoundry.toml - Indexer loads
.envvia Docker Compose and scripts - All commands (dev, build, deploy) automatically reference root
.env
See Environment Setup Guide for detailed configuration.
# Development
bun dev # Start all services
bun --filter <package> dev # Start individual service
# Building
bun build # Build all packages
bun --filter <package> build # Build specific package
# Smart Contracts
bun --filter contracts test # Test contracts
bun --filter contracts deploy:local # Deploy locally
bun --filter contracts deploy:testnet # Deploy to testnet
bun --filter contracts deploy:arbitrum # Deploy to Arbitrum
bun --filter contracts deploy:celo # Deploy to Celo mainnet
# Quality
bun format && bun lint && bun test # Quality checks- Fork β Branch β Code β Test β PR
- Use conventional commits:
feat:,fix:,docs: - Git hooks auto-format and lint on commit/push
| Document | Description |
|---|---|
| Architecture | System design and architecture |
| Deployment | Contract deployment guide |
| Karma GAP | Impact attestation integration |
| Upgrades | UUPS upgrade guide |
| Testing | E2E and contract testing |
| Features | Core platform features |
| Gas Limits | Gas optimization guide |
| Production Readiness | Production deployment checklist |
| Troubleshooting | Common issues and solutions |
Package docs: client β’ admin β’ indexer β’ contracts
Stack: React β’ Node.js β’ Solidity β’ GraphQL β’ TypeScript
Tools: Biome β’ 0xlint β’ Solhint β’ Playwright β’ Foundry
License: MIT β’ Setup: Environment Guide