@livestore/livestore 0.4.0-dev.21 → 0.4.0-dev.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. package/README.md +0 -1
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/QueryCache.js +1 -1
  4. package/dist/QueryCache.js.map +1 -1
  5. package/dist/SqliteDbWrapper.d.ts +5 -5
  6. package/dist/SqliteDbWrapper.d.ts.map +1 -1
  7. package/dist/SqliteDbWrapper.js +8 -8
  8. package/dist/SqliteDbWrapper.js.map +1 -1
  9. package/dist/SqliteDbWrapper.test.js +2 -2
  10. package/dist/SqliteDbWrapper.test.js.map +1 -1
  11. package/dist/effect/LiveStore.d.ts +130 -2
  12. package/dist/effect/LiveStore.d.ts.map +1 -1
  13. package/dist/effect/LiveStore.js +185 -6
  14. package/dist/effect/LiveStore.js.map +1 -1
  15. package/dist/effect/LiveStore.test.d.ts +2 -0
  16. package/dist/effect/LiveStore.test.d.ts.map +1 -0
  17. package/dist/effect/LiveStore.test.js +42 -0
  18. package/dist/effect/LiveStore.test.js.map +1 -0
  19. package/dist/effect/mod.d.ts +1 -1
  20. package/dist/effect/mod.d.ts.map +1 -1
  21. package/dist/effect/mod.js +3 -1
  22. package/dist/effect/mod.js.map +1 -1
  23. package/dist/live-queries/base-class.d.ts +3 -3
  24. package/dist/live-queries/base-class.d.ts.map +1 -1
  25. package/dist/live-queries/base-class.js +2 -2
  26. package/dist/live-queries/base-class.js.map +1 -1
  27. package/dist/live-queries/client-document-get-query.d.ts +1 -1
  28. package/dist/live-queries/client-document-get-query.d.ts.map +1 -1
  29. package/dist/live-queries/client-document-get-query.js +1 -1
  30. package/dist/live-queries/client-document-get-query.js.map +1 -1
  31. package/dist/live-queries/computed.d.ts.map +1 -1
  32. package/dist/live-queries/computed.js +2 -2
  33. package/dist/live-queries/computed.js.map +1 -1
  34. package/dist/live-queries/db-query.js +14 -14
  35. package/dist/live-queries/db-query.js.map +1 -1
  36. package/dist/live-queries/db-query.test.js +2 -2
  37. package/dist/live-queries/db-query.test.js.map +1 -1
  38. package/dist/live-queries/signal.test.js +2 -2
  39. package/dist/live-queries/signal.test.js.map +1 -1
  40. package/dist/mod.d.ts +2 -1
  41. package/dist/mod.d.ts.map +1 -1
  42. package/dist/mod.js +1 -0
  43. package/dist/mod.js.map +1 -1
  44. package/dist/reactive.d.ts +9 -9
  45. package/dist/reactive.d.ts.map +1 -1
  46. package/dist/reactive.js +9 -26
  47. package/dist/reactive.js.map +1 -1
  48. package/dist/reactive.test.js +2 -2
  49. package/dist/reactive.test.js.map +1 -1
  50. package/dist/store/StoreRegistry.d.ts +215 -0
  51. package/dist/store/StoreRegistry.d.ts.map +1 -0
  52. package/dist/store/StoreRegistry.js +267 -0
  53. package/dist/store/StoreRegistry.js.map +1 -0
  54. package/dist/store/StoreRegistry.test.d.ts +2 -0
  55. package/dist/store/StoreRegistry.test.d.ts.map +1 -0
  56. package/dist/store/StoreRegistry.test.js +381 -0
  57. package/dist/store/StoreRegistry.test.js.map +1 -0
  58. package/dist/store/create-store.d.ts +56 -6
  59. package/dist/store/create-store.d.ts.map +1 -1
  60. package/dist/store/create-store.js +32 -7
  61. package/dist/store/create-store.js.map +1 -1
  62. package/dist/store/devtools.d.ts +1 -1
  63. package/dist/store/devtools.d.ts.map +1 -1
  64. package/dist/store/devtools.js +16 -3
  65. package/dist/store/devtools.js.map +1 -1
  66. package/dist/store/store-eventstream.test.js +2 -2
  67. package/dist/store/store-eventstream.test.js.map +1 -1
  68. package/dist/store/store-types.d.ts +59 -9
  69. package/dist/store/store-types.d.ts.map +1 -1
  70. package/dist/store/store-types.js.map +1 -1
  71. package/dist/store/store-types.test.js +1 -1
  72. package/dist/store/store-types.test.js.map +1 -1
  73. package/dist/store/store.d.ts +102 -6
  74. package/dist/store/store.d.ts.map +1 -1
  75. package/dist/store/store.js +148 -47
  76. package/dist/store/store.js.map +1 -1
  77. package/dist/utils/dev.js.map +1 -1
  78. package/dist/utils/stack-info.js +2 -2
  79. package/dist/utils/stack-info.js.map +1 -1
  80. package/dist/utils/tests/fixture.d.ts +1 -1
  81. package/dist/utils/tests/fixture.d.ts.map +1 -1
  82. package/dist/utils/tests/fixture.js.map +1 -1
  83. package/dist/utils/tests/otel.d.ts.map +1 -1
  84. package/dist/utils/tests/otel.js +5 -5
  85. package/dist/utils/tests/otel.js.map +1 -1
  86. package/package.json +59 -18
  87. package/src/QueryCache.ts +1 -1
  88. package/src/SqliteDbWrapper.test.ts +4 -2
  89. package/src/SqliteDbWrapper.ts +12 -11
  90. package/src/ambient.d.ts +0 -7
  91. package/src/effect/LiveStore.test.ts +61 -0
  92. package/src/effect/LiveStore.ts +381 -8
  93. package/src/effect/mod.ts +13 -1
  94. package/src/live-queries/__snapshots__/db-query.test.ts.snap +336 -231
  95. package/src/live-queries/base-class.ts +7 -6
  96. package/src/live-queries/client-document-get-query.ts +4 -2
  97. package/src/live-queries/computed.ts +3 -2
  98. package/src/live-queries/db-query.test.ts +3 -2
  99. package/src/live-queries/db-query.ts +15 -15
  100. package/src/live-queries/signal.test.ts +3 -2
  101. package/src/mod.ts +2 -0
  102. package/src/reactive.test.ts +3 -2
  103. package/src/reactive.ts +22 -23
  104. package/src/store/StoreRegistry.test.ts +540 -0
  105. package/src/store/StoreRegistry.ts +418 -0
  106. package/src/store/create-store.ts +76 -15
  107. package/src/store/devtools.ts +20 -6
  108. package/src/store/store-eventstream.test.ts +4 -2
  109. package/src/store/store-types.test.ts +3 -1
  110. package/src/store/store-types.ts +64 -13
  111. package/src/store/store.ts +197 -60
  112. package/src/utils/dev.ts +2 -2
  113. package/src/utils/stack-info.ts +2 -2
  114. package/src/utils/tests/fixture.ts +2 -1
  115. package/src/utils/tests/otel.ts +8 -7
  116. package/docs/api/index.md +0 -3
  117. package/docs/building-with-livestore/complex-ui-state/index.md +0 -5
  118. package/docs/building-with-livestore/crud/index.md +0 -5
  119. package/docs/building-with-livestore/data-modeling/index.md +0 -1
  120. package/docs/building-with-livestore/debugging/index.md +0 -17
  121. package/docs/building-with-livestore/devtools/index.md +0 -79
  122. package/docs/building-with-livestore/events/index.md +0 -355
  123. package/docs/building-with-livestore/examples/ai-agent/index.md +0 -5
  124. package/docs/building-with-livestore/examples/index.md +0 -30
  125. package/docs/building-with-livestore/examples/todo-workspaces/index.md +0 -891
  126. package/docs/building-with-livestore/examples/turnbased-game/index.md +0 -7
  127. package/docs/building-with-livestore/opentelemetry/index.md +0 -208
  128. package/docs/building-with-livestore/production-checklist/index.md +0 -5
  129. package/docs/building-with-livestore/reactivity-system/index.md +0 -202
  130. package/docs/building-with-livestore/rules-for-ai-agents/index.md +0 -9
  131. package/docs/building-with-livestore/state/materializers/index.md +0 -300
  132. package/docs/building-with-livestore/state/sql-queries/index.md +0 -72
  133. package/docs/building-with-livestore/state/sqlite/index.md +0 -45
  134. package/docs/building-with-livestore/state/sqlite-schema/index.md +0 -306
  135. package/docs/building-with-livestore/state/sqlite-schema-effect/index.md +0 -300
  136. package/docs/building-with-livestore/store/index.md +0 -281
  137. package/docs/building-with-livestore/syncing/index.md +0 -136
  138. package/docs/building-with-livestore/tools/cli/index.md +0 -177
  139. package/docs/building-with-livestore/tools/mcp/index.md +0 -187
  140. package/docs/examples/cloudflare-adapter/index.md +0 -44
  141. package/docs/examples/expo-adapter/index.md +0 -44
  142. package/docs/examples/index.md +0 -55
  143. package/docs/examples/node-adapter/index.md +0 -44
  144. package/docs/examples/web-adapter/index.md +0 -52
  145. package/docs/framework-integrations/custom-elements/index.md +0 -142
  146. package/docs/framework-integrations/react-integration/index.md +0 -918
  147. package/docs/framework-integrations/solid-integration/index.md +0 -293
  148. package/docs/framework-integrations/svelte-integration/index.md +0 -42
  149. package/docs/framework-integrations/vue-integration/index.md +0 -294
  150. package/docs/getting-started/expo/index.md +0 -736
  151. package/docs/getting-started/node/index.md +0 -115
  152. package/docs/getting-started/react-web/index.md +0 -573
  153. package/docs/getting-started/solid/index.md +0 -3
  154. package/docs/getting-started/vue/index.md +0 -471
  155. package/docs/index.md +0 -209
  156. package/docs/llms.txt +0 -147
  157. package/docs/misc/CODE_OF_CONDUCT/index.md +0 -133
  158. package/docs/misc/FAQ/index.md +0 -37
  159. package/docs/misc/community/index.md +0 -88
  160. package/docs/misc/credits/index.md +0 -14
  161. package/docs/misc/design-partners/index.md +0 -13
  162. package/docs/misc/package-management/index.md +0 -21
  163. package/docs/misc/performance/index.md +0 -25
  164. package/docs/misc/resources/index.md +0 -46
  165. package/docs/misc/state-of-the-project/index.md +0 -37
  166. package/docs/misc/troubleshooting/index.md +0 -82
  167. package/docs/overview/concepts/index.md +0 -78
  168. package/docs/overview/how-livestore-works/index.md +0 -56
  169. package/docs/overview/introduction/index.md +0 -5
  170. package/docs/overview/technology-comparison/index.md +0 -40
  171. package/docs/overview/when-livestore/index.md +0 -81
  172. package/docs/overview/why-livestore/index.md +0 -5
  173. package/docs/patterns/ai/index.md +0 -15
  174. package/docs/patterns/anonymous-user-transition/index.md +0 -10
  175. package/docs/patterns/app-evolution/index.md +0 -72
  176. package/docs/patterns/auth/index.md +0 -226
  177. package/docs/patterns/effect/index.md +0 -1495
  178. package/docs/patterns/encryption/index.md +0 -6
  179. package/docs/patterns/external-data/index.md +0 -5
  180. package/docs/patterns/file-management/index.md +0 -11
  181. package/docs/patterns/file-structure/index.md +0 -14
  182. package/docs/patterns/list-ordering/index.md +0 -369
  183. package/docs/patterns/offline/index.md +0 -32
  184. package/docs/patterns/orm/index.md +0 -18
  185. package/docs/patterns/presence/index.md +0 -11
  186. package/docs/patterns/rich-text-editing/index.md +0 -11
  187. package/docs/patterns/server-side-clients/index.md +0 -97
  188. package/docs/patterns/side-effects/index.md +0 -11
  189. package/docs/patterns/state-machines/index.md +0 -11
  190. package/docs/patterns/storybook/index.md +0 -192
  191. package/docs/patterns/undo-redo/index.md +0 -9
  192. package/docs/patterns/version-control/index.md +0 -8
  193. package/docs/platform-adapters/cloudflare-durable-object-adapter/index.md +0 -453
  194. package/docs/platform-adapters/electron-adapter/index.md +0 -15
  195. package/docs/platform-adapters/expo-adapter/index.md +0 -245
  196. package/docs/platform-adapters/node-adapter/index.md +0 -160
  197. package/docs/platform-adapters/tauri-adapter/index.md +0 -15
  198. package/docs/platform-adapters/web-adapter/index.md +0 -218
  199. package/docs/sustainable-open-source/contributing/docs/index.md +0 -94
  200. package/docs/sustainable-open-source/contributing/info/index.md +0 -63
  201. package/docs/sustainable-open-source/contributing/monorepo/index.md +0 -195
  202. package/docs/sustainable-open-source/sponsoring/index.md +0 -104
  203. package/docs/sync-providers/cloudflare/index.md +0 -773
  204. package/docs/sync-providers/custom/index.md +0 -65
  205. package/docs/sync-providers/electricsql/index.md +0 -159
  206. package/docs/sync-providers/s2/index.md +0 -230
  207. package/docs/tutorial/0-welcome/index.md +0 -48
  208. package/docs/tutorial/1-setup-starter-project/index.md +0 -105
  209. package/docs/tutorial/2-deploy-to-cloudflare/index.md +0 -195
  210. package/docs/tutorial/3-read-and-write-todos-via-livestore/index.md +0 -511
  211. package/docs/tutorial/4-sync-data-via-cloudflare/index.md +0 -210
  212. package/docs/tutorial/5-expand-business-logic/index.md +0 -174
  213. package/docs/tutorial/6-persist-ui-state/index.md +0 -453
  214. package/docs/tutorial/7-next-steps/index.md +0 -22
  215. package/docs/understanding-livestore/design-decisions/index.md +0 -33
  216. package/docs/understanding-livestore/event-sourcing/index.md +0 -40
