T3 // Economy & Business

coe_crafting

Crafting Hub

Recipes, benches and crafting execution for mechanics, commerce and factions

HEADLESS SERVICE (NO UI)
DEPENDS ON coe_corecoe_databasecoe_businessescoe_factionscoe_inventorycoe_loggingcoe_ui
coe_crafting 19 exports · 0 commands

Runs without a NUI: nothing is rendered on the client and the resource stays idle until events arrive.

01 // OVERVIEW

Crafting hub: it holds recipes, rules and execution, and other systems only say where the bench is and who has access. Deterministic recipes with multiple inputs and outputs, bench types with input source (player, stash or both) and output destination, and recipe, bench and menu registration in the admin panel.

On FiveM Enhanced

Begin reserves and validates; Complete checks again, consumes and delivers. If anything fails, everything is returned.

02 // FEATURES

What the module delivers

01

Deterministic Recipes

No failure chance or bonus.

02

Bench Types

Accepted categories, source and destination.

03

Context Access

Businesses and factions decide who uses it.

04

Safe Transaction

Inputs returned if anything fails.

ARCHITECTURAL LAYERS // CLEAN ARCHITECTURE

4-Layer Isolation with 0.00 ms Idle

Every COE Framework script strictly follows the principle of separation of concerns. Interact with the 3D stack below:

L4
Presentation & NUI
HTML5 · CSS tokens · CoE UI
CEF DX12
L3
Application & Server
Atomic locks · Rate limiting
Auth Server
L2
Platform & HAL
Core.Platform · Mock natives
Gen9 HAL
L1
Domain & ACID Database
Prepared SQL · MariaDB pool
ACID Pool
LAYER 04 // PRESENTATION & NUI

Responsive NUI & CoE UI Design System

Built with vanilla HTML5, CSS3 tokens, and modern JavaScript. No heavyweight frameworks (React/Vue/Electron). Rendered directly in FiveM DX12's Chromium Embedded Framework at 0.00 ms while closed.

Five themes supported in real time through CSS variables (--coe-accent, --coe-surface)
Fully keyboard-navigable (Tab, Esc, Enter) and ARIA-accessible
Secure asynchronous communication with the FiveM client via fetch("https://...")
ADMIN POWERS // OPERATION & MANAGEMENT

What this script delivers to Server Owners

Manage your city without relying on developers. Runtime parameters, auditing, and ACE-protected commands:

🛡️
ACE Permissions
Administrative operations strictly protected by coe.staff and coe.admin principals.
IsPlayerAceAllowed(src, "coe.admin")
📊
Ledger Auditing
Relevant actions write audit records to the database through coe_audit.
exports.coe_audit:Record(severity, category, event, context)
⚡
0.00ms Idle Telemetry
Event-driven thread dispatch that stays dormant until network events fire.
Clean Architecture & HAL
03 // EXPORTS

Public API 19

Typed contracts to call from other resources. Full types live in types.lua and in the docs reference.

exports['coe_crafting']:AdminCatalog() → any

Export server AdminCatalog (server/main.lua).

No parameters.

LUA
local result = exports['coe_crafting']:AdminCatalog()
exports['coe_crafting']:AdminDeleteBench(fn) → any

Export server AdminDeleteBench (server/main.lua).

ParameterType
fnany
LUA
local result = exports['coe_crafting']:AdminDeleteBench(fn)
exports['coe_crafting']:AdminDeleteMenu(fn) → any

Export server AdminDeleteMenu (server/main.lua).

ParameterType
fnany
LUA
local result = exports['coe_crafting']:AdminDeleteMenu(fn)
exports['coe_crafting']:AdminDeleteRecipe(fn) → any

Export server AdminDeleteRecipe (server/main.lua).

ParameterType
fnany
LUA
local result = exports['coe_crafting']:AdminDeleteRecipe(fn)
exports['coe_crafting']:AdminSaveBench(fn) → any

Export server AdminSaveBench (server/main.lua).

ParameterType
fnany
LUA
local result = exports['coe_crafting']:AdminSaveBench(fn)
exports['coe_crafting']:AdminSaveMenu(fn) → any

Export server AdminSaveMenu (server/main.lua).

ParameterType
fnany
LUA
local result = exports['coe_crafting']:AdminSaveMenu(fn)
exports['coe_crafting']:AdminSaveRecipe(fn) → any

Export server AdminSaveRecipe (server/main.lua).

ParameterType
fnany
LUA
local result = exports['coe_crafting']:AdminSaveRecipe(fn)
exports['coe_crafting']:AdminSetBusinessMenu(fn) → any

Export server AdminSetBusinessMenu (server/main.lua).

ParameterType
fnany
LUA
local result = exports['coe_crafting']:AdminSetBusinessMenu(fn)
exports['coe_crafting']:Begin(fn) → any

Export server Begin (server/main.lua).

ParameterType
fnany
LUA
local result = exports['coe_crafting']:Begin(fn)
exports['coe_crafting']:Busy(fn) → any

Export server Busy (server/main.lua).

ParameterType
fnany
LUA
local result = exports['coe_crafting']:Busy(fn)
exports['coe_crafting']:Cancel(fn) → any

Export server Cancel (server/main.lua).

ParameterType
fnany
LUA
local result = exports['coe_crafting']:Cancel(fn)
exports['coe_crafting']:Close(fn) → any

Export server Close (server/main.lua).

ParameterType
fnany
LUA
local result = exports['coe_crafting']:Close(fn)
exports['coe_crafting']:Complete(fn) → any

Export server Complete (server/main.lua).

ParameterType
fnany
LUA
local result = exports['coe_crafting']:Complete(fn)
exports['coe_crafting']:List(fn) → any

Export server List (server/main.lua).

ParameterType
fnany
LUA
local result = exports['coe_crafting']:List(fn)
exports['coe_crafting']:ListRecipes() → any

Panel catalog containing only each recipe's ID, name, and category.

No parameters.

LUA
local result = exports['coe_crafting']:ListRecipes()
exports['coe_crafting']:Open(fn) → any

Export server Open (server/main.lua).

ParameterType
fnany
LUA
local result = exports['coe_crafting']:Open(fn)
exports['coe_crafting']:RegisterBench(fn) → any

The calling resource owns the registration; it cannot overwrite another resource's recipe or bench.

ParameterType
fnany
LUA
local result = exports['coe_crafting']:RegisterBench(fn)
exports['coe_crafting']:RegisterRecipe(fn) → any

Export server RegisterRecipe (server/main.lua).

ParameterType
fnany
LUA
local result = exports['coe_crafting']:RegisterRecipe(fn)
exports['coe_crafting']:RemoveRecipe(fn) → any

Export server RemoveRecipe (server/main.lua).

ParameterType
fnany
LUA
local result = exports['coe_crafting']:RemoveRecipe(fn)
04 // COMMANDS

In-game commands 0

This module registers no commands: it is driven by exports and events.