diff --git a/.github/images/hero-light.svg b/.github/images/hero-light.svg new file mode 100644 index 00000000..6ba3359c --- /dev/null +++ b/.github/images/hero-light.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.github/images/kotlin-foundation.png b/.github/images/kotlin-foundation.png new file mode 100644 index 00000000..904066f2 Binary files /dev/null and b/.github/images/kotlin-foundation.png differ diff --git a/.github/images/mobile-native-foundation.png b/.github/images/mobile-native-foundation.png new file mode 100644 index 00000000..5b87ffb8 Binary files /dev/null and b/.github/images/mobile-native-foundation.png differ diff --git a/README.md b/README.md index 9bee7843..f67ae8b4 100644 --- a/README.md +++ b/README.md @@ -1,129 +1,38 @@ -
- -

Store5

-
- -[![codecov](https://codecov.io/gh/MobileNativeFoundation/Store/branch/main/graph/badge.svg?token=0UCmG3QHPf)](https://codecov.io/gh/MobileNativeFoundation/Store) - -
-

Full documentation can be found on our website!

-

Join our official Slack on kotlinlang!

-
- -### Concepts - -- [Store](https://mobilenativefoundation.github.io/Store/store/store/) is a typed repository that returns a flow - of [Data](https://github.com/MobileNativeFoundation/Store/blob/main/store/src/commonMain/kotlin/org/mobilenativefoundation/store/store5/StoreReadResponse.kt#L39) - /[Loading](https://github.com/MobileNativeFoundation/Store/blob/main/store/src/commonMain/kotlin/org/mobilenativefoundation/store/store5/StoreReadResponse.kt#L34) - /[Error](https://github.com/MobileNativeFoundation/Store/blob/main/store/src/commonMain/kotlin/org/mobilenativefoundation/store/store5/StoreReadResponse.kt#L51) - from local and network data sources -- [MutableStore](https://mobilenativefoundation.github.io/Store/mutable-store/building/overview/) is a mutable repository implementation that allows create **(C)**, read **(R)**, - update **(U)**, and delete **(D)** operations for local and network resources -- [SourceOfTruth](https://mobilenativefoundation.github.io/Store/mutable-store/building/implementations/source-of-truth/) persists items -- [Fetcher](https://mobilenativefoundation.github.io/Store/mutable-store/building/implementations/fetcher/) defines how data will be fetched over network -- [Updater](https://mobilenativefoundation.github.io/Store/mutable-store/building/implementations/updater/) defines how local changes will be pushed to network -- [Bookkeeper](https://mobilenativefoundation.github.io/Store/mutable-store/building/implementations/bookkeeper/) tracks metadata of local changes and records - synchronization failures -- [Validator](https://mobilenativefoundation.github.io/Store/mutable-store/building/implementations/validator/) returns whether an item is valid -- [Converter](https://mobilenativefoundation.github.io/Store/mutable-store/building/implementations/converter/) converts items - between [Network](https://mobilenativefoundation.github.io/Store/mutable-store/building/generics/network) - /[Local](https://mobilenativefoundation.github.io/Store/mutable-store/building/generics/sot) - /[Output](https://mobilenativefoundation.github.io/Store/mutable-store/building/generics/common) representations - -### Including Store In Your Project - -#### Android -```kotlin -implementation "org.mobilenativefoundation.store:store5:5.1.0-alpha05" -``` - -#### Multiplatform (Common, JVM, Native, JS) - -```kotlin -commonMain { - dependencies { - implementation("org.mobilenativefoundation.store:store5:5.1.0-alpha05") - } -} -``` - -### Getting Started - -#### Building Your First Store - -```kotlin -StoreBuilder - .from(fetcher, sourceOfTruth) - .converter(converter) - .validator(validator) - .build(updater, bookkeeper) -``` - -#### Creating + -##### Request +# Store5 -```kotlin -store.write( - request = StoreWriteRequest.of( - key = key, - value = value - ) -) -``` - -##### Response - -```text -1. StoreWriteResponse.Success.Typed(response) -``` - -#### Reading - -##### Request - -```kotlin -store.stream(request = StoreReadRequest.cached(key, refresh = false)) -``` +[![codecov](https://codecov.io/gh/MobileNativeFoundation/Store/branch/main/graph/badge.svg?token=0UCmG3QHPf)](https://codecov.io/gh/MobileNativeFoundation/Store) -##### Response +#### Documentation -```text -1. StoreReadResponse.Data(value, origin = StoreReadResponseOrigin.Cache) -``` +Comprehensive guides, tutorials, and API reference: [store.mobilenativefoundation.org](https://store.mobilenativefoundation.org). -#### Updating +#### Getting Started -##### Request +1. Start with the [Quickstart](https://store.mobilenativefoundation.org/docs/quickstart) to build your first Store. +2. Dive into [Store Foundations](https://store.mobilenativefoundation.org/docs/concepts) to learn how Store works. +3. Check out [Handling CRUD](https://store.mobilenativefoundation.org/docs/use-cases/store5/setting-up-store-for-crud-operations) for an advanced guide on supporting create, read, update, and delete operations. -```kotlin -store.write( - request = StoreWriteRequest.of( - key = key, - value = newValue - ) -) -``` +#### Getting Help -##### Response +Join our community in the [#store](https://kotlinlang.slack.com/archives/C06007Z01HU) channel on the official Kotlin Slack. -```text -1. StoreWriteResponse.Success.Typed(response) -``` +#### Getting Involved -#### Deleting +Store has a vibrant community of contributors. We welcome contributions of all kinds. Please see our [Contributing Guidelines](CONTRIBUTING.md) for more information on how to get involved. -##### Request +#### Backed By -```kotlin -store.clear(key) -``` +
+ + +
-### License +#### License ```text Copyright (c) 2024 Mobile Native Foundation. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. ``` - diff --git a/gradle.properties b/gradle.properties index fddf2053..8e82db2b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ org.gradle.jvmargs=-XX:MaxMetaspaceSize=2G # POM file GROUP=org.mobilenativefoundation.store -VERSION_NAME=5.1.0-alpha05 +VERSION_NAME=5.1.0-SNAPSHOT POM_PACKAGING=pom POM_DESCRIPTION = Store5 is a Kotlin Multiplatform network-resilient repository layer diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 8c173e28..2a973b84 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -21,7 +21,7 @@ testCore = "1.6.1" kmmBridge = "0.3.2" ktlint = "0.39.0" kover = "0.6.0" -store = "5.1.0-alpha05" +store = "5.1.0-SNAPSHOT" truth = "1.1.3" binary-compatibility-validator = "0.15.0-Beta.2" diff --git a/tooling/plugins/src/main/kotlin/org/mobilenativefoundation/store/tooling/plugins/KotlinMultiplatformConventionPlugin.kt b/tooling/plugins/src/main/kotlin/org/mobilenativefoundation/store/tooling/plugins/KotlinMultiplatformConventionPlugin.kt index b28b22b6..e197911c 100644 --- a/tooling/plugins/src/main/kotlin/org/mobilenativefoundation/store/tooling/plugins/KotlinMultiplatformConventionPlugin.kt +++ b/tooling/plugins/src/main/kotlin/org/mobilenativefoundation/store/tooling/plugins/KotlinMultiplatformConventionPlugin.kt @@ -172,7 +172,7 @@ object Versions { const val COMPILE_SDK = 34 const val MIN_SDK = 24 const val TARGET_SDK = 34 - const val STORE = "5.1.0-alpha05" + const val STORE = "5.1.0-SNAPSHOT" }