A tiny SwiftUI app that displays Albums of Kanye West and a brief info about the artist.

Overview

West Day Ever

It's a small SwiftUI app, that displays Albums of Kanye West and a brief info about the artist.

Technical notes

Low level packages that don't depend on any other package.

  • DesignKit: for common UI components and tokens
  • Networking: for making REST API request
  • Storage: for data persistency
  • Fetcher: an abstraction over Networking and Storage yet a totally stand alone package without depending on those two. It uses dependency inversion, by declaring the dependencies that fetcher needs in order to function properly. These dependencies will be injected either in the app or the feature packages. I only implemented a single behaviour which tryes to load local data first, then reaches out to the server to update the data.

Feature packages don't depend on each other, but uses the low level packages.

  • Artist: contains logic and UI for fetching, storing and displaying artist info.
  • Album: contains logic and UI for fetching, storing and displaying albums info.
  • Track: contains logic and UI for fetching, storing and displaying tracks info.

Using dependency inversion also means there are some code duplication, however with proper design it's barely noticable. In this small project it only resulted in two redundant types (ArtistId and AlbumId) and dupliction of protocol comformances like this:

extension CodableStorage: LocalSource {}
extension RequestLoader: RemoteSource {}

However, this enables to have a flat project dependency graph, so more packages can be built in parallel, which is a major win at a large scale project.

I used MVVM with no navigation pattern. In procudtion I'd rather use MVI with proper states, actions and reducers, however I felt the current implementation is clean enough and scalable as well.

I didn't write any tests, however I used POP & functional approach. Every layer has a Protocol to abstract them and most of the concrete implementation of those protocols can be initialised with an injected function that provides the working mechanism. That means it's really easy to make stub implementations for testing. I created some stub implementation that also helps with SwiftUI previews.

I made both the protocols and the implementations generic. That might seem a bit verbose yet it helps with performance, as the layers can invoke each others methods with static dispatch instead of dynamic dispatch. The new Swift 5.6 already started encouraging developers to do so, by adding the any keyword.

References:

The app supports Light and Dark mode, I put some effort to enhance accessibility capabilities like DynamicType and Voice over. It runs on macOS and iOS, supporting smaller and larger screens as well.

I was also experimenting with Actors, async/away and Tasks instead of using Combine. It seems like on the long term Swift concurrency will probably replace Combine:

You might also like...
Simple and minimalist weather app that displays the current conditions.
Simple and minimalist weather app that displays the current conditions.

Minimalistic Weather App Project Description In this project, I have developed a simple and minimalist weather app, where I use the Current Weather Da

Reverie is a work-in-progress iOS app that displays your Last.fm scrobbles for each past year, for the current date.
Reverie is a work-in-progress iOS app that displays your Last.fm scrobbles for each past year, for the current date.

Reverie is a work-in-progress iOS app that displays your Last.fm scrobbles for each past year, for the current date.

LiveWeatherApp - Live Weather App - Displays Live Weather Data with OpenWeather API
LiveWeatherApp - Live Weather App - Displays Live Weather Data with OpenWeather API

Live Weather App - Displays Live Weather Data with OpenWeather API Learned about

WeatherApp-weatherbit.io- - App, that displays the weather in defined cities
WeatherApp-weatherbit.io- - App, that displays the weather in defined cities

WeatherApp-weatherbit.io- App, that displays the weather in defined cities This

VTuber Cam, macOS app that displays an avatar using a virtual camera.
VTuber Cam, macOS app that displays an avatar using a virtual camera.

日本語 VCam macOS app that displays an avatar using a virtual camera. You can display a virtual avatar on Zoom or Google Meet, or etc. This is useful for

Sol° beautifully displays weather information so you can plan your day accordingly
Sol° beautifully displays weather information so you can plan your day accordingly

Sol° for iOS Sol° beautifully displays weather information so you can plan your day accordingly. Check the weather in your current location or any cit

In this mini app covered the concepts like basics of SwiftUI and Navigations and Animations and List with CRUD functions and MVVM and App Launch and App icons adding and also applied persistence using UserDefaults Concept.
In this mini app covered the concepts like basics of SwiftUI and Navigations and Animations and List with CRUD functions and MVVM and App Launch and App icons adding and also applied persistence using UserDefaults Concept.

TodoList In this application used the concepts from the beginner level project of SwiftUI_Evolve_1 The following concepts covered in this mini app Swi

IOS15-SwiftUI-InAppPurchaseDemo - In-App Purchase Demo app written with SwiftUI
IOS15-SwiftUI-InAppPurchaseDemo - In-App Purchase Demo app written with SwiftUI

iOS15-SwiftUI-InAppPurchaseDemo In-App Purchase Demo app written with SwiftUI If

This To-Do app was developed using Swift and SwiftUI and works on iOS, MacOS (Apple Silicon) and WatchOS. The tasks are kept on storage even when the app is restarted.

ToDo-SwiftUI This app has a lot of sentimental value for me, given that it helped me a lot to understand the process of doing an iOS app and became th

Owner
Daniel Tombor
Daniel Tombor
CountryList - iOS app to show country info

CountryList iOS app to show country info Overview 'CountryList App' fetch and di

Christi John 2 Aug 29, 2022
BeezyLight.app✦ tiny macOS app to control a usb-connected light

BeezyLight.app✦ tiny macOS app to control a usb-connected light

null 2 Jul 11, 2022
A tiny app that will check your recent subscriptions on RevenueCat and will

Meow Let your RevenueCat talk Download Credits Big thanks to: RxSwift KeychainAccess Popover Notice of Non-Affiliation and Disclaimer We are not affil

2Stable 22 Jul 14, 2022
A SwiftUI App that displays information about the planets in our solar system.

MySpaceApp Created by Noman Ahmad Current Version : 1.0 Description: MySpaceApp is a simple ios app designed for space enthusiasts. With this app, you

Noman Ahmad 1 Nov 2, 2021
Native iOS app built in SwiftUI, displays a collection of user's books.

Native iOS app built in SwiftUI, displays a collection of user's books.

Matthew Eilar 1 May 23, 2022
TinyToyTank - Tiny Toy Tank AR project

TinyToyTank This is my very first AR project so far ?? . It is really fun to pla

Dscyre Scotti  1 Jan 22, 2022
Mac OSX app that displays window previews when hovering over app icon on the Dock.

Dock Window Preview Adds window preview functionality on hover for Mac Dock, an open-source alternative. This is very early in development and it will

Paul Sweeney 32 Dec 26, 2022
Application that displays current weather at a random location. iOS 14.0 or newer. SwiftUI.

Elseweather App that displays current weather at a random location. Description Elseweather was created as a student/research project with no practica

Ярослав 11 Dec 15, 2022
‪‪An app that stores and displays the information entered by the user‬‬

To do list :‬‬ ‪‪An app that stores and displays the information entered by the user‬‬ ‪‪The user can : Add, delete one or clear all , Edit, Show the

null 0 Nov 4, 2021
LocationsWikipedia - a simple App that fetches a list of locations and displays it at UITableView

Fetching a list of locations or Adding a new location and displaying the list inside a Table View when the user press one of them it will open Wikipedia app and display it inside a Map View.

Mohamd Bitar 2 Jun 8, 2022