Green Goods

Measures, tracks, and rewards the impact on gardens with a simple Progressive Web App.
https://github.com/greenpill-dev-guild/green-goods

Category: Biosphere
Sub Category: Biodiversity Citizen Science

Keywords

attestations collaboration community environment ethereum filecoin foundry greenpill ipfs knowledge-garden local-first p2p pwa regen-coordination solidity storacha tailwindcss typescript vite

Keywords from Contributors

conservation biodiversity biodiversity-monitoring impact regenerative smart-contracts

Last synced: about 24 hours ago
JSON representation

Repository metadata

Bringing community and environmental actions onchain to better measure, track and reward impact on local communities with a simple PWA.

https://github.com/greenpill-dev-guild/green-goods/blob/develop/

          # Green Goods

[![Version](https://img.shields.io/badge/version-1.0.0-blue.svg)](https://github.com/greenpill-dev-guild/green-goods/releases)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)

**Bringing community and environmental actions onchain to better measure, track and reward impact.**

Green Goods is an offline-first platform for documenting ecological and social work and proving impact on-chain. Operators approve gardener submissions, and the protocol anchors results in Ethereum attestation infrastructure.

## Getting Started

### Prerequisites

Install **Node.js 22+** and **Git**. Install **Docker Desktop** if you plan to run the full stack or indexer locally. Node includes `npm`, and `npm run setup` installs Bun automatically if it is missing.

**Optional tools:** Foundry is needed for contract work. `cloudflared` is useful for mobile-device PWA testing. macOS and Linux are supported natively; use WSL2 or a dev container on Windows.

### Clone

[![Clone on GitHub](https://img.shields.io/badge/Clone-on%20GitHub-2da44e?logo=github)](https://github.com/greenpill-dev-guild/green-goods)

Use GitHub's **Code** button to choose the SSH or HTTPS remote that matches your local Git setup. Then run the setup commands from the repo root.

### Agent-Assisted Setup

If you are using Codex, Claude Code, or another coding agent, start by loading [ONBOARDING.md](./ONBOARDING.md). It gives the agent the repo context, setup flow, environment model, and first-run checks before it starts changing files.

```text
Read ONBOARDING.md and AGENTS.md, then walk me through first-time setup for this repo.
Start with prerequisites, run npm run setup, check web readiness, start the browser
stack, and explain any env blockers before making changes.
```

### Setup

#### Install dependencies

```bash
npm run setup
```

After setup, use `bun` for repo scripts and package operations. `npm run setup` is the only documented npm entrypoint because fresh machines may not have Bun yet.

#### Environment defaults

Green Goods uses a single root `.env`, materialized from `.env.template` via the [1Password CLI](https://developer.1password.com/docs/cli/) (`op inject`). Bun, Vite, and Node read it natively — no per-command secret fetch.

```bash
bun run env:template:init   # one-time: scaffold .env.template from .env.schema
bun run env:sync             # materialize .env from .env.template (runs `op inject`)
bun run env:check            # validate .env satisfies .env.schema
```

`.env.schema` defines the contract; `.env.template` is the team-shared file with `op://Vault/Item/field` refs for shared secrets and plain values for non-secrets. Keep personal local-only credentials directly in `.env`.

| Variable | Needed for | Default setup state |
| --- | --- | --- |
| `APP_ENV` | Local tooling mode | Generated as `development` |
| `VITE_CHAIN_ID` | Client/admin chain selection | Generated for Sepolia |
| `VITE_ENVIO_INDEXER_URL` | Local indexer reads | Generated for local GraphQL; needs the indexer running for live local data |
| `VITE_PINATA_JWT` | Upload-capable media | Add only when testing uploads |
| `VITE_PIMLICO_API_KEY` | Passkey auth | Add only when testing passkey flows |
| `VITE_WALLETCONNECT_PROJECT_ID` | Wallet auth | Add only when testing wallet flows |
| `TELEGRAM_BOT_TOKEN` | Agent service | Add only when running a useful local agent |

For shared team secrets, edit `.env.template` and set the value to `op://Vault/Item/field`, then run `bun run env:sync`. For personal local credentials, set the variable directly in the root `.env`. Never create package-level `.env` files.

### Check readiness

```bash
bun run dev:doctor -- --profile web
```

### Start stack

```bash
bun run dev:web
```

Starts the four browser-based surfaces: client, admin, docs, and Storybook.

### Testing

```bash
bun run dev:smoke:web
```

Run this after the browser stack is starting.

## Tech Stack

### Stack Overview

- Node.js 22+ provides `npm` for first-clone setup.
- `npm run setup` installs Bun, installs dependencies, and creates the root `.env`.
- Bun is the workspace runtime after setup.
- `.env.schema` (key contract) + `.env.template` (1Password refs) materialize `.env` via `bun run env:sync` (`op inject`).
- PM2 manages local dev services.
- Docker powers full-stack indexer development.
- Storybook runs from the shared package.
- Full-stack work adds Docker-backed indexer services, the agent, tunnel, and workflow-specific env or secrets.

### Core Local URLs

Client and admin can start with generated defaults. Live data, uploads, authenticated onchain flows, and the local agent depend on the matching env and services.

| Surface | URL | Started by |
| --- | --- | --- |
| Client |  | `bun run dev:web` or `bun run dev` |
| Admin |  | `bun run dev:web` or `bun run dev` |
| Docs |  | `bun run dev:web` or `bun run dev` |
| Storybook |  | `bun run dev:web` or `bun run dev` |
| Agent |  | `bun run dev` with configured agent env |
| Indexer |  | `bun run dev` with Docker running |

### Dev Commands

#### Start browser surfaces

```bash
bun run dev:web
```

Runs the four browser-based sites: client, admin, docs, and Storybook.

#### Start full local stack

Check full-stack readiness first:

```bash
bun run dev:doctor -- --profile full
```

Then start the full stack:

```bash
bun run dev
```

Use the full stack for Docker/indexer, agent, tunnel, or mobile-device PWA work. Run the full doctor first; some services need workflow-specific env or secrets before they are useful.

#### Stop local services

```bash
bun run dev:stop
```

## Contributing

### Guides

Read the [Greenpill Dev Guild contributing guide](https://github.com/greenpill-dev-guild/.github/blob/main/CONTRIBUTING.md) and the full [How to Contribute](https://docs.greengoods.app/builders/how-to-contribute) guide before opening a pull request.

### Before Pushing

Run each command from the repo root before pushing.

#### Check formatting

```bash
bun run format:check
```

#### Run lint

```bash
bun run lint
```

#### Run tests

```bash
bun run test
```

#### Build workspace

```bash
bun run build
```

### Funded Scoped Work

Paid implementation work is grant-dependent and must be clearly scoped with maintainers before work begins. Green Goods does not run open-ended bounties.

## Resources

### Documentation

- [Developer Getting Started](https://docs.greengoods.app/builders/getting-started) - setup, env bootstrap, local services, and first-run workflow
- [Architecture](https://docs.greengoods.app/builders/architecture) - system design, boundaries, and diagrams
- [Builder API Index](https://docs.greengoods.app/builders/packages/api-index) - package APIs, contracts, and shared surfaces
- [Operations](https://docs.greengoods.app/builders/operations) - build, deploy, environment, and workflow references
- [How to Contribute](https://docs.greengoods.app/builders/how-to-contribute) - contributor workflow and expectations

### Agent References

- [ONBOARDING.md](./ONBOARDING.md) - paste into Claude Code on day one for a guided setup walkthrough
- [AGENTS.md](./AGENTS.md) - runtime rules and repo invariants for Codex and other coding agents
- [CLAUDE.md](./CLAUDE.md) - Claude Code commands, patterns, and working conventions

### Community and Security

- [Code of Conduct](https://github.com/greenpill-dev-guild/.github/blob/main/CODE_OF_CONDUCT.md)
- [Security Policy](https://github.com/greenpill-dev-guild/.github/blob/main/SECURITY.md)
- [MIT License](./LICENSE)

        

Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 4 days ago

Total Commits: 1,613
Total Committers: 10
Avg Commits per committer: 161.3
Development Distribution Score (DDS): 0.055

Commits in past year: 1,466
Committers in past year: 8
Avg Commits per committer in past year: 183.25
Development Distribution Score (DDS) in past year: 0.037

Name Email Commits
Afo c****t@a****o 1524
0xWildhare s****9@g****m 31
Tarun Gupta t****r@r****m 18
copilot-swe-agent[bot] 1****t 16
dependabot[bot] 4****] 7
Cursor Agent c****t@c****m 6
Athus a****o@g****m 5
Alexander Mangel c****r@g****m 3
Claude n****y@a****m 2
mrcn m****a@g****m 1

Committer domains:


Issue and Pull Request metadata

Last synced: 5 days ago

Total issues: 222
Total pull requests: 136
Average time to close issues: 3 months
Average time to close pull requests: 7 days
Total issue authors: 8
Total pull request authors: 7
Average comments per issue: 0.19
Average comments per pull request: 1.54
Merged pull request: 74
Bot issues: 0
Bot pull requests: 32

Past year issues: 122
Past year pull requests: 93
Past year average time to close issues: 28 days
Past year average time to close pull requests: 10 days
Past year issue authors: 6
Past year pull request authors: 7
Past year average comments per issue: 0.29
Past year average comments per pull request: 1.74
Past year merged pull request: 36
Past year bot issues: 0
Past year bot pull requests: 28

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/greenpill-dev-guild/green-goods

Top Issue Authors

  • Oba-One (196)
  • c-georgen (14)
  • marcaumdesign (4)
  • cauetomaz (3)
  • moose-code (2)
  • Cygnusfear (1)
  • NFTthat (1)
  • kitblake (1)

Top Pull Request Authors

  • Oba-One (92)
  • dependabot[bot] (31)
  • Cygnusfear (6)
  • Tarun-k-Gupta (4)
  • adigulalkari (1)
  • saket0392 (1)
  • fly-io[bot] (1)

Top Issue Labels

  • story (42)
  • contract (32)
  • state-logic (31)
  • task (29)
  • component (28)
  • design (23)
  • enhancement (21)
  • documentation (18)
  • api (14)
  • bug (14)
  • client (10)
  • admin (9)
  • shared (6)
  • infrastructure (5)
  • polish (4)
  • good first issue (3)
  • javascript (3)
  • spike (1)
  • impact-reporting (1)
  • size: large (1)
  • status: ready (1)
  • sprint: active (1)
  • priority: high (1)

Top Pull Request Labels

  • dependencies (31)
  • javascript (29)
  • contract (20)
  • component (20)
  • api (17)
  • state-logic (17)
  • documentation (4)
  • database (2)
  • enhancement (2)
  • infrastructure (2)
  • hacktoberfest-accepted (1)
  • automated/codex (1)
  • admin (1)
  • codex (1)

Package metadata

proxy.golang.org: github.com/greenpill-dev-guild/green-goods

Score: -Infinity