paid-resources
Restaurant Management

Restaurant Management

๐Ÿ’ฐ Full-Featured, Optimized & Dynamic Restaurant/Business Management System

lcky-restaurant_management is a production-ready restaurant and business management framework built for FiveM. Features lazy-loading architecture, RAM-first caching, and framework-agnostic bridge system.


โœจ Features

Core Systems

  • ๐Ÿช Multi-Restaurant Support - Unlimited restaurants with independent menus, recipes, orders
  • ๐Ÿ“ฆ Lazy Loading - Restaurants load from SQL on first access (minimal memory)
  • โšก RAM-First Caching - All runtime data cached in memory with instant SQL sync
  • ๐Ÿ”’ Job Grade Permissions - Granular access based on framework job grades

Business Operations

  • ๐Ÿ“‹ Dynamic Menu Management - Add, edit, remove menu items in real-time
  • ๐Ÿง‘โ€๐Ÿณ Kitchen Station System - Cooking (Grill, Fryer, Oven, Coffee) and Assembly stations
  • ๐Ÿณ Dynamic Recipe System - Restaurant-specific recipes with custom ingredients
  • ๐Ÿ›’ Cart & Order System - Full ordering flow with FIFO queue and real-time kitchen updates
  • ๐Ÿ’ฐ Payment System - Cash and bank card payments with confirmation
  • ๐Ÿงพ Receipt System - Physical receipt items (ox_inventory) with single/bulk redemption
  • ๐Ÿ’ฒ Tip System - Configurable tip percentages (0-20%)
  • ๐Ÿท๏ธ Discount System - Time-limited hourly discounts
  • ๐Ÿ“Š Z Report System - Revenue analytics and statistics
  • ๐Ÿช Wholesale Market - Bulk ingredient purchasing via ox_inventory

๐Ÿ“ฆ Dependencies

DependencyRequired
ox_libโœ…
ox_inventoryโœ…
oxmysqlโœ…
ox_target or qb-targetโœ…
qbx_core, qb-core, or ESXโœ…

๐Ÿš€ Installation

Step 1 - Place the Resource

resources/
โ””โ”€โ”€ [spc-scripts]/
    โ””โ”€โ”€ lcky-restaurant_management/

Step 2 - Import Database

Execute sql/schema.sql - creates:

  • lcky_restaurants - Restaurant definitions
  • lcky_menu_items - Menu items
  • lcky_recipes - Dynamic recipes
  • lcky_recipe_ingredients - Recipe ingredients
  • lcky_interaction_points - Interaction points
  • lcky_orders_log - Order history
  • lcky_discounts - Discount records

Step 3 - Register Inventory Items

Add items from inventoryitems.lua to your ox_inventory items config.

Step 4 - Add to server.cfg

ensure ox_lib
ensure oxmysql
ensure ox_inventory
ensure ox_target
ensure lcky-restaurant_management

Step 5 - Admin Permission

add_ace group.admin command.restaurantadmin allow

Step 6 - Create Restaurants

Use /restaurantadmin in-game to register restaurants.


๐Ÿ“ Architecture

โ”œโ”€โ”€ client/      # Point manager, interaction editor, menus, kitchen
โ”œโ”€โ”€ server/      # Instance, menu, order, recipe, kitchen managers
โ”‚   โ””โ”€โ”€ repositories/  # SQL abstraction layer
โ””โ”€โ”€ shared/
    โ”œโ”€โ”€ config.lua     # Main configuration
    โ”œโ”€โ”€ config_stations.lua  # Station definitions
    โ””โ”€โ”€ bridge/        # Framework auto-detect
        โ”œโ”€โ”€ core/      # qb.lua, esx.lua
        โ”œโ”€โ”€ inventory/ # ox.lua, qb.lua
        โ””โ”€โ”€ target/    # ox.lua, qb.lua

Data Flow

  1. Lazy Loading - Restaurant data loads from MySQL on first access
  2. RAM Cache - Data lives in _G.SPC_RestaurantInstances
  3. Instant Sync - Every mutation writes to SQL first, then updates cache

โš™๏ธ Configuration

Permission Grades

Config.Permissions = {
    accessCashier = 0,      -- All employees
    accessStorage = 1,      -- Chef+
    accessKitchen = 1,      -- Chef+
    editMenu = 2,           -- Manager+
    viewZReport = 2,        -- Manager+
    manageDiscounts = 2,    -- Manager+
}

Restaurant Definitions

Config.Restaurants = {
    ["burgershot"] = { name = "Burger Shot" },
    ["beanmachine"] = { name = "Bean Machine" },
}

Menu Categories

Config.MenuCategories = {
    burger  = { label = "Burgers",  icon = "fas fa-burger" },
    drink   = { label = "Drinks",   icon = "fas fa-glass-water" },
}

๐Ÿ”ง Cooking Stations

StationProcesses
GrillRaw Meat โ†’ Cooked Meat, Raw Bacon โ†’ Cooked Bacon
FryerPotato โ†’ Fries, Onion โ†’ Onion Rings
OvenDough โ†’ Baked Dough, Whole Chicken โ†’ Roasted Chicken
Coffee MachineCoffee Beans โ†’ Espresso Shot

Assembly Stations

Dynamic recipe-based stations (Prep Table, Drink Station)


๐ŸŽฎ In-Game Commands

CommandDescription
/restaurantadminOpen admin panel
(In-game menus)Management, Cashier, Kitchen interfaces

๐Ÿ“ค Key Exports

Instance Manager

exports['lcky-restaurant_management']:GetRestaurant(jobName)
exports['lcky-restaurant_management']:HasPlayerPermission(source, perm)
exports['lcky-restaurant_management']:PreloadAllRestaurants()

Order Manager

exports['lcky-restaurant_management']:CreateOrder(source, jobName, items)
exports['lcky-restaurant_management']:UpdateOrderStatus(jobName, orderId, status)

Menu Manager

exports['lcky-restaurant_management']:AddMenuItem(jobName, data)
exports['lcky-restaurant_management']:GetRestaurantMenu(jobName)

๐Ÿ› ๏ธ Admin Setup

  1. Grant ACE permission: add_ace group.admin command.restaurantadmin allow
  2. Run /restaurantadmin in-game
  3. Add restaurants and interaction points
  4. Set up menus and recipes
  5. Open for business via Management Menu

๐Ÿ“ License

Developed by LuckyScripts | All rights reserved