Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/admkopec/rickmorty

A sample iOS app using TCA and Clean Architecture best practices
https://github.com/admkopec/rickmorty

swift swiftui the-composable-architecture

Last synced: about 2 months ago
JSON representation

A sample iOS app using TCA and Clean Architecture best practices

Awesome Lists containing this project

README

        

# Rick & Morty
A sample iOS application using [The Composable Architecture](https://github.com/pointfreeco/swift-composable-architecture).
The application uses the [The Rick and Morty API](https://rickandmortyapi.com/documentation) to display list of characters and basic information about them.
The application aims to be modular following Clean Architecture guidelines and implementing repository patterns or separate worker classes for more advanced application logic. The Views are composed using TCA with the minimal business logic provided as part of Reducers. They connect to workers and repositories via TCA's Dependencies which unfortunately have to be provided as bridging structs due to TCA's inner architecture, and I am against writing complex logic in closures :)
## Features
- Infinite scroll pagination and `LazyVStack` for minimising the memory footprint of the application.
- `AsyncImage` for loading thumbnails only when needed
- CoreData storage for keeping track of "Favourite" characters
- `.searchable()` modifier for character searching
## Disclaimer
This is my first and only iOS project using TCA. I greatly appreciate the macros and extensive documentation including tutorials offered by this architecture. However, the way it implements reducers and dependecy injection, in my opinion greatly hinders code readability. This is why, I will most probably stick with Clean Swift or a variant of MVVM for my personal projects.