Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VIPER Architecture Pattern - Swift Concurrency Version

Visually Interesting Planned Easy Roadtrips (VIPER)

This is a Swift concurrency implementation of the VIPER architecture pattern tutorial from Kodeco. The original tutorial used Combine for reactive programming, while this version uses modern Swift concurrency.

Screenshots

VIPER App Main Screen VIPER App Trip Detail

Key Differences from Original Tutorial

  • Swift Concurrency: Uses async/await instead of Combine's Publisher/Subscriber pattern
  • @Observable Macro: Replaces Combine's @Published properties with the new @Observable macro for reactive UI updates
  • @MainActor: Ensures UI updates happen on the main thread using the @MainActor macro
  • Modern Swift: Leverages Swift 5.9+ features for cleaner, more maintainable code

Architecture Overview

VIPER stands for:

  • View: SwiftUI views that display the user interface
  • Interactor: Business logic and data manipulation
  • Presenter: Coordinates between View and Interactor, handles presentation logic
  • Entity: Data models (Trip, Waypoint)
  • Router: Navigation and routing between screens

Instructions

Features

  • Create and manage road trips with waypoints
  • Interactive map view showing trip routes
  • Image integration with Pixabay API
  • Clean VIPER architecture with Swift concurrency
  • Persistent data storage using JSON

Original Tutorial

Based on: Getting Started with the VIPER Architecture Pattern by Michael Katz

Attributions

  • maldives image: Photo by Sebastian Pena Lambarri on Unsplash
  • neuschwanstein castle: Photo by Lukas K on Unsplash
  • berlin: Photo by 🇨🇭 Claudio Schwarz | @purzlbaum on Unsplash

About

Road trip planner app demonstrating VIPER architecture with Swift concurrency

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages