This project simulates an agri-tech drone system for monitoring plant health. It uses a microservices architecture implemented in a Nx monorepo, featuring drone simulation, real-time data processing, and a web client for visualization.
- Drone simulation with realistic movement and battery depletion
- Plant health monitoring
- Real-time data transmission using MQTT
- RESTful API for data retrieval
- Web client for data visualization
- Nx: Monorepo management
- TypeScript: Primary language
- Node.js: Runtime environment
- Express: API server
- React: Web client
- MQTT: Message broker for real-time communication
agri-tech-drone-project/ ├── apps/ │ ├── api/ # Express API server │ ├── simulation/ # Drone simulation service │ └── web-client/ # React web application ├── libs/ │ ├── shared-types/ # Shared TypeScript interfaces │ ├── mqtt-client/ # MQTT client library │ └── data-processing/ # Data processing utilities ├── tools/ ├── nx.json ├── package.json └── tsconfig.base.json
- Node.js (v14+)
- npm (v6+)
- MQTT broker (e.g., Mosquitto)
-
Clone the repository: git clone https://github.com/akakiplimo/agri-tech-drone-project.git cd agri-tech-drone-project
-
Install dependencies: npm install
-
Set up environment variables: Create a
.env
file in the root directory with the following content: MQTT_BROKER_URL=mqtt://localhost:1883 API_PORT=3333
-
Start the MQTT broker (e.g., Mosquitto)
-
Run the API server: nx serve api
-
Run the simulation service: nx serve simulation
-
Run the web client: nx serve web-client
-
Access the web client at
http://localhost:4200
-
To generate a new library: nx g @nrwl/node:library my-new-lib
-
To generate a new application: nx g @nrwl/node:application my-new-app
-
To run tests: nx test
-
To run linting: nx lint
For deployment instructions, please refer to the DEPLOYMENT.md
file.
Please read CONTRIBUTING.md
for details on our code of conduct and the process for submitting pull requests.
This project is licensed under the MIT License - see the LICENSE.md
file for details.
- Nx team for the excellent monorepo tools
- MQTT.js contributors for the robust MQTT client library
- All contributors and maintainers of this project