Setup App
Was this helpful?
Was this helpful?
This guide provides step-by-step instructions to clone and run the Health Campaign Frontline Worker's App locally on your machine. The app is a Flutter application developed for health campaigns.
Before you begin, ensure that you have the following installed on your PC:
Flutter 3.16.5 version -
Android Studio or VS Code, any preferred IDE for Flutter development.
Android device or emulator for testing.
Run the flutter doctor command to ensure all the required checklists are marked.
Open a terminal and run the following commands:
git clone https://github.com/egovernments/health-campaign-field-worker-app.git
cd health-campaign-field-worker-app
Open the project in your preferred IDE (Android Studio, Visual Studio Code). Make sure that your IDE is configured with the Flutter and Dart plugins.
Create a .env file inside the apps/health_campaign_field_worker_app folder.
Sample .env file:
Create another file as pubspec_overrides.yaml in the same folder:
Create another file as pubspec_overrides.yaml in packages/attendance_management/pubspec_overrides.yaml
Create another file as pubspec_overrides.yaml in packages/forms_engine/pubspec_overrides.yaml
Run install_bricks.sh bash script which is located in the tools folder. This script fetches and links all the necessary dependencies for the project.
After successfully running the script and setting up the env file, navigate to the app's folder from the terminal:
cd apps/health_campaign_field_worker_app
Connect your Android device or start an emulator. Ensure that it is visible by running
flutter devices.
Now, run the following command to launch the app:
flutter run.
This command will build the app and install it on the connected device or emulator.
Create a .env file inside the apps/health_campaign_field_worker_app folder.
Sample .env file:
Create another file as pubspec_overrides.yaml in the same folder.
Create another file as pubspec_overrides.yaml in packages/attendance_management/pubspec_overrides.yaml
Create another file as pubspec_overrides.yaml in packages/forms_engine/pubspec_overrides.yaml
Run install_bricks.sh bash script which is located in the tools folder. This script fetches and links all the necessary dependencies for the project.
After successfully running the script and setting up the env file, navigate to - apps/health_campaign_field_worker_app folder in the terminal, and run the following command to generate the APK:
flutter build apk --release --no-tree-shake-icons
After successfully running the above command, the APK will be generated in the path
apps/health_campaign_field_worker_app/build\app\outputs\flutter-apk\app-release.apk
Install the generated APK on your preferred Android device.
All the Master data persist in MDMS under the tenant folders.
App configuration: Primary details required to run the app:
Import the following curl in Postman:
Sample message to upsert:
If the localisation is not executed prior, then -
Product Repo:
Sample: . App master data persist in:
Consist of service register: All the APIs that the app utilises to call the server:
Project types: Details of the projects are listed here:
Additional static configs:
Consolidated: Module Localisation: