Skip to content

This app is designed to render DHIS2 data entry forms in an accordion structure to ease the entry process of custom forms on Android.

License

Notifications You must be signed in to change notification settings

Ex057/TheSimpleDataEntry

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Data Entry (DHIS2 Android)

Platform Kotlin Compose Status Build License

Simple Data Entry is a native Android client for DHIS2 focused on fast, reliable data capture in low-connectivity environments. It supports dataset reporting, standalone event capture, and tracker workflows with consistent card-based screens, offline caching, and deliberate, user-controlled sync. Developed by HISP Uganda.

Highlights

  • Dataset reporting with sectioned entry, validation, and clear status feedback
  • Event programs with card and line-list views, creation, and editing
  • Tracker programs with enrollments, stage events, and profile details
  • Offline-first behavior with cached metadata and locally stored drafts
  • Manual and login-time sync flows to avoid surprise bandwidth usage

Tech stack

  • Kotlin + Jetpack Compose (UI)
  • DHIS2 Android SDK + Rules Engine
  • MVVM + StateFlow + repositories
  • Hilt (DI), Room (offline persistence), WorkManager (background sync)

Project layout

  • app/ - Android application source (Compose UI, ViewModels, repositories)

Architecture at a glance

  • Presentation layer: Compose screens + ViewModels, navigation in app/src/main/java/com/ash/simpledataentry/navigation
  • Domain layer: use cases and models under app/src/main/java/com/ash/simpledataentry/domain
  • Data layer: repositories + Room + sync services under app/src/main/java/com/ash/simpledataentry/data
  • Sync: WorkManager-backed background sync plus a foreground sync service for explicit user actions

Flow diagram

flowchart LR
  User[User] --> UI[Compose Screens]
  UI --> VM[ViewModels]
  VM --> UC[Use Cases]
  UC --> Repo[Repositories]
  Repo --> DB[(Room)]
  Repo --> SDK[DHIS2 SDK]
  SDK --> API[(DHIS2 Server)]
  Repo --> Sync[WorkManager / Sync Service]
  Sync --> API
Loading

Getting started

Prerequisites:

  • Android Studio (Giraffe or newer) with Android SDK
  • JDK 17+ (Android Studio bundled JDK 21 works)

Build debug APK:

./gradlew assembleDebug

Run on a device or emulator:

  • Open the project in Android Studio and press Run

Screenshots

Authentication

Login Sync Progress
Login Loading

Home & Navigation

Home - All Programs Datasets Tab
Home Datasets

Dataset Data Entry

Dataset Instances Data Entry Form
Instances Entry Form
Nested Accordions Radio Options
Accordions Radio
Validation Unsaved Changes
Validation Unsaved

Tracker Programs

Enrollment List Tracker Dashboard

Enrollments Dashboard
Events Summary Events Table
Events Events Table
Tracked Entity Profile
Profile

Distribution (GitHub Actions)

Release builds are automated via .github/workflows/release.yml and attach APK + AAB artifacts to a GitHub Release on tag push.

Set GitHub Secrets:

  • ANDROID_KEYSTORE_BASE64 - base64 of your *.jks file
  • ANDROID_KEYSTORE_PASSWORD
  • ANDROID_KEY_ALIAS
  • ANDROID_KEY_PASSWORD

Example to create the base64 payload:

base64 < /path/to/keystore.jks

Create a release:

git tag v1.0.0
git push origin v1.0.0

Artifacts:

  • APK: app/build/outputs/apk/release/app-release.apk
  • AAB: app/build/outputs/bundle/release/app-release.aab

Configuration

  • local.properties (ignored) holds your Android SDK path; keep it out of version control.
  • Server credentials are entered at runtime via the login flow; no .env is required.

Testing

Unit tests:

./gradlew test

Instrumentation tests:

./gradlew connectedAndroidTest

Notes

  • Sync is intentionally user-driven after login; datasets and metadata use cached values by default.
  • Event line lists and tracker stage tables may load data values in the background.

Contributing

Issues and PRs are welcome. Please describe the use case, expected behavior, and test coverage.

License

MIT. See LICENSE.

About

This app is designed to render DHIS2 data entry forms in an accordion structure to ease the entry process of custom forms on Android.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Kotlin 79.7%
  • TypeScript 11.8%
  • Java 8.3%
  • Other 0.2%