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
- Testing with Combine and SwiftUI
- Dynamic type and other accessibility features
- Localization and formatters
Starting the example server
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.
$ sudo vim /etc/hosts # Add this: 127.0.0.1 localhost $ 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 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:
- Flux という設計思想
- 漫画で説明する Flux
- React & Flux入門
- iOS meets Flux
- Composable Architecture and Point-Free for their wonderful architecture framework
- 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.