Shop is an example e-commerce app with a modern architecture and view layout implementation. It's made to showcase the following things (some of which are still in progress):
- A complex e-commerce (network client-focused) app with both SwiftUI and UIKit
- A highly dynamic and backend-driven home screen that's almost entirely customizable through the server
- Migration piecemeal from UIKit to SwiftUI
- A variety of architectures common to iOS apps with a particular focus on SwiftUI-friendly ones
- Dynamic type and other accessibility features
I made a simple Node.js app to run on localhost so the app can use actual network requests. Follow the instructions below to get it running on your environment.
$ npm install # Install npm and node if not installed
$ node app.js
Though by no means fully correct or complete, here are the commits where I tried out a bunch of common architectures before settling on a custom Redux-like architecture strongly inspired by The Composable Architecture (TCA).
This app is my personal playground to experiment with new APIs, but feel free to contibute!
I referred to these sources for information on architecture:
Reference
- https://medium.com/eureka-engineering/thought-about-arch-for-swiftui-1b0496d8094
- https://qiita.com/shiz/items/510f9095c82a0f610102
- https://nalexn.github.io/clean-architecture-swiftui/
- https://www.raywenderlich.com/8440907-getting-started-with-the-viper-architecture-pattern
- https://theswiftdev.com/how-to-build-swiftui-apps-using-viper/
- https://www.davidahouse.com/2020-05-25-thoughts-on-app-architecture-with-swiftui/
- https://quickbirdstudios.com/blog/swiftui-architecture-redux-mvvm/
- https://www.vadimbulavin.com/modern-mvvm-ios-app-architecture-with-combine-and-swiftui/
- https://benoitpasquier.com/swiftui-what-has-changed-in-mvvm-pattern-swift/
- Example
- https://stackoverflow.com/a/32920459
- https://swiftwithmajid.com/2019/09/18/redux-like-state-container-in-swiftui/
- https://tech.mercari.com/entry/2019/12/11/150000
- https://basememara.com/building-scalable-swiftui-architecture-app/
- Example
- https://benoitpasquier.com/integrate-redux-in-mvvm-architecture/
- https://medium.com/commencis/using-redux-with-mvvm-on-ios-18212454d676
- Example
- http://blog.benjamin-encz.de/post/real-world-flux-ios/
- https://jobandtalent.engineering/ios-architecture-an-state-container-based-approach-4f1a9b00b82e
- https://github.com/bq/mini-swift
- https://swiftandpizza.com/flux-in-swift/
- https://qiita.com/tamayuru/items/3afb0bb9dac7033adef0
- Example
- Flux という設計思想
- 漫画で説明する Flux
- React & Flux入門
- iOS meets Flux
- SwiftFlux
- Composable Architecture and Point-Free for their wonderful architecture framework
- CombineExt
- Hacking With Swift for about 90% of the results that turn up in Google searchs on SwiftUI
Licensed under MIT license. See LICENSE for more info.