# johnsundell/swiftbysundell architecture

> Architecture diagram of the GitHub repository johnsundell/swiftbysundell, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/johnsundell/swiftbysundell
- Repository: https://github.com/johnsundell/swiftbysundell

## Overview

SwiftBySundell is an educational collection of Swift code samples for the Swift by Sundell website and podcast, not a single application with a unified runtime. A learner opens a topic sample and studies its demonstration; the samples are independent. The map groups the repository’s topic branches rather than implying calls between them. Sampled source confirms the individual demonstrations, while unsampled topics are represented by their existing playground entry paths.

Main entry points: [`Basics/Enums.playground/Contents.swift`](https://github.com/johnsundell/swiftbysundell/blob/master/Basics/Enums.playground/Contents.swift) (Enums), [`Basics/access-control.playground/Contents.swift`](https://github.com/johnsundell/swiftbysundell/blob/master/Basics/access-control.playground/Contents.swift) (Access control), [`Basics/closures.playground/Contents.swift`](https://github.com/johnsundell/swiftbysundell/blob/master/Basics/closures.playground/Contents.swift) (Closures), [`Basics/generics.playground/Contents.swift`](https://github.com/johnsundell/swiftbysundell/blob/master/Basics/generics.playground/Contents.swift) (Generics)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_swift["Swift language"]
  node_enums["Enums<br/>[Contents.swift]"]
  node_access["Access control<br/>[Contents.swift]"]
  node_closures["Closures<br/>[Contents.swift]"]
  node_generics["Generics<br/>[Contents.swift]"]
  node_optionals["Optionals<br/>[Contents.swift]"]
  node_properties["Properties<br/>[Contents.swift]"]
  node_protocols["Protocols<br/>[Contents.swift]"]
  node_result["Result<br/>[Contents.swift]"]
  node_errors["Error handling<br/>[Contents.swift]"]
  node_generics2["Type inference<br/>[Contents.swift]"]
  node_values["Value and reference<br/>[Contents.swift]"]
  node_mapping["Map operations<br/>[Contents.swift]"]
  node_complexity["Time complexity<br/>[Contents.swift]"]
  node_memory["Memory management"]
end

subgraph group_app["App development"]
  node_animations["Animations<br/>[Contents.swift]"]
  node_children["Child controllers<br/>[Contents.swift]"]
  node_layout["Layout anchors<br/>[Contents.swift]"]
  node_swiftui["SwiftUI<br/>[Contents.swift]"]
  node_testing["Unit testing<br/>[Contents.swift]"]
end

subgraph group_async["Async and data"]
  node_network["Networking<br/>[Contents.swift]"]
  node_combine["Combine<br/>[Contents.swift]"]
  node_dispatch["Grand Central Dispatch<br/>[Contents.swift]"]
  node_codable["Codable<br/>[Contents.swift]"]
end

subgraph group_blog["Blog samples"]
  node_futures["Futures and promises"]
  node_dsl["Swift DSLs"]
  node_replicator["Replicator layers<br/>[Contents.swift]"]
end

node_learner(("Learner"))

node_learner -->|"studies"| node_enums
node_learner -->|"studies"| node_access
node_learner -->|"studies"| node_closures
node_learner -->|"studies"| node_generics
node_learner -->|"studies"| node_optionals
node_learner -->|"studies"| node_properties
node_learner -->|"studies"| node_protocols
node_learner -->|"studies"| node_result
node_learner -->|"studies"| node_errors
node_learner -->|"studies"| node_generics2
node_learner -->|"studies"| node_values
node_learner -->|"studies"| node_mapping
node_learner -->|"studies"| node_complexity
node_learner -->|"studies"| node_memory
node_learner -->|"studies"| node_animations
node_learner -->|"studies"| node_children
node_learner -->|"studies"| node_layout
node_learner -->|"studies"| node_swiftui
node_learner -->|"studies"| node_testing
node_learner -->|"studies"| node_network
node_learner -->|"studies"| node_combine
node_learner -->|"studies"| node_dispatch
node_learner -->|"studies"| node_codable
node_learner -->|"studies"| node_futures
node_learner -->|"studies"| node_dsl
node_learner -->|"studies"| node_replicator

click node_enums "https://github.com/johnsundell/swiftbysundell/blob/master/Basics/Enums.playground/Contents.swift"
click node_access "https://github.com/johnsundell/swiftbysundell/blob/master/Basics/access-control.playground/Contents.swift"
click node_closures "https://github.com/johnsundell/swiftbysundell/blob/master/Basics/closures.playground/Contents.swift"
click node_generics "https://github.com/johnsundell/swiftbysundell/blob/master/Basics/generics.playground/Contents.swift"
click node_optionals "https://github.com/johnsundell/swiftbysundell/blob/master/Basics/optionals.playground/Contents.swift"
click node_properties "https://github.com/johnsundell/swiftbysundell/blob/master/Basics/properties.playground/Contents.swift"
click node_protocols "https://github.com/johnsundell/swiftbysundell/blob/master/Basics/protocols.playground/Contents.swift"
click node_result "https://github.com/johnsundell/swiftbysundell/blob/master/Basics/result.playground/Contents.swift"
click node_errors "https://github.com/johnsundell/swiftbysundell/blob/master/Basics/error-handling.playground/Contents.swift"
click node_generics2 "https://github.com/johnsundell/swiftbysundell/blob/master/Basics/type-inference.playground/Contents.swift"
click node_values "https://github.com/johnsundell/swiftbysundell/blob/master/Basics/value-and-reference-types.playground/Contents.swift"
click node_mapping "https://github.com/johnsundell/swiftbysundell/blob/master/Basics/map-flatMap-compactMap.playground/Contents.swift"
click node_complexity "https://github.com/johnsundell/swiftbysundell/blob/master/Basics/time-complexity.playground/Contents.swift"
click node_memory "https://github.com/johnsundell/swiftbysundell/blob/master/Basics/MemoryManagement.xcodeproj/MemoryManagement.swift"
click node_animations "https://github.com/johnsundell/swiftbysundell/blob/master/Basics/animations.playground/Contents.swift"
click node_children "https://github.com/johnsundell/swiftbysundell/blob/master/Basics/child-view-controllers.playground/Contents.swift"
click node_layout "https://github.com/johnsundell/swiftbysundell/blob/master/Basics/layout-anchors.playground/Contents.swift"
click node_swiftui "https://github.com/johnsundell/swiftbysundell/blob/master/Basics/swiftui.playground/Contents.swift"
click node_testing "https://github.com/johnsundell/swiftbysundell/blob/master/Basics/unit-testing.playground/Contents.swift"
click node_network "https://github.com/johnsundell/swiftbysundell/blob/master/Basics/networking.playground/Contents.swift"
click node_combine "https://github.com/johnsundell/swiftbysundell/blob/master/Basics/combine.playground/Contents.swift"
click node_dispatch "https://github.com/johnsundell/swiftbysundell/blob/master/Basics/grand-central-dispatch.playground/Contents.swift"
click node_codable "https://github.com/johnsundell/swiftbysundell/blob/master/Basics/codable.playground/Contents.swift"
click node_futures "https://github.com/johnsundell/swiftbysundell/blob/master/Blog/Under-the-hood-of-Futures-and-Promises.swift"
click node_dsl "https://github.com/johnsundell/swiftbysundell/blob/master/Blog/building-dsls-in-swift.swift"
click node_replicator "https://github.com/johnsundell/swiftbysundell/blob/master/Blog/Using-replicator-layers.playground/Contents.swift"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_enums,node_access,node_closures,node_generics,node_optionals,node_properties,node_protocols,node_result,node_errors,node_generics2,node_values,node_mapping,node_complexity,node_memory toneBlue
class node_animations,node_children,node_layout,node_swiftui,node_testing toneAmber
class node_network,node_combine,node_dispatch,node_codable toneMint
class node_futures,node_dsl,node_replicator toneRose
class node_learner toneIndigo
```

## Components

### Swift language

- [Enums](https://github.com/johnsundell/swiftbysundell/blob/master/Basics/Enums.playground/Contents.swift): `Basics/Enums.playground/Contents.swift`
- [Access control](https://github.com/johnsundell/swiftbysundell/blob/master/Basics/access-control.playground/Contents.swift): `Basics/access-control.playground/Contents.swift`
- [Closures](https://github.com/johnsundell/swiftbysundell/blob/master/Basics/closures.playground/Contents.swift): `Basics/closures.playground/Contents.swift`
- [Generics](https://github.com/johnsundell/swiftbysundell/blob/master/Basics/generics.playground/Contents.swift): `Basics/generics.playground/Contents.swift`
- [Optionals](https://github.com/johnsundell/swiftbysundell/blob/master/Basics/optionals.playground/Contents.swift): `Basics/optionals.playground/Contents.swift`
- [Properties](https://github.com/johnsundell/swiftbysundell/blob/master/Basics/properties.playground/Contents.swift): `Basics/properties.playground/Contents.swift`
- [Protocols](https://github.com/johnsundell/swiftbysundell/blob/master/Basics/protocols.playground/Contents.swift): `Basics/protocols.playground/Contents.swift`
- [Result](https://github.com/johnsundell/swiftbysundell/blob/master/Basics/result.playground/Contents.swift): `Basics/result.playground/Contents.swift`
- [Error handling](https://github.com/johnsundell/swiftbysundell/blob/master/Basics/error-handling.playground/Contents.swift): `Basics/error-handling.playground/Contents.swift`
- [Type inference](https://github.com/johnsundell/swiftbysundell/blob/master/Basics/type-inference.playground/Contents.swift): `Basics/type-inference.playground/Contents.swift`
- [Value and reference](https://github.com/johnsundell/swiftbysundell/blob/master/Basics/value-and-reference-types.playground/Contents.swift): `Basics/value-and-reference-types.playground/Contents.swift`
- [Map operations](https://github.com/johnsundell/swiftbysundell/blob/master/Basics/map-flatMap-compactMap.playground/Contents.swift): `Basics/map-flatMap-compactMap.playground/Contents.swift`
- [Time complexity](https://github.com/johnsundell/swiftbysundell/blob/master/Basics/time-complexity.playground/Contents.swift): `Basics/time-complexity.playground/Contents.swift`
- [Memory management](https://github.com/johnsundell/swiftbysundell/blob/master/Basics/MemoryManagement.xcodeproj/MemoryManagement.swift): `Basics/MemoryManagement.xcodeproj/MemoryManagement.swift`

### App development

- [Animations](https://github.com/johnsundell/swiftbysundell/blob/master/Basics/animations.playground/Contents.swift): `Basics/animations.playground/Contents.swift`
- [Child controllers](https://github.com/johnsundell/swiftbysundell/blob/master/Basics/child-view-controllers.playground/Contents.swift): `Basics/child-view-controllers.playground/Contents.swift`
- [Layout anchors](https://github.com/johnsundell/swiftbysundell/blob/master/Basics/layout-anchors.playground/Contents.swift): `Basics/layout-anchors.playground/Contents.swift`
- [SwiftUI](https://github.com/johnsundell/swiftbysundell/blob/master/Basics/swiftui.playground/Contents.swift): `Basics/swiftui.playground/Contents.swift`
- [Unit testing](https://github.com/johnsundell/swiftbysundell/blob/master/Basics/unit-testing.playground/Contents.swift): `Basics/unit-testing.playground/Contents.swift`

### Async and data

- [Networking](https://github.com/johnsundell/swiftbysundell/blob/master/Basics/networking.playground/Contents.swift): `Basics/networking.playground/Contents.swift`
- [Combine](https://github.com/johnsundell/swiftbysundell/blob/master/Basics/combine.playground/Contents.swift): `Basics/combine.playground/Contents.swift`
- [Grand Central Dispatch](https://github.com/johnsundell/swiftbysundell/blob/master/Basics/grand-central-dispatch.playground/Contents.swift): `Basics/grand-central-dispatch.playground/Contents.swift`
- [Codable](https://github.com/johnsundell/swiftbysundell/blob/master/Basics/codable.playground/Contents.swift): `Basics/codable.playground/Contents.swift`

### Blog samples

- [Futures and promises](https://github.com/johnsundell/swiftbysundell/blob/master/Blog/Under-the-hood-of-Futures-and-Promises.swift): `Blog/Under-the-hood-of-Futures-and-Promises.swift`
- [Swift DSLs](https://github.com/johnsundell/swiftbysundell/blob/master/Blog/building-dsls-in-swift.swift): `Blog/building-dsls-in-swift.swift`
- [Replicator layers](https://github.com/johnsundell/swiftbysundell/blob/master/Blog/Using-replicator-layers.playground/Contents.swift): `Blog/Using-replicator-layers.playground/Contents.swift`

### Other components

- **Learner**

## Connections

- Learner → Enums: studies
- Learner → Access control: studies
- Learner → Closures: studies
- Learner → Generics: studies
- Learner → Optionals: studies
- Learner → Properties: studies
- Learner → Protocols: studies
- Learner → Result: studies
- Learner → Error handling: studies
- Learner → Type inference: studies
- Learner → Value and reference: studies
- Learner → Map operations: studies
- Learner → Time complexity: studies
- Learner → Memory management: studies
- Learner → Animations: studies
- Learner → Child controllers: studies
- Learner → Layout anchors: studies
- Learner → SwiftUI: studies
- Learner → Unit testing: studies
- Learner → Networking: studies
- Learner → Combine: studies
- Learner → Grand Central Dispatch: studies
- Learner → Codable: studies
- Learner → Futures and promises: studies
- Learner → Swift DSLs: studies
- Learner → Replicator layers: studies
