A Kotlin-based Android application that fetches and displays Star Wars planets using the SWAPI.tech API.
Whether you’re choosing an outfit to visit the Mos Eisley Cantina or heading out on a long retreat to Ahch-To, we’ve got you covered!
This app uses SWAPI.tech, a Star Wars REST API. Two main endpoints are used:
GET /planets— list of planet summariesGET /planets/{id}— full details of a single planet
- Fetches a paginated list of planets from the Star Wars universe
- Loads detailed information for each planet
- Uses Retrofit with Kotlin Serialization for network calls
- Clean architecture with separate
feature,data, andcoremodules - Dependency injection via Hilt
- Robust testing with
MockK,JUnit, andKotlinx Coroutines Test
The architecure follows clean architecture principles and is organised in feature modules.
app : Navigation logic, application entry point
feature Feature modules
feature:planet-list : presentation logic for the planets list
feature:planet-detail : presentation logic implementation for the planet detail
data
data:planet : fetching logic and implementations for planet data
core
core:design : design system and reusable UI components
core:domain : use cases and repository interface contracts
core:model : fundamental plain data classes defining the domain objects.
core:network : base reusable http client and network settings implementation
__
git clone https://github.com/your-org/star-wars-planets.gitTo run tests:
./gradlew test
./gradlew \
:feature:planet-list:connectedAndroidTest \
:feature:planet-detail:connectedAndroidTest- Sanitise build scripts with a build-logic module
- Expand tests suite
- Add Room persistency
- Return all pages of the API with infinite scrolling
- Add colors to the theme to style it in Star Wars fashion



