Skip to content

vthanhsang/test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 

Repository files navigation

🧡 Charity Application

📌 Overview

Charity Application is a donation management system designed specifically for administrators. The app provides powerful features to manage inventory, monitor device connectivity, and track order activities effectively and intuitively.


🚀 Key Features

  • 🧾 Order History Management: View detailed donation requests including recipient info, order time, status, and requested items.
  • 📉 Low Stock Monitoring: Automatically detect and notify when product inventory is low.
  • 📦 Stock-In Management: Track newly added products to the warehouse.
  • 🖥️ Device Online/Offline Monitoring: Monitor the connectivity status of remote IoT devices or distribution points.

🛠️ Technologies Used

  • Flutter – SDK for developing cross-platform apps (Android, iOS, Web, Desktop) using Dart.
  • VS Code – Lightweight IDE for Flutter/Dart development.
  • DBoard / Thingsboard – Middleware platform for IoT data processing and device management.
  • Firebase – Enables push notifications for Android and iOS platforms.
  • Android Studio – Official IDE to build and test Android apps.
  • Xcode – Required for building and deploying iOS applications.

⚙️ Environment Setup & Run


🐧 On Linux (Ubuntu 22.04) – For Android Build

Environment Version

  • Android Studio :Android Studio Narwhal | 2025.1.1
  • OS: Ubuntu 22.04
  • Git installed
  • Flutter version: 3.32.2

1️⃣ Install Android Studio

sudo apt update
sudo snap install android-studio --classic

After installation:

  1. Open Android Studio → Create any sample project
  2. Navigate to File > Settings > Languages & Frameworks > Android SDK
  3. Go to the SDK Tools tab and check the following:
    • ✅ Android SDK Command-line Tools (latest)
    • ✅ Android SDK Build-Tools
    • ✅ Android SDK Platform-Tools
    • ✅ Android Emulator (if using virtual device)
  4. Click Apply → Wait for download → Click OK

2️⃣ Install Flutter:

sudo snap install flutter --classic

Check if Flutter is installed properly:

flutter doctor 

If Android toolchain is missing, run:

flutter doctor --android-licenses  

(Then press y to accept all licenses.)

Connect your Android phone via USB and verify the device is recognized:

flutter devices

3️⃣ Install VS Code (optional):

sudo snap install code --classic

Then:

  • Open VS Code → Press Ctrl + Shift + X
  • Search and install:
    • Flutter
    • Dart

▶️ Run to build app on Android

Clone source code:

git clone https://git.d-soft.com.vn/dng.pj0018.iot.lab/development/charitysystem/charity-application.git

Open source:

cd charity-application
code .

Connect your phone via USB and run:

flutter clean
flutter pub get
flutter run

Wait for the build to complete and install the app on your device.
Note: You can download following:
Youtube: https://www.youtube.com/watch?v=5cVOnXchj2g


🍏 On macOS / For iOS

1️⃣ Install Flutter SDK

Follow the official installation guide:
https://flutter.dev/docs/get-started/install/macos

Or install via Homebrew:

brew install --cask flutter
flutter doctor

2️⃣ Install Visual Studio Code & Plugins

brew install --cask visual-studio-code
sudo gem install cocoapods

After installation, open VS Code → go to Extensions (Ctrl+Shift+X) and install the following:

  • Flutter
  • Dart

3️⃣ Install Xcode & Command Line Tools

  1. Open the App Store, search for Xcode, and click Install
  2. Then run:
xcode-select --install
sudo xcode-select --switch /Applications/Xcode.app
sudo xcodebuild -runFirstLaunch

▶️ Run to build app on IOS

Clone from Git

git clone https://git.d-soft.com.vn/dng.pj0018.iot.lab/development/charitysystem/charity-application.git
cd charity-application

Install iOS Dependencies (CocoaPods)

cd ios
pod install
cd ..

Open with Xcode

open ios/Runner.xcworkspace

Xcode Configuration

Step 1: Configure Signing

  • In Xcode, select Runner → Target → Signing & Capabilities
  • Change the Bundle Identifier to:
    com.example.appCharity
    
    ✅ Choose Team (Free Apple ID is still free)
  • Ensure iOS Deployment Target is set to at least iOS 12.0

Step 2: Enable Background Modes

  • In the Signing & Capabilities tab, click the + Capability button.
  • Add Background Modes
  • Tick the following options:
    • ✅ Background fetch
    • ✅ Remote notifications
    • ✅ Background processing

After finish configuration, back to VScode and run

flutter clean
flutter pub get
flutter run

Or you can build in Xcode by click ▶️

Edit Podfile to enable iOS 12.0:

  • Open file ios/Podfile
  • Find line # platform :ios, '12.0'
  • Remove #
  • Save file and run back
flutter clean
flutter pub get
flutter run

Optional: Build Release Version for iOS (Replace flutter run to)

flutter build ios --release

About

no service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published