AlphaCrop is an advanced open-source platform for field-level crop analysis, combining interactive web tools with Python-based analytic backends for researchers and agricultural practitioners.
- Region Selection: Draw polygons on a basemap (Leaflet, in the web app) to define areas of interest in a field.
- Model Inference: Select classifiers for plant disease detection or crop yield forecasts.
- Data Source Integration: Toggle between satellite and IoT sensor network data as analysis sources (simulated in the PoC).
- End-to-end Analysis: Send regions and selected models/data sources to a Python backend for analysis (FastAPI/ML).
- IoT Sensor Data: Request and display simulated or real sensor readings within the selected field region.
- Extensible Models: Supports multiple underlying analysis models (e.g., Baseline Satellite or Agricultural Foundation Model).
- Proof-of-Concept Web UI: Fast, interactive interface built with React, Vite, and Leaflet.
From the repository root, start a simple static server for index.html:
# Option A (Node)
npx serve . -l 8080
# Option B (Python)
python -m http.server 8080Landing page URL: http://localhost:8080
In a second terminal:
cd field-app
npm install
npm run devField app URL: http://localhost:3000/field-app/
- Open the landing page at
http://localhost:8080. - Use the Field App button/link to open
http://localhost:3000/field-app/in development. - In the field app, draw your region of interest on the map.
- Choose a classification model.
- Select data sources (Satellite and/or IoT).
- Run the analysis.
To connect to your Python backend:
-
Create a
.env.localfile infield-app/with:VITE_API_URL=http://localhost:8000 -
Backend expects:
POST /analyzefor analysis job (region, model, data sources).POST /sensorsfor IoT sensor readings (polygon in GeoJSON).
See the minimal backend example in field-app/README.md for FastAPI code.
Instead of running two servers locally, you can deploy the entire project to Vercel:
# Install Vercel CLI
npm i -g vercel
# Deploy (from repo root)
vercelVercel automatically:
- Builds the landing page (
index.html) and the field app (field-app/dist/) once. - Routes traffic via
vercel.json:/→ landing page/field-app/*→ field app/images/*→ public images
- Hosts both under a single domain (e.g.,
alphacrop.vercel.app).
The field app's base: "/field-app/" in vite.config.js ensures all assets resolve correctly in production.
| ID | Name | Status |
|---|---|---|
| baseline | Baseline Satellite Model | ✅ Available |
| afm | Agricultural Foundation Model | 🚧 Under Development |
field-app/— Modern React (Vite) front end for drawing, model selection, and analysis launch.- (optional)
backend/— FastAPI Python backend for real or simulated model inference and sensor data. README.md— Main documentation (you’re here).
Proof of concept – research use only. See repository root for full license terms.
- See
field-app/README.mdfor full app setup instructions and example backend.