# cw\_tablet Business

## Config overview

| File             | What it configures                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `.env`           | <p>Configures all external services for the site.<br>It contains the <strong>database connection</strong> (<code>DATABASE\_URL</code>), <strong>encryption keys</strong> (<code>BETTER\_AUTH\_SECRET</code>), <strong>Discord OAuth credentials</strong> (<code>DISCORD\_CLIENT\_ID</code> / <code>DISCORD\_CLIENT\_SECRET</code>), the <strong>public site URL</strong> (<code>NEXT\_PUBLIC\_APP\_URL</code>), and optionally the <strong>Redis connection</strong> for caching and <strong>S3/R2 credentials</strong> for file storage.</p><p>Without a <code>.env</code> file, the application <strong>cannot connect to the database or perform authentication</strong>.</p> |
| `next.config.ts` | <p>List of allowed external domains for loading images.<br>Without this configuration, <strong>Next.js</strong> will refuse to load images from S3, R2, or FiveM.</p><p>Each external source (Cloudflare R2, AWS S3, FiveM server) must be added here with both <strong>protocol</strong> and <strong>hostname</strong>.</p>                                                                                                                                                                                                                                                                                                                                                     |
| `config.lua`     | <p>Configures the appearance and behavior of the <strong>FiveM tablet</strong>.<br>It determines which framework to use (QBCore, QBOX, ESX), the language for messages, the key to open/close the tablet, and, most importantly, the list of available tablets.</p><p>Each tablet includes its URL, access key, and authorized jobs.<br>This is the <strong>master file</strong> that essentially says: <em>“Display this website when this key is pressed, but only for players with the police job.”</em></p>                                                                                                                                                                  |

Restart the resource after editing any config.


---

# 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://codeweb.gitbook.io/docs/scripts/cw_tablet-business.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.
