# nalexn/clean-architecture-swiftui

SwiftUI sample app using Clean Architecture. Examples of working with SwiftData persistence, networking, dependency injection, unit testing, and more.

Repository: https://github.com/nalexn/clean-architecture-swiftui
Canonical: https://ross.abutalabs.com/products/clean-architecture-swiftui
Language: Swift
License: MIT
License Family: permissive
Topics: swiftui, swift, architecture, clean-architecture, cleanarchitecture, example-project, swiftui-example, mvvm, interactor, sample, demo, swift-data, swift-testing, swiftdata, viewinspector
Last push: 2025-07-14T17:10:30+00:00

## Health v2 (maintenance only)
Score: 37/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 31, release rhythm 8, longevity 100
- inputs: {"age_days": 2501, "days_push": 415, "days_rel": 633, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 6592, forks 827 (observed 2026-08-28T04:09:45.551771+00:00)

## What it is
A demo SwiftUI application showcasing Clean Architecture with decoupled presentation, business logic, and data access layers. It demonstrates SwiftData persistence, async-await networking, native dependency injection, programmatic navigation, and full test coverage including UI tests.

## Use cases
- learn clean architecture for swiftui apps
- example of structuring a swiftui project with mvvm
- see how to do dependency injection in swiftui
- sample app with swiftdata persistence and networking
- learn programmatic navigation and deep linking in swiftui
- reference for testing swiftui views with viewinspector

## When to choose
- starting a new SwiftUI app and wanting a proven architecture template
- learning how to separate presentation, business logic, and data access layers in Swift
- looking for a fully tested example app covering networking, persistence, and DI

## When to avoid
- you need a production-ready framework or library rather than a sample project
- your project targets UIKit or non-Apple platforms
- you need an architecture other than Clean Architecture or MVVM

## Facets
- artifact type: learning-resource
- maturity: active
- function: state-management, http-client, testing, mobile-framework
- domain: mobile-development, tutorials, web-development
- platform: -
- tags: swiftui, clean-architecture, mvvm, swiftdata, combine, sample-app, dependency-injection, unit-testing, ios, macos, swift, mobile

## Member repositories
- nalexn/clean-architecture-swiftui (main) score 37

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:45.551771+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:43:33.734797+00:00, confidence not recorded.
  - readme: https://github.com/nalexn/clean-architecture-swiftui (fetched 2026-08-28T04:09:45.551771+00:00, sha 45496f8efc23)
- Data as of 2026-08-30T08:39:29.467469+00:00.
