For detailed system architecture refer to docs folder
This is a modern monitoring system for Agriculture leveraging modern web, AI, ML, and backend technologies to monitor, analyze, and automate agriculture operations.
It is built using a full-stack, cloud-native approach with technologies like FastAPI, Next.js, Docker, Supabase, and more.
Smart farm is a web-based livestock management system that helps dairy farmers digitize animal health, reproduction, and farm record-keeping.
The platform enables farmers to track breeding cycles, health events, treatments, and expenses to improve productivity and reduce preventable losses.
- 🌱 Smart farm data collection and visualization
- 📡 API endpoints for future advancementments to sensors and drones
- 📊 Real-time dashboards and analytics
- 🔐 Secure authentication and role-based access
- 🔁 CI/CD for automated testing and deployment
- 🌐 Scalable infrastructure using Docker and cloud platforms
- python 3.9 and above
- FastAPI - High-performance API
- Uvicorn - ASGI server
- Node.js - backend components
- Alembic - handling db migrations
- Gunicorn - WSGI HTTP server for production
- SQLAlchemy - ORM for database operations
- Pydantic - Data validation and settings management
- Redis - Caching and real-time data handling
- Next.js 14
- TypeScript
- Tailwind CSS – Utility-first CSS framework
- DaisyUI
- Docker – Containerization
- NGINX – Reverse proxy, load balancer and frontend static file serving
- GitHub Actions – CI/CD automation
- Render - backend hosting
- supabase - postgre db
- Neon - Postgre db
- vercel - frontend hosting
- Firebase - frontend hosting
- service worker - for WPA
- Black - Code formatting
- isort - Import statement organization
- Ruff - Extremely fast Python linter
- mypy - Static type checking
- Bandit - Security linter for Python
- pre-commit hooks - Automated code quality checks
- pytest - Testing framework
- Coverage.py - Code coverage analysis
- Docker + Docker Compose
- Git
- Optional: Python (for local FastAPI dev), Node.js (for local frontend dev)
- Ensure you configure .env file as most services won't work without it
# Clone the repository
git clone https://github.com/samnjoro30/Smart_Agriculture.git
cd Smart_Agriculture
docker-compose up --build# backend folder
cd backend
# create virtual environment (if not already created)
uv venv --python 3.11
# activate environment
source .venv/bin/activate
# install dependencies
uv sync
# run backend server
uvicorn API:app --reload# navigate to frontend structure
cd frontend
pnpm install
pnpm run dev cd backend
# make sure redis is running before running celery worker
celery -A worker.celery_app worker \
--loglevel=info \
-Q livestock_service,default- for folder structure check out on docs/structure.md
Bandit - f or security linting
-
🌦️ Weather API integration
-
📍 GPS-based crop tracking
-
🤖 ML-based yield prediction
-
📲 Progressive Web App (PWA) support
-
Mobile App built on flutter