ATY Scripts Logo
ATY Scripts/Docs/Restaurant Creator/Architecture

Architecture

Stack

Layer Tech
Server / Client logic Lua (CfxLua)
Bridge aty_lib — framework, inventory, target, skin, database abstraction
Database oxmysql (MySQL)
NUI Vue 3 (Composition API) + Vite + Pinia, built to web/dist
3D screens cr3d DUI engine (texture-replace + panel rendering)

State & sync model

  • Server-side cache — restaurants are loaded from the DB into a server cache on start and after edits.
  • GlobalState replication — the cache and live sub-states are published via GlobalState (e.g. ATY_Restaurants, ATY_Freezers, ATY_PrepStock, ATY_PrepBoards, ATY_RestaurantPollutions, ATY_Dispensers, ATY_PizzaBoxes, ATY_EspressoMachines). Clients read these and react via state-bag change handlers / polling loops.
  • Cooking states — grill/fryer tickets sync via a dedicated SyncCookingStates client event; timers are computed client-side to stay clock-skew-proof.

Folder layout

aty_restaurant/
├── client/            # main, open, builder, dui, cr3d/, biometrics, npc,
│                      # microwave_prop, espresso_prop, pizza, courier, ...
├── server/            # main, kitchen, employees, dashboard, supply, admin,
│                      # microwave, biometrics, tenders, sabotage, npc, ...
├── shared/            # config.lua, config_items, config_recipes,
│                      # config_stations, locales, utils   (escrow_ignore'd)
├── web/               # Vue 3 NUI source (src) + built output (dist)
├── items/             # ready-to-paste ox / qb item lists
├── data/install.sql   # database schema
└── fxmanifest.lua

NUI build

The NUI is a standard Vite app:

cd web
npm install
npm run build      # outputs to web/dist (shipped)

web/dist is what the game loads (ui_page 'web/dist/index.html'). Only rebuild if you change files under web/src. Locale text and most config are read at runtime and do not require a rebuild.

Editable vs escrow

shared/* (config, items, recipes, stations, locales, utils) is escrow_ignore'd and fully open. Core logic may be protected depending on your distribution.

ATY Scripts LogoATY SCRIPTS

Crafting highly optimized FiveM scripts for QBCore & ESX. Maximum performance, precision code, zero lag.

Join Community

Partner

Official partners with Tebex. Secure checkout and Cfx.re Keymaster integration.

Legal

Not affiliated with Rockstar Games, Cfx.re, FiveM, or Take-Two Interactive. Purchases bound by Tebex Terms of Service.

© 2026 ATY SCRIPTS. All rights reserved.