Nx workspace with two Android apps: provider-app and customer-app (Jetpack Compose, Kotlin).
Prerequisites
- Node.js (LTS)
- Yarn (v4; enable with
corepack enableif needed) - Android Studio (or Android SDK + emulator / device with USB debugging)
1. Install dependencies
From the repository root:
yarn installThe workspace uses Yarn 4 (see packageManager in package.json). There are no scripts in package.json for the Android apps—invoke Gradle through Nx with yarn nx … as below. Nx is configured in nx.json; app targets live in each app’s project.json (e.g. build, installDebug).
2. Build an app
# Provider app
yarn nx build provider-app
# Customer app
yarn nx build customer-app3. Install and run on a device or emulator
Start an Android emulator or connect a device, then:
# Provider app
yarn nx run provider-app:installDebug
# Customer app
yarn nx run customer-app:installDebug4. Hot reload (app stays running, no full restart)
For the smoothest experience—apply code changes without reinstalling or restarting the app—run the app from Android Studio:
- Open the app folder in Android Studio (e.g.
File → Open → apps/provider-app). - Run the app (green Play or Debug).
- With the app running, use Apply Code Changes (⌃F10 / Ctrl+F10) or Apply Changes and Restart Activity (⌃⌥F10) after editing code. Only changed code is built and pushed to the device; the app stays running (or only the activity restarts).
Alternative: run with Gradle directly
# Provider app
cd apps/provider-app && ./gradlew installDebug
# Customer app
cd apps/customer-app && ./gradlew installDebugOn Windows, use the wrapper batch file:
cd apps\\provider-app && gradlew.bat installDebug
cd apps\\customer-app && gradlew.bat installDebugClick here to finish setting up your workspace!
To run tasks with Nx use:
yarn nx <target> <project-name>For example:
yarn nx build provider-appThese targets are either inferred automatically or defined in the project.json or package.json files.
More about running tasks in the docs »
To add libraries or apps, use Nx generators and the right plugin for your stack (this repo is Android/Kotlin). Run yarn nx list to see installed plugins, or use Nx Console in the IDE.
Nx Console is an editor extension that enriches your developer experience. It lets you run tasks, generate code, and improves code autocompletion in your IDE. It is available for VSCode and IntelliJ.
Learn more:
And join the Nx community: