Skip to content

eltonkola/DesktopApp

Repository files navigation

Compose Desktop Template

A modern, cross-platform desktop application template built with Jetpack Compose Multiplatform.

This template was created to simplify the process of starting new desktop applications, eliminating the need for repetitive boilerplate code and setup.

Demo

This template includes a simple demo app that mimics the UI/UX of an AI chat application, showcasing:

  • Integration with apifreellm.com free API
  • Modern UI built with Compose and JetBrains Jewel components
  • Support for both dark and light themes
  • Custom icons from Lucide and Jewel

Screenshot 1 Main application window

Screenshot 2 Application in action

Features

  • 🖥️ Cross-platform support (Windows, macOS, Linux)
  • 🎨 Modern UI with Jetpack Compose for Desktop
  • 🏗️ CI/CD pipeline for automated builds
  • 📦 Packaged as native installers for all platforms
  • 🎨 Uses JetBrains Jewel UI components for a polished look
  • 🔄 Hot reload for faster development
  • 🌓 Dark and light theme support
  • 🚀 Optimized for performance and minimal resource usage

Prerequisites

  • JDK 17 or higher (Download)
  • IntelliJ IDEA (recommended) or Android Studio
  • Gradle 8.0 or higher
  • macOS 10.14+ / Windows 10+ / Linux (64-bit)

Getting Started

  1. Clone the repository
    git clone https://github.com/yourusername/compose-desktop-template.git
  2. Open the project in IntelliJ IDEA or Android Studio
  3. Run the application using the Gradle task: run

Downloads

Build Status

Latest development builds are available from GitHub Actions:

💡 View all artifacts from the latest build

Note: You'll need to unzip the downloaded files before installing.

Building

Local Build

./gradlew package

Create Distributables

Build platform-specific packages:

./gradlew packageDmg        # macOS
./gradlew packageMsi        # Windows
./gradlew packageDeb        # Linux (Debian/Ubuntu)

Note: The build process will automatically include required JDK modules. To optimize the final binary size, unused JDK modules are excluded based on your application's requirements.

CI/CD

This project includes GitHub Actions workflow that automatically builds and packages the application for all major platforms:

  • Windows (.msi)
  • macOS (.dmg)
  • Linux (.deb)

The workflow triggers on pushes to the main branch and on new releases.

Dependencies

  • Jetpack Compose Multiplatform (1.5.0)
  • JetBrains Jewel UI (0.9.0)
  • Ktor Client (2.3.0) for networking
  • Kotlinx Serialization (1.5.0)
  • SLF4J (2.0.7) for logging

Customization

Dependencies

  • Remove unused libraries (e.g., Ktor, ViewModel) to reduce binary size
  • Add new dependencies as needed (e.g., Koin for DI, Coil for image loading)

Icons & Assets

  • Replace the sample icons in the icons folder with your own
  • Recommended tools:
    • CloudConvert for generating .icns (macOS) and .ico (Windows) files
    • Figma for designing custom UI assets

Troubleshooting

  • If you encounter Gradle issues, try:
    ./gradlew --stop
    ./gradlew clean
  • For build errors, ensure you have the correct JDK version set in your IDE
  • Check the GitHub Issues for known issues and solutions

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Acknowledgments

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

About

Compose ui and jewels desktop app template.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages