Sunrise, sunset & daylight tracker for multiple locations. Animated sun/moon arcs, time-of-day gradients, yearly daylight chart. Kotlin + Jetpack Compose + Material 3.
Find a file
2026-01-28 00:17:56 +01:00
.idea Initial commit 2026-01-27 16:33:25 +01:00
app Update SunCard.kt 2026-01-28 00:17:56 +01:00
build/reports/problems Initial commit 2026-01-27 16:33:25 +01:00
gradle Update .gitignore and expand README documentation 2026-01-27 16:38:10 +01:00
screenshots Add screenshots to README 2026-01-27 16:54:20 +01:00
.gitattributes Initial commit 2026-01-27 16:33:25 +01:00
.gitignore Remove build artifacts from tracking and add CLAUDE.md to gitignore 2026-01-27 16:54:55 +01:00
build.gradle.kts Initial commit 2026-01-27 16:33:25 +01:00
gradle.properties Initial commit 2026-01-27 16:33:25 +01:00
gradlew Initial commit 2026-01-27 16:33:25 +01:00
gradlew.bat Initial commit 2026-01-27 16:33:25 +01:00
LICENSE Initial commit 2026-01-27 16:33:25 +01:00
local.properties Initial commit 2026-01-27 16:33:25 +01:00
README.md Add translations for 18 new languages (20 total) 2026-01-27 17:31:28 +01:00
settings.gradle.kts Initial commit 2026-01-27 16:33:25 +01:00

SunZones

Track sunrise, sunset and daylight across multiple locations around the world. A minimal, single-screen Android app with time-aware gradient backgrounds, animated sun/moon arcs, and a yearly daylight chart.

Screenshots

Warsaw at sunset Adeje at midday Warsaw at night

Features

  • Multi-location tracking -- swipe between saved locations to see real-time sun and moon data
  • Sunrise & sunset times with day/night length and countdown to next sunrise
  • Animated sun/moon arc -- a visual progress indicator showing where the sun (or moon) is in its path across the sky
  • Moon phase & illumination -- current lunar phase emoji and illumination percentage
  • Time-of-day gradients -- card backgrounds shift dynamically through sunrise, morning, midday, afternoon, sunset, twilight and night palettes
  • Yearly daylight chart -- scrollable month-by-month visualization of day length and sunrise/sunset distribution
  • Timezone-aware -- each location stores its own IANA timezone, so times are always correct regardless of where your device is
  • Search or GPS -- add locations by city name search or use your current position
  • 20 languages -- English, Polish, Chinese, Hindi, Spanish, French, Arabic, Bengali, Portuguese, Russian, Urdu, Indonesian, German, Japanese, Nigerian Pidgin, Marathi, Telugu, Turkish, Tamil, Vietnamese

Architecture

Clean MVVM, single-activity Jetpack Compose app with Hilt dependency injection.

Room DB (Flow)
  -> LocationDao -> LocationRepository -> GetLocationsUseCase
       -> CalculateSunTimesUseCase -> SunLocation (UI model)
            -> MainViewModel (StateFlow) -> Compose UI
Layer Responsibility
data/local Room entity, DAO, database
data/repository Thin DAO wrapper, current-location replacement logic
domain/usecase Sun/moon calculations via commons-suncalc, yearly daylight aggregation
domain/model SunLocation (computed fields), MonthDaylight (chart data)
ui/main HorizontalPager of SunCard composables, 60-second auto-refresh
ui/addlocation Geocoder search + GPS, timezone resolution via Android ICU
di Hilt module providing Room, DAO, Geocoder, FusedLocationProviderClient

Tech stack

Language Kotlin
UI Jetpack Compose, Material 3
DI Hilt
Database Room
Sun/moon math commons-suncalc 3.11
Location Google Play Services FusedLocationProviderClient
Geocoding Android Geocoder
Timezone lookup android.icu.util.TimeZone (built-in)
Min SDK 26 (Android 8.0)
Target SDK 35 (Android 15)

Build

Requires Java 17 and the Android SDK.

export JAVA_HOME="/opt/homebrew/Cellar/openjdk@17/17.0.18/libexec/openjdk.jdk/Contents/Home"
./gradlew assembleDebug

License

MIT -- Pawel Orzech