EcoRecycle is a production-grade, secure, and scalable web application built with ASP.NET Core MVC (using .NET 10). It provides an incentive-based recycling management solution that connects Users (Recyclers), Recycling Stores, and Administrators to optimize waste processing and support community sustainability goals.
EcoRecycle follows standard ASP.NET Core MVC patterns, utilizing traditional raw ADO.NET parameters and SQL stored procedures for maximum speed, security, and portability (no ORMs used).
EcoRecycle/
β
βββ App_Data/ (LocalDB file storage)
βββ Controllers/
β βββ AccountController.cs (Auth, cookies, profile, forgot pass)
β βββ AdminController.cs (Approvals, categories, campaigns, settings, QR checks)
β βββ HomeController.cs (News reader, tips, landing page)
β βββ StoreController.cs (Assigned pickups, weights entry, history)
β βββ UserController.cs (Pickups scheduling, map, QR redemptions, AI classifier)
β
βββ DAL/
β βββ DatabaseHelper.cs (ADO.NET core executions wrapper)
β βββ UserDAL.cs (Auth, users, approvals)
β βββ PickupDAL.cs (Logistics, weights, categories)
β βββ RewardDAL.cs (Redemptions, QR checks)
β βββ CampaignDAL.cs (Enrollments, campaign targets)
β βββ NotificationDAL.cs (Alerts retrieval, counts)
β βββ ContentDAL.cs (News, tips, leaderboard, audit logs, settings)
β
βββ Models/
β βββ User.cs (User schema properties and joined store fields)
β βββ Store.cs (Recycling center coordinates and details)
β βββ PickupRequest.cs (Pickup logistics, items, and categories)
β βββ Reward.cs (Incentive catalogs and transactions)
β βββ Campaign.cs (Environmental milestones and enrollments)
β βββ Notification.cs (System and logistics notifications)
β βββ EcoContent.cs (News, tips, badges, leaderboard rows, audit logs)
β βββ ViewModels/ (LoginVM, RegisterVM, ProfileVM, CompletePickupVM, etc.)
β
βββ Services/
β βββ PasswordHasher.cs (Secure PBKDF2 hashing helper)
β βββ WasteClassifierService.cs (Hugging Face API + Local deterministic fallback)
β
βββ wwwroot/
β βββ css/site.css (Glassmorphism styles, dark/light bootstrap colors)
β βββ js/site.js (Theme toggler, live notification polling)
β βββ uploads/ (User file directories for avatars and waste files)
β
βββ Database/
βββ schema.sql (Tables, Constraints, Indexes)
βββ stored_procedures.sql (All Stored Procedures)
βββ seed_data.sql (Default roles, categories, news, tips, badges, rewards)
sqlcmd)Ensure LocalDB is started and execute the SQL scripts sequentially from the project root:
# Start LocalDB MSSQLLocalDB
sqllocaldb start MSSQLLocalDB
# 1. Execute Schema Creation
sqlcmd -S "(localdb)\MSSQLLocalDB" -E -i Database/schema.sql
# 2. Register Stored Procedures
sqlcmd -S "(localdb)\MSSQLLocalDB" -E -i Database/stored_procedures.sql
# 3. Seed Database Contents
sqlcmd -S "(localdb)\MSSQLLocalDB" -E -i Database/seed_data.sql
Open appsettings.json and ensure the connection string points to EcoRecycleDb:
"ConnectionStrings": {
"DefaultConnection": "Server=(localdb)\\MSSQLLocalDB;Database=EcoRecycleDb;Integrated Security=True;Encrypt=False;TrustServerCertificate=True;"
}
Restore, build, and run the application locally:
dotnet restore
dotnet build
dotnet run --project EcoRecycle
Open http://localhost:5000 (or https://localhost:5001) in your browser.
We implement smart configurations for API keys under Admin -> System Settings:
hf_...) to connect with ResNet-50.bottle.jpg yields Plastic Bottle with 94.2% confidence), enabling seamless local testing.You can deploy directly to Azure App Service using GitHub Actions. Add the following YAML workflow to .github/workflows/deploy.yml:
name: Deploy EcoRecycle to Azure
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Restore dependencies
run: dotnet restore
- name: Build Project
run: dotnet build --configuration Release --no-restore
- name: Publish Artifacts
run: dotnet publish --configuration Release --output ./publish
- name: Deploy to Azure App Service
uses: azure/webapps-deploy@v3
with:
app-name: 'EcoRecycle-App' # Substitute with your Azure App Service Name
publish-profile: ${{ secrets.AZURE_PUBLISH_PROFILE }}
package: ./publish
[ValidateAntiForgeryToken]).SqlParameter collections.ClaimTypes.Role) mapped to controllers ([Authorize(Roles = "...")]).EcoRecycle is a production-grade, secure, and scalable web application built with ASP.NET Core MVC (using .NET 10). It provides an incentive-based recycling management solution that connects Users (Recyclers), Recycling Stores, and Administrators to optimize waste processing and support community sustainability goals.
EcoRecycle follows standard ASP.NET Core MVC patterns, utilizing traditional raw ADO.NET parameters and SQL stored procedures for maximum speed, security, and portability (no ORMs used).
EcoRecycle/
β
βββ App_Data/ (LocalDB file storage)
βββ Controllers/
β βββ AccountController.cs (Auth, cookies, profile, forgot pass)
β βββ AdminController.cs (Approvals, categories, campaigns, settings, QR checks)
β βββ HomeController.cs (News reader, tips, landing page)
β βββ StoreController.cs (Assigned pickups, weights entry, history)
β βββ UserController.cs (Pickups scheduling, map, QR redemptions, AI classifier)
β
βββ DAL/
β βββ DatabaseHelper.cs (ADO.NET core executions wrapper)
β βββ UserDAL.cs (Auth, users, approvals)
β βββ PickupDAL.cs (Logistics, weights, categories)
β βββ RewardDAL.cs (Redemptions, QR checks)
β βββ CampaignDAL.cs (Enrollments, campaign targets)
β βββ NotificationDAL.cs (Alerts retrieval, counts)
β βββ ContentDAL.cs (News, tips, leaderboard, audit logs, settings)
β
βββ Models/
β βββ User.cs (User schema properties and joined store fields)
β βββ Store.cs (Recycling center coordinates and details)
β βββ PickupRequest.cs (Pickup logistics, items, and categories)
β βββ Reward.cs (Incentive catalogs and transactions)
β βββ Campaign.cs (Environmental milestones and enrollments)
β βββ Notification.cs (System and logistics notifications)
β βββ EcoContent.cs (News, tips, badges, leaderboard rows, audit logs)
β βββ ViewModels/ (LoginVM, RegisterVM, ProfileVM, CompletePickupVM, etc.)
β
βββ Services/
β βββ PasswordHasher.cs (Secure PBKDF2 hashing helper)
β βββ WasteClassifierService.cs (Hugging Face API + Local deterministic fallback)
β
βββ wwwroot/
β βββ css/site.css (Glassmorphism styles, dark/light bootstrap colors)
β βββ js/site.js (Theme toggler, live notification polling)
β βββ uploads/ (User file directories for avatars and waste files)
β
βββ Database/
βββ schema.sql (Tables, Constraints, Indexes)
βββ stored_procedures.sql (All Stored Procedures)
βββ seed_data.sql (Default roles, categories, news, tips, badges, rewards)
sqlcmd)Ensure LocalDB is started and execute the SQL scripts sequentially from the project root:
# Start LocalDB MSSQLLocalDB
sqllocaldb start MSSQLLocalDB
# 1. Execute Schema Creation
sqlcmd -S "(localdb)\MSSQLLocalDB" -E -i Database/schema.sql
# 2. Register Stored Procedures
sqlcmd -S "(localdb)\MSSQLLocalDB" -E -i Database/stored_procedures.sql
# 3. Seed Database Contents
sqlcmd -S "(localdb)\MSSQLLocalDB" -E -i Database/seed_data.sql
Open appsettings.json and ensure the connection string points to EcoRecycleDb:
"ConnectionStrings": {
"DefaultConnection": "Server=(localdb)\\MSSQLLocalDB;Database=EcoRecycleDb;Integrated Security=True;Encrypt=False;TrustServerCertificate=True;"
}
Restore, build, and run the application locally:
dotnet restore
dotnet build
dotnet run --project EcoRecycle
Open http://localhost:5000 (or https://localhost:5001) in your browser.
We implement smart configurations for API keys under Admin -> System Settings:
hf_...) to connect with ResNet-50.bottle.jpg yields Plastic Bottle with 94.2% confidence), enabling seamless local testing.You can deploy directly to Azure App Service using GitHub Actions. Add the following YAML workflow to .github/workflows/deploy.yml:
name: Deploy EcoRecycle to Azure
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Restore dependencies
run: dotnet restore
- name: Build Project
run: dotnet build --configuration Release --no-restore
- name: Publish Artifacts
run: dotnet publish --configuration Release --output ./publish
- name: Deploy to Azure App Service
uses: azure/webapps-deploy@v3
with:
app-name: 'EcoRecycle-App' # Substitute with your Azure App Service Name
publish-profile: ${{ secrets.AZURE_PUBLISH_PROFILE }}
package: ./publish
[ValidateAntiForgeryToken]).SqlParameter collections.ClaimTypes.Role) mapped to controllers ([Authorize(Roles = "...")]).