Skip to content

surendar-pd/smart-serve

Repository files navigation

SmartServeApp

Nx workspace with two Android apps: provider-app and customer-app (Jetpack Compose, Kotlin).

Running the apps

Prerequisites

  • Node.js (LTS)
  • Yarn (v4; enable with corepack enable if needed)
  • Android Studio (or Android SDK + emulator / device with USB debugging)

1. Install dependencies

From the repository root:

yarn install

The 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-app

3. 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:installDebug

4. 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:

  1. Open the app folder in Android Studio (e.g. File → Open → apps/provider-app).
  2. Run the app (green Play or Debug).
  3. 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 installDebug

On Windows, use the wrapper batch file:

cd apps\\provider-app && gradlew.bat installDebug
cd apps\\customer-app && gradlew.bat installDebug

Finish your remote caching setup

Click here to finish setting up your workspace!

Run tasks

To run tasks with Nx use:

yarn nx <target> <project-name>

For example:

yarn nx build provider-app

These targets are either inferred automatically or defined in the project.json or package.json files.

More about running tasks in the docs »

Add new projects

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.

Learn more about Nx plugins »

Learn more about Nx on CI

Install Nx Console

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.

Install Nx Console »

Useful links

Learn more:

And join the Nx community:

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors