Documentation

Agroflow Documentation

Learn how to set up and use Agroflow for smart farming with IoT, blockchain, and AI.

Quick Start Guide

Prerequisites

  • Node.js 18+ and npm
  • Supabase account (free tier works)
  • Gemini API key (for chatbot)
  • MetaMask wallet (for NFT minting)

Installation

# Clone the repository
git clone https://github.com/Devvaibhavpk/Agroflow.git
cd Agroflow

# Install dependencies
npm install

# Copy environment template
cp .env.local.example .env.local

# Add your keys to .env.local
# NEXT_PUBLIC_SUPABASE_URL=your_url
# NEXT_PUBLIC_SUPABASE_ANON_KEY=your_key
# GEMINI_API_KEY=your_gemini_key

# Run development server
npm run dev

Supabase Setup

  1. Create a new Supabase project
  2. Run the SQL scripts in /supabase folder:
    • setup.sql - Core tables
    • blockchain_tables.sql - NFT/blockchain tables
    • sample_data.sql - Demo data
  3. Copy your project URL and anon key to .env.local
Environment Variables
VariableDescriptionRequired
NEXT_PUBLIC_SUPABASE_URLYour Supabase project URL✅ Yes
NEXT_PUBLIC_SUPABASE_ANON_KEYSupabase anonymous key✅ Yes
GEMINI_API_KEYGoogle Gemini API key for chatbot✅ Yes
NEXT_PUBLIC_NFT_CONTRACT_ADDRESSDeployed NFT contract addressOptional

Need Help?

Check out the GitHub repo or try the live demo