# Settings keys

Settings live in the `settings` table and are edited from the admin panel. Machine-specific values live in `.env`, `config/database.local.php` or `config/site.local.php` and are never stored here.

## Site

| Key | Type | Meaning |
|---|---|---|
| `site.name` | string | Site name; also the default email From name |
| `site.description` | string | Default meta description |
| `site.default_locale` | string | Locale for a first-time visitor |
| `site.language_mode` | string | `single` or `multilingual` |
| `site.language_switcher_enabled` | bool | Show the public switcher |
| `site.browser_locale_detection` | bool | Honour `Accept-Language` |
| `site.timezone` | string | Timezone for displayed timestamps |
| `site.admin_path` | string | Administrator path, e.g. `w-admin` |

## Community

| Key | Type | Meaning |
|---|---|---|
| `community.question_moderation` | string | Publish immediately or hold |
| `community.comments_enabled` | bool | Global comment switch |
| `community.follows_enabled` | bool | Global follow switch |
| `community.duplicate_suggestions_enabled` | bool | Suggest similar questions while asking |
| `community.spam_moderate_score` | int | Score at which content is held |
| `community.spam_reject_score` | int | Score at which content is refused |

## Mail

| Key | Type | Meaning |
|---|---|---|
| `mail.enabled` | bool | Master switch |
| `mail.transport` | string | `smtp` or `mail` |
| `mail.from_email` | string | From address |
| `mail.from_name` | string | Falls back to `site.name` |
| `mail.smtp.host` | string | Server hostname |
| `mail.smtp.port` | int | 587 or 465 |
| `mail.smtp.encryption` | string | `starttls` or `ssl` |
| `mail.smtp.auth` | bool | Authenticate |
| `mail.smtp.username` | string | Usually the full mailbox address |
| `mail.smtp.password` | secret | Never rendered back or logged |

## Notifications

| Key | Type | Meaning |
|---|---|---|
| `notifications.database_enabled` | bool | In-app notifications |
| `notifications.email_enabled` | bool | Email notifications |
| `notifications.admin_email` | string | Address for administrator alerts |
| `notifications.telegram_enabled` | bool | Telegram alerts |
| `notifications.telegram_bot_token` | secret | Bot token |
| `notifications.telegram_chat_id` | string | Target chat |

## SEO

| Key | Type | Meaning |
|---|---|---|
| `seo.default_title` | string | Fallback title |
| `seo.robots_mode` | string | Site-wide robots policy |
| `seo.sitemap_enabled` | bool | Serve sitemaps |
| `seo.question_permalink` | string | Question URL shape |
| `seo.question_prefix` | string | Question path prefix |
| `seo.slug_style` | string | Slug generation style |
| `seo.og_image` | string | Default social image |
| `seo.twitter_site` | string | Twitter/X handle |
| `seo.google_verification` | string | Search Console token |
| `seo.bing_verification` | string | Bing Webmaster token |

## Security

| Key | Type | Meaning |
|---|---|---|
| `security.strict_csp` | bool | Tighter Content-Security-Policy |
| `security.turnstile_enabled` | bool | Optional challenge; off by default |
| `security.turnstile_site_key` | string | Public key |
| `security.turnstile_secret_key` | secret | Private key |

## Ads

| Key | Type | Meaning |
|---|---|---|
| `ads.enabled` | bool | Global advertising switch |
| `ads.between_answers.interval` | int | Insert every N answers |
| `ads.between_answers.max_insertions` | int | Cap per page |

## Theme

| Key | Type | Meaning |
|---|---|---|
| `theme.active` | string | Active theme directory |
| `theme.tokens` | json | Live design tokens |
| `theme.profile_id` | int | Active theme profile |
| `theme.brand_text` | string | Brand text in the header |

## Not settings

| Value | Location | Why |
|---|---|---|
| Database credentials | `config/database.local.php` or `.env` | Credentials do not belong in the database they unlock |
| `APP_URL` | `.env` | Trusted origin for reset and verification links |
| `APP_BASE_URL` | `.env` | Subdirectory base path |
