The Digital Twin of Your Farm
A full‑stack smart farm‑management platform that fuses satellite intelligence, weather forecasting, IoT telemetry, AI assistance, and financial analytics into one connected workspace.
Overview • Features • Dashboard Modules • Plans & Pricing • Tech Stack • Architecture • Getting Started • Configuration • Integrations • API • Live Demo • Contributing • License
AgroVision turns scattered farm data, satellite imagery, weather, soil probes, machinery logs, and ledgers into a single, decision-grade platform. Built on Next.js 16 (App Router) with React 19 and TypeScript, it pairs a Supabase-backed data layer with Stripe subscription billing and Resend transactional email, and ships with an AI agronomy assistant, NDVI analytics, IoT sensor integrations, and a fully responsive, themeable, installable (PWA) interface.
Every external integration is optional. When an API key is not configured, AgroVision gracefully falls back to realistic mock data so the complete product experience is explorable from your very first npm run dev, with zero setup required.
- Interactive satellite map (Leaflet) with field boundaries and crop overlays.
- Field management tools — create fields, draw editable polygons directly on the map, or import GPS coordinates.
- Per-field crop intelligence — track crop health, soil moisture, nitrogen, and expected yield.
- NDVI vegetation analytics — monitor crop vigor over time and flag areas of concern.
- Hyper-local multi-day forecasts backed by AgroMonitoring with an OpenWeatherMap fallback.
- Soil moisture monitoring by depth (10 cm–100 cm) to guide irrigation decisions.
- Crop weather insights — precipitation outlook, wind/humidity summaries, and recommended spraying/irrigation windows.
- Plug-and-play connectivity with major IoT sensor providers (soil probes, weather stations, irrigation valves).
- Live sensor dashboards with real-time readings, status, and alerting.
- AI-generated insights over streaming sensor data.
- Natural-language chat over your farm data.
- Actionable recommendations for irrigation, fertilization, pest control, and yield optimization.
- Revenue vs. expenses tracking with interactive charts built on Recharts.
- Advanced analytics — income, expenses, net profit, and yearly trends.
- Exportable reports and a financial dashboard designed for planning.
- Machinery & fleet management — track hours, fuel, maintenance, and assignments.
- Workers, tasks, calendar, inventory, notifications, and livestock — one unified operations dashboard.
- Full auth lifecycle — registration, login, email verification, and password reset.
- Subscription billing — three plans, monthly/yearly billing, invoices, and Stripe webhooks.
- 11 languages — English, Español, Français, Deutsch, Italiano, Português, Nederlands, العربية, Ελληνικά, 中文, 日本語.
- Adaptable workspace — light/dark theme, multi-currency, and metric/imperial units.
- PWA-ready — offline caching, installable manifest, and app shortcuts.
- SaaS feature-gating — capability flags and plan limits drive the UI on a per-account basis.
AgroVision ships with a complete, modular dashboard. Each module is built on top of the same design system and feature-gating layer.
| Module | What you can do |
|---|---|
| Dashboard | Real-time overview of fields, weather, finances, tasks, and machinery status. |
| Farm Map | Interactive Leaflet map with editable field polygons and satellite basemaps. |
| Fields | Create and edit fields, draw polygons, import GPS, and review NDVI/crop health. |
| Weather | Forecasts, soil moisture by depth, and irrigation/spraying recommendations. |
| Sensors | IoT provider integrations, live dashboards, and AI-powered sensor insights. |
| AI | Natural-language assistant that answers questions about your farm data. |
| Analytics | Revenue/expenses, net profit, yearly trends, and exportable reports. |
| Finance | Budgeting and expense tracking with detailed reporting. |
| Machinery | Fleet managemen hours, fuel, maintenance, and assignments. |
| Workers | Team directory with roles and contact details. |
| Tasks | Drag-and-drop task boards to keep operations moving. |
| Calendar | Farm activities and scheduling in one view. |
| Inventory | Track inputs, supplies, and stock levels. |
| Animals | Livestock and herd management. |
| Marketplace | In-platform marketplace to connect growers with suppliers. |
| Notifications | Alert center for weather, sensors, billing, and system events. |
| Billing | Subscription management, invoices, and plan details. |
| Settings | Profile, language, theme, currency, and units. |
| Pricing | Public pricing page with plan comparison and checkout. |
Three subscription tiers, billed monthly or yearly, managed end-to-end through Stripe.
| Plan | Price | Best for | Highlights |
|---|---|---|---|
| Starter | $29/mo · $290/yr | Small family farms | 50 acres · basic analytics · weather · tasks · satellite monitoring · limited AI |
| Professional | $79/mo · $790/yr | Growing operations | 500 acres · AI assistant · satellite & crop-health monitoring · IoT sensors · API access · unlimited AI |
| Enterprise | $199/mo · $1,990/yr | Large-scale operations | Unlimited acres · premium AI models · custom integrations · white-label · on-premise option · SLA |
A demo/simulation endpoint (
/api/billing/simulate) makes it easy to exercise the full billing lifecycle during development.
| Layer | Technology |
|---|---|
| Framework | Next.js 16 (App Router) + Server Components |
| UI Runtime | React 19 |
| Language | TypeScript |
| Styling | Tailwind CSS v4 + tailwindcss-animate + class-variance-authority |
| UI Kit | Radix UI primitives, lucide-react icons, Framer Motion animations |
| Charts | Recharts |
| Maps | Leaflet + react-leaflet |
| Drag & Drop | @hello-pangea/dnd |
| Backend | Next.js Route Handlers + Supabase (auth & data) |
| Payments | Stripe — checkout, subscriptions, invoices, webhooks |
| Resend + React Email templates | |
| i18n | i18next + react-i18next (11 languages, LibreTranslate fallback) |
| PWA | Custom service worker (public/sw.js) + generated web manifest |
AgroVision is a full-stack application built on the Next.js App Router. Server components render the dashboard shells, while route handlers under src/app/api act as a single origin they protect integration keys, enforce authentication and plan gates, and proxy third-party services. Supabase handles authentication and data persistence, Stripe reconciles subscriptions through a dedicated Edge Function webhook, and a provider-based composable UI layer keeps the experience consistent across every module.
agrovizion/
├── public/ # Static assets, PWA icons, service worker (sw.js)
├── scripts/
│ └── generate-icons.js # PWA icon generation
├── src/
│ ├── app/
│ │ ├── (marketing)/ # Landing, pricing, login/register, forgot-password
│ │ ├── auth/callback # Supabase auth redirect handling
│ │ ├── dashboard/ # All 19 modules: farm-map, fields, weather, sensors,
│ │ │ # ai, analytics, finance, machinery, workers, tasks,
│ │ │ # calendar, inventory, animals, marketplace,
│ │ │ # notifications, billing, settings, ...
│ │ ├── api/ # Route handlers (see API Routes below)
│ │ ├── checkout/ # Stripe checkout page
│ │ ├── verify-email/ # Email verification flow
│ │ ├── page.tsx # Landing page
│ │ ├── layout.tsx # Root layout
│ │ ├── manifest.ts # PWA web manifest
│ │ └── globals.css
│ ├── components/
│ │ ├── ui/ # Radix-based primitives (button, card, dialog, ...)
│ │ ├── billing/ # Feature-gate, plan-badge, subscription UI
│ │ ├── demo-video.tsx # Cinematic "Watch Demo" walkthrough
│ │ ├── farm-map.tsx # Leaflet satellite map
│ │ ├── ndvi-analytics-dashboard.tsx
│ │ ├── sidebar.tsx # Dashboard navigation
│ │ └── *_provider.tsx # Theme, language, currency, units, PWA providers
│ └── lib/
│ ├── billing/ # Stripe provider, plans, subscriptions, webhooks, gates
│ ├── email/ # Resend provider + React Email templates
│ ├── supabase/ # Auth + database clients
│ ├── offline/ # Service-worker offline cache
│ ├── *.service.ts # Weather, agro-monitoring, sensors, NDVI, export
│ └── data.ts # Mock data & shared types
├── supabase/
│ ├── config.toml
│ └── functions/stripe-webhook/ # Stripe webhook Edge Function
├── .env.example # Environment template
├── next.config.ts
├── package.json
└── tsconfig.json
- Node.js
>= 20.9.0(LTS 22 recommended) - npm (or yarn / pnpm / bun)
- Optional accounts for live integrations: Supabase, Stripe, Resend, AgroMonitoring, OpenWeatherMap
# 1. Clone the repository
git clone https://github.com/AnastKara/AgroVision.git
cd AgroVision
# 2. Install dependencies
npm install
# 3. Create your local environment file
cp .env.example .env.local
# (Windows PowerShell: Copy-Item .env.example .env.local)
# 4. Start the development server
npm run devOpen http://localhost:3000 with your browser. The app runs fully on mock data until you add API keys.
| Command | Description |
|---|---|
npm run dev |
Start the development server (hot reload) |
npm run build |
Build the application for production |
npm start |
Start the production server |
npm run lint |
Run ESLint across the codebase |
Copy .env.example to .env.local and fill in the values you need. All variables are optional — the app falls back to demo data for any service that is not configured.
| Variable | Required | Description |
|---|---|---|
NEXT_PUBLIC_SUPABASE_URL |
Opt. | Supabase project URL |
NEXT_PUBLIC_SUPABASE_ANON_KEY |
Opt. | Supabase public anon key |
SUPABASE_SERVICE_ROLE_KEY |
Opt. | Supabase service-role key (server-only) |
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY |
Opt. | Stripe publishable key |
STRIPE_SECRET_KEY |
Opt. | Stripe secret key |
STRIPE_WEBHOOK_SECRET |
Opt. | Stripe webhook signing secret |
STRIPE_PRICE_STARTER/PROFESSIONAL/ENTERPRISE_{MONTHLY,YEARLY} |
Opt. | Stripe Price IDs for the three plans and two billing cycles |
PAYMENT_PROVIDER |
Opt. | stripe (default) — reserved for future providers |
AGROMONITORING_API_KEY |
Opt. | AgroMonitoring satellite & weather API key |
OPENWEATHER_API_KEY |
Opt. | OpenWeatherMap fallback key |
DEFAULT_FARM_LAT / DEFAULT_FARM_LON |
Opt. | Default farm coordinates for the map |
NEXT_PUBLIC_APP_URL |
Opt. | Public app URL (defaults to http://localhost:3000) |
RESEND_API_KEY |
Opt. | Resend API key for transactional email |
EMAIL_FROM |
Opt. | Sender address for outgoing email |
| Service | Role | Used When |
|---|---|---|
| Supabase | Authentication (email OTP/verify) & database | Keys configured |
| Stripe | Subscriptions, checkout, invoices, customer portal, webhooks | Keys configured |
| Resend | Transactional email (verification, welcome, invoice, payments) | RESEND_API_KEY set |
| AgroMonitoring | Satellite (Sentinel-2) imagery & weather polygons | AGROMONITORING_API_KEY set |
| OpenWeatherMap | Weather forecast fallback | OPENWEATHER_API_KEY set |
| Leaflet / EOX | Satellite & street basemap tiles | Always (with graceful fallbacks) |
| LibreTranslate | On-the-fly translation for non-English locales | Language switch used |
All handlers live under src/app/api and share the same auth, feature-gate, and error-handling conventions.
| Route | Purpose |
|---|---|
GET/POST /api/fields, /api/fields/[id] |
Field CRUD and analytics |
/api/agromonitoring/polygons, /api/agromonitoring/satellite |
Satellite polygon & imagery proxies |
GET /api/weather, /api/weather/satellite |
Weather forecasts and satellite imagery |
/api/sensors/providers, /api/sensors/integrations |
Sensor provider & integration registry |
POST /api/sensors/sync |
Synchronize sensor readings |
POST /api/sensors/ai |
AI insights over sensor data |
POST /api/auth/register, verify-email, resend-verification |
Authentication flows |
GET/PATCH /api/profile |
User profile retrieval & update |
POST /api/billing/checkout |
Create a Stripe checkout session |
POST /api/billing/webhook |
Stripe webhook handler |
GET /api/billing/subscription |
Current plan & limits |
/api/billing/invoices, /api/billing/invoices/[id]/download |
Invoice listing & PDF download |
POST /api/billing/portal |
Stripe customer portal session |
POST /api/billing/simulate |
Simulate billing states (development) |
The landing page includes a cinematically animated "Watch Demo" walkthrough. It showcases realistic mockups of the real AgroVision screens Dashboard, Farm Map, Weather, IoT Sensors, AI Assistant, and Analytics with a continuous Ken Burns camera effect, play/pause, a progress bar, and prev/next controls. No account or API keys required.
AgroVision is under active development. Contributions that improve reliability, documentation, or the developer experience are welcome.
- Fork the repository and create a feature branch.
- Follow the existing code conventions (TypeScript, ESLint, and the provider-component patterns).
- Run
npm run lintandnpm run buildbefore opening a pull request. - Reference the relevant issue or feature in your PR description.
This project is proprietary software. All rights reserved. © 2024 AgroVision.
Built with 💚 by Anastasios Karaivazoglou
github.com/AnastKara/AgroVision
