# Shared Config

This guide controls framework integration and permission mapping in `config/shared.lua`, which affects almost every server-side operation in VibesEZ-Race.

## Before You Start

* VibesEZ-Race installed and running.
* One framework resource running: QBCore, Qbox, ESX, or custom bridge.
* Access to restart `VibesEZ-Race`.

## Configure Framework And Bridge

1. Open `config/shared.lua`.
2. Set `Framework`.

```lua
-- File: config/shared.lua
Framework = 'auto', -- EDIT THIS: auto | qbcore | qbox | esx | custom
```

3. Set bridge resource names.

```lua
-- File: config/shared.lua
Bridge = {
	qbResource = 'qb-core',     -- EDIT THIS
	qboxResource = 'qbx_core',  -- EDIT THIS
	esxResource = 'es_extended', -- EDIT THIS
	useOxLibCallbacks = true,   -- EDIT THIS
	useOxLibNotify = true       -- EDIT THIS
}
```

## Configure Admin Access

1. Open `config/shared.lua`.
2. Set `AdminSystem.MasterAdmins` values.

```lua
-- File: config/shared.lua
AdminSystem = {
	MasterAdmins = {
		Mode = 'framework', -- EDIT THIS: identifier | framework | both
		Identifiers = {
			-- EDIT THIS: add identifier entries when needed
		},
		FrameworkGroups = { 'god', 'superadmin', 'admin' } -- EDIT THIS
	}
}
```

3. Set `AdminMode.forceNonAdmin`.

```lua
-- File: config/shared.lua
AdminMode = {
	forceNonAdmin = false -- EDIT THIS
}
```

> **Warning:** Keep `forceNonAdmin = false` on production servers or all admin checks will fail.

## Configure Database Table Aliases

1. Open `config/shared.lua`.
2. Review `DatabaseTables` alias mappings.

```lua
-- File: config/shared.lua
DatabaseTables = {
	race_roles = 'vibesez_race_roles',      -- EDIT THIS only if physical table was renamed
	racer_profiles = 'vibesez_race_profiles', -- EDIT THIS only if physical table was renamed
	racing_tracks = 'vibesez_race_tracks'   -- EDIT THIS only if physical table was renamed
	-- ...
}
```

> **Note:** Leave alias values unchanged when you use the default SQL from `install/racing.sql`.

## Verify

1. Restart the `VibesEZ-Race` resource.
2. Open the racing app in-game.
3. Confirm profile loading and admin panel visibility.
4. Confirm new races and tracks save without SQL errors.

## See Also

* [Configuration Overview](/vibesez/docs/configuration/overview.md)
* [Initial Setup](https://github.com/VibesEZ/VibesEZ-Race/blob/claude-docs/docs/getting-started/initial-setup.md)


---

# Agent Instructions: 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:

```
GET https://vibesez.gitbook.io/vibesez/docs/configuration/shared-config.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
