smartfarming-mobile/README.md

99 lines
4.0 KiB
Markdown
Raw Normal View History

2024-10-09 02:05:52 +00:00
# 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
2024-12-30 04:06:21 +00:00
git clone https://gitlab.com/profile-image/kedaireka/smartfarming/mobile-smartfarming.git
2024-10-09 02:05:52 +00:00
```
2024-12-30 04:06:21 +00:00
2. Navigate to the flutter project directory:
2024-10-09 02:05:52 +00:00
```bash
2024-12-30 04:06:21 +00:00
cd agrilink_vocpro
2024-10-09 02:05:52 +00:00
```
3. Install dependencies:
```bash
flutter pub get
```
if it does't work try:
```bash
2024-10-10 09:38:27 +00:00
flutter outdated
2024-12-30 04:06:21 +00:00
// follow with
2024-10-10 09:38:27 +00:00
flutter pub upgrade --major-versions
2024-10-09 02:05:52 +00:00
```
or check your latest dart version make sure it compatible with this project
2024-12-30 04:06:21 +00:00
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
```
2024-10-09 02:05:52 +00:00
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.
2024-12-30 04:06:21 +00:00
- `core/`: Contains all constant value and data needed for the project.
- `data/`: Contains model and data response
2024-10-09 02:05:52 +00:00
- `domain/`: logic and service of the application
- `feature/`: Contains every feature in the app
2024-12-30 04:06:21 +00:00
- `provider/`: Contains a function to integrate with domain layer
- `view` : contains the main screen UI code
- `widget` : conatins the widget UI code
2024-10-09 02:05:52 +00:00
- `pubspec.yaml`: Project dependencies and configurations.
2024-08-05 08:16:46 +00:00
## Contributing
2024-10-09 02:05:52 +00:00
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.
2024-08-05 08:16:46 +00:00
## License
2024-10-09 02:05:52 +00:00
This project is licensed under the MIT License.