# Host on https://adneutral.link/config/

Upload every file from `server-config/` to your web root:

```
https://adneutral.link/config/app_config.json      ← master control + env
https://adneutral.link/config/security.json      ← VPN / Private DNS / device checks
https://adneutral.link/config/t_ch.json
https://adneutral.link/config/l_st.json
https://adneutral.link/config/l_mt.json
https://adneutral.link/config/wc2026.json
https://adneutral.link/config/ads.json
https://adneutral.link/config/privacy_policy.json
https://adneutral.link/config/terms_of_service.json
```

## Master switch per JSON file (no app rebuild)

Add **`"enabled": true`** or **`"enabled": false`** as the **first field** at the root of each file. Do not change anything else in the file structure.

```json
{
  "enabled": true,
  "live_matches": [ ... ]
}
```

```json
{
  "enabled": true,
  "categories": [ ... ]
}
```

- `"enabled": true` → app loads the file normally (each match/stream/channel keeps its own settings).
- `"enabled": false` → app ignores the whole file and shows an empty state (“No matches available”, “No streams available”, etc.).
- The app re-fetches every **30 seconds** while open (no HTTP cache) and immediately when returning to foreground, so toggling `enabled` updates without reinstalling the app or clearing storage.

## Server-side “.env” (no app rebuild)

Edit **`app_config.json`** → `"env"` block. The app reads this on launch and applies URLs + flags:

```json
"env": {
  "APP_CONFIG_URL": "https://adneutral.link/config/app_config.json",
  "T_CH_URL": "https://adneutral.link/config/t_ch.json",
  "L_MT_URL": "https://adneutral.link/config/l_mt.json",
  "L_ST_URL": "https://adneutral.link/config/l_st.json",
  "WC2026_CONFIG_URL": "https://adneutral.link/config/wc2026.json",
  "ADS_CONFIG_URL": "https://adneutral.link/config/ads.json",
  "PRIVACY_POLICY_URL": "https://adneutral.link/config/privacy_policy.json",
  "TERMS_OF_SERVICE_URL": "https://adneutral.link/config/terms_of_service.json",
  "ENABLE_ADS": "false",
  "ENABLE_FCM": "false",
  "ENABLE_ONESIGNAL": "false",
  "TELEGRAM_CHANNEL_URL": "https://t.me/your_channel"
}
```

Change any value on the server → app picks it up within ~10 minutes (or on next cold start).

## Random Play Store review text

Edit **`app_config.json`** → `review.reviewTextPool` (array of strings).  
On 4–5 stars the app picks **one random line**, copies it, then opens Play Store.

```json
"review": {
  "showEverySession": true,
  "reviewTextPool": [
    "MatchGrid — best live scores and TV app!",
    "Love live TV and match updates. Rate us 5 stars!",
    "Add your own line here — changes without app update"
  ],
  "playStoreUrl": "https://play.google.com/store/apps/details?id=com.matchgrid.football.livescores"
}
```

## Telegram popup

```json
"telegram": {
  "enabled": true,
  "url": "https://t.me/your_real_channel",
  "title": "Join us on Telegram",
  "message": "Live stream updates"
}
```

## Regenerate JSON from M3U

```powershell
npm run config:generate
```

Then re-upload the files to `adneutral.link/config/`.

## App build `.env`

Project `.env` already points to adneutral. Rebuild after changing build-time keys only:

```powershell
npm run android:rebuild
```
