Sunrise, sunset & daylight tracker for multiple locations. Animated sun/moon arcs, time-of-day gradients, yearly daylight chart. Kotlin + Jetpack Compose + Material 3.
  • Kotlin 86.4%
  • TypeScript 6.5%
  • Python 3.3%
  • HTML 1.6%
  • JavaScript 1.2%
  • Other 1%
Find a file
Paweł Orzech b236a5aa48
Some checks are pending
Android CI / verify (push) Waiting to run
Android CI / instrumented-tests (push) Waiting to run
docs(live): state at 05:55, 27.11: F5 complete, lists for the owner
Carried from live/engine (5ad659e). Code stays on live/engine.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HNVGq78RFvU7gKgWDwvWua
2026-11-27 05:52:15 +01:00
.agents/skills/publish-sunzones Round up short notification delays and disable Glance trampolines 2026-08-02 00:24:59 +02:00
.claude/commands Remove worktree dirs from tracking and update gitignore 2026-04-11 17:53:21 +02:00
.codex Round up short notification delays and disable Glance trampolines 2026-08-02 00:24:59 +02:00
.github/workflows ci: pin every action to a commit SHA, drop persisted checkout credentials 2026-10-25 01:34:26 +02:00
app release: 1.7.29 (versionCode 44) 2026-11-22 12:09:36 +01:00
artifacts/device-evidence/20260822T111124Z docs: device evidence for the 1.7.2 WorkManager fix 2026-08-22 13:12:47 +02:00
docs docs(live): handoff, widget review and foldable design decision (from live/engine e7520c1) 2026-11-26 23:03:53 +01:00
google-play docs(release): 1.7.29 record; AGENTS current state points at it 2026-11-22 12:10:51 +01:00
gradle feat: in-app review + in-app updates, and an ASO rewrite of the store listing 2026-08-20 17:40:27 +02:00
Plans docs(live): state at 05:55, 27.11: F5 complete, lists for the owner 2026-11-27 05:52:15 +01:00
screenshots Add screenshots to README 2026-01-27 16:54:20 +01:00
server feat(server): sky proxy for SunZones Live, plus the Live plan 2026-11-26 20:48:58 +01:00
site Fix SunZones card transitions and city interactions 2026-11-19 13:10:29 +01:00
tools refactor(publish): release notes have one source, docs/release-notes/<versionName>/ 2026-11-09 23:26:40 +01:00
validation docs(release): 1.7.22 record; AGENTS current state points at it 2026-11-03 18:12:17 +01:00
.gitattributes Initial commit 2026-01-27 16:33:25 +01:00
.gitignore feat: apply UX audit improvements and release tooling 2026-07-30 10:07:44 +02:00
AGENTS.md docs(live): state after the night of 26-27.11; 1.7.29 is published 2026-11-27 01:27:41 +01:00
AUDIT_REPORT.md docs: round 12, Cato findings and final gate numbers 2026-10-25 19:08:54 +01:00
AUDIT_REPORT_ROUND4.md Round 4 audit: reports, agent changelog, widget receiver label 2026-07-24 21:59:28 +02:00
AUDIT_REPORT_ROUND5.md docs: round-5 audit reports 2026-07-27 20:01:33 +02:00
build.gradle.kts feat(crashlytics): crash reporting that cannot carry a place or a coordinate 2026-07-27 02:43:00 +02:00
CHANGELOG.md release: 1.7.29 (versionCode 44) 2026-11-22 12:09:36 +01:00
CHANGELOG_AGENT.md docs: round 12, Cato findings and final gate numbers 2026-10-25 19:08:54 +01:00
CLAUDE.md docs: foldable plan (docs/FOLDABLE.md) and CLAUDE.md trigger 2026-11-24 16:10:17 +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
IMPROVEMENTS_REPORT.md Improve accessibility and search UX 2026-08-23 14:37:13 +02:00
ISA.md Add SunZones Pro monetization: freemium + one-time premium_lifetime purchase 2026-07-19 12:44:34 +02:00
LICENSE Initial commit 2026-01-27 16:33:25 +01:00
README.md chore: unslop pass over landing page, store copy, changelog and Pro strings 2026-10-31 00:50:33 +01:00
settings.gradle.kts Initial commit 2026-01-27 16:33:25 +01:00
UX_RECOMMENDATIONS.md fix: audit round 10 — retry on failed edits, scrollable add-city form, bounded page dots 2026-09-30 18:31:49 +02:00
UX_RECOMMENDATIONS_ROUND4.md Announce page position to screen readers and explain a failed widget add 2026-07-24 22:03:37 +02:00
UX_RECOMMENDATIONS_ROUND5.md docs: round-5 audit reports 2026-07-27 20:01:33 +02:00
wrangler.jsonc chore(site): deploy config for sunzones.orzech.me 2026-10-31 01:09:32 +01:00

SunZones

Track sunrise, sunset and daylight across multiple locations around the world. One screen, one card per city: sunrise and sunset times, day length, a sun/moon arc, a background that follows the time of day, 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; tap page indicator to manage cities
  • Sunrise & sunset times with day/night length and countdown to next sunrise
  • Animated sun/moon arc: shows where the sun (or moon) is in its path across the sky
  • Moon phase & illumination: current lunar phase emoji and illumination percentage
  • Local time, labelled: each card and city-list row says whose clock it is showing ("19:00 local time · 7 h ahead of you") and flags when the date over there is already different
  • Time-of-day gradients: card backgrounds follow sunrise, morning, midday, afternoon, sunset, twilight and night palettes
  • Resizable home-screen widget: three designs from a 2x1 strip to a 4x4 block, each with a full-width sun/moon arc as its horizon line
  • 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
  • Sunrise/sunset reminders: optional local notifications, scheduled entirely on-device
  • 20 languages: English, Polish, Chinese, Hindi, Spanish, French, Arabic, Bengali, Portuguese, Russian, Urdu, Indonesian, German, Japanese, Nigerian Pidgin, Marathi, Telugu, Turkish, Tamil, Vietnamese

SunZones Pro

A single one-time purchase (premium_lifetime, Google Play Billing; no subscription, no ads, no account). The free tier holds three locations and every core sun feature above.

  • Unlimited locations
  • Twilight & light: golden hour, blue hour and the full civil/nautical/astronomical twilight timeline
  • Night & Moon: moonrise and moonset, the astronomical-night window, how much of it is moonless, the next new moon, and whether the Milky Way core clears the horizon after dark
  • Yearly daylight chart: month-by-month day length, tap a month to jump to it
  • Time travel: step the date back and forward, or pick any day between 1900 and 2100, and every reading on the card follows
  • Golden hour reminders

Privacy

No account, no backend, no analytics SDK, no ads. Sun and moon maths run entirely on-device; saved places never leave it.

One exception, stated up front: crash reports are sent to Google's Firebase Crashlytics, on by default, and can be turned off in Settings > Diagnostics. Coordinates, saved place names and device identifiers are stripped from the message, breadcrumbs and custom keys before anything is sent; the stack trace and Crashlytics' own device/installation metadata are what remain.

All three store-facing documents are current: the privacy policy and Data Safety form were republished on 2026-07-30, and the store listing was rewritten on 2026-08-20 (see Plans/GROWTH.md).

Architecture

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

Room DB (Flow)
  -> LocationDao -> LocationRepository -> GetLocationsUseCase(date, includeAstro)
       -> CalculateSunTimesUseCase (+ CalculateAstroNightUseCase) -> SunLocation
            -> MainViewModel (StateFlow) -> Compose UI
                                         -> WidgetRenderData -> Glance widget
Layer Responsibility
data/local Room entity, DAO, database
data/repository Thin DAO wrapper, current-location replacement logic
data/preferences DataStore: notification settings, crash-reporting opt-out
domain/usecase Sun/moon calculations via commons-suncalc, astronomical night and Milky Way season, yearly daylight aggregation
domain/model SunLocation (computed fields), AstroNight, ArcState (the one day/night decision), MonthDaylight
domain/util Timezone-id hardening, administrative-suffix stripping for geocoded names
diagnostics Crash-report scrubbing (pure JVM) + the Crashlytics seam behind it
billing EntitlementRepository, Play Billing data source, monetization config/killswitch
ui/main HorizontalPager of SunCard composables, date bar, 60-second auto-refresh; SelectedDatePolicy validates the restored/intent-borne date
ui/widget Glance widget; layout breakpoints, element gating and bitmap arcs decided in pure functions outside the Glance tree
ui/addlocation Geocoder search + GPS, timezone resolution via Android ICU
di Hilt modules providing Room, DAO, Geocoder, FusedLocationProviderClient, billing and diagnostics

Tech stack

Language Kotlin
UI Jetpack Compose, Material 3
DI Hilt
Database Room (schema exported, migrations tested)
Preferences DataStore
Widget Jetpack Glance (version: see gradle/libs.versions.toml)
Background work WorkManager
Billing Google Play Billing (version: see gradle/libs.versions.toml)
Crash reporting Firebase Crashlytics (opt-out; no Firebase Analytics)
Sun/moon math commons-suncalc (version: see gradle/libs.versions.toml)
Location Google Play Services FusedLocationProviderClient
Geocoding Android Geocoder
Timezone lookup android.icu.util.TimeZone (built-in)
Tests JUnit 5, MockK (JVM unit tests: ./gradlew testDebugUnitTest)
Min SDK 26 (Android 8.0)
Target SDK 36 (Android 16)

Build

Requires Java 17 and the Android SDK.

A google-services.json for the Firebase project must be present at app/google-services.json: it is committed, since this repository is private.

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

Full gate:

./gradlew lint testDebugUnitTest assembleDebug

assembleRelease now uploads the R8 mapping file to Firebase, so a release build needs network access. Debug builds upload nothing.

License

MIT, Pawel Orzech