A reference architecture for building modular Swift projects using Swift Package Manager as the foundation.
ExtremePackaging is a project template and methodology focused on maximal modularity and minimal coupling. Each feature or domain is isolated into its own Swift package with a single, clear responsibility — making the codebase faster to build, easier to reason about, and naturally scalable across iOS, macOS, and server targets.
- Isolate everything. Each package is self-contained with its own dependencies.
- Share only contracts. Communication happens through public interfaces, never implementations.
- Scale gradually. The architecture grows in defined stages, from a simple package setup to a complete multi-platform workspace.
- Automate hygiene. SwiftLint and SwiftFormat keep every stage clean and consistent.
ExtremePackaging/
├── Apps/
│ ├── iOSApp/
│ └── macOSApp/
├── Packages/
│ ├── AppFeature/
│ └── SharedModels/
└── Main.xcworkspace
- Packages contain all shared logic (features, models, utilities).
- Apps act as thin platform shells.
- Workspace ties everything together for development.
git clone https://github.com/mihaelamj/ExtremePackaging.git
cd ExtremePackaging
xed .Each stage of the repo represents a checkpoint in the project’s evolution:
- 🏁 Stage 01 – Initialize packages
- ⚙️ Stage 02 – Add workspace
- 💻 Stage 03 – Add iOS & macOS apps
Switch between stages using Git branches to explore how modularity grows step by step.
git checkout stage/03-apps-addedBuilt-in support for:
- 🧹 SwiftLint for static analysis
- 🧾 SwiftFormat for consistent style
- 🧱 SwiftPM for dependency isolation
All configurations are included and ready to extend per package.
ExtremePackaging promotes an architecture that remains transparent as it scales. By embracing modular design from day one, teams can iterate faster, test independently, and keep codebases healthy — even in long-lived projects.
“Design for separation, not complexity.”