99 lines
4.0 KiB
Markdown
99 lines
4.0 KiB
Markdown
# Agrilink Vocpro (Smart Farming Application)
|
|
|
|
A mobile application for managing and monitoring greenhouse conditions with IoT devices using Flutter.
|
|
|
|
## Overview
|
|
This application enables user to monitor greenhouse conditions and control devices like water valves via an IoT interface. The app retrieves data from various sensors (humidity, temperature, etc.) and allows manual control of devices through MQTT.
|
|
|
|
## Features
|
|
- Monitor sensor data (humidity, temperature, light intensity, etc.)
|
|
- Control IoT devices (water valves, lights)
|
|
- User authentication and profile management
|
|
- MQTT integration for real-time data communication (via Rest API)
|
|
|
|
## Technology Stack
|
|
- Flutter (Mobile Framework)
|
|
- MQTT (IoT communication)
|
|
- REST API (Backend communication)
|
|
- GitLab/GitHub for version control
|
|
|
|
## Flutter Dependency Stack
|
|
|
|
This project uses several packages to support various functionalities. Below is a list of the key dependencies:
|
|
|
|
- **[Dio](https://pub.dev/packages/dio)**: A powerful HTTP client for Dart, used for integrating with the API backend.
|
|
- **[shared_preferences](https://pub.dev/packages/shared_preferences)**: A package for storing simple data persistently across sessions (e.g., token management).
|
|
- **[intl](https://pub.dev/packages/intl)**: Provides internationalization and localization support, including date formatting and number formatting.
|
|
- **[go_router](https://pub.dev/packages/go_router)**: A declarative routing package used for managing navigation between screens.
|
|
- **[bootstrap_icons](https://pub.dev/packages/bootstrap_icons)**: A package that provides Bootstrap icons for UI components.
|
|
- **[fl_chart](https://pub.dev/packages/fl_chart)**: A powerful chart library for visualizing data in different formats, used for sensor data graphing.
|
|
- **[flutter_screenutil](https://pub.dev/packages/flutter_screenutil)**: A package to manage screen size responsiveness, ensuring the app looks good on different device resolutions.
|
|
- **[gauge_indicator](https://pub.dev/packages/gauge_indicator)**: A widget for visualizing sensor data (e.g., humidity, temperature) with gauge indicators.
|
|
- **[mqtt_client](https://pub.dev/packages/mqtt_client)**: A library used for MQTT integration, enabling real-time communication between the app and IoT devices.
|
|
|
|
|
|
## Installation Guide
|
|
1. Clone the repository:
|
|
```bash
|
|
git clone https://gitlab.com/profile-image/kedaireka/smartfarming/mobile-smartfarming.git
|
|
```
|
|
2. Navigate to the flutter project directory:
|
|
```bash
|
|
cd agrilink_vocpro
|
|
```
|
|
3. Install dependencies:
|
|
```bash
|
|
flutter pub get
|
|
```
|
|
if it does't work try:
|
|
```bash
|
|
flutter outdated
|
|
// follow with
|
|
flutter pub upgrade --major-versions
|
|
```
|
|
or check your latest dart version make sure it compatible with this project
|
|
|
|
project tool version
|
|
|
|
```
|
|
• Flutter version 3.27.0-1.0.pre.685
|
|
• Upstream repository https://github.com/flutter/flutter.git
|
|
• Framework revision 227f6a04f7, 2024-12-03 13:21:59 +0100
|
|
• Engine revision f9d4f744e0
|
|
• Dart version 3.7.0 (build 3.7.0-207.0.dev)
|
|
• DevTools version 2.41.0
|
|
```
|
|
|
|
4. Run the project:
|
|
```bash
|
|
flutter run
|
|
```
|
|
|
|
### 6. **Project Structure**
|
|
Berikan deskripsi singkat tentang struktur folder dan file penting di dalam proyek.
|
|
|
|
|
|
## Project Structure
|
|
- `lib/`: Contains the Flutter app source code.
|
|
- `core/`: Contains all constant value and data needed for the project.
|
|
- `data/`: Contains model and data response
|
|
- `domain/`: logic and service of the application
|
|
- `feature/`: Contains every feature in the app
|
|
- `provider/`: Contains a function to integrate with domain layer
|
|
- `view` : contains the main screen UI code
|
|
- `widget` : conatins the widget UI code
|
|
- `pubspec.yaml`: Project dependencies and configurations.
|
|
|
|
|
|
|
|
## Contributing
|
|
1. Fork the repository.
|
|
2. Create a new branch (`git checkout -b feature/your-feature`).
|
|
3. Commit your changes (`git commit -m 'Add your feature'`).
|
|
4. Push to the branch (`git push origin feature/your-feature`).
|
|
5. Open a Pull Request.
|
|
|
|
|
|
## License
|
|
This project is licensed under the MIT License.
|