ClyCites API is a comprehensive agricultural management platform that provides a suite of services for modern farming operations. This API serves as the backend infrastructure for managing farms, crops, livestock, weather monitoring, and agricultural intelligence.
-
Farm Management
- Complete farm operations tracking
- Crop and livestock management
- Farm worker coordination
- Smart farming capabilities
-
Weather & Alerts
- Real-time weather monitoring
- Customizable farm alerts
- Weather-based recommendations
-
AI & Analytics
- AI-powered recommendations
- Daily farming assistance
- Predictive analytics
- Price monitoring
-
Team & Organization
- Multi-user support
- Role-based access control
- Team collaboration features
- Organization management
The ClyCites API is built using a microservices architecture, where each service is responsible for specific functionality. This design ensures scalability, maintainability, and separation of concerns. Below is a detailed breakdown of each service and its components:
ClyCites-api/
βββ agricasst/ # Agriculture Assistant Service
β βββ app/
β β βββ controllers/ # Request handlers
β β βββ models/ # Data models
β β βββ routes/ # API endpoints
β β βββ services/ # Business logic
β β βββ utils/ # Helper functions
β βββ config/ # Service configuration
β βββ middleware/ # Custom middlewares
β
βββ auth/ # Authentication Service
β βββ controllers/ # Auth controllers
β βββ models/ # User and token models
β βββ middlewares/ # Auth middlewares
β βββ routes/ # Auth endpoints
β
βββ analytics/ # Analytics Service
βββ ml-predict/ # Machine Learning Service
βββ price-monitoring/ # Price Monitoring Service
βββ sampling-data/ # Data Sampling Service
βββ wcapi/ # Web API Service
The project is organized into several microservices:
- Core agricultural management service that handles:
- Crop lifecycle management (planting, monitoring, harvesting)
- Farm resource allocation and scheduling
- Equipment and inventory tracking
- Soil health monitoring and recommendations
- Irrigation management and scheduling
- Pest and disease monitoring
- Yield forecasting and optimization
- RESTful API endpoints for:
/crops: Crop management and monitoring/resources: Farm resource management/schedules: Agricultural activity scheduling/soil: Soil health data and analysis/irrigation: Irrigation system control/pests: Pest and disease tracking
- Data analysis and reporting
- Performance metrics and insights
- Agricultural trends analysis
- User authentication and authorization
- API token management
- Role-based access control
- Security middleware
- Machine learning models for agriculture
- Crop yield predictions
- Weather pattern analysis
- Smart farming recommendations
- Agricultural market price tracking
- Price trend analysis
- Market insights
- Data collection and sampling
- Statistical analysis
- Quality assurance
- Web-facing API endpoints
- External integrations
- API documentation
- Node.js
- MongoDB
- Docker (for containerized deployment)
-
Clone the repository: ```bash git clone https://github.com/olivierndanyuzwe/ClyCites-api.git ```
-
Install dependencies for each service: ```bash cd ClyCites-api for dir in */; do cd "$dir" npm install cd .. done ```
-
Configure environment variables:
- Copy the example .env files in each service directory
- Update with your specific configuration
Each service can be run independently or using Docker Compose:
```bash
docker-compose up
cd auth npm start ```
- JWT-based authentication
- Rate limiting
- API key authentication
- Role-based access control
API documentation is available for each service. After starting the services, you can access the documentation at:
- Authentication API:
/auth/api-docs - Agriculture Assistant:
/agricasst/api-docs - Weather API:
/wcapi/api-docs
We welcome contributions! Please see our contributing guidelines for details.
This project is licensed under the MIT License - see the LICENSE file for details.
For support and queries, please create an issue in the repository or contact the development team.
Built with β€οΈ by the ClyCites Team