Adrian Kuta 9e18987aaf feat: Implement airport data fetching and display
This commit introduces the functionality to fetch airport data from the Ryanair API and display it in the UI.

Key changes:
- Added `AirportInfoModel` interface and its implementation `AirportInfoModelImpl` to represent airport data in the data layer.
- Created `AirportInfoModelMapper` to map `AirportResponse` to `AirportInfoModel`.
- Set the base URL for Retrofit in `NetworkModule` to `https://services-api.ryanair.com`.
- Added new Gradle modules: `model:data:shared`, `model:datasource:airports`, `model:datasource:shared`, and `domain:search`.
- Implemented `CacheImpl` in `model:data:shared` for generic caching.
- Defined `ObserveAirportsUseCase` interface in `domain:search` to observe airport data.
- Added Detekt configuration for the `domain:search` and `model:datasource:shared` modules.
- Created `AirportsDatasource` interface and its implementation `AirportsDatasourceImpl` to manage airport data.
- Implemented `AirportInfoDomainMapper` to map `AirportInfoModel` to the domain `AirportInfo`.
- Updated `HomeScreen` to display a list of airports using `LazyColumn`.
- Updated `HomeScreenViewModel` to fetch and expose airport data via `ObserveAirportsUseCase`.
- Added `ObserveAirportsUseCaseModule` to provide the `ObserveAirportsUseCase` implementation.
- Implemented `ObserveAirportsUseCaseImpl` in the repository layer to fetch data from the API and update the datasource.
- Added `kotlinx-datetime` dependency.
- Created `AirportsDatasourceModule` to provide `AirportsDatasource` and its implementation.
- Added `CacheObservers.kt` with a utility function `loadData` to handle cache observation and data loading logic.
- Updated dependencies in `model:data:simple`, `model:repository`, and `ui:home` build files.
- Updated `settings.gradle.kts` to include new modules.
- Defined `Cache` interface in `model:datasource:shared`.
2025-06-13 21:47:11 +02:00
2025-06-12 23:20:21 +02:00
2025-06-12 23:20:21 +02:00
2025-06-12 23:20:21 +02:00
2025-06-12 23:20:21 +02:00
2025-06-12 10:14:10 +02:00
2025-06-12 10:14:10 +02:00
2025-06-12 10:14:10 +02:00
2025-06-12 10:14:10 +02:00
2025-06-12 10:14:10 +02:00

Android challenge

The task

We would like you to build an app to search for flights.

You are provided with a codebase containing a bit of code so that you can start working on the task faster. It includes some parts of the UI, basic network layer implementation with DTOs & DI setup. Feel free to modify any file you find in the repo this is only there to help you out.

Please develop an Android app with the following requirements:


Search screen

  • User can search for flights with the following criteria:
    • Origin & destination station
    • Departure date
    • Number of adults, teen & children
  • Destination can only be selected after picking origin
  • All fields need to be filled to make a search
  • Number of adults must be greater than 0

Station search screen

  • User can select a station from a list
  • Stations are grouped by country (country name to be shown before each group)
  • User can use search field to filter the airports list
  • Screen works with 2 configurations
    • Origin selection all stations are available for selection
    • Destination selection only stations to which we can travel from origin selection are available for selection

Results screen

  • A list of results for the specified search criteria is shown
  • Show only the crucial information about the trip
  • Make sure to handle network errors and empty results

URLs:

Tip: For test purposes try DUB (Dublin) STN (London Stansted) route it has flights every day.


What we expect from you

  • Architecture for both domain and UI layer. Please avoid using framework libraries if possible.
  • Use kotlinx.coroutines library. Do not use Live Data.
  • Squeeze all the best from Kotlin!
  • UI part is not crucial, we would more appreciate better code than great design in this task.
  • Creativity - shine in areas you are best!
  • Understanding of your solution.

Questions for you

Please submit the answers to the following questions in the README.md file

  • How long did you spend on the task?
  • Rate from 0-10, how would you assess the complexity of the task? 0 - very trivial, 10 - extremely complex
  • If you had more time (or if you were doing it in production) what would you have changed/improved?
  • Which parts of the code would you like to highlight?
  • In your opinion, which Google library was the best addition to the Android Dev world in the last years?

If you have the need to comment the provided task, we would love to hear that from you 🙂
...
...

Time frame

You have 4 days to submit your solution. There is no need to spend more than 12 hours on the task as we don't seek perfection. Focus on the key areas of Android development

Please fork this repository. After finishing a task, create pull request to the parent repository main branch.

You are allowed to use AI tools to assist with this programming task. However, you will be asked to explain your solutions in detail.


In case of any questions feel free to drop us an email at AndroidDevelopers@ryanair.com any time.

Fly high!


COPYRIGHTS

Copyright licensed by © Ryanair Labs

Description
No description provided
Readme 1.7 MiB
Languages
Kotlin 100%