Skip to content

Latest commit

Β 

History

History
148 lines (133 loc) Β· 5.25 KB

File metadata and controls

148 lines (133 loc) Β· 5.25 KB

Project Structure

Challenge/
β”œβ”€β”€ .github/
β”‚   β”œβ”€β”€ actions/
β”‚   β”‚   β”œβ”€β”€ setup/              # Composite action: Xcode, mise, caching, SPM, simulator
β”‚   β”‚   └── test-report/        # Composite action: artifact upload, summary, PR comment
β”‚   └── workflows/
β”‚       └── quality-checks.yml  # GitHub Actions CI workflow
β”œβ”€β”€ App/                             # Main application target
β”‚   β”œβ”€β”€ Sources/
β”‚   └── Tests/
β”‚       β”œβ”€β”€ Shared/                  # Robots, Scenarios, Stubs, Fixtures
β”‚       └── UI/                      # UI tests (XCTest)
β”œβ”€β”€ AppKit/                          # Composition layer (SPM local package)
β”‚   β”œβ”€β”€ Package.swift
β”‚   β”œβ”€β”€ Sources/
β”‚   β”‚   β”œβ”€β”€ Data/                    # App-level data configuration
β”‚   β”‚   └── Presentation/            # Root views and navigation
β”‚   └── Tests/
β”‚       β”œβ”€β”€ Unit/
β”‚       └── Snapshots/
β”œβ”€β”€ Features/                        # Feature modules (SPM local packages)
β”‚   β”œβ”€β”€ Character/
β”‚   β”‚   β”œβ”€β”€ Package.swift
β”‚   β”‚   β”œβ”€β”€ Sources/
β”‚   β”‚   └── Tests/
β”‚   β”œβ”€β”€ Home/
β”‚   β”‚   β”œβ”€β”€ Package.swift
β”‚   β”‚   β”œβ”€β”€ Sources/
β”‚   β”‚   └── Tests/
β”‚   β”œβ”€β”€ Episode/
β”‚   β”‚   β”œβ”€β”€ Package.swift
β”‚   β”‚   β”œβ”€β”€ Sources/
β”‚   β”‚   └── Tests/
β”‚   └── System/
β”‚       β”œβ”€β”€ Package.swift
β”‚       β”œβ”€β”€ Sources/
β”‚       └── Tests/
β”œβ”€β”€ Libraries/                       # Shared libraries (SPM local packages)
β”‚   β”œβ”€β”€ Core/                        # Navigation, routing, image loading
β”‚   β”‚   β”œβ”€β”€ Package.swift
β”‚   β”‚   β”œβ”€β”€ Sources/
β”‚   β”‚   β”œβ”€β”€ Tests/
β”‚   β”‚   └── Mocks/
β”‚   β”œβ”€β”€ Networking/                  # HTTP client
β”‚   β”‚   β”œβ”€β”€ Package.swift
β”‚   β”‚   β”œβ”€β”€ Sources/
β”‚   β”‚   β”œβ”€β”€ Tests/
β”‚   β”‚   └── Mocks/
β”‚   β”œβ”€β”€ DesignSystem/                # UI components (Atomic Design)
β”‚   β”‚   β”œβ”€β”€ Package.swift
β”‚   β”‚   β”œβ”€β”€ Sources/
β”‚   β”‚   └── Tests/
β”‚   └── SnapshotTestKit/             # Snapshot testing framework
β”‚       β”œβ”€β”€ Package.swift
β”‚       └── Sources/
β”œβ”€β”€ Shared/
β”‚   └── Resources/                   # Localization, shared resources
β”‚       β”œβ”€β”€ Package.swift
β”‚       └── Sources/
β”œβ”€β”€ Tuist/
β”‚   β”œβ”€β”€ ProjectDescriptionHelpers/
β”‚   β”‚   └── Modules/
β”‚   └── Package.swift               # External SPM dependencies + target settings
β”œβ”€β”€ Scripts/
β”œβ”€β”€ docs/
β”œβ”€β”€ Project.swift                    # Root project (app + UI tests + module packages)
β”œβ”€β”€ Workspace.swift                  # Workspace configuration (code coverage)
β”œβ”€β”€ Challenge.xctestplan            # Test plan aggregating all module test targets (SPM strategy only)
β”œβ”€β”€ Tuist.swift
└── .mise.toml

Modules

App

Main application entry point.

Target Purpose
Challenge Main app
ChallengeUITests UI tests

AppKit

Composition layer that wires all features together.

Target Purpose
ChallengeAppKit Root views, navigation, dependency wiring
ChallengeAppKitTests Unit tests

Libraries

Module Purpose
ChallengeCore Navigation, routing, deep linking, image loading, app environment
ChallengeNetworking HTTP client (REST) and GraphQL client abstraction over URLSession
ChallengeDesignSystem Atomic Design UI components and design tokens
ChallengeResources Localization and shared resources
ChallengeSnapshotTestKit Snapshot testing helpers (test-only, wraps swift-snapshot-testing)

Features

Module Purpose
ChallengeCharacter Character list and detail screens (Rick & Morty REST API)
ChallengeEpisode Character episodes list (Rick & Morty GraphQL API)
ChallengeHome Home screen with logo animation
ChallengeSystem System settings and configuration

Dependency Graph

Challenge (App)
└── ChallengeAppKit
    β”œβ”€β”€ ChallengeCore
    β”œβ”€β”€ ChallengeNetworking
    β”œβ”€β”€ ChallengeCharacter
    β”‚   β”œβ”€β”€ ChallengeCore
    β”‚   β”œβ”€β”€ ChallengeNetworking
    β”‚   β”œβ”€β”€ ChallengeResources
    β”‚   └── ChallengeDesignSystem
    β”œβ”€β”€ ChallengeEpisode
    β”‚   β”œβ”€β”€ ChallengeCore
    β”‚   β”œβ”€β”€ ChallengeNetworking
    β”‚   β”œβ”€β”€ ChallengeResources
    β”‚   └── ChallengeDesignSystem
    β”œβ”€β”€ ChallengeHome
    β”‚   β”œβ”€β”€ ChallengeCore
    β”‚   β”œβ”€β”€ ChallengeResources
    β”‚   β”œβ”€β”€ ChallengeDesignSystem
    β”‚   └── Lottie (external)
    └── ChallengeSystem
        β”œβ”€β”€ ChallengeCore
        β”œβ”€β”€ ChallengeResources
        └── ChallengeDesignSystem

Libraries (base dependencies):
β”œβ”€β”€ ChallengeCore (no dependencies)
β”œβ”€β”€ ChallengeNetworking (no dependencies)
β”œβ”€β”€ ChallengeResources β†’ ChallengeCore
β”œβ”€β”€ ChallengeDesignSystem β†’ ChallengeCore
└── ChallengeSnapshotTestKit (test-only, wraps swift-snapshot-testing)