Skip to content

Agri-Energy Connect is a prototype web application designed to empower farmers by bridging the gap between sustainable agricultural practices and green energy solutions. The platform supports two main user roles: Employees and Farmers, offering unique functionality tailored to each.

Notifications You must be signed in to change notification settings

mishcodes09/AgriEnergyConnect

Repository files navigation

🌿 Agri-Energy Connect Platform

Agri-Energy Connect is a prototype web application designed to empower farmers by bridging the gap between sustainable agricultural practices and green energy solutions. The platform supports two main user roles: Employees and Farmers, offering unique functionality tailored to each.

Status Built With License

📦 Project Overview

This system was developed using ASP.NET Core MVC, Entity Framework Core, and SQL Server (Azure-hosted), and is structured to be scalable, maintainable, and user-friendly for both technical and non-technical stakeholders.

🌿 References:

Microsoft Docs. 2022. Hash passwords in ASP.NET Core. [online] Available at: https://learn.microsoft.com/en-us/aspnet/core/security/data-protection/consumer-apis/password-hashing?view=aspnetcore-9.0 [Accessed 12 May 2025]

  • This was used to securely store user passwords in the system using industry-standard hashing techniques.

Microsoft. 2024. Use cookie authentication without ASP.NET Core Identity. [Online] Available at: https://learn.microsoft.com/en-us/aspnet/core/security/authentication/cookie?view=aspnetcore-9.0 [Accessed 12 May 2025]

  • i am using cookies to manage and maintain a user's login session.

Microsoft. 2025. ClaimsPrincipal Class. [Online] Available at: https://learn.microsoft.com/en-us/dotnet/api/system.security.claims.claimsprincipal?view=net-9.0 [Accessed 12 May 2025]

  • Im using this to represent the currently logged-in user.

Microsoft. 2025. ClaimsIdentity. 2025. [online] Available at: https://learn.microsoft.com/en-us/dotnet/api/system.security.claims.claimsidentity?view=net-9.0 [Accessed 12 May 2025]

  • an object that holds all the facts (claims) about the user.

Microsoft. 2024. Role-based authorization in ASP.NET Core. [Online]. Available at: https://learn.microsoft.com/en-us/aspnet/core/security/authorization/roles?view=aspnetcore-9.0. [Accessed 12 May 2025]

  • restricts access to certain parts of my application based on the role of the user.

Microsoft. 2024. HtmlHelper.AntiForgeryToken Method. [Online]. Available at:https://learn.microsoft.com/en-us/dotnet/api/system.web.mvc.htmlhelper.antiforgerytoken?view=aspnet-mvc-5.2 [Accessed 12 May 2025]

  • built-in helper in ASP.NET MVC and Razor Pages that helps protect my forms from hackers

🛠️ Tech Stack

  • Frontend: ASP.NET Core MVC (Razor Pages, Bootstrap)

  • Backend: ASP.NET Core

  • Database: Azure SQL Database (via Entity Framework Core)

🚀 Getting Started

🔧 Prerequisites

Make sure the following tools are installed:

  • .NET 8 SDK
  • SQL Server or Azure SQL
  • Visual Studio 2022+ with ASP.NET and EF workloads
  • Docker Desktop (optional but recommended)

🖥️ Setting Up the Development Environment

  1. Clone the Repository git clone https://github.com/your-username/agri-energy-platform.git cd agri-energy-platform

  2. Configure the Database Connection

    • Open appsettings.json
    • Replace the connection string under "DefaultConnection" with your local or Azure SQL details: "ConnectionStrings": { "DefaultConnection": "Server=your-server;Database=AgriEnergyDB;User Id=your-user;Password=your-password;" }
  3. Apply Database Migrations dotnet ef database update

  4. Run the Application dotnet run

About

Agri-Energy Connect is a prototype web application designed to empower farmers by bridging the gap between sustainable agricultural practices and green energy solutions. The platform supports two main user roles: Employees and Farmers, offering unique functionality tailored to each.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published