diff --git a/README.md b/README.md index 78214888..0702a6b5 100644 --- a/README.md +++ b/README.md @@ -16,14 +16,46 @@ SPDX-License-Identifier: MIT [![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FStanfordSpezi%2FSpeziAccount%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/StanfordSpezi/SpeziAccount) [![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FStanfordSpezi%2FSpeziAccount%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/StanfordSpezi/SpeziAccount) -The Account module provides account-related functionality for Spezi-based applications. -It provides two standardized views with Account Setup, Overview and Edit functionality. -It allows integrating arbitrary account management services using the Account Service abstraction. +A Spezi framework that provides account-related functionality including login, sign up and password reset. + +## Overview + +The `SpeziAccount` framework fully abstracts setup and management of user account functionality for the +[Spezi](https://github.com/StanfordSpezi/Spezi/) framework ecosystem. + +|![Screenshot displaying the account setup view with an email and password prompt and a Sign In with Apple button.](Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountSetup.png#gh-light-mode-only) ![Screenshot displaying the account setup view with an email and password prompt and a Sign In with Apple button.](Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountSetup~dark.png#gh-dark-mode-only)|![Screenshot displaying the Signup Form for Account setup.](Sources/SpeziAccount/SpeziAccount.docc/Resources/SignupForm.png#gh-light-mode-only) ![Screenshot displaying the Signup Form for Account setup.](Sources/SpeziAccount/SpeziAccount.docc/Resources/SignupForm~dark.png#gh-dark-mode-only)|![Screenshot displaying the Account Overview.](Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountOverview.png#gh-light-mode-only) ![Screenshot displaying the Account Overview.](Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountOverview~dark.png#gh-dark-mode-only)| +|:--:|:--:|:--:| +|The [`AccountSetup`](https://swiftpackageindex.com/stanfordspezi/speziaccount/documentation/speziaccount/accountsetup) is the central view for account onboarding, facilitating account login and creation. |The [`SignupForm`](https://swiftpackageindex.com/stanfordspezi/speziaccount/documentation/speziaccount/signupform) is used by email-password-based AccountServices by default. |The [`AccountOverview`](https://swiftpackageindex.com/stanfordspezi/speziaccount/documentation/speziaccount/accountoverview) is used to view and modify the user details of the currently associated account.| + + +The ``AccountSetup`` and ``AccountOverview`` views are central to `SpeziAccount`. +You use the ``AccountDetails`` abstraction within your views to visualize account information of the associated user account. + +An ``AccountService`` provides an abstraction layer for managing different types of account management services +(e.g., email address and password-based service combined with an identity provider like Sign in with Apple). For more information, please refer to the [API documentation](https://swiftpackageindex.com/StanfordSpezi/SpeziAccount/documentation). +> [!NOTE] +> The [SpeziFirebase](https://github.com/StanfordSpezi/SpeziFirebase) +framework provides the [`FirebaseAccountConfiguration`](https://swiftpackageindex.com/stanfordspezi/spezifirebase/documentation/spezifirebaseaccount/firebaseaccountconfiguration) +you can use to configure an Account Service base on the Google Firebase service. -## The Spezi Template Application + +## Setup + +You need to add the Spezi Account Swift package to +[your app in Xcode](https://developer.apple.com/documentation/xcode/adding-package-dependencies-to-your-app#) or +[Swift package](https://developer.apple.com/documentation/xcode/creating-a-standalone-swift-package-with-xcode#Add-a-dependency-on-another-Swift-package). + +> [!IMPORTANT] +> If your application is not yet configured to use Spezi, follow the [Spezi setup article](https://swiftpackageindex.com/stanfordspezi/spezi/documentation/spezi/initial-setup) to set up the core Spezi infrastructure. + +The [Initial Setup](https://swiftpackageindex.com/stanfordspezi/speziaccount/documentation/speziaccount/initial-setup) +article provides a quick-start guide to set up `SpeziAccount` in your App. +Refer to the +[Creating your own Account Service](https://swiftpackageindex.com/stanfordspezi/speziaccount/documentation/speziaccount/creating-your-own-account-service) +article if you plan on implementing your own Account Service. The [Spezi Template Application](https://github.com/StanfordSpezi/SpeziTemplateApplication) provides a great starting point and example using the Spezi Account module. @@ -31,10 +63,9 @@ The [Spezi Template Application](https://github.com/StanfordSpezi/SpeziTemplateA Contributions to this project are welcome. Please make sure to read the [contribution guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md) and the [contributor covenant code of conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md) first. - ## License This project is licensed under the MIT License. See [Licenses](https://github.com/StanfordSpezi/SpeziAccount/tree/main/LICENSES) for more information. -![Spezi Footer](https://raw.githubusercontent.com/StanfordSpezi/.github/main/assets/FooterLight.png#gh-light-mode-only) -![Spezi Footer](https://raw.githubusercontent.com/StanfordSpezi/.github/main/assets/FooterDark.png#gh-dark-mode-only) +![Spezi Footer](https://raw.githubusercontent.com/StanfordSpezi/.github/main/assets/Footer.png#gh-light-mode-only) +![Spezi Footer](https://raw.githubusercontent.com/StanfordSpezi/.github/main/assets/Footer~dark.png#gh-dark-mode-only) diff --git a/Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountEdit.png b/Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountEdit.png new file mode 100644 index 00000000..ae8f7973 Binary files /dev/null and b/Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountEdit.png differ diff --git a/Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountEdit.png.license b/Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountEdit.png.license new file mode 100644 index 00000000..9bfad3b0 --- /dev/null +++ b/Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountEdit.png.license @@ -0,0 +1,5 @@ +This source file is part of the Stanford Spezi open-source project + +SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) + +SPDX-License-Identifier: MIT diff --git a/Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountEdit~dark.png b/Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountEdit~dark.png new file mode 100644 index 00000000..58464a6e Binary files /dev/null and b/Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountEdit~dark.png differ diff --git a/Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountEdit~dark.png.license b/Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountEdit~dark.png.license new file mode 100644 index 00000000..9bfad3b0 --- /dev/null +++ b/Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountEdit~dark.png.license @@ -0,0 +1,5 @@ +This source file is part of the Stanford Spezi open-source project + +SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) + +SPDX-License-Identifier: MIT diff --git a/Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountOverview.png b/Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountOverview.png new file mode 100644 index 00000000..5dc2f6e6 Binary files /dev/null and b/Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountOverview.png differ diff --git a/Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountOverview.png.license b/Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountOverview.png.license new file mode 100644 index 00000000..9bfad3b0 --- /dev/null +++ b/Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountOverview.png.license @@ -0,0 +1,5 @@ +This source file is part of the Stanford Spezi open-source project + +SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) + +SPDX-License-Identifier: MIT diff --git a/Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountOverview~dark.png b/Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountOverview~dark.png new file mode 100644 index 00000000..4d04c92b Binary files /dev/null and b/Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountOverview~dark.png differ diff --git a/Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountOverview~dark.png.license b/Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountOverview~dark.png.license new file mode 100644 index 00000000..9bfad3b0 --- /dev/null +++ b/Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountOverview~dark.png.license @@ -0,0 +1,5 @@ +This source file is part of the Stanford Spezi open-source project + +SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) + +SPDX-License-Identifier: MIT diff --git a/Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountSetup.png b/Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountSetup.png new file mode 100644 index 00000000..84fe597c Binary files /dev/null and b/Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountSetup.png differ diff --git a/Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountSetup.png.license b/Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountSetup.png.license new file mode 100644 index 00000000..9bfad3b0 --- /dev/null +++ b/Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountSetup.png.license @@ -0,0 +1,5 @@ +This source file is part of the Stanford Spezi open-source project + +SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) + +SPDX-License-Identifier: MIT diff --git a/Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountSetup~dark.png b/Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountSetup~dark.png new file mode 100644 index 00000000..9d3edef1 Binary files /dev/null and b/Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountSetup~dark.png differ diff --git a/Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountSetup~dark.png.license b/Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountSetup~dark.png.license new file mode 100644 index 00000000..9bfad3b0 --- /dev/null +++ b/Sources/SpeziAccount/SpeziAccount.docc/Resources/AccountSetup~dark.png.license @@ -0,0 +1,5 @@ +This source file is part of the Stanford Spezi open-source project + +SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) + +SPDX-License-Identifier: MIT diff --git a/Sources/SpeziAccount/SpeziAccount.docc/Resources/SignupForm.png b/Sources/SpeziAccount/SpeziAccount.docc/Resources/SignupForm.png new file mode 100644 index 00000000..2911c4e4 Binary files /dev/null and b/Sources/SpeziAccount/SpeziAccount.docc/Resources/SignupForm.png differ diff --git a/Sources/SpeziAccount/SpeziAccount.docc/Resources/SignupForm.png.license b/Sources/SpeziAccount/SpeziAccount.docc/Resources/SignupForm.png.license new file mode 100644 index 00000000..9bfad3b0 --- /dev/null +++ b/Sources/SpeziAccount/SpeziAccount.docc/Resources/SignupForm.png.license @@ -0,0 +1,5 @@ +This source file is part of the Stanford Spezi open-source project + +SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) + +SPDX-License-Identifier: MIT diff --git a/Sources/SpeziAccount/SpeziAccount.docc/Resources/SignupForm~dark.png b/Sources/SpeziAccount/SpeziAccount.docc/Resources/SignupForm~dark.png new file mode 100644 index 00000000..b3015cd1 Binary files /dev/null and b/Sources/SpeziAccount/SpeziAccount.docc/Resources/SignupForm~dark.png differ diff --git a/Sources/SpeziAccount/SpeziAccount.docc/Resources/SignupForm~dark.png.license b/Sources/SpeziAccount/SpeziAccount.docc/Resources/SignupForm~dark.png.license new file mode 100644 index 00000000..9bfad3b0 --- /dev/null +++ b/Sources/SpeziAccount/SpeziAccount.docc/Resources/SignupForm~dark.png.license @@ -0,0 +1,5 @@ +This source file is part of the Stanford Spezi open-source project + +SPDX-FileCopyrightText: 2023 Stanford University and the project authors (see CONTRIBUTORS.md) + +SPDX-License-Identifier: MIT diff --git a/Sources/SpeziAccount/SpeziAccount.docc/SpeziAccount.md b/Sources/SpeziAccount/SpeziAccount.docc/SpeziAccount.md index 4461374b..7578631a 100644 --- a/Sources/SpeziAccount/SpeziAccount.docc/SpeziAccount.md +++ b/Sources/SpeziAccount/SpeziAccount.docc/SpeziAccount.md @@ -15,9 +15,25 @@ SPDX-License-Identifier: MIT ## Overview The `SpeziAccount` framework fully abstracts setup and management of user account functionality for the -[Spezi](https://swiftpackageindex.com/stanfordspezi/spezi/documentation/spezi) framework ecosystem. - -> Note: The article provides a quick-start guide to set up `SpeziAccount` in your App. +[Spezi](https://github.com/StanfordSpezi/Spezi/) framework ecosystem. + +@Row { + @Column { + @Image(source: "AccountSetup", alt: "Screenshot displaying the account setup view with an email and password prompt and a Sign In with Apple button.") { + The ``AccountSetup`` is the central view for account onboarding, facilitating account login and creation. + } + } + @Column { + @Image(source: "SignupForm", alt: "Screenshot displaying the Signup Form for Account setup.") { + The ``SignupForm`` is used by email-password-based AccountServices by default. + } + } + @Column { + @Image(source: "AccountOverview", alt: "Screenshot displaying the Account Overview.") { + The ``AccountOverview`` is used to view and modify the user details of the currently associated account. + } + } +} The ``AccountSetup`` and ``AccountOverview`` views are central to `SpeziAccount`. You use the ``AccountDetails`` abstraction within your views to visualize account information of the associated user account. @@ -25,8 +41,21 @@ You use the ``AccountDetails`` abstraction within your views to visualize accoun An ``AccountService`` provides an abstraction layer for managing different types of account management services (e.g., email address and password-based service combined with an identity provider like Sign in with Apple). -> Note: The [SpeziFirebase](https://swiftpackageindex.com/StanfordSpezi/SpeziFirebase/documentation/spezifirebaseaccount) - framework provides the `FirebaseAccountConfiguration` you can use to configure an Account Service base on the Google Firebase service. +> Note: The [SpeziFirebase](https://github.com/StanfordSpezi/SpeziFirebase) +framework provides the [`FirebaseAccountConfiguration`](https://swiftpackageindex.com/stanfordspezi/spezifirebase/documentation/spezifirebaseaccount/firebaseaccountconfiguration) +you can use to configure an Account Service base on the Google Firebase service. + +## Setup + +You need to add the Spezi Account Swift package to +[your app in Xcode](https://developer.apple.com/documentation/xcode/adding-package-dependencies-to-your-app#) or +[Swift package](https://developer.apple.com/documentation/xcode/creating-a-standalone-swift-package-with-xcode#Add-a-dependency-on-another-Swift-package). + +> Important: If your application is not yet configured to use Spezi, follow the [Spezi setup article](https://swiftpackageindex.com/stanfordspezi/spezi/documentation/spezi/initial-setup) to set up the core Spezi infrastructure. + +The article provides a quick-start guide to set up `SpeziAccount` in your App. + +Refer to the article if you plan on implementing your own Account Service. ## Topics