Skip to content
salpirasPublic

About

This repository hosts an app showing Star Wars planet informations

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

🌌 Star Wars Planets App

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!

🌍 API

This app uses SWAPI.tech, a Star Wars REST API. Two main endpoints are used:

  • GET /planets — list of planet summaries
  • GET /planets/{id} — full details of a single planet

🚀 Features

  • 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, and core modules
  • Dependency injection via Hilt
  • Robust testing with MockK, JUnit, and Kotlinx Coroutines Test

🧱 Architecture

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

__

Module Dependency Graph

▶️ Running the app

git clone https://github.com/your-org/star-wars-planets.git

🧪 Testing

To run tests:

./gradlew test
./gradlew \
    :feature:planet-list:connectedAndroidTest \
    :feature:planet-detail:connectedAndroidTest

🔘 Future improvements / TODOs

  • 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

About

This repository hosts an app showing Star Wars planet informations

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Contributors

Languages