Skip to content

mr-baraiya/AgroSmart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

232 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌱 AgroSmart - Smart Agriculture Management System

A comprehensive full-stack smart agriculture platform that empowers farmers and agri-businesses with real-time data, analytics, and automation. Built with modern technologies to revolutionize farming through data-driven insights and intelligent farm management.

License .NET React SQL Server


Live Demo

Check out AgroSmart in action:

Backend APIs


Frontend Deployments


Tech Stack

Backend

  • ASP.NET Core 8
  • Entity Framework Core
  • SQL Server
  • JWT Authentication
  • REST APIs

Frontend

  • React 19 + Vite
  • Tailwind CSS
  • Framer Motion
  • Recharts
  • React Router

Automation & Integrations

  • n8n (workflow automation)
  • Brevo (Email automation)
  • EmailJS (contact form)
  • OpenWeatherMap API
  • AGMARKNET API

Key Features

  • Role-based Authentication (Admin / User)
  • Farm, Field & Crop Management
  • Sensor Monitoring (Soil, Temperature, Humidity)
  • Weather Intelligence & Alerts
  • AI-based Smart Insights
  • Task & Schedule Management
  • In-app & Automated Notifications
  • Login & Security Alerts via n8n
  • Password Reset with Secure Token System
  • Multi-deployment (Render, SmarterASP, Cloudflare)

n8n Automation

AgroSmart uses n8n workflows for:

  • Login success notifications
  • Security alert automation
  • Contact form processing
  • Email-based system notifications

Backend β†’ Webhook β†’ n8n β†’ Email Provider


Project Structure

AgroSmart/
β”‚
β”œβ”€β”€ AgroSmartBeackend/   # ASP.NET Core API
β”œβ”€β”€ AgroSmartFrontend/   # React + Vite App
β”œβ”€β”€ Database/            # SQL Scripts
β”œβ”€β”€ Materials/           # Documentation
└── README.md

πŸ›  Installation

Backend

cd AgroSmartBeackend
dotnet restore
dotnet ef database update
dotnet run

Frontend

cd AgroSmartFrontend
npm install
npm run dev

Configure:

  • Database connection
  • JWT secret
  • Automation webhook
  • API base URLs

Configuration

Backend Configuration

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning"
    }
  },
  "AllowedHosts": "*",

  "ConnectionStrings": {
    "myConnectionString": "Server=YOUR_SERVER;Database=AgroSmart;User Id=YOUR_USERNAME;Password=YOUR_PASSWORD;Encrypt=True;TrustServerCertificate=True;"
  },

  "Jwt": {
    "Key": "YOUR_SUPER_SECRET_JWT_KEY_HERE",
    "Issuer": "https://yourdomain.com",
    "Audience": "*",
    "TokenExpiryMinutes": 60
  },

  "SmtpSettings": {
    "Host": "smtp.gmail.com",
    "Port": "587",
    "Username": "your_email@gmail.com",
    "Password": "your_app_password_here",
    "FromEmail": "your_email@gmail.com"
  },

  "Prerender": {
    "Token": "YOUR_PRERENDER_TOKEN_HERE"
  },

  "AutomationSettings": {
    "WebhookUrl": "https://your-n8n-domain/webhook/agrosmart-login",
    "SecretKey": "YOUR_WEBHOOK_SECRET_KEY"
  }
}

Frontend Environment Variables

# -------------------------------
# API Configuration
# -------------------------------
# For development
# VITE_API_BASE_URL=https://localhost:7059/api
# VITE_IMAGE_BASE_URL=https://localhost:7059

# For production (Render backend)
VITE_API_BASE_URL=https://your-backend.onrender.com/api
VITE_IMAGE_BASE_URL=https://your-backend.onrender.com

# -------------------------------
# Weather API (OpenWeatherMap)
# -------------------------------
VITE_WEATHER_API_KEY=YOUR_WEATHER_API_KEY
VITE_WEATHER_API_BASE_URL=https://api.openweathermap.org/data/2.5

# -------------------------------
# EmailJS Configuration
# -------------------------------
VITE_EMAILJS_USER_ID=YOUR_EMAILJS_USER_ID
VITE_EMAILJS_SERVICE_ID=YOUR_EMAILJS_SERVICE_ID
VITE_EMAILJS_TEMPLATE_ID=YOUR_EMAILJS_TEMPLATE_ID

# -------------------------------
# AGMARKNET API (Mandi Prices)
# -------------------------------
# Get key from: https://data.gov.in/
VITE_AGMARKNET_API_KEY=YOUR_AGMARKNET_API_KEY

Never commit secrets to GitHub.


Author

Mr. Baraiya https://github.com/mr-baraiya


AgroSmart – Smart farming for a sustainable future.

About

AgroSmart: A Smart Agriculture Platform Leveraging IoT and AI for Sustainable Farm Management.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages