> 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-police.md).

# cw\_tablet Police

## Config overview

**MDT Police & Justice Platform** — Configuration Files

| File             | What it configures                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `.env`           | Configures all external services for the site. It contains the **database connection** (`DATABASE_URL`), **encryption keys** (`BETTER_AUTH_SECRET`), **Discord OAuth credentials** (`DISCORD_CLIENT_ID` / `DISCORD_CLIENT_SECRET`), the **public site URL** (`NEXT_PUBLIC_APP_URL`), and optionally the **Redis connection** for caching and **S3/R2 credentials** for file storage. Without a `.env` file, the application **cannot connect to the database or perform authentication**. |
| `next.config.ts` | List of allowed external domains for loading images. Without this configuration, **Next.js** will refuse to load images from S3, R2, or FiveM. Each external source (Cloudflare R2, AWS S3, FiveM server) must be added here with both **protocol** and **hostname**.                                                                                                                                                                                                                     |
| `config.lua`     | Configures the appearance and behavior of the **FiveM tablet**. 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. Each tablet includes its URL, access key, and authorized jobs. This is the **master file** that essentially says: *"Display this website when this key is pressed, but only for players with the police job."*                               |

Restart the resource after editing any config.
