How fespinoza/youtube-sampleprojects works
Project type and purpose
• This is not a single full-stack service but a collection of iOS/SwiftUI sample applications, each showcasing a different feature set:
• ImageGallery – a basic SwiftUI image grid viewer
• LiveActivityDemo – demonstrates iOS Live Activities using WidgetKit & ActivityKit plus custom Swift packages
• MovieCatalog – a modular SwiftUI app backed by TheMovieDB API, organized into Clean-Architecture layers via Swift Packages
File structure
• Top-level directories:
• ImageGallery/
• LiveActivityDemo/
• MovieCatalog/
• README.md, .gitignore
• Each subfolder is an Xcode workspace containing: App entry points, Views, Models, Resources, Extensions, Tests, and in the case of MovieCatalog & LiveActivityDemo, multiple internal Swift Packages under names like Packages/1-Base, 2-Infrastructure, 3-Features.
README
• It simply states: “A collection of sample projects I use for my YouTube channel.”
• No further architecture guidance is provided, so you must infer the patterns from the file layout.
Main components & interactions (per project)
A. ImageGallery
• Components:
– App (ImageGalleryApp.swift)
– Views (MainView, ImageGrid)
– Models (data structs)
– Extensions (Array.swift)
– Resources (Assets.xcassets)
• Relationships & flow:
View → Model → Resources
• Pattern: Simple MV or MVVM-style separation; all in one module
B. LiveActivityDemo
• Components:
– Main App (LiveActivityDemoApp.swift, AppDelegate.swift)
– DemoWidgets extension (WidgetKit bundle + LiveActivity definitions)
– Packages:
1. JSONPayload – constructs push payloads
2. LiveActivityContent – defines ActivityKit Attributes & Content
3. LiveActivityUI – renders SwiftUI views for live activities
• Relationships & flow:
Main App uses JSONPayload to craft push payload → ActivityKit receives push → LiveActivityContent maps payload to ActivityState → LiveActivityUI renders UI in widget extension → System delivers updates
• Pattern: Modular Swift Packages + widget extension + ActivityKit
C. MovieCatalog
• Components:
– MovieCatalog App (MovieCatalogApp.swift)
– Screens (Home, MovieList, MovieDescription, ActorDetails, ReleaseCalendar, ImageGallery, etc.)
– Data layer: MovieDataClient.swift → calls external TheMovieDB API
– Domain models packaged under Packages/1-Base/MovieModels
– Infrastructure packages under Packages/2-Infrastructure (Components, MovieDBNetworking, Navigation)
– Feature packages under Packages/3-Features (MovieDetails, MovieSearch)
– Utilities, Config, Extensions, Snapshot testing kit
• Relationships & flow:
UI Screens → Navigation Router → Feature modules → DataClient → External API → Domain Models → back up to Feature modules and UI
• Pattern: Clean Architecture (Domain / Infrastructure / Features) implemented as Swift Packages; MVVM-like binding with SwiftUI