Use when the goal is making rstore work end-to-end in a Nuxt app: configure module setup, auto-register collections/plugins, ensure SSR cache hydration works, fix generated template or auto-import issues, and extend integration from other Nuxt modules; pair with the `rstore-vue` skill for collection/query/form behavior.
Wire @rstore/vue into Nuxt through module scanning, generated templates, SSR hydration, and devtools integration.
Use this skill together with the @rstore/vue skill for collection/query/form semantics.
| Area | Documentation |
|---|---|
| Nuxt setup | https://rstore.akryum.dev/guide/getting-started#nuxt |
| Collections and relations | https://rstore.akryum.dev/guide/schema/collection, https://rstore.akryum.dev/guide/schema/relations |
| Query and mutation model | https://rstore.akryum.dev/guide/data/query, https://rstore.akryum.dev/guide/data/mutation |
| Cache and live updates | https://rstore.akryum.dev/guide/data/cache, https://rstore.akryum.dev/guide/data/live |
| Plugin extension model | https://rstore.akryum.dev/guide/plugin/setup, https://rstore.akryum.dev/guide/plugin/hooks |
| Collaboration plugin (Yjs) | https://rstore.akryum.dev/plugins/yjs |
| Related package skills | rstore-vue skill (@rstore/vue) |
| Skill-local API references | ./references/index.md |
| Primitive | Purpose |
|---|---|
rstore.rstoreDirs | Per-layer directories scanned for collections and plugins |
<rstoreDir>/*.ts | Collection/relations exports included in generated schema |
<rstoreDir>/plugins/*.ts | Plugin exports included in generated plugin list |
#build/$rstore-collection | Generated schema template from scanned collection files |
#build/$rstore-plugins | Generated plugin exports from scanned plugin files |
#build/$restore-options | Generated options template (experimentalGarbageCollection) |
| Runtime plugin layer | Creates store, installs plugin, serializes/hydrates cache, injects $rstore |
addCollectionImport / addPluginImport | Public extension hooks for other Nuxt modules |
export default defineNuxtConfig({
modules: ['@rstore/nuxt'],
rstore: {
rstoreDirs: ['rstore'],
},
})
Expected layout:
rstore/
todos.ts
users.ts
plugins/
remote.ts
@rstore/nuxt in modules.rstoreDirs.default or named const values intended for schema assembly.useStore() and auto-imports from #imports in app code, not ad hoc store singletons.addCollectionImport / addPluginImport from module setup.find*, query, forms, hooks), use the rstore-vue skill.withItemType, defineCollection, defineRstorePlugin, defineRstoreModule, useStore, RStoreSchema, plus related types.#build templates instead of requiring manual registry wiring.nuxtApp.payload.state.$srstore on render and hydrates on client load.experimentalGarbageCollection is passed from module options into createStore.addCollectionImport(nuxt, importPath) appends import sources merged into generated schema.addPluginImport(nuxt, importPath) appends plugin imports merged into generated plugin list._rstoreCollectionImports/_rstorePluginImports directly.default nor named const.Object.values(...).#build/$rstore-collection and #build/$rstore-plugins./__rstore is module-owned and served/proxied by setupDevToolsUI; do not duplicate that wiring in app code.| Topic | Description | Reference |
|---|---|---|
| API index | Full map of Nuxt API/config references | api-index |
| rstore.rstoreDirs | Collection/plugin scan directory option | api-rstore-dirs |
| rstore.experimentalGarbageCollection | Pass-through garbage collection option | api-experimental-garbage-collection |
| addCollectionImport | Extend generated collection imports | api-add-collection-import |
| addPluginImport | Extend generated plugin imports | api-add-plugin-import |
| defineRstorePlugin | Nuxt alias for definePlugin | api-define-rstore-plugin |
| defineRstoreModule | Nuxt alias for defineModule | api-define-rstore-module |
| RStoreSchema | Namespaced schema helper object | api-rstore-schema |
| useStore (#imports) | Nuxt runtime store accessor | api-use-store |
| SSR cache hydration ($srstore) | Payload cache serialization/hydration | api-cache-hydration |
| Devtools route (/__rstore) | Custom devtools UI route wiring | api-devtools-route |
| Base @rstore/vue skill | Underlying collection/query/form semantics | rstore-vue skill |