System Architecture
A high-level overview of how Green Goods worksβdesigned for users, operators, and non-technical stakeholders who want to understand the system without diving into code.
The Big Picture
Green Goods is a full-stack regenerative impact platform connecting mobile users, web dashboards, blockchain networks, and data infrastructure.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β User Layer β
β β
β Gardener (Mobile PWA) ββ Operator (Admin Dashboard) β
β Evaluator (API/Explorers) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Application Layer β
β β
β Client App Admin Dashboard GraphQL API β
β (React PWA) (React Dashboard) (Envio) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Infrastructure Layer β
β β
β IPFS Storage Smart Accounts Indexer DB β
β (Pinata) (Pimlico) (PostgreSQL) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Blockchain Layer β
β β
β Arbitrum One ββ Celo ββ Base Sepolia β
β (Smart Contracts + EAS Attestations) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββUser Journeys
Gardener Journey: Submit Work
1. In the Field
2. Behind the Scenes
3. Operator Reviews
Result: Verified, permanent on-chain record of impact work
Operator Journey: Approve Work
1. Access Dashboard
2. Review Workflow
3. On-Chain Recording
Evaluator Journey: Query Data
1. Access API
2. Query Garden Impact
3. Verify On-Chain
Components Deep Dive
Client PWA (greengoods.app)
Purpose: Mobile-first app for gardeners to document work
Technology:
React 18 + TypeScript
Vite bundler
TanStack Query (data fetching)
Zustand (state management)
Tailwind CSS v4
Key Features:
Passkey authentication
Offline job queue
Camera integration
Real-time sync status
Data Flow:
Deployment: Vercel CDN (instant global access)
Admin Dashboard (admin.greengoods.app)
Purpose: Web dashboard for operators to manage gardens and approve work
Technology:
React 18 + TypeScript
Urql (GraphQL client)
XState (workflow orchestration)
Zustand (state management)
Key Features:
Wallet connection (MetaMask, etc.)
Real-time GraphQL subscriptions
Garden and member management
Work review interface
Impact analytics
Data Flow:
Deployment: Vercel
GraphQL Indexer (Envio)
Purpose: Fast, queryable database of blockchain events
Technology:
Envio HyperIndex
PostgreSQL database
GraphQL API
ReScript event handlers
What It Indexes:
Garden creations
Action registrations
Work submissions
Work approvals
Member additions/removals
Attestations
Query Example:
Public Endpoint: https://indexer.hyperindex.xyz/0bf0e0f/v1/graphql
Smart Contracts (On-Chain)
Core Contracts:
1. GardenToken (ERC-721)
Gardens as NFTs
Tokenbound account per garden
Garden creation and transfer
2. ActionRegistry
Register available actions
Track action metadata
Emit action events
3. WorkResolver
Validates work submissions
Creates work attestations
Enforces gardener membership
4. WorkApprovalResolver
Validates approvals
Creates approval attestations
Enforces operator permissions
Triggers Karma GAP attestations
5. AssessmentResolver
Garden assessments
Multi-capital tracking
Impact aggregation
Deployment:
Arbitrum One: 0x8578004FD468212B9056052856c7cF282760Ef25 (ActionRegistry)
Celo: 0x0747ED4f1915b8f3A6eA8a9d8216E8F53EE80f92 (ActionRegistry)
Base Sepolia: 0x9685E9E5430C13AFF7ef32D9E8fc93d516e121E0 (ActionRegistry)
Data Flow Diagrams
Work Submission Flow
Work Approval Flow
Security & Trust Model
Authentication
Gardeners (Passkey):
WebAuthn standard
Biometric verification
Device-bound credentials
Can't be phished
Operators (Wallet):
Self-custody wallets
Transaction signing
Full transparency
User controls keys
Authorization
On-Chain Enforcement:
Only gardeners can submit work
Only operators can approve work
Only admins can create gardens
Enforced by smart contracts
Off-Chain Validation:
UI hides unavailable features
API respects permissions
Graceful error messages
Data Integrity
Immutable Records:
Attestations can't be edited
Blockchain provides finality
Timestamp proofs
Verification:
Anyone can verify attestations
Cryptographic signatures
Open data, open source
Scalability
Current Capacity
Transactions:
L2 networks handle 1000+ TPS
Green Goods uses minimal gas
Batch operations where possible
Storage:
IPFS handles large media
On-chain stores only CIDs
Indexer optimized for queries
Future Scaling
Multi-Chain:
Deploy to more L2s
Cross-chain bridges
Unified data layer
Caching:
CDN for static assets
GraphQL response caching
Optimistic UI updates
Sharding (if needed):
Regional gardens on different chains
Unified query layer
Cross-chain attestations
Monitoring & Observability
User Analytics
PostHog Integration:
Anonymous usage tracking
Feature adoption rates
Error tracking
Performance metrics
Privacy-First:
No personal data collected
Opt-out available
GDPR compliant
System Health
Blockchain Monitoring:
Transaction success rates
Gas prices
Contract events
API Monitoring:
Query latencies
Error rates
Uptime
Alerting:
Critical errors β Telegram
Performance degradation monitoring
Automatic retries
Learn More
Technical Documentation
Developer Architecture Guide β Code-level details
Client Package β PWA architecture
Admin Package β Dashboard architecture
Indexer Package β GraphQL indexer
Contracts Package β Smart contracts
Product Documentation
Product Overview β Vision and goals
Core Features β Feature breakdown
Offline Architecture β Offline-first details
Karma GAP Integration β GAP technical spec
Concepts
Attestations β How verification works
Gardens & Work β Data model
MDR Workflow β User experience
Last updated