How sammethot/learn-fivem works
Purpose and Published Entry Points
FiveM School is a static, markdown-authored course for building FiveM resources, from Lua and runtime fundamentals through production projects. The learner entry point is README.md, with the ordered curriculum beginning at 01-basics/01-what-is-fivem.md. FULL-INDEX.md is the repository-level navigation map. The published site is deployed to GitHub Pages via .github/workflows/deploy.yml.
Curriculum as the Primary Architecture
The repository is organized as a strict dependency-ordered learning pipeline rather than an executable FiveM application. Foundational runtime and resource concepts precede cross-boundary messaging, platform APIs, persistence, framework integrations, UI, hardening, performance, and projects:
• 01-basics/01-what-is-fivem.md
• 02-events/01-local-events.md
• 10-first-projects/01-hello-resource.md
Each lesson is intended to link forward, making directory ordering and lesson sequence the core control flow.
FiveM Runtime and Resource Boundary
The course establishes FiveM resources as deployable units defined by an fxmanifest.lua, separating client Lua, server Lua, and shared code. It teaches the key trust boundary: client code runs on player machines and is hostile; server code is authoritative. This model is introduced in:
• 01-basics/03-client-vs-server.md
• 01-basics/04-resources-and-fxmanifest.md
• 02-events/03-event-security.md
Target runtime is FiveM with Lua 5.4 and OneSync Infinity, tested on a local FiveM server managed through txAdmin.
Inter-Script Communication and Security
Events are the main control-flow mechanism covered: local events within a runtime, network events across client/server, and callbacks for request/response patterns. Net-event handlers form an attack surface and must capture source, validate inputs and permissions server-side, and avoid exposing secrets or authority to clients.
• 02-events/01-local-events.md
• 02-events/02-net-events.md
• 02-events/04-callbacks.md
Security guidance is consolidated and reinforced through 08-security/01-security-checklist.md.
Game, Data, and Framework Integration
The course progresses from GTA V natives to server-side MySQL persistence, then to common roleplay abstractions. The expected modern stack is Qbox (qbx_core), with QBCore and ESX addressed as alternatives. Database examples use oxmysql and emphasize parameterized queries as the data-integrity boundary.
• 03-natives/02-common-natives.md
• 04-database/02-queries-and-security.md
• 05-frameworks/01-qbox-basics.md
External services/dependencies include the FiveM/GTA native API, MySQL, oxmysql, Qbox/QBCore/ESX, and server configuration through server.cfg/convars.
Ox Ecosystem and Interaction Layer
The curriculum treats Ox libraries as reusable resource-level integration points: ox_lib for common UI/utilities, ox_target for world interactions, and ox_inventory for inventory operations. These components sit between gameplay scripts, framework player data, and server validation.
• 06-ox-libraries/01-ox-lib.md
• 06-ox-libraries/02-ox-target.md
• 06-ox-libraries/03-inventories.md
NUI and End-to-End Delivery
NUI introduces a browser-rendered CEF overlay, with game-script ↔ UI messaging as another explicit boundary; React 19 + Vite is the assumed UI stack. Final projects integrate the prior layers into runnable resources such as a shop and menu, while performance lessons constrain thread/wait usage to preserve server and client frame time.
• 07-nui/01-nui-basics.md
• 07-nui/02-react-nui.md
• 09-performance/02-optimization-patterns.md
• 10-first-projects/02-shop.md
Main entry points: 02-shop.md Shop Project · 02-react-nui.md React NUI · 04-resources-and-fxmanifest.md Resource & Manifest · 02-queries-and-security.md MySQL via oxmysql
Components 19
Course Navigation
- Learner Entry
README.md - Course Index
FULL-INDEX.md - GitHub Pages Deploy
.github/workflows/deploy.yml
Learning Pipeline
Ordered lessons build from runtime fundamentals to projects.
- FiveM Fundamentals
01-basics/01-what-is-fivem.md - Local Events
02-events/01-local-events.md - Network Events
02-events/02-net-events.md - Callbacks
02-events/04-callbacks.md - React NUI · CEF UI communicates across a game-script/UI boundary.
07-nui/02-react-nui.md - Security Checklist
08-security/01-security-checklist.md - Optimization Patterns · Constrains thread and wait usage for frame time.
09-performance/02-optimization-patterns.md - Hello Resource
10-first-projects/01-hello-resource.md - Shop Project · End-to-end runnable resource.
10-first-projects/02-shop.md
FiveM Resource Model
- Client / Server Trust · Clients are hostile; server code is authoritative.
01-basics/03-client-vs-server.md - Resource & Manifest · Resources package client, server, and shared Lua.
01-basics/04-resources-and-fxmanifest.md - Event Security · Server handlers validate source, input, and permissions.
02-events/03-event-security.md
Platform Integrations
- GTA Native API
03-natives/02-common-natives.md - MySQL via oxmysql · Parameterized queries are the data-integrity boundary.
04-database/02-queries-and-security.md - Qbox & Alternatives · Qbox is primary; QBCore and ESX are alternatives.
05-frameworks/01-qbox-basics.md - Ox Integration Layer · ox_lib, ox_target, and ox_inventory connect gameplay to validated services.
06-ox-libraries/01-ox-lib.md
Connections 21
- Learner Entry → Course Index: navigates
- Learner Entry → FiveM Fundamentals: begins curriculum
- Course Index → GitHub Pages Deploy: published by
- FiveM Fundamentals → Client / Server Trust: introduces
- Client / Server Trust → Resource & Manifest: applied in
- Resource & Manifest → Local Events: enables scripts
- Local Events → Network Events: extends to
- Network Events → Event Security: requires
- Event Security → Callbacks: secures request flow
- Callbacks → GTA Native API: advances to
- GTA Native API → MySQL via oxmysql: adds persistence
- MySQL via oxmysql → Qbox & Alternatives: supports player data
- Qbox & Alternatives → Ox Integration Layer: integrates with
- Ox Integration Layer → React NUI: adds interaction UI
- React NUI → Security Checklist: reinforces boundaries
- Security Checklist → Optimization Patterns: hardens before tuning
- Optimization Patterns → Hello Resource: prepares implementation
- Hello Resource → Shop Project: builds toward
- Shop Project → Resource & Manifest: delivered as resource
- Shop Project → MySQL via oxmysql: persists data
- Shop Project → React NUI: uses UI