legacy-crafting
Overview
What legacy-crafting is and how it's put together.
legacy-crafting
legacy-crafting is a full crafting system for FiveM built around workbenches, tiered recipes, and a cinematic camera preview when crafting.
Features
- Placeable/existing-prop crafting benches with map blips and
ox_targetinteraction zones - Cinematic camera + rotating item preview while crafting (
Config.CameraOffset,Config.PropRotationSpeed) - Recipe, category, tier, and bench management through an in-game admin panel (
Config.AdminCommand) - Built-in XP/tier ladder (
Config.Tiers) or delegation to the externallegacy-skillsresource - Per-bench shared storage (ox_inventory stashes) as an alternative ingredient source to player inventory
- Job/gang gated benches and recipes, cooldowns, crafting history logging, and Discord webhook notifications
- React/Tailwind/Vite NUI frontend (
web/) built toweb/dist
Architecture at a glance
- server/server.lua — loads bench/recipe/category/tier data from MySQL, validates and processes crafts, exposes a full admin CRUD API gated by an
IsAdmin()check, and registers theConfig.AdminCommandcommand. - client/client.lua — NUI bridge, cinematic camera, and preview prop rendering.
- client/benches.lua — spawns bench objects/blips/target zones from server bench data and keeps them in sync.
- client/placement.lua — in-game admin tool for positioning benches, cameras, and props.
- config.lua — all tunables (see Configuration).
- sql/schema.sql (+ optional seed files) — the
legacy_crafting_*table schema and sample/seed data. - web/ — the React/Tailwind NUI, built separately with Vite.
This resource depends on legacy-lib, ox_lib, and oxmysql, and additionally uses ox_inventory and ox_target at runtime, plus optionally legacy-skills. See Installation for full details.