Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standard Improvements #73

Merged
merged 12 commits into from
Jul 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,13 @@ jobs:
runsonlabels: '["macOS", "self-hosted"]'
scheme: Spezi-Package
build:
name: Build for CodeQL & Swift 5.7
name: CodeQL
permissions:
contents: read
security-events: write
uses: StanfordSpezi/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
with:
runsonlabels: '["macos-13"]'
xcodeversion: 14.2.0
scheme: Spezi-Package
test: false
codeql: true
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.7
// swift-tools-version:5.8

//
// This source file is part of the Stanford Spezi open-source project
Expand Down
25 changes: 17 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,25 @@ For more information, please refer to the [API documentation](https://swiftpacka

## The Spezi Architecture

Spezi introduces a standards-based modular approach to building digital health applications. A standard builds the shared repository of data mapped to a common understanding that is used to exchange data between Spezi modules.
Spezi introduces a standards-based modular approach to building digital health applications.
A 'Standard' defines the key component that orchestrates the data flow in the application by meeting requirements defined by components.
You can learn more about the 'Standard' protocol and when it is advised to create your own standard in your application in the <doc:Standard> documentation.

We differentiate between five different types of modules:
- **Standard**: Acts as a shared repository and common ground of communication between modules. We, e.g., provide the FHIR standard as a great standard to build your digital health applications.
- **Data Sources**: Provide input to a standard and utilize the standard's data source registration functionality and adapters to transform data into the standardized format. Examples include the HealthKit data source.
- **Data Source User Interfaces**: Data source user interfaces are data sources that also present user interface components. This, e.g., includes the questionnaire module in the Spezi Swift Package.
- **Data Storage Providers**: Data storage providers obtain elements from a standard and persistently store them. Examples include uploading the data to a cloud storage provider such as the Firebase module.
- **Research Application User Interface**: Research application user interfaces display additional context in the application and include the onboarding, consent, and contacts modules to display great digital health applications.
A 'Component' defines a software subsystem providing distinct and reusable functionality.
Components can use the constraint mechanism to enforce a set of requirements to the standard used in the Spezi-based software where the component is used.
Components also define dependencies on each other to reuse functionality and can communicate with other components by offering and collecting information.
They can also conform to different additional protocols to provide additional access to Spezi features, such lifecycle management and triggering view updates in SwiftUI using the observable mechanisms in Swift.
You can learn more about components in the <doc:Component> documentation.

![System Architecture of the Spezi Framework](Sources/Spezi/Spezi.docc/Resources/SystemArchitecture.jpg)
To simplify the creation of components, a common set of functionalities typically used by components is summarized in the 'Module' protocol, making it an easy one-stop solution to support all these different functionalities and build a capable Spezi module.

> Note: Spezi relies on an ecosystem of modules. Think about what modules you want to build and contribute to the open-source community! Refer to 'Component' and 'Module' documentation to learn more about building your modules.

You can find a list of modules and reusable Swift Packages offered by the Spezi team at Stanford at https://swiftpackageindex.com/StanfordSpezi.
Learn more about Spezi at https://spezi.stanford.edu.
Reach out to us on social media and use the [Stanford Spezi Discussion Forum](https://github.com/orgs/StanfordSpezi/discussions) to ask any Spezi-related questions or share the projects you built with Spezi.

Check out the [Stanford Biodesign Digital Health Group GitHub organization](), for example, applications built with Spezi and some of our related open-source and research projects.

The [API documentation](https://swiftpackageindex.com/StanfordSpezi/Spezi/documentation) includes a selector to switch between the different Swift Package Manager Targets, allowing you to explore the different modules that are included in the Spezi repository.

Expand Down
101 changes: 0 additions & 101 deletions Sources/Spezi/Adapter/Adapter.swift

This file was deleted.

154 changes: 0 additions & 154 deletions Sources/Spezi/Adapter/AdapterBuilder.swift

This file was deleted.

Loading