An offline-first Android app for browsing SpaceX launches and rockets. The launch feed is cached locally, so it stays available when the network drops.
The app talks to a small local Go API server. The server
replaces the archived r-spacex/SpaceX-API and serves all data from embedded
snapshots.
Important
Star the repository to get update notifications from GitHub without delay. ⭐️
Star History
- Browse launches with Paging 3 and a locally cached feed.
- View launch and rocket details.
- Bookmark launches and rockets for offline access.
- Switch between Retrofit or Ktor and Room or SQLDelight at build time.
- Run against the bundled Go API server without internet access.
- Architecture & Tech Stack: project structure, clean architecture, module dependencies, technology choices.
- Local API Server: Go server that replaces the archived SpaceX-API, all endpoints, data sources, and how to run it.
- GitHub Workflows: CI/CD pipeline details for unit tests, APK releases, and Maestro UI tests.
- JDK 17 or newer.
- Go 1.22 or newer.
- Android Studio, or the Android SDK with
adb. - An Android device or emulator running Android 7.0 (API 24) or newer.
Start the API server, build the app, install it, and launch it with one command:
make runThis command starts the Go API server on port 8443, builds and installs the debug APK, and launches the app. The command blocks while the server runs.
To keep the server in a separate terminal:
# Terminal 1
make start-server
# Terminal 2
make install
make start-appThe app connects to https://localhost:8443/ through adb reverse. To use a
different host, pass -PAPI_BASE_URL=https://<host>:8443/ to Gradle. See
Local API Server for details.
Run make help to list all targets.
| Command | Description |
|---|---|
make help |
List all targets |
make start-server |
Stop any running server, forward port 8443, and start the Go API server |
make install |
Build and install the debug APK with the local API URL |
make start-app |
Launch the app on the first connected device |
make stop-server |
Stop the Go API server on port 8443 |
make run |
Start the API server, install the app, and launch the app |
make run-retrofit-room |
Run with Retrofit + Room (default) |
make run-retrofit-sqldelight |
Run with Retrofit + SQLDelight |
make run-ktor-room |
Run with Ktor + Room |
make run-ktor-sqldelight |
Run with Ktor + SQLDelight |
make test |
Run Android unit tests, Go server tests, and Maestro UI tests when a device is connected |
make lint |
Run Android lint checks |
make cleanup |
Delete Android build artifacts and Go build output |
The build defaults to Retrofit and Room. To change the implementations without
the make run-* targets, pass the Gradle properties directly:
./gradlew installDebug -PNETWORK_IMPL=ktor -PSTORAGE_IMPL=sqldelight- Copyright © 2023 Nishant Srivastava.
- This project is Apache License 2.0 licensed.
