Skip to main content

Installation

Greenhouse Admin supports Web, Android, iOS, and Desktop platforms. Follow the platform-specific instructions below to install and configure the application.

System requirements

Common requirements (all platforms)

  • JDK 11 or higher - For Gradle and Kotlin compilation
  • Git - For version control
  • 8GB RAM minimum - 16GB recommended for optimal performance

Platform-specific requirements

  • Modern browser with WebAssembly support:
    • Chrome 119+
    • Firefox 120+
    • Safari 17+
    • Edge 119+
  • Node.js 18+ (automatically managed by Gradle)
  • Yarn (automatically managed by Gradle)

Installation steps

1. Clone the repository

git clone https://github.com/apptolast/greenhouse-admin.git
cd greenhouse-admin

2. Configure environment

Create a local.properties file in the project root:
# API Configuration
API_BASE_URL=https://your-api-endpoint.com/api/v1/

# Android SDK path (auto-detected by Android Studio)
sdk.dir=/path/to/Android/sdk
The API_BASE_URL must include the trailing /api/v1/ path. This value is injected at build time using BuildKonfig.

3. Verify Gradle setup

Test your Gradle installation:
./gradlew --version
Expected output:
Gradle 8.x
Kotlin: 2.3.0
JVM: 11.x or higher

Platform installation

Building for web

Greenhouse Admin supports two web targets:For modern browsers with better performance:
# Development build with hot reload
./gradlew :composeApp:wasmJsBrowserDevelopmentRun

# Production build
./gradlew :composeApp:wasmJsBrowserProductionWebpack
Output: composeApp/build/dist/wasmJs/productionExecutable/

JavaScript (Legacy)

For older browser compatibility:
# Development build with hot reload
./gradlew :composeApp:jsBrowserDevelopmentRun

# Production build
./gradlew :composeApp:jsBrowserProductionWebpack
Output: composeApp/build/dist/js/productionExecutable/

Updating web dependencies

After modifying dependencies in build.gradle.kts, update the Yarn lock files:
# For JavaScript target
./gradlew kotlinUpgradeYarnLock

# For WebAssembly target  
./gradlew kotlinWasmUpgradeYarnLock

Deploying to production

After building, deploy the contents of the output directory to your web server:
# Example: Deploy to nginx
cp -r composeApp/build/dist/wasmJs/productionExecutable/* /var/www/html/

Dependency management

Version catalog

All dependencies are managed in gradle/libs.versions.toml:
[versions]
kotlin = "2.3.0"
composeMultiplatform = "1.10.0"
koin-bom = "4.1.1"
ktor = "3.4.0"
kotlinx-serialization = "1.10.0"

[libraries]
koin-bom = { module = "io.insert-koin:koin-bom", version.ref = "koin-bom" }
koin-core = { module = "io.insert-koin:koin-core" }
ktor-client-core = { module = "io.ktor:ktor-client-core", version.ref = "ktor" }

Platform-specific engines

Ktor uses different HTTP engines per platform:
PlatformEngineLibrary
AndroidOkHttpktor-client-okhttp
iOSDarwinktor-client-darwin
Desktop (JVM)OkHttpktor-client-okhttp
Web (JS/Wasm)JavaScriptktor-client-js

IDE setup

IntelliJ IDEA / Android Studio

  1. Install required plugins:
    • Kotlin Multiplatform Mobile (KMM)
    • Compose Multiplatform IDE Support
  2. Configure Kotlin plugin:
    • Go to Settings → Languages & Frameworks → Kotlin
    • Ensure “Use compiler from ‘kotlin-compiler-embeddable’” is enabled
  3. Set up run configurations:
    • The IDE will automatically detect available run configurations
    • Use the run widget in the toolbar to switch between platforms
// Enable experimental features
compilerOptions {
    freeCompilerArgs.add("-Xexpect-actual-classes")
}

languageSettings {
    enableLanguageFeature("ExplicitBackingFields")
}

Verification

Verify your installation by running the test suite:
# Run all tests
./gradlew test

# Run tests for specific platform
./gradlew :composeApp:jvmTest
./gradlew :composeApp:iosSimulatorArm64Test
All tests should pass before proceeding with development. If tests fail, check your JDK version and environment configuration.

Troubleshooting

Gradle build fails

Issue: Could not resolve all dependencies Solution: Clear Gradle cache and rebuild:
./gradlew clean
rm -rf ~/.gradle/caches
./gradlew build --refresh-dependencies

iOS build fails

Issue: Framework not found ComposeApp Solution: Rebuild the Kotlin framework:
./gradlew :composeApp:embedAndSignAppleFrameworkForXcode

Web build fails with Yarn errors

Issue: Yarn lock file is outdated Solution: Upgrade the Yarn lock files:
./gradlew kotlinUpgradeYarnLock
./gradlew kotlinWasmUpgradeYarnLock

Android build fails

Issue: SDK location not found Solution: Ensure local.properties contains the correct SDK path:
sdk.dir=/Users/username/Library/Android/sdk

Next steps

Quickstart

Learn how to run your first build

Building

Build for all platforms

Architecture

Understand the project structure

Development setup

Complete development environment setup

Build docs developers (and LLMs) love