Skip to content
Fmsticks2Public

About

AgroVault is a decentralized finance (DeFi) platform designed to empower individuals and cooperatives through blockchain-based financial tools. From lending and borrowing to yield farming and staking, AgriVault bridges traditional finance with decentralized innovation, enabling users to grow wealth, access capital, and participate in tokenized.....

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

Β 

History

26 Commits

Folders and files

Repository files navigation

AgroVault - Decentralized Agricultural Finance Platform

AgroVault Logo

AgroVault is a comprehensive decentralized platform built on Aleo blockchain that revolutionizes agricultural finance and supply chain management. The platform connects farmers, investors, and consumers through secure, transparent, and efficient blockchain-based solutions.

🌟 Features

Core Functionality

  • Decentralized Marketplace: Trade agricultural products with smart contract security
  • DeFi Integration: Staking, lending, and yield farming for agricultural assets
  • Supply Chain Tracking: Transparent tracking from farm to consumer
  • Governance System: Community-driven decision making
  • Multi-Wallet Support: Compatible with various Aleo wallets

Advanced Features

  • Real-time Analytics: Market insights and performance metrics
  • Risk Assessment: AI-powered risk analysis for investments
  • Certification Management: Digital certificates for organic and quality standards
  • Cross-border Payments: Seamless international transactions
  • Insurance Integration: Crop insurance and risk mitigation

πŸ—οΈ Architecture

Monorepo Structure

AgroVault/
β”œβ”€β”€ frontend/          # React + Vite frontend application
β”œβ”€β”€ backend/           # Node.js + Express API server
β”‚   └── contracts/     # Aleo smart contracts
β”œβ”€β”€ scripts/           # Deployment and setup scripts
└── docs/             # Documentation

Technology Stack

Frontend

  • React 18+ with TypeScript
  • Vite for build tooling
  • Tailwind CSS for styling
  • Aleo Wallet Adapter for blockchain integration
  • Recharts for data visualization

Backend

  • Node.js with Express.js
  • RESTful API architecture
  • CORS and security middleware
  • Environment-based configuration

Blockchain

  • Aleo blockchain for smart contracts
  • Leo programming language
  • Zero-knowledge proofs for privacy
  • Testnet3 for development

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Git
  • PowerShell (for Windows deployment scripts)

Local Development

  1. Clone the repository

    git clone https://github.com/yourusername/AgroVault.git
    cd AgroVault
  2. Install dependencies

    npm run install:all
  3. Set up environment variables

    # Frontend
    cp frontend/.env.example frontend/.env.local
    
    # Backend
    cp backend/.env.example backend/.env
  4. Start development servers

    npm run dev

    This starts:

🌐 Deployment

Production Deployment

AgroVault is designed for deployment across multiple platforms:

  • Frontend: Vercel (recommended)
  • Backend: Render (recommended)
  • Smart Contracts: Aleo Testnet

Deployment Guide

For detailed deployment instructions, see DEPLOYMENT_GUIDE.md

Quick Deployment Steps

  1. Deploy Smart Contracts

    # Run as Administrator
    .\scripts\setup-aleo.ps1
    .\scripts\deploy-contract.ps1
  2. Deploy Backend to Render

    • Connect GitHub repository
    • Set environment variables
    • Deploy with auto-build
  3. Deploy Frontend to Vercel

    • Import GitHub repository
    • Configure build settings
    • Set environment variables

πŸ“– API Documentation

Backend Endpoints

Health Check

GET /
Response: { "message": "AgroVault API is running" }

Authentication

POST /auth/login
POST /auth/register
POST /auth/logout

Marketplace

GET    /marketplace/products
POST   /marketplace/products
GET    /marketplace/products/:id
PUT    /marketplace/products/:id
DELETE /marketplace/products/:id

Transactions

GET  /transactions
POST /transactions

Analytics

GET /analytics/dashboard
GET /analytics/market-stats

Smart Contract Functions

Marketplace.leo

// Create a new product listing
create_product(name, description, price, category, quantity, harvest_date, certification)

// Purchase a product
purchase_product(product_id, price)

// Update product status
update_product_status(product_id, is_listed)

πŸ”§ Development

Project Scripts

# Development
npm run dev              # Start both frontend and backend
npm run dev:frontend     # Start frontend only
npm run dev:backend      # Start backend only

# Building
npm run build            # Build frontend for production
npm run build:frontend   # Build frontend only

# Installation
npm run install:all      # Install all dependencies
npm run install:frontend # Install frontend dependencies
npm run install:backend  # Install backend dependencies

Environment Variables

Frontend (.env.local)

VITE_API_BASE_URL=http://localhost:5000
VITE_ALEO_NETWORK=testnet3
VITE_ALEO_PROGRAM_ID=marketplace.aleo
VITE_WALLET_NETWORK=testnet3

Backend (.env)

PORT=5000
NODE_ENV=development
CORS_ORIGIN=http://localhost:3000
ALEO_NETWORK=testnet3
ALEO_PROGRAM_ID=marketplace.aleo

πŸ§ͺ Testing

Frontend Testing

cd frontend
npm run test
npm run test:coverage

Backend Testing

cd backend
npm run test

Smart Contract Testing

cd backend/contracts
aleo test

πŸ”’ Security

Security Features

  • Zero-knowledge proofs for transaction privacy
  • Secure smart contract architecture
  • CORS protection
  • Input validation and sanitization
  • Environment variable protection

Security Best Practices

  • Never commit private keys to repository
  • Use environment variables for all secrets
  • Regular dependency updates
  • Security audits for smart contracts

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Guidelines

  • Follow TypeScript best practices
  • Write comprehensive tests
  • Update documentation
  • Follow commit message conventions

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ†˜ Support

Getting Help

Resources

πŸ—ΊοΈ Roadmap

Phase 1 (Current)

  • βœ… Core marketplace functionality
  • βœ… Basic DeFi features
  • βœ… Wallet integration
  • βœ… Deployment infrastructure

Phase 2 (Q3 2025)

  • πŸ”„ Advanced analytics
  • πŸ”„ Mobile application
  • πŸ”„ Insurance integration
  • πŸ”„ Multi-language support

Phase 3 (Q4 2025)

  • πŸ“‹ Cross-chain integration
  • πŸ“‹ AI-powered recommendations
  • πŸ“‹ Advanced governance features
  • πŸ“‹ Enterprise partnerships

πŸ“Š Project Status

Build Status Version License Aleo


Built with ❀️ for the agricultural community

For more information, visit our upcoming page website or follow developer on Twitter.

About

AgroVault is a decentralized finance (DeFi) platform designed to empower individuals and cooperatives through blockchain-based financial tools. From lending and borrowing to yield farming and staking, AgriVault bridges traditional finance with decentralized innovation, enabling users to grow wealth, access capital, and participate in tokenized.....

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages