An Application that displays movies details

home screen searching movie details


This Application follows the Ports & Adapters architecture, where the application logic is written in the core module in a plain kotlin/java module, with no external dependencies (only Rx for reactive functional support), and any platform specific code is in another modules, integrated through implementing the declared ports in the core

ports and adapters

Also Interfaces in Kotlin helped alot in designing the ports, as it can declare abstract properties which can be used in business rules … new technique was not there in Java that makes defining ports more structured


  • Testing: a pure java / kotlin core makes it very easy in testing
  • Scalability: it is easy to scale as the business rules are defined into ports, any technology can be used to serve more powerful usages while respecting the same business rules
  • Maintainability: maintainability is very easy as most of the changes in the future will be outside the core, like changing UI or upgrading to a database rather than cache, when this happens, the core module is un-touched
  • Security: as our core is not depending on any 3rd parties, it is very safe to keep the code that matters into the core, and the code that does not matter can be replaced if found any vulnerabilities
  • Performance: Specially in project build time, as the architecture requires multiple modules which makes build time faster


  • Dependencies: dependencies needs to be managed across multiple modules, and each dependency must have a defined scope
  • Different Mindset: it requires some time for developers who are used to layered architectures, to rethink how they view the system, as Hexagonal architecture is very flexible that it cannot be described in layers, it is more of designing a puzzle of pluggable components rather than putting layers above each other


unit test coverage is around 70%, regardless of the numbers, any logic is unit tested across the application, weather it is presentation logic, business logic, application logic, or even data sources implementation

unit tests count core test coverage data-sources-test-coverage


for the latest apk of the app, you can find it in this repository in releases directory:

or download it through this link:

What’s next (If you’d like to contribute)

  • I wish I could have implemented the UI with compose, but found problems in setting up stuff, so maybe in the coming iteration will convert the UI parts to compose
  • Also the UI needs to be much fancier, and UI tests are still need to be written
  • there were couple of bugs related to triggering API’s while rotating the app, I disabled rotation for now till I fix those bugs then enable it again (it was fine till I started implementing the Movie Details screen)
  • with more data to deal with, the project can use Room database instead of in-memory cache, and implement the MigrationDataSource Port, then everything should be working as expected
  • Did not have chance to use coroutines that much in this project, just in couple of classes, wish to add more features and they could show some amazing stuff wth coroutines

Quality Matrices

Core Module

core quality

Data Sources Module

Data Sources Quality

Presentation Module

Presentation Quality

PS. All quality reports are generated by CodeMR plugin and available at codemr directory in this project for more details