App Setup
Last updated
Was this helpful?
Last updated
Was this helpful?
Database (DB) Restore (Providing a DB backup to avoid hassle since the automation of the seed data creation is a work in progress):
To restore the database, you can access the DB dump file. Use the following link to download the SQL file.
Run Kubectl, and copy cmd to copy the file to the server (playground pod where DB runs).
Execute the restore command inside the playground pod.
Once the DB is restored, redeploy the MDMS service, persister, and indexer services using the config flag since we have updated a few links in the DevOps repository.
The Postgres version should be 14.8 or later.
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:
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 the IDE is configured with the Flutter and Dart plugins.
Run install_bricks.sh bash script which is located in the tools folder.
Navigate to the root folder of the project in the terminal and run the following command to initialise the packages using Melos:
melos bootstrap
(-or-)
melos bs
This command fetches and links all the necessary dependencies for the project.
Now, 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:
Note: Check that all the folder names are present in the packages folder before overriding the dependencies.
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:
Navigate to the root folder of the project in the terminal and run the following command:
melos clean
melos bs
After successfully running melos bs, navigate to the apps/health_campaign_field_worker_app folder in the terminal and run the following command to generate the APK:
flutter build APK --release
How to change the master data: 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:
Replace the {URL} with the required environment.
Get the {authToken} of SUPER_USER.
Replace the {tenantId} with the required tenant.
Each message object should have a unique code and module.
Sample message to upsert:
Link for Localisation:
Flutter 3.10.0 version -
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’s Localisation: