{"id":49972003,"url":"https://github.com/tarek-bohdima/asteroidradar","last_synced_at":"2026-06-07T22:01:05.749Z","repository":{"id":45289021,"uuid":"433893872","full_name":"Tarek-Bohdima/AsteroidRadar","owner":"Tarek-Bohdima","description":"Offline-first Android app tracking Near Earth Objects via NASA's NeoWs API, with daily WorkManager refresh and Astronomy Picture of the Day.","archived":false,"fork":false,"pushed_at":"2026-06-07T20:26:17.000Z","size":4725,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-06-07T21:16:27.738Z","etag":null,"topics":["android","coil","coroutines-android","fragment","kotlin","kotlin-android","ksp","livedata","moshi","mvvm-android","nasa-api","navigation-component","near-earth-objects","offline-first","recyclerview","retrofit2","room-database","udacity-android-nanodegree","workmanager-kotlin"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tarek-Bohdima.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-12-01T16:03:17.000Z","updated_at":"2026-06-07T20:25:30.000Z","dependencies_parsed_at":"2024-03-17T23:23:02.570Z","dependency_job_id":"b6d41163-ac8d-41e8-9abe-20d14da2d277","html_url":"https://github.com/Tarek-Bohdima/AsteroidRadar","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/Tarek-Bohdima/AsteroidRadar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tarek-Bohdima%2FAsteroidRadar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tarek-Bohdima%2FAsteroidRadar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tarek-Bohdima%2FAsteroidRadar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tarek-Bohdima%2FAsteroidRadar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tarek-Bohdima","download_url":"https://codeload.github.com/Tarek-Bohdima/AsteroidRadar/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tarek-Bohdima%2FAsteroidRadar/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34039495,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-07T02:00:07.652Z","response_time":124,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","coil","coroutines-android","fragment","kotlin","kotlin-android","ksp","livedata","moshi","mvvm-android","nasa-api","navigation-component","near-earth-objects","offline-first","recyclerview","retrofit2","room-database","udacity-android-nanodegree","workmanager-kotlin"],"created_at":"2026-05-18T09:01:14.068Z","updated_at":"2026-06-07T22:01:05.741Z","avatar_url":"https://github.com/Tarek-Bohdima.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Asteroid Radar\n\n[![Android CI](https://github.com/Tarek-Bohdima/AsteroidRadar/actions/workflows/build_pull_request.yml/badge.svg)](https://github.com/Tarek-Bohdima/AsteroidRadar/actions/workflows/build_pull_request.yml)\n[![Kotlin](https://img.shields.io/badge/Kotlin-1.6.21-blueviolet?logo=kotlin)](#)\n[![minSdk](https://img.shields.io/badge/minSdk-26-brightgreen)](#)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](#license)\n\nAsteroid Radar tracks Near Earth Objects (NEOs) using NASA's\n[Asteroids NeoWs](https://api.nasa.gov/) feed and shows the\n[Astronomy Picture of the Day](https://api.nasa.gov/) on launch.\nAsteroids close-approaching Earth in the next seven days are pulled in the\nbackground once a day, cached locally, and filtered by today / week / all stored.\nAvailable on Google Play (internal track).\n\n## Features\n\n- **NeoWs feed** — close-approaching asteroids for the next seven days, with\n  potentially-hazardous flagging.\n- **APOD** — NASA's Astronomy Picture of the Day on the main screen.\n- **Offline-first** — Room is the source of truth; the UI reads from the DB,\n  the network path only writes.\n- **Daily background refresh** via WorkManager (constraints: unmetered network\n  + charging + battery-not-low + device-idle).\n- **Filters** — sealed `AsteroidsFilter` (`TODAY` / `WEEK` / `STORED`) maps to\n  one DAO query each.\n\n## Tech stack\n\n| Layer | Choice |\n|---|---|\n| Language | Kotlin |\n| UI | Fragments + Data Binding + Navigation Component (safe-args) |\n| Async | Kotlin Coroutines |\n| Networking | Retrofit + Moshi + OkHttp; Scalars and Moshi converter factories registered in order so `String` returns get the raw body and `@JsonClass`-annotated returns get the codegen-generated adapter |\n| Persistence | Room (compiled with KSP) |\n| Background | WorkManager (`PeriodicWorkRequest`, KEEP policy) |\n| Image loading | Coil |\n| Logging | Timber |\n\nArchitecture is a standard offline-first repo pattern (`domain` / `network` /\n`database` / `repository` / `ui` / `work`). See [`CLAUDE.md`](CLAUDE.md) for\nthe load-bearing details and module-by-module orientation.\n\n## Build and run\n\nRequires JDK 17 and the Android SDK. Common commands:\n\n```bash\n./gradlew assembleDebug          # debug APK\n./gradlew assembleRelease        # signed release APK (needs keystore env vars)\n./gradlew bundleRelease          # signed AAB for Play Store\n./gradlew test                   # all unit tests\n./gradlew connectedAndroidTest   # instrumented tests (needs device/emulator)\n```\n\nSingle-test run:\n\n```bash\n./gradlew :app:testDebugUnitTest --tests \"com.tarek.asteroidradar.ExampleUnitTest\"\n```\n\n## Configuration\n\n`app/build.gradle` reads secrets from environment variables first, falling back\nto `local.properties`. For local development add to `local.properties`:\n\n```properties\nNASA_API_KEY=your_nasa_api_key            # https://api.nasa.gov/ → \"Generate API Key\"\n# release-signing only — needed for assembleRelease / bundleRelease\nKEYSTORE_PATH=/absolute/path/to/keystore.jks\nKEYSTORE_PASSWORD=...\nKEY_ALIAS=...\nKEY_PASSWORD=...\n```\n\nThe keystore must be **PKCS12** — `signingConfigs.release.storeType` is hard-coded\nto `\"PKCS12\"` in `app/build.gradle`.\n\n### Firebase Crashlytics (Phase 15b)\n\nRelease builds ship structured logs and crash reports to Firebase Crashlytics\nvia the typed-event logging pattern documented in\n[`docs/patterns/structured-logging.md`](docs/patterns/structured-logging.md).\nThe Firebase plugins are applied **conditionally** on the presence of\n`app/google-services.json`, so debug builds keep working for anyone who hasn't\nset up Firebase yet — only `assembleRelease` / `bundleRelease` / `packageRelease`\nrequire it (the build script fails fast if it's missing).\n\nTo set up locally:\n\n1. Create a Firebase project at \u003chttps://console.firebase.google.com\u003e.\n2. Add an Android app with package name `com.tarek.asteroidradar` (must match\n   `applicationId`).\n3. Download the generated `google-services.json` and place it at\n   `app/google-services.json`. The file is gitignored — never commit it.\n\nFor CI, add the file's base64-encoded contents as the\n`GOOGLE_SERVICES_JSON_BASE64` GitHub Secret; the release workflow decodes it\ninto place before building.\n\nThe debug build type never wires the Crashlytics sink (`LoggerReleaseModule`\nlives in `app/src/release/`), so no Crashlytics traffic is generated during\nlocal development.\n\n## Release flow\n\nReleases are tag-driven. Push a tag matching `v*` and\n[`.github/workflows/release.yml`](.github/workflows/release.yml) takes over:\n\n1. Validates that `vMAJOR.MINOR.PATCH` matches `versionMajor/Minor/Patch` in\n   `app/build.gradle` — mismatch fails the workflow before building.\n2. Runs unit tests, then builds and signs both the APK (attached to the GitHub\n   Release for sideloading) and the AAB (uploaded as a workflow artifact for\n   manual upload to Play Console).\n3. Tags whose name contains `INTERNAL`, `alpha`, `beta`, `rc`, or `RC` are\n   auto-flagged as pre-release.\n\nRequired GitHub Secrets: `NASA_API_KEY`, `KEYSTORE_BASE64` (the PKCS12 keystore\nbase64-encoded), `KEYSTORE_PASSWORD`, `KEY_ALIAS`, `KEY_PASSWORD`,\n`GOOGLE_SERVICES_JSON_BASE64` (the Firebase config file, base64-encoded — see\n\"Firebase Crashlytics\" above).\n\nTag/version conventions: SemVer with an optional classifier suffix that maps to\na Play Store track:\n\n| Classifier | Play track |\n|---|---|\n| `-INTERNAL` | Internal testing |\n| `-ALPHA` | Closed alpha |\n| `-BETA` | Open beta |\n| `-RC` | Production rollout candidate |\n| (none) / `-RELEASE` | Production |\n\n## Roadmap\n\nThe phased modernization plan lives in\n[`docs/IMPROVEMENT_PLAN.md`](docs/IMPROVEMENT_PLAN.md) (Gradle Kotlin DSL +\nversion catalog → convention plugin → code-quality tooling → toolchain bump →\nHilt → R8 → tests + Kover → edge-to-edge → eventual Compose migration).\n\n## License\n\nReleased under the MIT License — every source file ships with the full block in\nits header. See any `.kt` or `.gradle` file (e.g. [`build.gradle`](build.gradle))\nfor the canonical text.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarek-bohdima%2Fasteroidradar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftarek-bohdima%2Fasteroidradar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarek-bohdima%2Fasteroidradar/lists"}