> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/StakeEngine/web-sdk/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Get the Stake Engine Web SDK running locally in minutes

This guide walks you through cloning the repo, installing dependencies, and running the `lines` sample game inside Storybook so you can play a full round locally before writing a single line of game code.

<Steps>
  <Step title="Install Node.js 22.16.0">
    The SDK requires Node.js version 22.16.0. The recommended way is via [nvm](https://github.com/nvm-sh/nvm):

    ```bash theme={null}
    # Download and install nvm
    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash

    # Source nvm without restarting the shell
    \. "$HOME/.nvm/nvm.sh"

    # Install Node.js 22.16.0
    nvm install 22.16.0

    # Verify — should print "v22.16.0"
    node -v
    ```
  </Step>

  <Step title="Install pnpm 10.5.0">
    The monorepo uses pnpm workspaces. Install the required version globally:

    ```bash theme={null}
    npm install pnpm@10.5.0 -g

    # Verify — should print "10.5.0"
    pnpm -v
    ```
  </Step>

  <Step title="Clone the repository">
    ```bash theme={null}
    git clone https://github.com/StakeEngine/web-sdk.git
    cd web-sdk
    ```
  </Step>

  <Step title="Install dependencies">
    From the repo root, install all workspace dependencies in one command:

    ```bash theme={null}
    pnpm install
    ```

    If no error messages appear, you are ready to continue.

    <Note>
      **Windows users:** Storybook may fail to start without `cross-env`. If you encounter an error, update the storybook script in `apps/lines/package.json`:

      ```json theme={null}
      "storybook": "cross-env PUBLIC_CHROMATIC=true storybook dev -p 6001 public"
      ```

      Initial Storybook loading on Windows can take up to 15 minutes, but hot reloads after that are fast.
    </Note>
  </Step>

  <Step title="Run the lines game in Storybook">
    TurboRepo's `--filter` flag targets a specific workspace package by the `name` field in its `package.json`. The sample game is named `lines`:

    ```bash theme={null}
    pnpm run storybook --filter=lines
    ```

    Storybook opens in your browser. You will see a sidebar with story sets like `COMPONENTS`, `MODE_BASE`, and `MODE_BONUS`.
  </Step>

  <Step title="Play a base game round">
    1. In the Storybook sidebar, navigate to **MODE\_BASE → book → random**.
    2. An **Action** button appears in the bottom-left corner of the game canvas.
    3. Click **Action** and wait for a complete base game round to finish.

    You now have a fully functional game running locally against randomly generated book data—no RGS connection required.
  </Step>
</Steps>

## Next steps

Now that the game is running locally, you can explore the rest of the development workflow:

* **[Building and Launching](/building-and-launching)** — build for production and deploy to Stake Engine.
* **[Book and Events](/concepts/book-and-events)** — understand how bookEvents and emitterEvents drive game behaviour.

<Tip>
  To run the game in **DEV mode** (a full SvelteKit dev server instead of Storybook), use:

  ```bash theme={null}
  pnpm run dev --filter=lines
  ```

  You will see an authentication error screen—this is expected until you connect to a live RGS session. See [Building and Launching](/building-and-launching) for instructions on copying the RGS query string into the DEV mode URL.
</Tip>
