How bizilabs/halo works
Project type and purpose
• This is an open-source Kotlin Multiplatform library (“Halo”) providing Compose UI components and charting on Android and Desktop.
• It includes two main modules: “halo” (core UI components, theming, base primitives) and “charts” (chart data models, drawing logic).
• Sample apps (Android and Desktop) demonstrate usage of those modules.
• GitHub workflows handle building, testing, and publishing artifacts to a Maven repository.
File structure
• Top-level build files: settings.gradle.kts, build.gradle.kts, gradle.properties, gradlew scripts, GitHub workflow configs.
• charts/ module: commonMain code under charts/src/commonMain/kotlin/org/bizilabs/halo/charts; contains data models, drawing helpers, style definitions, and a UI entrypoint (HaloLineChart).
• halo/ module: commonMain code under halo/src/commonMain/kotlin/org/bizilabs/halo; subdivided into:
• composeResources (fonts)
• components (buttons, cards, badges, textfields, bottom sheets, etc.)
• extensions and state utilities
• sample/ module: two subprojects:
• sample/android: Android app depending on halo and charts, showcasing a UI in MainActivity
• sample/desktop: Desktop Compose multiplatform app with screens for each component
• charts and halo modules are compiled as multiplatform libraries without platform-specific code.
• CI/CD: .github/workflows defines build, publish, and tagging pipelines.
README for additional insights
• Confirms the library is Compose Multiplatform for all platforms.
a. Main components
• Developer workstation with Gradle and Kotlin Multiplatform plugin
• Core library: halo module (UI primitives, theming)
• Chart library: charts module (data, drawing, chart UI)
• Sample Android app (Android module)
• Sample Desktop app (Desktop module)
• External dependencies: Kotlin Stdlib, Compose Multiplatform, Kotlinx libraries
• CI/CD pipeline (GitHub Actions)
• Artifact repository (Maven Central or GitHub Packages)
b. Relationships and interactions
• halo and charts modules depend on Compose Multiplatform and Kotlinx
• sample apps depend on both modules
• CI/CD pipeline triggers on push/tags, builds all modules, runs tests, and publishes artifacts
• Developer workstation pushes code to GitHub, CI/CD builds and publishes, consumers (sample apps or external projects) fetch artifacts
c. Architectural patterns and design principles
• Modular KMP architecture: shared commonMain code, no platform-specific code in core modules
• Separation of concerns: UI primitives in halo, chart logic in charts
• Sample apps implement thin platform-specific layers to consume shared code
• Theming and style objects are centralized for consistency across components
d. Technologies, frameworks, and libraries
• Kotlin Multiplatform
• Compose Multiplatform UI
• Kotlinx Serialization or coroutines (if used)
• Gradle Kotlin DSL for build scripts
• GitHub Actions for CI/CD