A starter project for iOS engineers who want to improve their skills according to company processes. This project serves as a learning playground for SwiftUI, navigation patterns, localization, design implementation, and AI-assisted code generation with tools like Cursor, Claude Code, GitHub Copilot, and others.
Sports Hub is a sports news application built with SwiftUI targeting iOS 26+. It demonstrates modern iOS development practices including:
- Modern Swift Concurrency with
@Observable(Swift 5.9+) - Clean Architecture (Domain, Data, Presentation layers)
- Protocol-oriented design for testability
- Generic navigation system
- Environment-based configuration
- Xcode 26.0+
- iOS 26.0+ deployment target
- Backend server running locally
Before running the app, you need to set up the backend server. Follow the instructions at:
π Sports Hub Launcher
The launcher provides a unified CLI tool to bootstrap the backend services using Podman.
git clone https://github.com/dark-side/sports_hub_launcher.git
cd sports_hub_launcher
chmod +x setup.sh
./setup.sh- Clone this repository
- Open
Sports-Hub.xcodeprojin Xcode - Ensure backend is running at
http://127.0.0.1:3002 - Build and run (βR)
| Resource | Link |
|---|---|
| Figma Prototype | Sports Hub General Prototype |
| Feature Roadmap | Mobile Application Features List |
Sports-Hub/
βββ Source/
β βββ Application/ # App entry point & root navigation
β β βββ Sports_HubApp.swift
β β βββ AppFlowModel.swift # Global app state & navigation
β β βββ AppRootView.swift
β β βββ MainAppFlowContentContainerView.swift
β β
β βββ Common/ # Shared code across features
β β βββ Articles/
β β β βββ Domain/ # Domain models
β β β β βββ Article.swift
β β β β βββ Comment.swift
β β β βββ Data/
β β β βββ DTO/ # Network response models
β β β βββ Repositories/ # Data access layer
β β β βββ Services/ # Network services
β β βββ UserProfile/
β β β βββ Domain/
β β β βββ Data/
β β βββ Views/ # Reusable UI components
β β βββ NetworkError.swift
β β
β βββ Features/ # Feature modules
β β βββ Home/ # Home feed & article details
β β βββ SideMenu/ # Side navigation menu
β β βββ UserProfile/ # Login, SignUp, Logout flows
β β βββ Navigation/ # Navigation models & routes
β β βββ NBA/ # NBA section (placeholder)
β β βββ NFL/ # NFL section (placeholder)
β β
β βββ Utilities/
β βββ AppConfig.swift
β
βββ Resources/
β βββ Assets.xcassets/
β
βββ Preview Content/ # SwiftUI preview helpers
| Entity | Description |
|---|---|
AppFlowModel |
Global app state manager handling navigation, side menu, user authentication state, and modal presentations |
NavigationModel<Route> |
Generic navigation coordinator for each feature flow (Home, NBA, NFL) |
UserProfileManager |
Manages user authentication state and creates auth-related ViewModels |
Article |
Domain model representing a sports article |
User |
Domain model representing authenticated user |
View β ViewModel β Repository β NetworkService β API
β
Mapper
β
Domain Model
| Pattern | Implementation |
|---|---|
| Observation | @Observable macro (Swift 5.9+) |
| Dependency Injection | Protocol-based repositories |
| Navigation | NavigationStack with typed routes |
| State Management | Enum-based view states (idle, loading, loaded, error) |
| Main Actor Isolation | Project-level SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor |
- Develop screens according to Figma prototypes
- Implement NBA and NFL feature screens
- Add pull-to-refresh functionality
- Implement infinite scroll/pagination
- Develop cache system (URLCache, custom disk cache)
- Add persistence layer (SwiftData, CoreData, or UserDefaults)
- Implement offline mode support
- Add String Catalogs for localization
- Support English and Ukrainian languages
- Localize date/number formatters
- Reimplement using TCA (The Composable Architecture)
- Reimplement using MV (Model-View) pattern
- Reimplement using MVVM-C (Coordinator pattern)
- Extract feature modules into Swift Packages
- Add unit tests for ViewModels
- Add unit tests for Repositories and Mappers
- Add UI tests for critical user flows
- Implement snapshot testing
- Define Cursor rules (
.cursorrules) for code generation context - Experiment with Claude Code for feature generation
- Create custom prompts for consistent code style
| Setting | Value |
|---|---|
| Deployment Target | iOS 26.0 |
| Swift Version | 5.0 |
| Default Actor Isolation | MainActor |
| Supported Orientations | Portrait only |
Set API_URL environment variable to override the default backend URL:
# Default: http://127.0.0.1:3002
API_URL=http://your-backend-urlHappy coding! π