> ## Documentation Index
> Fetch the complete documentation index at: https://stratasync.blode.md/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

Install the packages for your stack, or scaffold a complete app with the Claude Code skill.

## Scaffold a full-stack app

Scaffold a complete Next.js + Fastify app:

```bash
npx skills add stratasync/stratasync
```

This installs a Claude Code skill that generates a working client and server with models, sync, IndexedDB, WebSocket, and PostgreSQL.

## Requirements

- **Node.js** >= 18
- **TypeScript** 5.9+ with `experimentalDecorators` enabled
- **React** 18 or 19
- **Next.js** 14 or 15 (if using `@stratasync/next`)

## Install

```bash
# React app
npm install @stratasync/core @stratasync/client @stratasync/react @stratasync/mobx @stratasync/storage-idb @stratasync/transport-graphql

# Next.js app
npm install @stratasync/core @stratasync/client @stratasync/react @stratasync/next @stratasync/mobx @stratasync/storage-idb @stratasync/transport-graphql

# Add collaborative editing
npm install @stratasync/y-doc
```

## Peer dependencies

```bash
npm install react mobx yjs
```

| Package             | Required versions                         |
| ------------------- | ----------------------------------------- |
| `@stratasync/react` | `react ^18 \|\| ^19`, `yjs ^13.6`         |
| `@stratasync/next`  | `next ^14 \|\| ^15`, `react ^18 \|\| ^19` |
| `@stratasync/mobx`  | `mobx ^6.0`                               |

## TypeScript configuration

Enable experimental decorators for model schema definitions.

```json
{
  "compilerOptions": {
    "experimentalDecorators": true,
    "emitDecoratorMetadata": false,
    "strict": true,
    "target": "ES2022",
    "module": "ESNext",
    "moduleResolution": "bundler"
  }
}
```

`emitDecoratorMetadata` is not needed: decorators register with the `ModelRegistry` at runtime.