> For the complete documentation index, see [llms.txt](https://daddy-studios.gitbook.io/daddy-studios-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://daddy-studios.gitbook.io/daddy-studios-docs/scripts/daddy-hud/building-the-ui.md).

# Building the UI

The open source edition ships the Vue 3 source of the interface in `ui/`. The built files in `web/` are what the game loads, so you only need this page if you change the interface.

```bash
cd ui
npm install
npm run build     # writes ../web
npm run dev       # browser preview with a test panel
npm test          # settings tests
```

Node.js 18 or newer is needed.

## Structure

| Path                        | Contents                                         |
| --------------------------- | ------------------------------------------------ |
| `ui/src/components/`        | HUD modules, settings menu, edit mode            |
| `ui/src/stores/hud.js`      | State, NUI messages and settings logic           |
| `ui/src/settings.config.js` | Player settings, defaults and validation         |
| `ui/src/locales.js`         | Loads `locales/en.json` as the fallback language |
| `ui/postcss-fivem.js`       | Build step for the FiveM browser, see below      |

## The FiveM browser

FiveM runs NUI pages in Chromium 103. CSS that only works in newer browsers looks fine in a desktop preview but breaks in game. `ui/postcss-fivem.js` runs on every build and:

* turns `border` into inset box-shadow rings
* expands `inset:` into top/right/bottom/left
* removes `backdrop-filter`
* stops the build on `color-mix()` and on the `translate:`, `rotate:` and `scale:` properties (use `transform` instead)

Keep `cssTarget: 'chrome86'` in `vite.config.js`, otherwise the minifier merges the expanded positions back into `inset`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://daddy-studios.gitbook.io/daddy-studios-docs/scripts/daddy-hud/building-the-ui.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
