Skip to content

Repository files navigation

Stanford Grove

Build and Test REUSE status License: MIT

Open-source framework for the rapid development of modern, interoperable digital health applications.

Overview

Note

Refer to the Initial Setup instructions to integrate Grove into your application.

Grove introduces a module-based approach to building digital health applications.

An onboarding page with a title, information areas and floating action buttons An onboarding page with a title, information areas and floating action buttons The account setup view with email and password fields, Sign In, Create Account and Sign in with Apple The account setup view with email and password fields, Sign In, Create Account and Sign in with Apple A signed consent document with its name and signature fields A signed consent document with its name and signature fields Scheduled tasks listed for the day Scheduled tasks listed for the day
Grove Onboarding Grove Account Grove Consent Grove Scheduler
The paired devices list of the Bluetooth device modules The paired devices list of the Bluetooth device modules A questionnaire page with a choice, a multiple choice, a slider and a time question on cards A questionnaire page with a choice, a multiple choice, a slider and a time question on cards A conversation with an attached chart and a picture the assistant generated A conversation with an attached chart and a picture the assistant generated A conversation in which the assistant calls a function to read health samples before answering A conversation in which the assistant calls a function to read health samples before answering
Grove Devices Grove Questionnaire Grove Chat Grove LLM

The conversations in the last two tiles run over OpenAI, Anthropic, Gemini, Apple's Foundation Models or a model on the device, and the assistant calls into your app when it needs data.

An Ecosystem of Modules

You can find the modules and reusable Swift packages included in this monorepo in Package.swift.

Note

Grove relies on an ecosystem of modules. Consider what modules you want to build and contribute to the open-source community. Refer to the Grove Guide and Documentation Guide for requirements for Grove-based software, and see the Module documentation to learn more about building your modules.

Add Grove to Your App

This monorepo version of Grove is distributed as one Swift Package that contains the core Grove library and several optional Grove modules. Add only the products your app needs; for example, most apps start with Grove and then add modules such as GroveViews, GroveOnboarding, GroveConsent, GroveAccount, or GroveHealthKit.

Xcode

  1. Open your app project in Xcode.

  2. Select File > Add Package Dependencies....

  3. Enter the package URL:

    https://github.com/SchmiedmayerLab/Grove.git
    
  4. Choose a dependency rule:

    • Choose Up to Next Minor Version.
    • Enter the latest tagged 0.x release.
  5. Select the Grove products your app target needs. At minimum, select Grove. Add additional products only when you use them, such as GroveViews, GroveOnboarding, GroveConsent, GroveAccount, or GroveHealthKit.

  6. Make sure the products are added to your app target, not only to a test target.

  7. Import the modules in Swift files where you use them:

    import Grove
    import GroveViews

Swift Package Manager

If your app or library already has a Package.swift, add this package to the dependencies section:

.package(url: "https://github.com/SchmiedmayerLab/Grove.git", .upToNextMinor(from: "0.3.0"))

Then add the products you use to the target that needs them:

.target(
    name: "MyApp",
    dependencies: [
        .product(name: "Grove", package: "Grove"),
        .product(name: "GroveViews", package: "Grove"),
        .product(name: "GroveOnboarding", package: "Grove")
    ]
)

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.

The Grove Building Blocks

Note

The Grove Guide and Documentation Guide outline the requirements for Grove-based modules, including terminology, guidance, and examples on structuring a Grove 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 Grove-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 Grove 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 Grove documentation catalog.

Contributing

Contributions to this project are welcome. Please make sure to read the contribution guide, the contribution guidelines and the contributor covenant code of conduct first. You can find a list of contributors in the CONTRIBUTORS.md file.

License

This project is licensed under the MIT License. See LICENSE.md for more information.

Citation

If you use this software, please cite it using the metadata in CITATION.cff, which GitHub surfaces through the Cite this repository button.

Our Research

For more information, visit the Schmiedmayer Lab GitHub organization.

Schmiedmayer Lab Schmiedmayer Lab

About

Open-source framework for building modern, interoperable digital health applications.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

4 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages