home / skills / reactive / data-client / initialize

initialize skill

/.cursor/skills/initialize

This skill helps new developers initialize the Reactive Data Client monorepo by installing prerequisites, installing dependencies, building, testing, and

npx playbooks add skill reactive/data-client --skill initialize

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
2.3 KB
---
name: initialize
description: Setup, install, and onboard new developers to Reactive Data Client monorepo - nvm, yarn, build, test, getting started guide
disable-model-invocation: true
---

# Initialize Development Environment

## Overview
Get a new developer up and running with the Reactive Data Client monorepo.

## Steps
1. **Install prerequisites**
   - Install Node.js >= 14 via [nvm](https://github.com/nvm-sh/nvm): `nvm install`
   - Enable Corepack for Yarn 4: `corepack enable`
   - Verify Yarn: `yarn --version` (should be 4.x)

2. **Install dependencies**
   - Run `yarn install` from repo root
   - This installs all workspace dependencies

3. **Build the project**
   - Run `yarn build` to build all packages
   - This runs TypeScript compilation and Babel transforms

4. **Run tests**
   - Run `yarn test` to verify everything works
   - Tests use Jest with projects: ReactDOM, Node, ReactNative

5. **Project familiarization**
   - Review monorepo structure:
     - `packages/endpoint` – Base endpoints and declarative schemas
     - `packages/rest` – REST modeling (`resource()`, `RestEndpoint`)
     - `packages/core` – Framework-agnostic normalized store
     - `packages/react` – React hooks (`useSuspense`, `useLive`, `useQuery`)
     - `packages/vue` – Vue 3 composables
     - `packages/normalizr` – Schema/Entity/normalization
   - Read [official docs](https://dataclient.io/docs)
   - Explore example apps in `examples/`

6. **Optional: Start website locally**
   - Use workspace task "website: start" or `cd website && yarn start`
   - Documentation site runs on localhost

## Onboarding Checklist
- [ ] Node.js >= 14 and Yarn 4 ready
- [ ] `yarn install` completed without errors
- [ ] `yarn build` succeeds
- [ ] `yarn test` passes
- [ ] Reviewed `packages/` structure
- [ ] Read `CONTRIBUTING.md`
- [ ] Explored an example app (`examples/todo-app` or `examples/github-app`)

## Helpful Commands
| Command | Description |
|---------|-------------|
| `yarn build` | Build all packages |
| `yarn test` | Run all tests |
| `yarn lint` | Run ESLint |
| `yarn format` | Auto-fix lint issues |
| `yarn changeset` | Create a changeset for your PR |

## Resources
- [Documentation](https://dataclient.io/docs)
- [Discord](https://discord.gg/35nb8Mz)
- [Contributing Guide](./CONTRIBUTING.md)

Overview

This skill sets up, installs, and onboards new developers to the Reactive Data Client TypeScript monorepo. It walks through environment prerequisites, dependency installation, build and test commands, and quick project familiarization to get productive quickly. The goal is a repeatable checklist to prepare machines and confirm the workspace builds and tests cleanly.

How this skill works

The skill verifies Node and Yarn versions, enables Corepack for Yarn 4, and runs yarn install to populate workspaces. It compiles all packages with yarn build and runs the unified test suite via yarn test. It then guides developers through the monorepo layout, example apps, docs, and optional local website startup.

When to use it

  • Onboard a new team member to the repository
  • Set up a fresh development machine or VM
  • Prepare CI or reproducible developer environments
  • Verify a clean build and passing tests before work begins
  • Re-familiarize before contributing a major change

Best practices

  • Use nvm to install and pin Node.js (ensure Node >= 14)
  • Enable Corepack before using Yarn 4: corepack enable
  • Run yarn install from the repo root to install all workspace deps
  • Run yarn build then yarn test to catch compilation or test failures early
  • Read CONTRIBUTING.md and project docs to follow contribution and release conventions
  • Explore example apps to see common usage patterns and integration

Example use cases

  • New hire runs through the onboarding checklist to confirm their machine is ready
  • A maintainer validates build/test on a clean environment before merging a PR
  • A contributor runs examples/todo-app to understand hook usage and patterns
  • A developer starts the docs site locally to review or update documentation
  • CI pipeline mirrors these steps to ensure reproducible builds and tests

FAQ

Which Node and Yarn versions are required?

Use Node.js 14 or later. Enable Corepack and use Yarn 4.x; verify with yarn --version.

How do I start the documentation site locally?

Run the workspace website start task or cd website && yarn start; the docs will be available on localhost.

What commands should I run first after cloning?

Run nvm install (or otherwise install Node), corepack enable, then yarn install from the repository root. After that run yarn build and yarn test.