> For the complete documentation index, see [llms.txt](https://docs.lostdev.store/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lostdev.store/races/integrations/framework.md).

# Framework

## Auto-detection

By default (`Config.Framework.type = nil`), the resource checks which core resource is running in this order:

1. `qbx_core` started → **QBX (Qbox)**
2. `qb-core` started → **QBCore**
3. `es_extended` started → **ESX**
4. None of the above → **Standalone**

If auto-detection picks the wrong one—for example, if you have multiple frameworks installed or a renamed core resource:

```lua
Config.Framework = {
    type = 'qbx',        -- 'qbcore' | 'qbx' | 'esx' | 'standalone'
    resource = nil,       -- only needed if your core resource has a non-default name
}
```

Money (entry fees, rewards) and job/gang lookups are read through this framework bridge, so this must be correct for `Config.Lobby.entryFeeAccount` and `Config.Rewards` to work.

## Identity provider

`Config.Identity.provider` decides where a player's "group", job, gang, or a custom concept, comes from when a route restricts who can join:

* `'framework'` (default) — Pulled from the detected framework's job/gang data.
* `'custom'` — Supply your own resolver:

```lua
Config.Identity = {
    provider = 'custom',
    custom = {
        GetPlayerGroup = function(source)
            return { type = 'job', name = 'unemployed', label = 'Unemployed' }
        end,
    },
}
```

Use `'custom'` if you're on a framework this resource doesn't natively support, or if you want race eligibility to key off something other than job/gang—for example, a permission level, whitelist, or custom faction system.

## Standalone mode

Standalone works with no framework at all, money and identity checks are skipped/no-op unless you provide a custom identity resolver.

Lobbies, ghosts, leaderboards, and route creation all work the same regardless of framework.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.lostdev.store/races/integrations/framework.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
