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

# 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.
