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.
- 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
- 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
AgroVault/
βββ frontend/ # React + Vite frontend application
βββ backend/ # Node.js + Express API server
β βββ contracts/ # Aleo smart contracts
βββ scripts/ # Deployment and setup scripts
βββ docs/ # Documentation
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
- Node.js 18+
- npm or yarn
- Git
- PowerShell (for Windows deployment scripts)
-
Clone the repository
git clone https://github.com/yourusername/AgroVault.git cd AgroVault -
Install dependencies
npm run install:all
-
Set up environment variables
# Frontend cp frontend/.env.example frontend/.env.local # Backend cp backend/.env.example backend/.env
-
Start development servers
npm run dev
This starts:
- Frontend: http://localhost:3000
- Backend: http://localhost:5000
AgroVault is designed for deployment across multiple platforms:
- Frontend: Vercel (recommended)
- Backend: Render (recommended)
- Smart Contracts: Aleo Testnet
For detailed deployment instructions, see DEPLOYMENT_GUIDE.md
-
Deploy Smart Contracts
# Run as Administrator .\scripts\setup-aleo.ps1 .\scripts\deploy-contract.ps1
-
Deploy Backend to Render
- Connect GitHub repository
- Set environment variables
- Deploy with auto-build
-
Deploy Frontend to Vercel
- Import GitHub repository
- Configure build settings
- Set environment variables
GET /
Response: { "message": "AgroVault API is running" }
POST /auth/login
POST /auth/register
POST /auth/logout
GET /marketplace/products
POST /marketplace/products
GET /marketplace/products/:id
PUT /marketplace/products/:id
DELETE /marketplace/products/:id
GET /transactions
POST /transactions
GET /analytics/dashboard
GET /analytics/market-stats
// 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
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 dependenciesVITE_API_BASE_URL=http://localhost:5000
VITE_ALEO_NETWORK=testnet3
VITE_ALEO_PROGRAM_ID=marketplace.aleo
VITE_WALLET_NETWORK=testnet3PORT=5000
NODE_ENV=development
CORS_ORIGIN=http://localhost:3000
ALEO_NETWORK=testnet3
ALEO_PROGRAM_ID=marketplace.aleocd frontend
npm run test
npm run test:coveragecd backend
npm run testcd backend/contracts
aleo test- Zero-knowledge proofs for transaction privacy
- Secure smart contract architecture
- CORS protection
- Input validation and sanitization
- Environment variable protection
- Never commit private keys to repository
- Use environment variables for all secrets
- Regular dependency updates
- Security audits for smart contracts
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow TypeScript best practices
- Write comprehensive tests
- Update documentation
- Follow commit message conventions
This project is licensed under the MIT License - see the LICENSE file for details.
- π Documentation
- π Issue Tracker
- π¬ Discussions
- β Core marketplace functionality
- β Basic DeFi features
- β Wallet integration
- β Deployment infrastructure
- π Advanced analytics
- π Mobile application
- π Insurance integration
- π Multi-language support
- π Cross-chain integration
- π AI-powered recommendations
- π Advanced governance features
- π Enterprise partnerships
Built with β€οΈ for the agricultural community
For more information, visit our upcoming page website or follow developer on Twitter.