Monorepo Structure
Audience: Engineers touching multiple packages or coordinating cross-package work. Networks: Arbitrum One (42161), Celo (42220), Base Sepolia (84532). Deployment data lives in
packages/contracts/deployments/*.json. Updated November 2024.
Green Goods is a Bun-based monorepo with four packages working together.
Package Overview
client
Gardener PWA
React + Vite
3001
admin
Operator dashboard
React + Vite
3002
indexer
GraphQL API
Envio + PostgreSQL
8080
contracts
Smart contracts
Solidity + Foundry
-
Dependencies
client ──→ contracts (deployment artifacts)
admin ──→ contracts (deployment artifacts)
indexer ──→ contracts (ABIs)Single Source of Truth: packages/contracts/deployments/
Workspace Commands
Cross-Package Imports
âś… Allowed:
❌ Forbidden:
Rule: Only import deployment artifacts, never source code.
Environment
Single root .env: All packages share the same file at repo root.
Never create package-specific .env files.
Build Order
contracts (generates ABIs)
indexer (needs ABIs)
client (needs deployment JSON)
admin (needs deployment JSON)
Run: bun build handles order automatically.
Learn More
Last updated