A GPS journey tracker for iOS. Record routes in real time, visualize them on the map, and build a personal atlas of everywhere you've been.
- Clean Architecture — Domain, Data, and Presentation layers fully separated
- Custom Coordinator pattern — type-safe navigation with
NavigationCoordinatorandModalCoordinator - Dependency Injection — FactoryKit container with protocol-based injection
- SwiftData persistence —
MapRouteDTOmodel withPersistenceStore - Use Cases —
MapUseCaseandMockMapUseCasefor testing - Repository pattern —
MapRepositorywithMapRepositoryProtocol - Network layer — custom
NetworkServicewithURLSession+async/await - ReachabilityService — network connectivity monitoring
- LocationService —
@Observablewrapper aroundCLLocationManager - Custom fonts — Poppins integrated via SwiftGen
- Localization —
Strings+Generatedvia SwiftGen
| Layer | Technology |
|---|---|
| UI Framework | SwiftUI (iOS 17 native APIs) |
| Maps | MapKit — Map(), MapPolyline, Annotation(), UserAnnotation() |
| Location | CoreLocation — CLLocationManager wrapped in @Observable service |
| Persistence | SwiftData |
| State Management | @Observable macro (iOS 17) |
| Navigation | Custom Coordinator pattern (NavigationCoordinator, ModalCoordinator) |
| Dependency Injection | FactoryKit |
| Networking | Custom NetworkService — URLSession + async/await |
| Code Generation | SwiftGen (Fonts, Icons, Localizable strings) |
| Architecture | Clean Architecture — Domain / Data / Presentation |
| Min Deployment | iOS 17.0 |
| Swift | 6.0+ |
MilkyWay/
├── Application/
│ ├── AppCoordinator/ # Root app coordinator
│ ├── DIContainer/ # FactoryKit DI container
│ ├── Configuration/ # App configuration
6
│ └── MilkyWayApp.swift # @main entry, SwiftData container
├── Domain/
│ ├── Entities/ # MapRoute (core domain model)
│ ├── UseCases/ # MapUseCase, MockMapUseCase
│ ├── RepositoryProtocol/ # MapRepositoryProtocol
│ └── UseCaseProtocol/ # MapUseCaseProtocol
├── Data/
│ ├── Repositories/ # MapRepository
│ ├── PersistentStorage/ # SwiftData store, MapRouteDTO
│ └── NetworkExtension/ # API routes, DTOs, network helpers
├── Infrastructure/
│ ├── Coordinators/ # NavigationCoordinator, ModalCoordinator
│ ├── Network/ # NetworkService, URLRequest extensions
│ └── Services/
│ ├── LocationService/ # CLLocationManager wrapper
│ └── ReachabilityService/
├── Presentation/
│ ├── Auth/ # SignInView + coordinator
│ └── Tabs/
│ ├── Map/ # MapView, MapViewModel, RecordRouteButtonView
│ ├── Routes/ # RoutesView, RoutesViewModel
│ ├── Explore/ # ExploreView (in progress)
│ ├── Profile/ # ProfileView (in progress)
│ └── TabsCoordinator.swift
├── Helpers/
│ ├── Extensions/ # Color, View, Map, LinearGradient extensions
│ ├── Modifiers/ # LoadingModifier
│ └── Logger/ # Log utility
└── Resources/
├── Fonts/ # Poppins (SwiftGen generated)
├── Icons/ # SwiftGen generated
└── Localizables/ # SwiftGen generated strings
MilkyWay follows Clean Architecture with three layers:
Presentation → Domain ← Data
- Domain layer — pure Swift, no framework dependencies. Contains
MapRouteentity,MapUseCaseProtocol,MapRepositoryProtocol - Data layer — SwiftData persistence, network DTOs,
MapRepositoryimplementation - Presentation layer — SwiftUI views,
@ObservableViewModels, Coordinator-based navigation
Navigation uses a custom Coordinator pattern — each tab owns its own flow coordinator, with type-safe routing via associated values.
Dependency injection uses FactoryKit — all dependencies registered in Container+Injection.swift and injected via @InjectedObservable / @Injected property wrappers.
- Xcode 16+
- iOS 17.0+ device or simulator
- Swift 6.0+
git clone https://github.com/BaidetskyiYurii/MilkyWay.git
cd MilkyWay
open MilkyWay/MilkyWay.xcodeprojNote: Location features require a physical device or a simulated location set in Xcode's Features menu.
Foundation
- Clean Architecture setup (Domain / Data / Presentation)
- Custom Coordinator navigation pattern
- FactoryKit dependency injection
- SwiftData persistence layer
- Custom NetworkService with async/await
- LocationService with real-time GPS tracking
- ReachabilityService
Map & Recording
- Live MapKit map with dark style
- Real-time GPS route recording
- MapPolyline route rendering with glow effect
- Start / end point annotations
- Auto-zoom to saved route
- Error handling with coordinator alerts
Routes
- Routes list with SwiftData
- Route cards with delete
- Empty state view
- Route detail screen with full map preview
- Route naming and editing
- Distance and duration stats per route
Explore & Profile
- Explore tab — heatmap, travel stats, countries visited
- Profile tab — journey count, total distance, settings
- Cloud sync (iCloud)
Polish
- Photo pin dropping during active recording
- Animated route rendering
- Journey story export
- App Store release