Skip to content

Repository files navigation

MedScan

AI-assisted Android app for staged skin-lesion analysis with a focused workflow for cutaneous leishmaniasis screening support.

What was improved

This repository has been updated with a broad quality pass focused on:

  • cleaner and more polished Compose UI
  • stronger localization support for English, French, and Arabic
  • improved accessibility labels and reduced hardcoded UI text
  • safer Gemini networking defaults for medical/privacy-sensitive requests
  • better image handling and downscaling before upload
  • clearer analysis, history, tracker, and profile flows
  • more structured PDF export output
  • safer file provider usage and general code cleanup

Local setup

Prerequisites

  • Android Studio
  • a valid Gemini API key
  • Firebase configured if you want authentication features enabled

1) Open the project

Open the repository folder in Android Studio.

2) Add a local .env file

Create a .env file in the project root:

GEMINI_API_KEY=YOUR_GEMINI_API_KEY

A sample file is already provided in .env.example.

3) Sync Gradle

Let Android Studio import and sync the project.

4) Run the app

Run on an emulator or a physical device.

Notes

  • .env is gitignored and should not be committed.
  • The app stores patient profile details locally on-device for reuse in future scans.
  • The output is informational only and must not be treated as a confirmed medical diagnosis.

GitHub Actions CI

Two workflows are included:

  • .github/workflows/android-ci.yml
  • .github/workflows/android-release.yml

1) Debug CI workflow

The debug workflow runs on:

  • every push
  • every pull request
  • manual workflow dispatch

What it does:

  • installs Java and Android SDK dependencies
  • restores the debug keystore from debug.keystore.base64
  • creates .env from the GEMINI_API_KEY GitHub secret if available, otherwise falls back to .env.example
  • builds the debug APK
  • uploads the generated APK as a GitHub Actions artifact

2) Release workflow

The release workflow runs on:

  • version tags like v1.0.0
  • manual workflow dispatch

What it does:

  • restores the release keystore from a GitHub secret
  • builds the signed release APK and release AAB
  • uploads both as GitHub Actions artifacts
  • automatically creates a GitHub Release when the push is a version tag such as v1.0.0

Required repository secrets

Add these secrets in your GitHub repository settings:

  • GEMINI_API_KEY (recommended)
  • KEYSTORE_BASE64
  • STORE_PASSWORD
  • KEY_PASSWORD
  • KEY_ALIAS (optional, defaults to upload)

Path:

  • GitHub → Repository → Settings → Secrets and variables → Actions → New repository secret

How to create KEYSTORE_BASE64

Convert your release keystore into base64, then paste the output into the GitHub secret:

base64 my-upload-key.jks > keystore.base64

On Linux/macOS, this is usually enough. On some systems you may prefer:

base64 -w 0 my-upload-key.jks

How to publish a GitHub Release automatically

Create and push a version tag:

git tag v1.0.0
git push origin v1.0.0

That will trigger the release workflow and publish the generated APK/AAB to the GitHub Release page.

Main app areas

  • Scan: capture/upload image and run the 2-stage analysis
  • History: review saved scans and export reports to PDF
  • Tracker: compare scans over time
  • Profile: authentication, local patient profile, and language selection
  • About: educational information about leishmaniasis

About

Prototype app

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages