Skip to content

a-elnajjar/spaceXAppSwiftUI_

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

SpaceX iOS App

A native iOS app built with SwiftUI that surfaces live SpaceX data — rocket launches, fleet information, and real-time telemetry for the Tesla Roadster currently orbiting the sun.

Built as a learning project to practice Clean Architecture, MVVM + Coordinator pattern, and modern Swift concurrency.


Features

  • Launches — Browse the full SpaceX launch history in list or grid view, with mission patch, status, and flight details
  • Rockets — Explore SpaceX's rocket fleet with specs, success rates, and imagery
  • Roadster Tracker — Live telemetry for Elon's Tesla Roadster: velocity, distance from Earth, distance from Mars, and an animated orbital visualization

Architecture

The project follows Clean Architecture with three strict layers:

Data        →   APIClient, DTOs, Mappers, Repository implementation
Domain      →   Entities, Repository protocol, Use Cases
Presentation →  ViewModels, Coordinators, Views

Each layer only depends inward — Presentation never touches DTOs, and Domain has zero knowledge of SwiftUI or networking.

Key patterns used:

  • MVVM + Coordinator for navigation and state
  • Protocol-based dependency inversion throughout
  • DependencyContainer as a single composition root
  • @Observable macro (iOS 17+) for reactive state

Security

Network requests use SSL certificate pinning via a custom URLSessionDelegate. The implementation:

  1. Validates the full CA trust chain with SecTrustEvaluateWithError
  2. Extracts the server's leaf certificate public key
  3. Compares a SHA-256 hash (via CryptoKit) against a pinned value

This defends against man-in-the-middle attacks even on compromised networks.


Tech Stack

Language Swift 6
UI SwiftUI
Concurrency async/await, actors
Observation @Observable (iOS 17+)
Networking URLSession with SSL pinning
Hashing CryptoKit (SHA-256)
Testing Swift Testing framework
API SpaceX REST API v4

Requirements

  • iOS 17.0+
  • Xcode 15+

Getting Started

git clone https://github.com/your-username/SpaceXApp.git
cd SpaceXApp
open SpaceXApp.xcodeproj

No package dependencies — build and run.

About

SwiftUI APP use SpaceX API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages