> For the complete documentation index, see [llms.txt](https://loureiro-stoned.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://loureiro-stoned.gitbook.io/docs/economy-monitor/config.lua.md).

# config.lua

#### `config/config.lua` (Preview)

Path: `stoned-economyControl/config/config.lua`

```lua
Config = Config or {}

--[[
  ════════════════════════════════════════
   GENERAL
  ════════════════════════════════════════
]]
Config.Framework = 'auto' -- 'auto' | 'esx' | 'qb' | 'qbox'
Config.Locale = 'en'      -- server notify locale: locales/*.lua
Config.OpenCommand = 'economy'

Config.Permission = {
    --- ACE permission (recommended)
    ace = 'stoned.economy.admin',
    --- ESX groups allowed to open the dashboard
    esxGroups = { 'admin', 'superadmin', 'owner' },
    --- QBCore / Qbox permission name
    qbPerms = 'admin',
}

--[[
  ════════════════════════════════════════
   DATA PIPELINE
  ════════════════════════════════════════
]]
Config.Batch = {
    IntervalMs = 2000, -- flush interval for batched DB writes
    MaxSize = 100,     -- max transactions per batch
}

Config.Wealth = {
    IntervalSec = 300, -- wealth snapshot refresh (seconds)
    VipItem = 'vipcoins', -- inventory item counted as VIP coins
}

Config.Retention = {
    Days = 90,         -- raw transactions retention
    AggDays = 365,     -- aggregate retention
    DeleteChunk = 5000,
}

--- Legacy webhook field (prefer config/discord.lua Webhook — server only).
Config.DiscordWebhook = ''

--- Persist full meta JSON on each transaction (recommended).
Config.StoreMeta = true

--- Advanced Context Engine → config/context.lua

Config.Api = {
    MaxAmount = 1000000000,
    RateLimitPerResource = 120,
}

--- Framework auto-detect timeout (seconds).
Config.DetectTimeoutSec = 60

--[[
  ════════════════════════════════════════
   DEBUG (keep false in production)
  ════════════════════════════════════════
]]
Config.Debug = {
    Bus = false,
    Hooks = false,
    Auth = false,
    Context = false, -- buffer / correlator verbose logs
}
```
