Ross ROSS = Recommend OSS · open-source software intelligence for agents

hmlongco/Factory

A modern approach to Container-Based Dependency Injection for Swift and SwiftUI. observed · 2026-08-28

github.com/hmlongco/Factory · Swift · MIT (permissive) observed · 2026-08-28

Health v2 · maintenance only

96/100

  • Activity 97
  • Release rhythm 93
  • Longevity 100
How is this computed?

round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.

  • gap_med: 3.0
  • age_days: 1554
  • days_rel: 49
  • days_push: 23
  • n_releases_24m: 29

Full methodology

Adoption not part of the score

2895 stars · 192 forks observed · 2026-08-28

What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded

Factory is a lightweight, compile-time safe dependency injection library for Swift and SwiftUI, built around container-based factory registrations. It supports scopes, parameters, contexts, and easy testing with minimal setup and no code generation.

Use cases

  • dependency injection in swiftui apps
  • replace storyboard singletons with injectable services
  • unit test view models with mocked dependencies
  • swiftui preview with mock services
  • manage service lifetimes with scopes
  • ios mvvm architecture with injected dependencies

When to choose

  • you want a lightweight DI solution with no build scripts or code generation
  • your project uses SwiftUI or UIKit on Apple platforms
  • you need compile-time safety for service resolution
  • you want fast resolution and easy testability

When to avoid

  • you need dependency injection on non-Apple platforms
  • you prefer purely constructor-based injection without a container
  • your team standardizes on a different DI framework already

Facets

library · maturity active

middleware developer-tools testing mobile-development developer-tools cross-platform dependency-injection swiftui service-locator containers mvvm swift ios macos

1 source

Member repositories

RepositoryRoleHealth v2
hmlongco/Factorymain96

For agents

markdown · JSON · MCP: product_card(name="hmlongco/Factory")

Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem