Open-source framework for the rapid development of modern, interoperable digital health applications.
Note
Refer to the Initial Setup instructions to integrate Spezi into your application.
Spezi introduces a module-based approach to building digital health applications.
|
|
|
|
Spezi Onboarding
and
Spezi Consent
|
Spezi Bluetooth
and
Spezi Devices
|
Spezi Questionnaire
|
|
|
|
Spezi Account
|
Spezi Views
, including
SpeziValidation
|
Spezi LLM
|
You can find the modules and reusable Swift packages included in this monorepo in Package.swift.
Note
Spezi relies on an ecosystem of modules. Consider what modules you want to build and contribute to the open-source community. Refer to the Spezi Guide and Documentation Guide for requirements for Spezi-based software, and see the Module documentation to learn more about building your modules.
This monorepo version of Spezi is distributed as one Swift Package that contains the core Spezi library and several optional Spezi modules.
Add only the products your app needs; for example, most apps start with Spezi and then add modules such as SpeziViews, SpeziOnboarding, SpeziConsent, SpeziAccount, or SpeziHealthKit.
-
Open your app project in Xcode.
-
Select File > Add Package Dependencies....
-
Enter the package URL:
https://github.com/SchmiedmayerLab/Spezi.git -
Choose a dependency rule:
- Choose Up to Next Minor Version.
- Enter the latest tagged
0.xrelease.
-
Select the Spezi products your app target needs. At minimum, select
Spezi. Add additional products only when you use them, such asSpeziViews,SpeziOnboarding,SpeziConsent,SpeziAccount, orSpeziHealthKit. -
Make sure the products are added to your app target, not only to a test target.
-
Import the modules in Swift files where you use them:
import Spezi import SpeziViews
If your app or library already has a Package.swift, add this package to the dependencies section:
.package(url: "https://github.com/SchmiedmayerLab/Spezi.git", .upToNextMinor(from: "0.1.0"))Then add the products you use to the target that needs them:
.target(
name: "MyApp",
dependencies: [
.product(name: "Spezi", package: "Spezi"),
.product(name: "SpeziViews", package: "Spezi"),
.product(name: "SpeziOnboarding", package: "Spezi")
]
)Use an Xcode or Swift toolchain that supports Swift Package tools version 6.2. If Xcode cannot resolve the package, confirm that the package URL and selected version are correct, then use File > Packages > Resolve Package Versions.
Note
The Spezi Guide and Documentation Guide outline the requirements for Spezi-based modules, including terminology, guidance, and examples on structuring a Spezi module, Swift package, and repository.
A Standard defines the key coordinator that orchestrates data flow in an application by meeting requirements defined by modules.
You can learn more about the Standard protocol and when it is advised to create your own standard in the Standard documentation.
A Module defines a software subsystem that provides distinct and reusable functionality.
Modules can use the constraint mechanism to enforce a set of requirements for the standard used in Spezi-based software.
They can also define dependencies on each other to reuse functionality and can communicate with other modules by offering and collecting information.
Modules may conform to different protocols to access additional Spezi features, such as lifecycle management and triggering view updates in SwiftUI using Swift’s observable mechanisms.
You can learn more about modules in the Module documentation.
For more information, see the Spezi documentation catalog.
Contributions to this project are welcome. Please make sure to read the contribution guide and the Contributor Covenant Code of Conduct first.
The original Spezi and BDHG projects may continue to be maintained in their respective upstream repositories under the StanfordSpezi and StanfordBDHG GitHub organizations. Please refer to the upstream repositories for their current development status and new releases.
This project is licensed under the MIT License. See Licenses for more information.
This repository is based on the StanfordSpezi/Spezi repository and incorporates content from several StanfordSpezi repositories and StanfordBDHG repositories, all of which were published under the MIT License.
Please refer to the individual repositories for detailed and updated contributor lists, including the StanfordSpezi/Spezi contributors file.
For more information, visit the Schmiedmayer Lab GitHub organization.











