Skip to content

Installation

Follow these steps to add DarkMarket to your server. The app installs like any lb-phone app, inside the [phone] folder of your resources.

Requirements

ItemDetail
lb-phoneRequired, installed and working
oxmysqlRecommended (otherwise memory mode, data not persisted)

1. Add the resource

Drop the lo_darkmarket folder into resources/[phone]/:

resources/
└── [phone]/
    └── lo_darkmarket/
        ├── fxmanifest.lua
        ├── shared/config.lua
        ├── client/client.lua
        ├── server/server.lua
        ├── installation.sql
        ├── locales/          ← language files (en, fr, es, de, it, pt)
        ├── assets/           ← App Store icon & images
        └── ui/
            └── dist/         ← already-built UI

2. Start order

In server.cfg, start DarkMarket after oxmysql and lb-phone:

cfg
ensure oxmysql
ensure lb-phone
ensure lo_darkmarket

WARNING

If lo_darkmarket starts before lb-phone, the app won't register on the phone. Keep the order.

3. Database

The schema is created automatically on start if oxmysql is available — no manual action required.

If you prefer to install the schema by hand (strict DBA, versioned migrations…), use the bundled installation.sql file:

bash
mysql -u <user> -p <database> < installation.sql

NOTE

Without oxmysql, the app runs in memory mode: data (accounts, channels, listings, DMs) is kept in RAM and lost when the resource restarts. For testing only.

4. User interface (UI)

The interface is already built: the ui/dist/ folder is provided and served to the phone by fxmanifest.lua. No build step is required to use the app.

If you want to modify the UI and rebuild it:

bash
cd resources/[phone]/lo_darkmarket/ui
npm install
npm run build

The build regenerates ui/dist/.

TIP

Development mode — to iterate without rebuilding every time, run the Vite server then enable dev mode in shared/config.lua:

bash
cd ui
npm run dev   # Vite server on localhost:3000
lua
Config.DevMode = true
Config.DevURL  = 'http://localhost:3000'

Restart the resource: the app now points to the Vite server. Set Config.DevMode = false again for production.

Verification

  1. Start the server (or ensure lo_darkmarket live).
  2. On the in-game phone, open the App Store: DarkMarket should appear, ready to download.
  3. Install it, then create a channel or post a test listing.

Once the install checks out, tune the behavior through the Configuration.