# File structure

Overview of every file in the resource and what it does.

```
moh-pawnshop/
├── fxmanifest.lua  Resource manifest (dependencies, scripts, NUI)
├── config.lua      All configuration options
├── server/
│   └── server.lua  Server-side events, validation, inventory, bans
├── client/
│   └── client.lua  NPC spawn, target, zones, NUI open/close
└── html/
    ├── index.html  NUI layout — tablet container + item grid + modal
    ├── style.css   NUI styling — Orbitron font, purple animations
    ├── script.js   NUI JS — message handler, sell flow, copy util
    └── logo.png   Logo shown in the shop header
```

## File Descriptions

| File                | Purpose                                                                                                                                          |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `fxmanifest.lua`    | Declares the resource name, author, scripts, and NUI page. Edit here to add new script files.                                                    |
| `config.lua`        | Single source of truth for all configurable values. Shared between client and server scope.                                                      |
| `server/server.lua` | Handles the `sellPawnItems` event, all validation, universal inventory functions, ban system, webhook, and the `getInv` callback.                |
| `client/client.lua` | Spawns the NPC and blip, registers target interactions, handles PolyZone / E keypress, triggers the server callback, and manages NUI open/close. |
| `html/index.html`   | NUI markup — the tablet container, item grid, and amount modal.                                                                                  |
| `html/style.css`    | All NUI visual styling including animations, shimmer effects, and responsive card grid.                                                          |
| `html/script.js`    | Handles `window.addEventListener('message')`, populates the item grid, manages the modal flow, and fires NUI callbacks to Lua.                   |
| `html/logo.png`     | Shop logo displayed in the NUI header. Replace with your own 80×80px image.                                                                      |

{% hint style="info" %}
**Adding new files** If you add new Lua scripts, register them in `fxmanifest.lua` under `client_scripts` or `server_scripts`.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mohssins.gitbook.io/mohscriptsdocs/moh-pawnshop/file-structure.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
