Skip to content

Latest commit

 

History

History
141 lines (103 loc) · 4.27 KB

File metadata and controls

141 lines (103 loc) · 4.27 KB

OpenPasture

An open-source intelligence layer for adaptive grazing. See docs/vision.md for the thesis and product philosophy.

Features

Digital Twin of Your Farm

  • Define farm boundaries and pasture zones
  • Track herd metadata (species, count)
  • Visualize all zones on an interactive map

Satellite-Derived Land Intelligence

  • Vegetation health metrics (NDVI, EVI)
  • Relative forage availability by pasture
  • Regrowth trends over time
  • Over/under-utilization indicators

Daily Recommendations

  • Which pasture to graze today
  • Suggested area and duration
  • Confidence score and assumptions
  • Plain-language explanations

Flexible Output

  • Visual fence geometry for planning
  • Copy-ready instructions for third-party virtual fencing tools
  • Manual execution guidance

Technical Approach

Satellite Imaging

We use publicly available satellite imagery (primarily Sentinel-2) to compute vegetation indices across your farm. This provides:

  • Scalable, low-cost land sensing
  • Multispectral data for vegetation analysis
  • Frequent revisits (daily to every few days)
  • Historical archive for trend analysis

Vegetation Indices

Index Purpose
NDVI Primary vegetation health indicator
EVI Enhanced sensitivity for dense pastures
NDWI Water stress and drought detection

Processing Pipeline

  1. Query satellite imagery for your farm's area
  2. Apply cloud masking to remove unusable pixels
  3. Compute vegetation indices
  4. Aggregate time-series data (rolling means/medians)
  5. Calculate zonal statistics per pasture
  6. Score pasture readiness using transparent rules
  7. Generate recommendation with confidence level

Getting Started

The web app lives in app/. Prerequisites: Node.js 18+ and pnpm.

cd app
pnpm install
pnpm run dev

Common scripts:

  • pnpm run dev - start the Vite dev server
  • pnpm run build - type-check and build for production
  • pnpm run lint - run ESLint
  • pnpm run preview - preview the production build

Environment Variables

Environment setup is documented in docs/environment.md.

Quick start:

cp app/.env.example app/.env.local
cp ingestion/satellite/.env.example ingestion/satellite/.env.local

Set server-side keys (for Convex backend actions) in Convex Dashboard environment variables:

  • AI_GATEWAY_API_KEY (required for AI recommendations via Vercel AI Gateway)
  • BRAINTRUST_API_KEY (optional observability)
  • BRAINTRUST_PROJECT_NAME (optional, defaults to grazing-agent)
  • GITHUB_TOKEN (optional, enables GitHub issue creation from reports)
  • CONVEX_DEBUG (optional backend debug logging)

Tech Stack

  • Frontend: React 19, TypeScript, TanStack Router, Tailwind CSS v4
  • Backend: Convex (serverless DB + functions)
  • Auth: Clerk
  • AI: Anthropic Claude via Vercel AI SDK
  • Maps: MapLibre GL + Mapbox Draw
  • Satellite Access: pystac-client, odc-stac, rasterio, xarray
  • Data Source: Microsoft Planetary Computer (Sentinel-2)

Project Structure

/
├── AGENTS.md              # AI agent reference
├── README.md              # This file
├── app/                   # Web application (Vite + React + Convex)
│   ├── src/               # Frontend source
│   └── convex/            # Serverless backend
├── docs/
│   ├── vision.md          # Thesis and product philosophy
│   ├── architecture.md    # Conceptual system architecture
│   ├── domain.md          # Remote sensing domain knowledge
│   └── environment.md     # Environment variable reference
├── ingestion/
│   └── satellite/         # Python satellite data pipeline
└── ...

Documentation

Contributing

See CONTRIBUTING.md for setup and contribution guidelines.

Security

If you discover a vulnerability, see SECURITY.md.

License

Licensed under the Apache License, Version 2.0. See LICENSE and NOTICE.