How superzero11/openfarm works
OpenFarm is a self-hostable crop-intelligence platform: farm teams manage organizations, farms, and fields, then inspect satellite indices, weather, soil, alerts, and scouting insights through a web app. The API provides tenant-scoped operations and background jobs; the worker computes observation and intelligence products, while TiTiler serves raster tiles. The README also documents boundary detection, sharing, and rich soil analysis, preserved here at subsystem level. Source excerpts verify API routing, auth, and parts of the index pipeline; other subsystem links are documented by the README or left unverified.
Main entry points: main.py FastAPI application · tables.py PostGIS data · page.tsx OpenFarm web · worker.py Celery worker
Components 28
Web experience
- OpenFarm web
apps/web/src/app/[locale]/(authenticated)/dashboard/page.tsx - Field workspace
apps/web/src/app/[locale]/(authenticated)/farms/[id]/fields/[fieldId]/page.tsx - Boundary review
apps/web/src/app/[locale]/(authenticated)/farms/[id]/detect/page.tsx - Shared field report
apps/web/src/app/[locale]/share/[token]/page.tsx - Web API client
apps/web/src/lib/api.ts
API and tenancy
- FastAPI application
services/api/app/main.py - JWT and org access
services/api/app/middleware/auth.py - Organizations
services/api/app/routers/orgs.py - Farms and fields
services/api/app/routers/fields.py - Monitoring API
services/api/app/routers/monitoring.py - Weather API
services/api/app/routers/weather.py - Soil API
services/api/app/routers/soil.py - Alerts and scouting
services/api/app/routers/alerts.py - Detection API
services/api/app/routers/detection.py - Share links
services/api/app/routers/share.py
Observation services
- Weather ingestion
services/api/app/tasks/weather.py - TiTiler service
services/tiler/app.py - Element84 STAC
- Open-Meteo
- SoilGrids / POLARIS
Intelligence workflows
- Celery worker
services/api/app/worker.py - Index processing
services/api/app/tasks/pipeline.py - Vegetation indices
services/api/app/tasks/indices.py - Soil intelligence
services/api/app/tasks/soil.py - Boundary inference
services/api/app/tasks/detection.py
Data and tiles
- PostGIS data
services/api/app/models/tables.py - COG object storage
Other components
- Farm user
Connections 44
- Farm user → OpenFarm web: uses
README.md - OpenFarm web → Field workspace: opens fields
README.md - OpenFarm web → Boundary review: starts review
README.md - OpenFarm web → Shared field report: opens shared view
README.md - OpenFarm web → Web API client: requests data
- Web API client → FastAPI application: calls
- FastAPI application → JWT and org access: applies access
services/api/app/main.py - FastAPI application → Organizations: routes
services/api/app/main.py - FastAPI application → Farms and fields: routes
services/api/app/main.py - FastAPI application → Monitoring API: routes
services/api/app/main.py - FastAPI application → Weather API: routes
services/api/app/main.py - FastAPI application → Soil API: routes
services/api/app/main.py - FastAPI application → Alerts and scouting: routes
services/api/app/main.py - FastAPI application → Detection API: routes
services/api/app/main.py - FastAPI application → Share links: routes
services/api/app/main.py - JWT and org access → PostGIS data: checks membership
services/api/app/middleware/auth.py - Organizations → PostGIS data: reads and writes
services/api/app/routers/orgs.py - Farms and fields → PostGIS data: reads and writes
services/api/app/routers/fields.py - Monitoring API → PostGIS data: reads data
services/api/app/routers/monitoring.py - Weather API → PostGIS data: reads and writes
- Soil API → PostGIS data: reads and writes
services/api/app/routers/soil.py - Alerts and scouting → PostGIS data: reads and writes
services/api/app/routers/alerts.py - Detection API → PostGIS data: reads and writes
services/api/app/routers/detection.py - Share links → PostGIS data: reads and writes
services/api/app/routers/share.py - Farms and fields → Weather ingestion: queues weather
services/api/app/routers/fields.py - Farms and fields → Soil intelligence: queues soil
services/api/app/routers/fields.py - Detection API → Celery worker: dispatches jobs
services/api/app/routers/detection.py - Monitoring API → Vegetation indices: queues indices
services/api/app/routers/monitoring.py - Celery worker → Vegetation indices: loads tasks
services/api/app/worker.py - Celery worker → Weather ingestion: loads tasks
services/api/app/worker.py - Celery worker → Soil intelligence: loads tasks
services/api/app/worker.py - Celery worker → Boundary inference: loads tasks
- Vegetation indices → Index processing: reuses helpers
services/api/app/tasks/pipeline.py - Index processing → Element84 STAC: searches scenes
README.md - Index processing → COG object storage: writes COGs
services/api/app/tasks/pipeline.py - Index processing → PostGIS data: stores statistics
services/api/app/tasks/pipeline.py - Index processing → Alerts and scouting: enriches alerts
- Weather ingestion → Open-Meteo: fetches forecasts
README.md - Soil intelligence → SoilGrids / POLARIS: ingests profiles
README.md - Soil API → Soil intelligence: queues processing
services/api/app/routers/soil.py - Boundary inference → Element84 STAC: uses imagery
- COG object storage → TiTiler service: serves COG tiles
README.md - Field workspace → TiTiler service: renders layers
- Shared field report → Share links: loads public report