FarmPulse is a smart farming system that automates irrigation, manure application, and pump control using IoT sensors, a Web3 backend, and decentralized smart contracts on the Stellar blockchain. FarmPulse solves the key challenges of traditional farming by automating irrigation, manure application, and pump control. It eliminates inconsistent watering, labor-intensive fertilizing, and inefficient manual pump operations. By integrating these systems, FarmPulse ensures precise, timely delivery of water and nutrients based on crop needs. This reduces waste, improves yields, and saves time and labor. The system also enables real-time monitoring and alerts, helping farmers respond quickly to issues like dry soil or system failures. FarmPulse brings smart, efficient, and sustainable farming to life, making modern agriculture more productive and less dependent on manual intervention.
FarmPulse stands out by offering a fully integrated, smart farming solution that automates irrigation, manure application, and pump control—all in one system. Unlike traditional systems that manage each function separately, FarmPulse synchronizes them using real-time data and sensors for precise water and nutrient delivery. Its user-friendly interface and remote monitoring capabilities allow farmers to control and optimize operations from anywhere. FarmPulse reduces manual labor, conserves resources, and maximizes crop yield with minimal effort. Its modular design makes it adaptable for small to large farms, and its data-driven approach ensures consistent, sustainable farming with smarter decision-making.
- Real-time irrigation and manure distribution using ESP8266 sensors.
- Secure authentication using Stellar wallets and Web3 integration.
- Smart contract automation with Stellar smart contracts.
- Real-time data handling via WebSockets.
- Modern React frontend with multiple pages and analytics.
- Middleware backend (Node.js/Express) as a bridge between devices and blockchain.
- Transparent and verifiable records on-chain.
- Advanced analytics and monitoring dashboard.
- Responsive design with Tailwind CSS.
- Cost tracking and performance metrics.
| Layer | Technology |
|---|---|
| Blockchain | Stellar Smart Contracts |
| Web3 Tools | Stellar SDK, React Context |
| Frontend | React.js, React Router, Tailwind CSS |
| IoT | ESP8266 (Wi-Fi-based) |
| Backend | Node.js + Express.js + WebSockets |
| Charts | Recharts, Lucide React |
| Authentication | Stellar Wallet Integration |
| Storage | Optional: MongoDB / IPFS |
- Node.js (v16+)
- Git
- Stellar wallet (e.g., Freighter, Albedo)
- Yarn or npm
git clone https://github.com/yourusername/farmpulse.git
cd farmpulse
cd backend
npm install
cd ../frontend
npm installCreate a .env file in both /backend and /frontend:
Backend (.env):
STELLAR_SECRET_KEY=your_stellar_secret_key
STELLAR_NETWORK=testnet
PORT=4000
Frontend (.env):
VITE_STELLAR_NETWORK=testnet
VITE_BACKEND_URL=http://localhost:4000
VITE_WS_URL=ws://localhost:4000
Start Backend (WebSocket + REST API):
cd backend
node index.jsStart Frontend (React):
cd ../frontend
npm startESP8266 -> Wi-Fi -> Express Backend (Node.js) -> WebSocket -> React Frontend | Stellar SDK | Stellar Smart Contracts
- Migrated from StarkNet to Stellar blockchain
- Lower transaction fees and faster confirmations
- Better wallet integration options
- Completely redesigned frontend with Tailwind CSS
- Multiple pages: Dashboard, Farm Control, Analytics, Settings
- Real-time charts and data visualization
- Responsive design for all devices
- Water usage tracking and cost analysis
- Moisture level trends and predictions
- Pump activity monitoring
- Export functionality for data analysis
- Individual farm management
- Batch operations for multiple farms
- Automated irrigation scheduling
- Real-time alerts and notifications
farmpulse/
├── backend/ # Express server + WebSocket + Stellar SDK
│ ├── routes/
│ │ └── api.js # API endpoints with Stellar integration
│ ├── websocket/
│ │ └── socketServer.js
│ ├── stellar/
│ │ └── contractManager.js # Stellar contract management
│ └── index.js
├── frontend/ # React frontend with Stellar integration
│ ├── src/
│ │ ├── components/
│ │ │ └── Navbar.js
│ │ ├── contexts/
│ │ │ └── StellarContext.js # Stellar wallet context
│ │ ├── pages/
│ │ │ ├── Dashboard.js
│ │ │ ├── FarmControl.js
│ │ │ ├── Analytics.js
│ │ │ └── Settings.js
│ │ ├── utils/
│ │ │ └── stellarWallet.js
│ │ ├── App.js
│ │ └── index.js
│ ├── tailwind.config.js
│ └── postcss.config.js
├── iot/ # ESP8266 firmware code
│ └── main.ino
└── README.md
POST /api/sensor- Receive sensor data from ESP8266GET /api/farm/:farmId- Get farm record from StellarPOST /api/farm- Create new farm record on Stellar
- Real-time sensor data broadcasts
- Transaction confirmations
- System alerts and notifications
The system uses Stellar smart contracts for:
-
Farm Record Management
- Create farm records with sensor data
- Update irrigation status
- Track ownership and permissions
-
Transaction Logging
- Immutable record of all farming operations
- Cost tracking and audit trails
- Performance metrics storage
We welcome all contributions!
- Fork the repo
- Create a new branch
git checkout -b feature/your-feature-name
- Make your changes
- Commit with clear messages
git commit -m "Add: Stellar wallet integration" - Push and open a Pull Request
This project is licensed under the ISC License - see the package.json file for details.