An iOS SwiftUI App using MVVM (Model-View-ViewModel) pattern & Combine Framework, support iOS14+
- Authentication
- RESTful API Products Menu
- Core Data Shopping Cart
Login Page | Menu Page | Cart Page |
---|---|---|
![]() |
![]() |
![]() |
- UI: iOS SwiftUI
- Design Pattern: MVVM (Model-View-ViewModel)
- Async Operations: Async / Await & Combine to prevent callback hell & make the code clean
SwiftCafe
├─ Assets.xcassets
│ └─ CafeThemeColor.colorset # App Colors
├─ Models # Data Models struct
│ ├─ AuthModel.swift
│ └─ ProductModel.swift
├─ Repositories # Business Logic Repositories
│ └─ CafeRepository.swift
├─ Services # Data API
│ ├─ CoreDataService.swift
│ └─ NetworkService.swift
├─ SwiftCafeApp.swift # SwiftUI App Life Cycle
├─ ViewModels # ViewModel for each View
│ ├─ CartViewModel.swift
│ ├─ LoginViewModel.swift
│ ├─ MainViewModel.swift
│ └─ MenuViewModel.swift
└─ Views # Contains a ViewModel per View
├─ CartView.swift
├─ LoginView.swift
├─ MainView.swift
└─ MenuView.swift