Developer Quickstart
Get the Green Goods monorepo running locally in 10 minutes. Start building on the regenerative impact protocol.
What You'll Need
π₯οΈ macOS, Linux, or Windows (WSL2)
π¦ Bun (v1.0+)
π¨ Foundry (for contracts)
π³ Docker Desktop (for indexer)
π§ Git
Optional but recommended:
π¦ MetaMask or another web3 wallet
π Test ETH on Base Sepolia (faucet)
Step 1: Clone and Install
1.1 Clone the Repository
git clone https://github.com/greenpill-dev-guild/green-goods.git
cd green-goods1.2 Install Dependencies
This installs all dependencies across the monorepo (client, admin, indexer, contracts).
What's installed:
Frontend dependencies (React, Vite, TanStack Query)
Smart contract tools (Solidity, Foundry)
Indexer dependencies (Envio, ReScript)
Development tools (Biome, 0xlint, Vitest)
Step 2: Configure Environment
2.1 Create .env File
2.2 Add Required Variables
Edit .env with your preferred editor:
Get API Keys:
Reown (WalletConnect): cloud.reown.com
Pimlico: dashboard.pimlico.io
Pinata: app.pinata.cloud
2.3 (Optional) Import Deployer Key
For contract deployment:
Detailed Environment Setup β
Step 3: Start the Full Stack
Green Goods uses PM2 to orchestrate all services.
3.1 Start Everything
This starts:
β Client PWA: https://localhost:3001 (HTTPS via mkcert)
β Admin Dashboard: http://localhost:3002
β Indexer: http://localhost:8080 (GraphQL playground)
All services running via PM2
3.2 Verify Services
Check service status:
View logs:
3.3 Stop Services
Step 4: Explore the Stack
4.1 Client PWA (https://localhost:3001)
The main gardener-facing Progressive Web App.
Key Features to Explore:
Passkey authentication (works on localhost)
MDR workflow (Media β Details β Review)
Offline queue (disconnect WiFi and try submitting)
Work dashboard
Tech Stack:
React 18 + TypeScript + Vite
TanStack Query + Zustand
Tailwind CSS v4 + Radix UI
Offline-first architecture
4.2 Admin Dashboard (http://localhost:3002)
Operator and admin interface.
Key Features to Explore:
Wallet connection (MetaMask)
Garden management (create, edit, view)
Work review interface
Member management
Tech Stack:
React 18 + TypeScript + Vite
Urql (GraphQL) + XState + Zustand
Tailwind CSS v4 + Radix UI
4.3 GraphQL Indexer (http://localhost:8080)
Envio indexer exposing Green Goods blockchain data.
Try a Query:
Visit http://localhost:8080
Password:
testingRun example query:
Tech Stack:
Envio HyperIndex
PostgreSQL (via Docker)
GraphQL API
ReScript event handlers
Step 5: Run Tests
Green Goods has comprehensive test coverage.
5.1 Client Tests
Test Types:
Component tests (Vitest + Testing Library)
Hook tests
Integration tests
Service layer tests
5.2 Admin Tests
5.3 Contract Tests
Test Types:
Unit tests (Foundry)
Integration tests
Gas optimization tests
Upgrade safety tests
5.4 Run All Tests
Step 6: Deploy to Testnet (Optional)
6.1 Compile Contracts
6.2 Deploy to Base Sepolia
Dry run first (simulation):
Deploy for real:
What gets deployed:
GardenToken (NFT registry)
ActionRegistry (task definitions)
Resolvers (work and approval logic)
Schemas (EAS attestation templates)
Root "Green Goods Community Garden"
Common Development Tasks
Run Specific Package
Format Code
Uses Biome (35x faster than Prettier).
Lint Code
Uses 0xlint (30ms on entire codebase) + Biome.
Build for Production
Project Structure
Key Files
package.json: Workspace scripts and dependenciesbiome.json: Formatting and linting config.gitbook.yaml: GitBook documentation configecosystem.config.js: PM2 service definitions
Next Steps for Developers
π¨ Frontend Development
Build new features:
Create UI components with Radix + Tailwind
Add hooks using TanStack Query
Implement offline workflows with job queue
Add internationalization (en/es/pt)
Example: Add Garden Filter:
βοΈ Smart Contract Development
Extend contracts:
Add new resolver logic
Create custom action types
Implement garden templates
Add governance features
Example: Custom Action Type:
π Indexer Development
Add new queries:
Define entities in
schema.graphqlAdd event handlers in
src/EventHandlers.tsRun
bun codegento regenerate types
Example: Track Action Completion Rates:
π API Integrations
Build external tools using the GraphQL API:
Troubleshooting
"bun not found"
Install Bun: https://bun.sh/docs/installation
"Port already in use"
"Docker not running"
"Foundry commands not found"
Install Foundry:
"Indexer fails to start"
Learn More
Developer Guides
Package Documentation
Design Resources
π¨ Figma Designs
π Miro Board
π₯ Product Demo
π Project Tracker
Community
π¬ Dev Chat: Telegram
π GitHub: greenpill-dev-guild/green-goods
π Issues: GitHub Issues
π‘ Discussions: GitHub Discussions
What's Next?
You're now set up to build on Green Goods! π
Your developer toolkit:
β Full monorepo running locally
β All services orchestrated via PM2
β Tests passing
β Ready to build features or integrations
Start building:
Explore the codebase
Fix a good first issue
Build a custom integration
Propose a new feature
Ready to contribute? Read Contributing Guide β
Last updated