Files
sats-price/README.md
T
tyiuandClaude Sonnet 5 188536867d Add a Compose HTML (DOM) web app and split Compose UI out of :shared
webHtmlApp is a new web build using Compose HTML instead of Compose
Multiplatform UI's Skia/canvas renderer - real <select>/<input>/<button>
elements, an anchored popup menu for reordering/removing currencies
(Compose HTML has no built-in DropdownMenu), and locale-independent
English strings (moko-resources' Compose integration pulls in
compose.foundation/ui, which this module exists to avoid).

Realizing the bundle-size win needed splitting sharedUi out of shared:
the Compose Multiplatform Gradle plugin bundles Skiko's several-MB web
runtime into any js/wasmJs target whose resolved dependencies contain
org.jetbrains.compose.ui:ui anywhere, and shared previously declared it
directly for the other (Skia-based) web app's UI. shared is now pure
business/data logic with no Compose dependency; sharedUi holds App()/
PriceScreen() for androidApp, desktopApp, and webApp to render.
PriceViewModel's ViewModel supertype and CurrencyConverter's BigDecimal
params moved from implementation() to api() in shared, since they're
part of its public surface that webHtmlApp now touches directly.

Also drops the @js-joda/timezone dependency from both web builds: the
app only ever calls TimeZone.currentSystemDefault(), which resolves to
a synthetic zone backed by the native Date offset on Kotlin/JS and
never touches the tz database - confirmed empirically on both js and
wasmJs targets. Cuts webApp's js bundle by ~950 KB and webHtmlApp's by
~800 KB.

currencyFlagEmoji() gained an explicit supportsFlagEmoji parameter
(defaulting to the existing expect/actual, false on web) so webHtmlApp
can opt in - Compose HTML renders real DOM text, so flag emoji work
fine there even though they don't on Compose Multiplatform's canvas.

website/serve-local.sh now builds and serves webHtmlApp instead of
webApp's wasmJs build, so it no longer mirrors what's actually deployed
to production; docs updated to reflect the new module layout and that
divergence, and the Pages workflow's path trigger now includes
sharedUi/** so UI changes there still redeploy the site.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-16 18:35:23 +03:00

7.3 KiB

SatsPrice Logo

SatsPrice

This app fetches the price of Bitcoin relative to common fiat currencies from multiple sources, and converts inputted amounts between Sats, BTC, and the selected fiat currency.

satsprice.app Website

GitHub downloads

Last Version License: GPL-3.0

Download and Install

Download on the App Store Get it on Zap Store Get it on Obtaininum Get it on GitHub

Supported Platforms

iOS 16.0+ • macOS 13.0+ • Android 7.0+ • Web (any modern browser)

Screenshots

Android

iPhone

iPad

macOS

Kotlin Multiplatform

This is a Kotlin Multiplatform project targeting Android, iOS, macOS, Web, and Desktop (JVM).

  • /shared contains almost the entire app — UI (built with Compose Multiplatform), view models, data sources, and domain logic. commonMain holds code shared by every target, alongside platform-specific source sets: androidMain, jvmMain (Desktop), appleMain (iOS and macOS), and webMain (JS and Wasm).

  • /androidApp, /desktopApp, and /webApp are thin launcher shells around shared's Compose UI.

  • /iosApp is a native SwiftUI app (shared across iOS and macOS), not Compose — it talks to shared through a hand-written bridge rather than rendering Compose directly.

Running the apps

Use the run configurations provided by the run widget in your IDE's toolbar. You can also use these commands and options:

  • Android app: ./gradlew :androidApp:assembleDebug
  • Desktop app:
    • Hot reload: ./gradlew :desktopApp:hotRun --auto
    • Standard run: ./gradlew :desktopApp:run
  • Web app (Compose Multiplatform UI, Skia-rendered - what's deployed to production):
    • Wasm target (faster, modern browsers): ./gradlew :webApp:wasmJsBrowserDevelopmentRun
    • JS target (slower, supports older browsers): ./gradlew :webApp:jsBrowserDevelopmentRun
  • Web app, DOM alternative (Compose HTML UI, renders real DOM instead of Skia/canvas - not what's deployed to production): ./gradlew :webHtmlApp:jsBrowserDevelopmentRun
  • iOS app: open the /iosApp directory in Xcode and run it from there.
  • Website with the web app built and served at /app/ (the webHtmlApp DOM build, not the one production actually deploys): ./website/serve-local.sh (serves at http://localhost:8000 by default; pass a port number to override)

Running tests

Use the run button in your IDE's editor gutter, or run tests using Gradle tasks:

  • Android tests: ./gradlew :shared:testAndroidHostTest
  • Desktop tests: ./gradlew :shared:jvmTest
  • Web tests:
    • Wasm target: ./gradlew :shared:wasmJsTest
    • JS target: ./gradlew :shared:jsTest
  • iOS tests: ./gradlew :shared:iosSimulatorArm64Test

Attribution

This project uses Kotlin Multiplatform, Compose Multiplatform, and Kotlin/Wasm, along with the following libraries:

The Bitcoin Calculator icon was created by Icon home and licensed as free for personal and commercial use with attribution.

The following free APIs are used: