hmlongco/Factory
A modern approach to Container-Based Dependency Injection for Swift and SwiftUI. observed · 2026-10-16
Health v2 · maintenance only
99/100
- Activity 99
- Release rhythm 99
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-10-21. Adoption (stars, forks) is never an input.
- gap_med: 3.5
- age_days: 1602
- days_rel: 6
- days_push: 6
- n_releases_24m: 31
Adoption not part of the score
2917 stars · 192 forks observed · 2026-10-16
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
- readme: https://github.com/hmlongco/Factory · fetched 2026-10-16 · 94778d3f647d
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| hmlongco/Factory | main | 99 |
For agents
markdown · JSON · MCP: product_card(name="hmlongco/Factory")
Data as of 2026-10-19T08:05:51.212177+00:00 · Report a problem