FarmIntel-API is a comprehensive farm management and intelligence backend built with Django and Django REST Framework. It provides a robust suite of tools for managing agricultural operations, including crop tracking, disease detection, cooperative management, and financial transactions.
- User & Organization Management: Secure user authentication (JWT) and organization-based access control.
- Crop Management: Track crop lifecycles and data.
- Disease Detection: Integrated machine learning capabilities for plant disease detection (e.g., Tomato Yellow Leaf Curl Virus).
- Cooperatives: Tools for managing agricultural cooperatives.
- Orders & Billing: Complete system for managing orders, billing, and financial transactions.
- Analytics: Data-driven insights for farm productivity.
- Notifications & Emails: Integrated communication system.
- Cloud Storage: Seamless media management using Cloudinary.
- Framework: Django 5.x, Django REST Framework (DRF)
- Authentication: JWT (JSON Web Tokens) via
rest_framework_simplejwt - Database: SQLite (Development) / PostgreSQL (Production ready)
- Storage: Cloudinary
- Utilities:
python-decouplefor configuration management
The project consists of several modular applications:
users: User accounts and authentication.organizations: Farm and organization hierarchy.crops: Crop data management.detector: ML-based plant disease detection.orders: Order processing and tracking.billing: Subscription and billing management.transactions: Financial transaction records.cooperatives: Cooperative group management.analytics: Reporting and data analysis.notifications: In-app and push notifications.emails: Email service integration.
- Python 3.10+
- pip (Python package manager)
git clone https://github.com/your-username/FarmIntel-API.git
cd FarmIntel-API# Windows
python -m venv venv
venv\Scripts\activate
# macOS/Linux
python3 -m venv venv
source venv/bin/activatepip install -r requirements.txtCreate a .env file in the root directory and add the following configuration variables:
SECRET_KEY=your_secret_key
DEBUG=True
# Cloudinary Configuration
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secretpython manage.py migratepython manage.py runserverThe API will be available at http://127.0.0.1:8000/.
The API endpoints are organized by module:
- Admin:
/admin/ - Users:
/users/ - Organizations:
/orgs/ - Billing:
/billing/ - Cooperatives:
/cooperatives/ - Notifications:
/notifications/ - Detector:
/detector/ - Crops:
/crops/ - Analytics:
/analytics/ - Orders:
/orders/ - Transactions:
/transactions/ - Upload:
/upload/
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License.