> ## Documentation Index
> Fetch the complete documentation index at: https://constanza101-borrissol-28.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get started with Borrissol in 5 minutes

> Clone the Borrissol repo, install dependencies, and run the local dev server in under five minutes. Covers Node version, .npmrc, and first steps.

By the end of this guide you will have the full Borrissol site running locally at `http://localhost:4321`, all four language variants accessible in your browser, and the Keystatic CMS panel open at `/keystatic` — no authentication needed in development mode.

## Prerequisites

* **Node ≥ 22.12.0** — required by Astro 6. Check with `node -v`. Install via [nvm](https://github.com/nvm-sh/nvm) or the [official Node.js installer](https://nodejs.org).
* **npm** — bundled with Node.js; no separate install needed.

## Setup steps

<Steps>
  <Step title="Clone the repository">
    ```bash theme={null}
    git clone https://github.com/constanza101/borrissol.git && cd borrissol
    ```
  </Step>

  <Step title="Install dependencies">
    ```bash theme={null}
    npm install
    ```

    <Note>
      The repo ships an `.npmrc` file containing `legacy-peer-deps=true`. This flag is **required** because `@keystatic/astro@5.0.6` declares a peer dependency of `astro@2-5`, but this project runs Astro 6. Without it, `npm install` will exit with an unresolvable peer-dependency error. Do not delete `.npmrc` until Keystatic publishes official Astro 6 support — see the note at the bottom of this page for details.
    </Note>
  </Step>

  <Step title="Start the dev server">
    ```bash theme={null}
    npm run dev
    ```

    Astro will start the development server and print a local URL:

    ```
    🚀 Local   http://localhost:4321/
    ```

    The site rebuilds instantly on every file save — no manual refresh needed for most changes.
  </Step>

  <Step title="Browse all four language variants">
    Open your browser and visit each locale:

    | URL                        | Language                          |
    | -------------------------- | --------------------------------- |
    | `http://localhost:4321/`   | Catalan (default — no URL prefix) |
    | `http://localhost:4321/es` | Spanish                           |
    | `http://localhost:4321/en` | English                           |
    | `http://localhost:4321/fr` | French                            |

    All four variants are served from the same `[lang]/index.astro` dynamic route via `getStaticPaths`. Only the Catalan home page lives at the root — it has no `/ca/` prefix.
  </Step>

  <Step title="Access the CMS panel">
    Navigate to `http://localhost:4321/keystatic`.

    In local development, Keystatic runs without authentication. You can create and edit blog posts directly; changes are written as MDX files to `src/content/blog/` in the repository. In production, access is restricted via Keystatic Cloud credentials.
  </Step>
</Steps>

## Commands reference

| Command                   | Description                                        |
| ------------------------- | -------------------------------------------------- |
| `npm run dev`             | Start the dev server on `http://localhost:4321`    |
| `npm run build`           | Build the production site to `./dist`              |
| `npm run preview`         | Serve the production build locally for inspection  |
| `npm run test`            | Run Vitest unit tests (run-once mode)              |
| `npm run test:watch`      | Run Vitest in watch mode                           |
| `npm run test:e2e`        | Build the site, then run Playwright E2E tests      |
| `npm run test:e2e:ui`     | Build the site, then open the Playwright UI runner |
| `npm run test:e2e:report` | Open the last Playwright HTML report               |

## Notes

### About `.npmrc` and `legacy-peer-deps`

The `.npmrc` file at the repo root contains a single line:

```ini theme={null}
legacy-peer-deps=true
```

This is a deliberate compatibility shim. `@keystatic/astro@5.0.6` declares `astro@2-5` as its peer dependency, but Borrissol runs on Astro 6. The `legacy-peer-deps` flag tells npm to fall back to the pre-npm-7 peer-resolution algorithm, which treats the peer dependency as advisory rather than blocking. **Do not delete this file** until Keystatic publishes a release that explicitly supports Astro 6 — removing it will break `npm install` for everyone working on the project.

### Netlify deploy credits: batch your changes

<Warning>
  Netlify's unified credit model charges approximately **15 credits per production deploy**. The Personal plan (\$9/mo) provides 1,000 credits (\~65 deploys). To preserve the budget:

  * **Batch all session changes into a single push.** Never push one commit per small fix.
  * **Use `[skip ci]`** in the commit message for changes that don't affect the live site (docs, comments, README updates):

  ```bash theme={null}
  git commit -m "update readme [skip ci]"
  ```

  Netlify will skip the build entirely for commits tagged `[skip ci]`, consuming zero credits.
</Warning>
