Configuration

To configure custom apps, navigate to the config file: /public/static/config/config.json Search for the AppStore section to add your custom applications.
Never change the redirect property! This is essential for the pad to know where to forward requests.

Configuration Properties

name
string
required
Name of the custom app
icon
string
required
Path to the icon for the custom app
url
string
required
Web page URL that the pad should display. Only websites with iFrame support work, including custom HTML files for self-developed apps.
custom_app_id
string
required
Unique identifier for your app. Set this once and never change it. Ensure no duplicate IDs exist.
darkmode
boolean
default:"false"
Changes the header and home button color scheme (black/white)
custom_event
object
Event configuration object with the following properties:

Examples

Website App Configuration

{
  "name": "CustomApp",
  "icon": "/public/img/app/Apps/custom.jpg",
  "default": true,
  "category": "apps",
  "custom_app_id": "SET_YOUR_OWN_ID_DONT_CHANGE_AFTERWARDS_NO_DOUBLE_ID",
  "redirect": "custom_app",
  "url": "https://www.test.com",
  "darkmode": false,
  "allowJobs": [],
  "disallowJobs": [],
  "custom_event": {
    "active": false,
    "closeWhenOpenApp": false
  }
}

Self-Developed App Configuration

{
  "name": "Template App",
  "icon": "/public/img/app/Apps/custom.jpg",
  "default": true,
  "category": "apps",
  "custom_app_id": "TEMPLATE_APP_1",
  "redirect": "custom_app",
  "url": "https://cfx-nui-roadpad-app-template/html/static/index.html",
  "darkmode": true,
  "allowJobs": [],
  "disallowJobs": [],
  "custom_event": {
    "active": false,
    "closeWhenOpenApp": false
  }
}

App Template

Get started quickly with our self-development app template on GitHub

Custom Events with Lua

To connect your app with Lua code, edit the client/clientAPI.lua file. Replace APPNAME with your actual app name and add your custom code inside the if statement:
RegisterNUICallback('app_custom_event', function(data, cb)
    local app = data.app

    if app == "APPNAME" then
        -- Your custom code here
    end

    cb('ok')
end)
Custom events allow you to trigger Lua functions when users interact with your custom app, enabling deeper integration with the game environment.