package/docs/llms.txt DELETED
@@ -1,147 +0,0 @@
1
- # LiveStore Documentation for LLMs
2
-
3
- > LiveStore is a client-centric local-first data layer for high-performance apps based on SQLite and event-sourcing.
4
-
5
- ## Notes
6
-
7
- - Most LiveStore APIs are synchronous and don't need `await`
8
-
9
-
10
- ## Getting started
11
-
12
- - [Getting started with LiveStore + React](/getting-started/react-web): How to use LiveStore with React on the web.
13
- - [Expo](/getting-started/expo): Learn how to use LiveStore with Expo.
14
- - [Node](/getting-started/node): Learn how to use LiveStore with Node.
15
- - [Getting started with LiveStore + Vue](/getting-started/vue): How to use LiveStore with Vue.
16
- - [Solid](/getting-started/solid): Learn how to use LiveStore with Solid.
17
-
18
- ## Tutorial
19
-
20
- - [Overview and prerequisites](/tutorial/0-welcome)
21
- - [1. Set up starter project with React, Vite & Tailwind](/tutorial/1-setup-starter-project)
22
- - [2. Deploy to Cloudflare Workers](/tutorial/2-deploy-to-cloudflare)
23
- - [3. Read and write todos via LiveStore](/tutorial/3-read-and-write-todos-via-livestore)
24
- - [4. Sync data to Cloudflare](/tutorial/4-sync-data-via-cloudflare)
25
- - [5. Expand business logic with more events](/tutorial/5-expand-business-logic)
26
- - [6. Persist UI state](/tutorial/6-persist-ui-state)
27
- - [Next steps](/tutorial/7-next-steps)
28
-
29
- ## Overview
30
-
31
- - [Introduction](/overview/introduction)
32
- - [Why LiveStore?](/overview/why-livestore)
33
- - [How LiveStore works](/overview/how-livestore-works)
34
- - [Concepts](/overview/concepts): Concepts in LiveStore
35
- - [When to use LiveStore (and when not)](/overview/when-livestore): Considerations when deciding to use LiveStore.
36
- - [Technology comparison](/overview/technology-comparison): How LiveStore compares to other related technologies
37
-
38
- ## Building with LiveStore
39
-
40
- - [Rules for AI agents](/building-with-livestore/rules-for-ai-agents)
41
- - [Events](/building-with-livestore/events)
42
- - [Data modeling](/building-with-livestore/data-modeling)
43
- - [CRUD](/building-with-livestore/crud): CRUD
44
- - [Store](/building-with-livestore/store)
45
- - [Complex UI state](/building-with-livestore/complex-ui-state): How to model complex UI state in LiveStore.
46
- - [Reactivity system](/building-with-livestore/reactivity-system)
47
- - [Syncing](/building-with-livestore/syncing): Syncing
48
- - [Debugging a LiveStore app](/building-with-livestore/debugging)
49
- - [Devtools](/building-with-livestore/devtools)
50
- - [OpenTelemetry](/building-with-livestore/opentelemetry)
51
- - [Production checklist](/building-with-livestore/production-checklist): Checklist for productionizing a LiveStore app
52
-
53
- ### State
54
-
55
- - [SQLite state schema](/building-with-livestore/state/sqlite-schema)
56
- - [SQLite state schema (Effect schema)](/building-with-livestore/state/sqlite-schema-effect)
57
- - [SQL queries](/building-with-livestore/state/sql-queries)
58
- - [Materializers](/building-with-livestore/state/materializers)
59
- - [SQLite in LiveStore](/building-with-livestore/state/sqlite): Notes on how to use SQLite in LiveStore
60
-
61
- ### Tools
62
-
63
- - [LiveStore CLI](/building-with-livestore/tools/cli): Command-line interface for LiveStore project scaffolding and development tools.
64
- - [MCP integration](/building-with-livestore/tools/mcp): Model Context Protocol integration for AI assistants like Claude.
65
-
66
- ### Examples
67
-
68
- - [Data modeling](/building-with-livestore/examples): How to model data in LiveStore.
69
- - [Todo app with shared workspaces](/building-with-livestore/examples/todo-workspaces): How to model a todo workspace app with shared workspaces in LiveStore.
70
- - [Turn-based game](/building-with-livestore/examples/turnbased-game): How to model a turn-based game in LiveStore.
71
- - [AI agent](/building-with-livestore/examples/ai-agent): How to model an AI agent in LiveStore.
72
-
73
- ## Framework integrations
74
-
75
- - [React integration for LiveStore](/framework-integrations/react-integration): How to integrate LiveStore with React.
76
- - [Custom elements](/framework-integrations/custom-elements): How to integrate LiveStore with Custom Elements aka Web Components.
77
- - [Svelte integration](/framework-integrations/svelte-integration): How to integrate LiveStore with Svelte.
78
- - [Vue integration for LiveStore](/framework-integrations/vue-integration): How to integrate LiveStore with Vue.
79
- - [Solid integration](/framework-integrations/solid-integration): How to integrate LiveStore with Solid.
80
-
81
- ## Platform adapters
82
-
83
- - [Web adapter](/platform-adapters/web-adapter): Information about LiveStore's web adapter
84
- - [Expo Adapter](/platform-adapters/expo-adapter): LiveStore adapter for React Native apps built with Expo
85
- - [Node adapter](/platform-adapters/node-adapter)
86
- - [Cloudflare Durable Object adapter](/platform-adapters/cloudflare-durable-object-adapter)
87
- - [Tauri adapter](/platform-adapters/tauri-adapter)
88
- - [Electron adapter](/platform-adapters/electron-adapter)
89
-
90
- ## Sync providers
91
-
92
- - [Cloudflare Workers](/sync-providers/cloudflare)
93
- - [ElectricSQL](/sync-providers/electricsql)
94
- - [S2](/sync-providers/s2): Use the official S2 backend with LiveStore via @livestore/sync-s2
95
- - [Build your own sync provider](/sync-providers/custom)
96
-
97
- ## Patterns
98
-
99
- - [Server-side clients](/patterns/server-side-clients)
100
- - [Encryption](/patterns/encryption)
101
- - [Effect](/patterns/effect)
102
- - [Rich Text Editing](/patterns/rich-text-editing)
103
- - [Auth](/patterns/auth)
104
- - [Rich text editing](/patterns/rich-text-editing)
105
- - [List Ordering](/patterns/list-ordering): Implement drag-and-drop list ordering with fractional indexing
106
- - [External data](/patterns/external-data)
107
- - [Offline support](/patterns/offline)
108
- - [Side effect](/patterns/side-effects): How to run side-effects for LiveStore events
109
- - [Version control](/patterns/version-control)
110
- - [Anonymous user transition](/patterns/anonymous-user-transition): How to transition an anonymous user to a logged in user
111
- - [File management](/patterns/file-management): How to manage files with LiveStore
112
- - [State machines](/patterns/state-machines): How to use state machines with LiveStore
113
- - [App evolution](/patterns/app-evolution): How to evolve your app and roll out new app versions
114
- - [Storybook testing (React)](/patterns/storybook): How to set up LiveStore with Storybook for component development and testing in React.
115
- - [Undo/Redo](/patterns/undo-redo): How to implement undo/redo functionality with LiveStore
116
- - [File structure](/patterns/file-structure)
117
- - [Presence](/patterns/presence): How to implement presence functionality with LiveStore
118
- - [ORM](/patterns/orm): How to use an ORM with LiveStore
119
- - [AI](/patterns/ai): How to use LiveStore to build AI applications
120
-
121
- ## Understanding LiveStore
122
-
123
- - [Event sourcing](/understanding-livestore/event-sourcing): Why and how LiveStore uses event sourcing for data flow, syncing and migrations.
124
- - [Design decisions](/understanding-livestore/design-decisions): Design decisions and trade-offs made in the development of LiveStore
125
-
126
- ## Sustainable open source
127
-
128
- - [Sponsoring LiveStore](/sustainable-open-source/sponsoring)
129
-
130
- ### Contributing
131
-
132
- - [Info](/sustainable-open-source/contributing/info): Notes for developers interested in contributing to LiveStore.
133
- - [Monorepo](/sustainable-open-source/contributing/monorepo): Notes on the monorepo setup of LiveStore.
134
- - [Docs](/sustainable-open-source/contributing/docs): Notes on contributing to the LiveStore docs
135
-
136
- ## Miscellaneous
137
-
138
- - [Frequently asked questions](/misc/FAQ): Frequently asked questions about LiveStore
139
- - [State of the project](/misc/state-of-the-project): A high-level overview of the current state of the project.
140
- - [Performance](/misc/performance)
141
- - [Community](/misc/community)
142
- - [Troubleshooting](/misc/troubleshooting): Common issues in apps using LiveStore and possible solutions.
143
- - [Credits](/misc/credits): Credits and acknowledgements
144
- - [Resources](/misc/resources): Resources, assets, logos, etc about LiveStore
145
- - [Design partners](/misc/design-partners)
146
- - [Code of conduct](/misc/CODE_OF_CONDUCT): Our code of conduct for the LiveStore community.
147
- - [Note on package management](/misc/package-management)
@@ -1,133 +0,0 @@
1
- # Code of conduct
2
-
3
- ## Our Pledge
4
-
5
- We as members, contributors, and leaders pledge to make participation in our
6
- community a harassment-free experience for everyone, regardless of age, body
7
- size, visible or invisible disability, ethnicity, sex characteristics, gender
8
- identity and expression, level of experience, education, socio-economic status,
9
- nationality, personal appearance, race, caste, color, religion, or sexual
10
- identity and orientation.
11
-
12
- We pledge to act and interact in ways that contribute to an open, welcoming,
13
- diverse, inclusive, and healthy community.
14
-
15
- ## Our Standards
16
-
17
- Examples of behavior that contributes to a positive environment for our
18
- community include:
19
-
20
- * Demonstrating empathy and kindness toward other people
21
- * Being respectful of differing opinions, viewpoints, and experiences
22
- * Giving and gracefully accepting constructive feedback
23
- * Accepting responsibility and apologizing to those affected by our mistakes,
24
- and learning from the experience
25
- * Focusing on what is best not just for us as individuals, but for the overall
26
- community
27
-
28
- Examples of unacceptable behavior include:
29
-
30
- * The use of sexualized language or imagery, and sexual attention or advances of
31
- any kind
32
- * Trolling, insulting or derogatory comments, and personal or political attacks
33
- * Public or private harassment
34
- * Publishing others' private information, such as a physical or email address,
35
- without their explicit permission
36
- * Other conduct which could reasonably be considered inappropriate in a
37
- professional setting
38
-
39
- ## Enforcement Responsibilities
40
-
41
- Community leaders are responsible for clarifying and enforcing our standards of
42
- acceptable behavior and will take appropriate and fair corrective action in
43
- response to any behavior that they deem inappropriate, threatening, offensive,
44
- or harmful.
45
-
46
- Community leaders have the right and responsibility to remove, edit, or reject
47
- comments, commits, code, wiki edits, issues, and other contributions that are
48
- not aligned to this Code of Conduct, and will communicate reasons for moderation
49
- decisions when appropriate.
50
-
51
- ## Scope
52
-
53
- This Code of Conduct applies within all community spaces, and also applies when
54
- an individual is officially representing the community in public spaces.
55
- Examples of representing our community include using an official email address,
56
- posting via an official social media account, or acting as an appointed
57
- representative at an online or offline event.
58
-
59
- ## Enforcement
60
-
61
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
- reported to the community leaders responsible for enforcement at
63
- [contact@livestore.dev][Contact].
64
- All complaints will be reviewed and investigated promptly and fairly.
65
-
66
- All community leaders are obligated to respect the privacy and security of the
67
- reporter of any incident.
68
-
69
- ## Enforcement Guidelines
70
-
71
- Community leaders will follow these Community Impact Guidelines in determining
72
- the consequences for any action they deem in violation of this Code of Conduct:
73
-
74
- ### 1. Correction
75
-
76
- **Community Impact**: Use of inappropriate language or other behavior deemed
77
- unprofessional or unwelcome in the community.
78
-
79
- **Consequence**: A private, written warning from community leaders, providing
80
- clarity around the nature of the violation and an explanation of why the
81
- behavior was inappropriate. A public apology may be requested.
82
-
83
- ### 2. Warning
84
-
85
- **Community Impact**: A violation through a single incident or series of
86
- actions.
87
-
88
- **Consequence**: A warning with consequences for continued behavior. No
89
- interaction with the people involved, including unsolicited interaction with
90
- those enforcing the Code of Conduct, for a specified period of time. This
91
- includes avoiding interactions in community spaces as well as external channels
92
- like social media. Violating these terms may lead to a temporary or permanent
93
- ban.
94
-
95
- ### 3. Temporary Ban
96
-
97
- **Community Impact**: A serious violation of community standards, including
98
- sustained inappropriate behavior.
99
-
100
- **Consequence**: A temporary ban from any sort of interaction or public
101
- communication with the community for a specified period of time. No public or
102
- private interaction with the people involved, including unsolicited interaction
103
- with those enforcing the Code of Conduct, is allowed during this period.
104
- Violating these terms may lead to a permanent ban.
105
-
106
- ### 4. Permanent Ban
107
-
108
- **Community Impact**: Demonstrating a pattern of violation of community
109
- standards, including sustained inappropriate behavior, harassment of an
110
- individual, or aggression toward or disparagement of classes of individuals.
111
-
112
- **Consequence**: A permanent ban from any sort of public interaction within the
113
- community.
114
-
115
- ## Attribution
116
-
117
- This Code of Conduct is adapted from the [Contributor Covenant][Homepage],
118
- version 2.1, available at
119
- [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
120
-
121
- Community Impact Guidelines were inspired by
122
- [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
123
-
124
- For answers to common questions about this code of conduct, see the FAQ at
125
- [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
126
- [https://www.contributor-covenant.org/translations][Translations].
127
-
128
- [Homepage]: https://www.contributor-covenant.org
129
- [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
130
- [Mozilla CoC]: https://github.com/mozilla/diversity
131
- [FAQ]: https://www.contributor-covenant.org/faq
132
- [Translations]: https://www.contributor-covenant.org/translations
133
- [Contact]: mailto:contact@livestore.dev
@@ -1,37 +0,0 @@
1
- # Frequently asked questions
2
-
3
- ### Does LiveStore have optimistic updates?
4
-
5
- Yes and no. LiveStore doesn't have the concept of optimistic updates as you might know from libraries like [React Query](https://tanstack.com/query/latest/docs/framework/react/guides/optimistic-updates), however, any data update in LiveStore is automatically optimistic without the developer having to implement any special logic.
6
-
7
- This provides the benefits of optimistic updates without the extra complexity by manually having to implement the logic for each individual data update (which can be very error prone).
8
-
9
- ### Does LiveStore have database transactions?
10
-
11
- LiveStore runs on the client-side and handles transactions differently than traditional server-side databases. While materializers automatically run in transactions, global transactional behavior (often called "online transactions") needs to be explicitly modeled in your application logic.
12
-
13
- ### Can I use an ORM or query builder with LiveStore?
14
-
15
- It's possible to use most ORMs/query builders with LiveStore (as long as they are able to synchronously generate SQL statements). You should also give the built-in LiveStore query builder a try. See [the ORM page](/patterns/orm) for more information.
16
-
17
- ### Is there a company behind LiveStore? How does LiveStore make money?
18
-
19
- LiveStore is developed by [Johannes Schickling](https://github.com/schickling) and has been incubated as the foundation of [Overtone](https://overtone.pro) (a local-first music app). The plan is to keep the development of LiveStore as sustainable as possible via sponsorships and other paths (e.g. commercial licenses, paid consulting, premium devtools, etc).
20
-
21
- ### Is there a hosted sync backend provided by LiveStore?
22
-
23
- No, LiveStore is designed to be self-hosted or be used with a 3rd party sync backend.
24
-
25
- ### Can I use my existing database with LiveStore? {#existing-database}
26
-
27
- Not currently. LiveStore is built around the idea of event-sourcing which separates reads and writes. This means LiveStore isn't syncing your database directly but only the events that are used to materialize the database making sure it's kept in sync across clients.
28
-
29
- However, we might provide support for this in the future depending on demand.
30
-
31
- ### What's the difference between clientId, sessionId, and userId?
32
-
33
- - **sessionId**: Identifies a single LiveStore instance within a client (e.g., a browser tab). Sessions can persist (e.g., across tab reloads in web).
34
- - **clientId**: A randomly generated identifier managed by LiveStore that identifies a client instance. Each client has its own unique clientId and can have one or multiple sessions.
35
- - **userId**: Not a LiveStore concept. User identity must be handled at the application level through your events and application logic.
36
-
37
- A single user might have multiple clients (e.g., using different browsers or devices), each with its own clientId. User identification should be modeled within your application domain.
@@ -1,88 +0,0 @@
1
- # Community
2
-
3
- ## Discord
4
-
5
- You can join the Discord server <a href={DISCORD_INVITE_URL}>here</a>.
6
-
7
- ## Office hours
8
-
9
- You can join future office hour events [here](https://lu.ma/livestore).
10
-
11
- {
12
- officeHours.map((url) => (
13
- <iframe
14
- width="560"
15
- height="315"
16
- src={url}
17
- title="YouTube video player"
18
- frameborder="0"
19
- allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
20
- allowfullscreen
21
- style={{ aspectRatio: '16 / 9' }}
22
- />
23
- ))
24
- }
25
-
26
- ## Conference talks & podcasts
27
-
28
- - [Native-Grade Web Apps with Local-First Data (ViteConf 2025)](https://www.youtube.com/watch?v=h5Bs0vEka5U)
29
- - [Sync different: Event sourcing in local-first apps](https://www.youtube.com/watch?v=nyPl84BopKc)
30
- - [From Prisma Founder to LiveStore: Building local-first apps with Johannes Schickling (Aaron Francis interview)](https://www.youtube.com/watch?v=aKTbGIrkrLE)
31
-
32
- ## RFX: Request for exploration \{#rfx\}
33
-
34
- LiveStore opens the door to many new possibilities. Many more than I could explore or build myself, so I invite you to explore some of the ideas below.
35
-
36
- ### Technological ideas
37
-
38
- - Auth
39
- - Authn
40
- - Authz
41
- - e2ee
42
- - Server side
43
- - React server rendering
44
- - Centralized read models
45
- - Integrating with existing databases / systems
46
- - CRDTs for text editing
47
- - Automerge / YJS as embedded data
48
- - Collaboration
49
- - Presence features
50
- - Blob files
51
- - Version control
52
- - Manual push/pull + git-like commits of multiple events
53
- - Event-sourcing
54
- - Schema evolution: migrating events (e.g. cambria)
55
- - Cross-app data interop
56
- - AI
57
- - Local RAG
58
- - Agents
59
-
60
- ### Application ideas
61
-
62
- It would be great to see a new generation of apps built with LiveStore - ideally each app being:
63
-
64
- - [Local-first](https://www.inkandswitch.com/essay/local-first/)
65
- - Open-source
66
- - Self-hostable
67
-
68
- Here are some app ideas:
69
-
70
- - Replacement for Doodle
71
- - Replacement for Canny (feature requests)
72
- - Replacement for Splitwise
73
- - Replacement for Wunderlist
74
- - GitHub client
75
- - A secret Santa app
76
- - Movie / TV tracking app
77
- - Fitness app
78
-
79
- ### LiveStore internals
80
-
81
- - Explore and improve multi-store ergonomics
82
- - Diff queries in SQLite
83
- - IVM
84
-
85
- ## Notable LiveStore projects (open-source)
86
-
87
- - [WorkSquared](https://github.com/sociotechnica-org/work-squared): An AI-haunted workplace to coordinate, plan, and execute.
88
- - [Cheffect](https://github.com/tim-smart/cheffect): Local-first recipe management app built with LiveStore and Effect
@@ -1,14 +0,0 @@
1
- # Credits
2
-
3
- LiveStore wouldn't have been possible without the help and support of many individuals and companies.
4
-
5
- A special thanks goes to:
6
-
7
- - Geoffrey Litt & Nicholas Schiefer for the collaboration of the [Riffle research project](https://riffle.systems/essays/prelude/) on which LiveStore is based on
8
- - Matt Wonlaw for the collaboration on LiveStore over an extended period of time
9
- - [Kuldar](https://kuldar.com) for the lovely LiveStore logo
10
- - Ink & Switch for their visionary [local-first research](https://inkandswitch.com/local-first/) and for being a continuous source of inspiration
11
- - The SQLite team for their amazing work on the SQLite core library
12
- - Roy Hashimoto for their great work on the SQLite WASM library [wa-sqlite](https://github.com/rhashimoto/wa-sqlite) which LiveStore uses a fork of
13
- - Tim Suchanek for the initial collaboration on the Effect DB schema library
14
- - All sponsors, users & community members for feedback and support
@@ -1,13 +0,0 @@
1
- # Design partners
2
-
3
- LiveStore is looking for design partners with the following aims:
4
- - For your company:
5
- - Architectural guidance and internal training
6
- - Priority support
7
- - Influence over the roadmap and prioritization of features/bugfixes
8
- - Make sure LiveStore is well-maintained as a critical part of your product
9
- - For LiveStore:
10
- - Sustain the continous development and maintenance of the project
11
- - Make sure LiveStore is a designed around real-world use cases and constraints
12
-
13
- Please [get in touch](https://forms.gle/NUy9irooEpXjqFAb6) if you're interested in becoming a design partner.
@@ -1,21 +0,0 @@
1
- # Note on package management
2
-
3
- export const catalog = `\
4
- catalog:
5
- effect: ${EFFECT_VERSION} # As LiveStore depends on \`effect\`
6
- # also \`react\`, \`react-dom\` etc based on your project
7
- `
8
-
9
- ## Recommended
10
-
11
- It's strongly recommended to use `pnpm` or `bun` when building an app with LiveStore to avoid dependency issues (e.g. wrong version resolution, duplicate dependencies, etc).
12
-
13
- ### Peer dependencies
14
-
15
- Since LiveStore has a few peer dependencies, you either should manually add them to your project or add the `@livestore/peer-deps` package to your project to satisfy them.
16
-
17
- ### PNPM Catalog
18
-
19
- When using `pnpm`, we recommend specifying the following packages in your [PNPM Catalog](https://pnpm.io/catalogs):
20
-
21
- <Code code={catalog} lang="yaml" title="pnpm-workspace.yaml" />
@@ -1,25 +0,0 @@
1
- # Performance
2
-
3
- LiveStore is designed with performance in mind. To ensure consistent speed and minimal resource consumption, we maintain a suite of performance tests that run automatically on every commit to `main` and every pull request. These tests help us detect regressions early and identify performance bottlenecks for implementing optimizations.
4
-
5
- ## Performance tests
6
-
7
- Our current test suite focuses on two key metrics: **latency** and **memory usage**.
8
-
9
- We measure these two metrics across various user interaction scenarios on a minimal LiveStore+React test app.
10
-
11
- We select scenarios that help stress-test LiveStore’s ability to handle common underlying tasks that are part of common user interactions.
12
-
13
- To learn more about our testing methodology, check out the [README](https://github.com/livestorejs/livestore/blob/main/tests/perf/README.md) of our performance tests.
14
-
15
- > **Future expansions:** We [plan](https://github.com/livestorejs/livestore/blob/main/tests/perf/README.md#future-improvements) to measure throughput and bundle size, as well as expand the selection of scenarios and dimensions for the tests.
16
-
17
- ## Latest test results
18
-
19
- You can view the latest performance test results on our [public dashboard](https://livestore.grafana.net/public-dashboards/4a9a3b7941464bcebbc0fa2cdddc3130).
20
-
21
- Otherwise, you can view the latest test results by inspecting the logs of the `perf-test` job in our [GitHub Actions workflow](https://github.com/livestorejs/livestore/actions/workflows/ci.yml).
22
-
23
- ## Reporting a performance issue
24
-
25
- We’re committed to transparency and continuous improvement. If you find performance gaps or regressions in your own usage, please [file an issue](https://github.com/livestorejs/livestore/issues/new)
@@ -1,46 +0,0 @@
1
- # Resources
2
-
3
- Feel free to use the following assets for presentations, blog posts, etc about LiveStore.
4
-
5
- ## Logo
6
-
7
- <table>
8
- <thead>
9
- <tr>
10
- <th style="text-align: center;">Dark PNG</th>
11
- <th style="text-align: center;">Dark SVG</th>
12
- <th style="text-align: center;">Light PNG</th>
13
- <th style="text-align: center;">Light SVG</th>
14
- </tr>
15
- </thead>
16
- <tbody>
17
- <tr>
18
- <td style="background-color: #333333; padding: 30px; text-align: center;">
19
- <img src="/resources/logo-dark.png" width="200" alt="LiveStore Logo Dark PNG" />
20
- </td>
21
- <td style="background-color: #333333; padding: 30px; text-align: center;">
22
- <img src="/resources/logo-dark.svg" width="200" alt="LiveStore Logo Dark SVG" />
23
- </td>
24
- <td style="background-color: #F0F0F0; padding: 30px; text-align: center;">
25
- <img src="/resources/logo-light.png" width="200" alt="LiveStore Logo Light PNG" />
26
- </td>
27
- <td style="background-color: #F0F0F0; padding: 30px; text-align: center;">
28
- <img src="/resources/logo-light.svg" width="200" alt="LiveStore Logo Light SVG" />
29
- </td>
30
- </tr>
31
- </tbody>
32
- </table>
33
-
34
- ## Architecture diagrams
35
-
36
- ### Client scenarios
37
-
38
- <iframe src='https://www.tldraw.com/p/NJKH2PHghAeJC-7UIC1xF?d=v-97.-1297.3177.3303.ZMsCZoB-D6VX-W2poI5Gm' style={{ height: '400px', width: '100%' }} />
39
-
40
- ### Sync architecture
41
-
42
- <iframe src='https://www.tldraw.com/p/CWLjWxk0On_rAtjsJ4vt2?d=v-491.-533.2303.2394.RaypXEQgx30bxQnCcVFAG' style={{ height: '400px', width: '100%' }} />
43
-
44
- ### Data modeling
45
-
46
- <iframe src='https://www.tldraw.com/p/7yByV0g6ksHmbIORnwoH3?d=v-336.-500.1614.1677.RnlHGrijaybsLhyM0sTlL' style={{ height: '400px', width: '100%' }} />
@@ -1,37 +0,0 @@
1
- # State of the project
2
-
3
- LiveStore is based on years of research (see [Riffle](https://riffle.systems/essays/prelude/)) and is used as the foundation for ambitious apps such as [Overtone](https://overtone.pro). LiveStore has been in development since 2021 and is making good progress towards a stable release. LiveStore is not yet ready for all production scenarios.
4
-
5
- ## Current state
6
-
7
- LiveStore is currently in **beta** with most APIs being fairly stable (there might still be some breaking changes in coming releases). Most work is currently focussed on reliability and performance improvements.
8
-
9
- There is currently no specific timeline for a 1.0 release but we are making good progress in that direction.
10
-
11
- ### On breaking changes
12
-
13
- While LiveStore is in beta there can be three kinds of breaking changes:
14
-
15
- - Breaking API changes
16
- - Client storage format changes (whenever `liveStoreStorageFormatVersion` is updated)
17
- - Sync backend storage format changes (e.g. when a sync backend implementation changes the way how it stores data)
18
-
19
- We try our best to minimize breaking changes and to provide a migration path whenever possible.
20
-
21
- ## Roadmap
22
-
23
- See [GitHub issues](https://github.com/livestorejs/livestore/issues) for more details. Get in touch if you have any questions or feedback.
24
-
25
- ### 2025 Q3
26
-
27
- - Adapter bug fixes & stability improvements
28
- - Performance improvements
29
- - Syncing latency & throughput
30
- - More testing
31
-
32
- ### Long-term
33
-
34
- - Eventlog compaction [#136](https://github.com/livestorejs/livestore/issues/136)
35
- - Support more syncing providers
36
- - Support more framework integrations
37
- - Support more platforms (e.g. Electron, Tauri)
@@ -1,82 +0,0 @@
1
- # Troubleshooting
2
-
3
- ### Store / sync backend is stuck in a weird state
4
-
5
- While hopefully rare in practice, it might still happen that a client or a sync backend is stuck in a weird/invalid state. Please report such cases as a [GitHub issue](https://github.com/livestorejs/livestore/issues).
6
-
7
- To avoid being stuck, you can either:
8
-
9
- - use a different `storeId`
10
- - or reset the sync backend and local client for the given `storeId`
11
-
12
- ## React related issues
13
-
14
- ### Rebase loop triggers repeated event emissions
15
-
16
- Symptoms
17
- - Logs repeatedly show messages like: `merge:pull:rebase: rollback` and the same local events being rolled back and replayed.
18
-
19
- Why this happens
20
- - LiveStore uses optimistic local commits and rebasing during sync. On pull, the client rolls back local events, applies the remote head, then replays local events — and only then refreshes reactive queries (transactional from the UI’s perspective).
21
- - If your app emits events from a reactive effect based on read‑model changes (e.g., “when the latest item changes, emit X”), the effect runs after each completed rebase. Without a rebase‑safe guard, it can emit the same logical event repeatedly across rebases.
22
- - Multiple windows/devices for the same user can also emit the same logical event at nearly the same time. Even if writes are idempotent, the extra local commits still cause additional rebases and effect re‑runs.
23
-
24
- Circuit breaker fix (rebase‑safe)
25
- - Implement a session‑local circuit breaker: track which logical actions you’ve already emitted in this session using an in‑memory set. This guard is not affected by rollback/replay, so it prevents re‑emitting across rebases.
26
- - Avoid feedback loops: don’t use the same store state you’re writing as the primary trigger.
27
-
28
- Example pattern (React)
29
-
30
- ```tsx
31
- // Pseudocode – rebase‑safe circuit breaker for side‑effects
32
- const circuitBreakerRef = useRef<Set<string>>(new Set())
33
- const latest = useLatestItemFromStore() // derived read‑model state
34
-
35
- React.useEffect(() => {
36
- if (!latest) return
37
-
38
- const key = latest.logicalId
39
- if (circuitBreakerRef.current.has(key)) return // session‑local guard (not rolled back)
40
-
41
- circuitBreakerRef.current.add(key) // open the breaker before emitting
42
- store.commit(events.someEvent({ id: deterministicIdFrom(latest), ... }))
43
- }, [latest, store])
44
- ```
45
-
46
- Checklist
47
- - Use a deterministic id for the event when possible.
48
- - Gate emission with a session‑local circuit breaker to avoid re‑emitting across rebases.
49
- - Keep effect dependencies minimal; avoid depending on store state that you also update in the same effect.
50
-
51
- Note on terminology
52
- - “Circuit breaker” here refers to an app‑level guard that prevents repeated side‑effect emissions across rebases. It is distinct from the traditional network/service circuit‑breaker pattern (failure threshold/open/half‑open) but serves a similar purpose of preventing repeated work under specific conditions.
53
-
54
- ### Query doesn't update properly
55
-
56
- If you notice the result of a `useQuery` hook is not updating properly, you might be missing some dependencies in the query's hash.
57
-
58
- For example, the following query:
59
-
60
- ```ts
61
- // Don't do this
62
- const query$ = useQuery(queryDb(tables.issues.query.where({ id: issueId }).first()))
63
- // ^^^^^^^ missing in deps
64
-
65
- // Do this instead
66
- const query$ = useQuery(queryDb(tables.issues.query.where({ id: issueId }).first(), { deps: [issueId] }))
67
- ```
68
-
69
- ## `node_modules` related issues
70
-
71
- ### `Cannot execute an Effect versioned ...`
72
-
73
- If you're seeing an error like `RuntimeException: Cannot execute an Effect versioned 3.10.13 with a Runtime of version 3.10.12`, you likely have multiple versions of `effect` installed in your project.
74
-
75
- As a first step you can try deleting `node_modules` and running `pnpm install` again.
76
-
77
- If the issue persists, you can try to add `"resolutions": { "effect": "3.15.2" }` or [`pnpm.overrides`](https://pnpm.io/package_json#pnpmoverrides) to your `package.json` to force the correct version of `effect` to be used.
78
-
79
- ## Package management
80
-
81
- - Please make sure you only have a single version of any given package in your project (incl. LiveStore and other packages like `react`, etc). Having multiple versions of the same package can lead to all kinds of issues and should be avoided. This is particularly important when using LiveStore in a monorepo.
82
- - Setting `resolutions` in your root `package.json` or tools like [PNPM catalogs](https://pnpm.io/catalogs) or [Syncpack](https://github.com/JamieMason/syncpack) can help you manage this.