Prerequisites
Before you begin, ensure you have the following installed:Required Tools
JDK
Java Development Kit 11 or higher
Kotlin
Kotlin 2.3.0 (managed by Gradle)
Gradle
Included via Gradle Wrapper
Git
For cloning the repository
System Requirements
- OS: Linux (any distribution)
- Hardware: Lenovo laptop with ACPI support
- Kernel Module:
acpi_callloaded (lsmod | grep acpi_call) - Memory: At least 3GB RAM for Gradle builds
Getting Started
Verify Gradle setup
The project uses the Gradle Wrapper, so no separate Gradle installation is needed:This will automatically download Gradle if needed.
Build the project
Build the entire project with:This compiles the Kotlin code, processes resources, and runs tests.
Compose Multiplatform Setup
KVantage is built with Compose Multiplatform for Desktop version 1.10.0.Key Technologies
| Technology | Version | Purpose |
|---|---|---|
| Kotlin | 2.3.0 | Primary language |
| Compose Multiplatform | 1.10.0 | UI framework |
| Material 3 | 1.10.0-alpha05 | Design system |
| Compose Hot Reload | 1.0.0 | Fast development iterations |
| Kotlinx Serialization | 1.10.0 | JSON/data handling |
| Lifecycle ViewModel | 2.9.6 | State management |
Project Configuration
The project uses Gradle’s version catalog (gradle/libs.versions.toml) to manage dependencies consistently.
View build.gradle.kts structure
View build.gradle.kts structure
Development Workflow
Hot Reload
The project includes Compose Hot Reload for faster development:Building a Distribution
Create a distributable JAR:composeApp/build/compose/binaries/main/.
Gradle Configuration
The project is configured with:Project Structure
Entry Point
The application entry point iscomposeApp/src/jvmMain/kotlin/com/korealm/kvantage/Main.kt:
build.gradle.kts:
Debugging Considerations
Debug Mode
Run with debug output:Common Issues
Backend daemon not starting
Backend daemon not starting
Ensure the Verify the ACPI module is loaded:
kvand binary in composeApp/bin/ is executable:Out of memory during build
Out of memory during build
Increase Gradle memory in
gradle.properties:Compose UI not rendering
Compose UI not rendering
Ensure you have proper graphics drivers and X11/Wayland support.Check Java version:Requires JDK 11 or higher.
Permission denied errors
Permission denied errors
The app needs root access for ACPI operations. Ensure:
- Your user is in the
sudogroup - You can execute
sudocommands - The backend daemon requests permissions properly
Logging
When debugging:- Add logging to track execution flow
- Log ACPI interactions and responses
- Include error context and stack traces
- Use appropriate log levels (DEBUG, INFO, WARN, ERROR)
Backend Daemon Development
The backend daemon (kvand) is developed separately:
- Repository: github.com/kosail/Kvand
- Language: Go (Golang)
- Location: Pre-compiled binary in
composeApp/bin/kvand
Why Go?
The daemon was reimplemented in Go due to:- JVM limitations for low-level system operations
- Kotlin Native constraints with ACPI access
- Better performance for system daemon operations
- Static binary distribution (no runtime dependencies)
Backend Communication
The GUI communicates with the daemon via:- Local socket or IPC mechanism
- JSON messages (using kotlinx-serialization)
- Root isolation - only daemon runs with privileges
For backend modifications, clone the Kvand repository separately and rebuild the binary.
IDE Setup
IntelliJ IDEA (Recommended)
- Open the project in IntelliJ IDEA
- IDEA will auto-detect the Gradle configuration
- Wait for Gradle sync to complete
- Run configurations will be automatically created
VS Code
- Install the Kotlin extension
- Install the Gradle extension
- Open the project folder
- Use terminal for Gradle commands
Next Steps
Now that your environment is set up:- Read the Contributing Guidelines for code standards
- Explore the Architecture to understand the codebase
- Check open issues for tasks to work on
- Join discussions on GitHub for questions
Ready to contribute?
Review our contributing guidelines to get started with your first PR