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

# All Available Yarn Commands Across War.re Projects

> A complete reference for every yarn script available in the war.re apps, from running a dev server to building, linting, formatting, and running tests.

Both apps in the war.re monorepo share a common set of yarn scripts. You always run commands from inside an app directory — either `main/` or `subdomains/ryan/`. There is no root-level script runner. The sections below cover every available command, call out which ones are app-specific, and show the exact invocations for each context.

## Running a Dev Server

Start the Next.js development server on `localhost:3000`:

<CodeGroup>
  ```bash main/ theme={null}
  cd main
  yarn dev
  ```

  ```bash subdomains/ryan/ theme={null}
  cd subdomains/ryan
  yarn dev
  ```
</CodeGroup>

## Building for Production

Both apps use Next.js static export. `yarn build` compiles the app and writes the output to an `out/` directory inside the app folder:

<CodeGroup>
  ```bash main/ theme={null}
  cd main
  yarn build
  ```

  ```bash subdomains/ryan/ theme={null}
  cd subdomains/ryan
  yarn build
  ```
</CodeGroup>

## Linting

Run ESLint using the `next/core-web-vitals` ruleset across the entire app:

<CodeGroup>
  ```bash main/ theme={null}
  cd main
  yarn lint
  ```

  ```bash subdomains/ryan/ theme={null}
  cd subdomains/ryan
  yarn lint
  ```
</CodeGroup>

## Type Checking

Run the TypeScript compiler in check-only mode. The `pretypecheck` hook runs `next typegen` automatically before `tsc --noEmit`, so generated Next.js types are always up to date before the check runs:

<CodeGroup>
  ```bash main/ theme={null}
  cd main
  yarn typecheck
  ```

  ```bash subdomains/ryan/ theme={null}
  cd subdomains/ryan
  yarn typecheck
  ```
</CodeGroup>

## Formatting

Use Prettier to format all files in the app, or check formatting without writing changes:

<CodeGroup>
  ```bash main/ theme={null}
  cd main
  yarn format          # write formatting fixes
  yarn format:check    # verify formatting, exit non-zero if issues found
  ```

  ```bash subdomains/ryan/ theme={null}
  cd subdomains/ryan
  yarn format          # write formatting fixes
  yarn format:check    # verify formatting, exit non-zero if issues found
  ```
</CodeGroup>

## Unit Tests

Jest unit tests are only available in `subdomains/ryan/`. The `main/` app has no Jest test suite — use e2e tests there instead.

```bash theme={null}
cd subdomains/ryan
yarn test               # run all Jest tests
yarn test:coverage      # run all Jest tests with a coverage report
```

## End-to-End Tests

Both apps have a Playwright e2e suite. These are screenshot-based smoke tests that require a production build to be present before they run.

<Tip>
  Always run `yarn build` before `yarn e2e`. Playwright serves the static `out/` directory — if the build is missing or stale, the tests will fail or use outdated output.
</Tip>

<CodeGroup>
  ```bash main/ theme={null}
  cd main
  yarn build
  yarn e2e              # run Playwright smoke tests
  yarn e2e:coverage     # run Playwright with V8 source-map coverage
  ```

  ```bash subdomains/ryan/ theme={null}
  cd subdomains/ryan
  yarn build
  yarn e2e              # run Playwright smoke tests
  ```
</CodeGroup>

`yarn e2e:coverage` is only available in `main/`. It enables browser source maps and uses `monocart-coverage-reports` to map coverage data back to TypeScript source files.

## Command Reference

| Command              | Available in            | What it does                         |
| -------------------- | ----------------------- | ------------------------------------ |
| `yarn dev`           | both                    | Dev server at `localhost:3000`       |
| `yarn build`         | both                    | Static export to `out/`              |
| `yarn lint`          | both                    | ESLint with `next/core-web-vitals`   |
| `yarn typecheck`     | both                    | `next typegen` then `tsc --noEmit`   |
| `yarn format`        | both                    | Prettier `--write`                   |
| `yarn format:check`  | both                    | Prettier `--check`                   |
| `yarn test`          | `subdomains/ryan/` only | Jest unit tests                      |
| `yarn test:coverage` | `subdomains/ryan/` only | Jest with coverage report            |
| `yarn e2e`           | both                    | Playwright smoke tests (build first) |
| `yarn e2e:coverage`  | `main/` only            | Playwright with V8 source coverage   |
