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
| Dependency | Required |
|---|---|
| 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 definitionslcky_menu_items- Menu itemslcky_recipes- Dynamic recipeslcky_recipe_ingredients- Recipe ingredientslcky_interaction_points- Interaction pointslcky_orders_log- Order historylcky_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_managementStep 5 - Admin Permission
add_ace group.admin command.restaurantadmin allowStep 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.luaData Flow
- Lazy Loading - Restaurant data loads from MySQL on first access
- RAM Cache - Data lives in
_G.SPC_RestaurantInstances - 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
| Station | Processes |
|---|---|
| Grill | Raw Meat โ Cooked Meat, Raw Bacon โ Cooked Bacon |
| Fryer | Potato โ Fries, Onion โ Onion Rings |
| Oven | Dough โ Baked Dough, Whole Chicken โ Roasted Chicken |
| Coffee Machine | Coffee Beans โ Espresso Shot |
Assembly Stations
Dynamic recipe-based stations (Prep Table, Drink Station)
๐ฎ In-Game Commands
| Command | Description |
|---|---|
/restaurantadmin | Open 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
- Grant ACE permission:
add_ace group.admin command.restaurantadmin allow - Run
/restaurantadminin-game - Add restaurants and interaction points
- Set up menus and recipes
- Open for business via Management Menu
๐ License
Developed by LuckyScripts | All rights reserved