Skip to main content
Mythic Framework resources follow a consistent structure that promotes organization, maintainability, and scalability. Understanding this structure is essential for both using and developing Mythic resources.

Standard Resource Structure

Every Mythic resource follows this pattern:
Not all resources have all folders. Simple resources may only have fxmanifest.lua and server/ or client/. Complex resources with UIs will have the full structure.

The fxmanifest.lua File

The manifest file is required for all FiveM resources. It defines metadata, dependencies, and files to load.

Basic Manifest

Mythic Resource Manifest

Mythic resources typically include anti-cheat and organized file loading:

Manifest Features

Declare resource dependencies:
Define exports other resources can use:
For resources with NUI:
For resources that add game data:

Directory Breakdown

client/ Directory

Contains all client-side Lua scripts. Common Files:
Example component.lua:
Example events.lua:

server/ Directory

Contains all server-side Lua scripts. Common Files:
Example component.lua:
Example callbacks.lua:

shared/ Directory

Contains scripts loaded on both client and server. Use Cases:
  • Configuration that both sides need
  • Shared utility functions
  • Constants and enums
  • Data structures
Example config.lua:

config/ Directory

Resource-specific configuration files. Example:

ui/ Directory

React-based user interfaces. Structure:
Example App.jsx:

File Naming Conventions

Naming Pattern:
  • Lowercase with underscores: item_manager.lua
  • Or descriptive names: component.lua, events.lua, main.lua
Prefixes (mythic-base pattern):
  • sh_ = Shared (both sides)
  • sv_ = Server only
  • cl_ = Client only
Components: PascalCase
Utilities: camelCase
Reducers: Descriptive with suffix
Always named config.lua or descriptive of what they configure:

Best Practices

Consistent Structure

Follow the standard structure for all resources. Makes navigation and maintenance easier.

Separate Concerns

Keep client, server, and UI code separate. Don’t mix them in the same file.

Use Wildcards

Use client/*.lua and server/*.lua in fxmanifest for easier file management.

Document Everything

Include README.md explaining what the resource does and how to configure it.

Config Files

Externalize configuration. Never hardcode values that might change.

Modular Code

Break large files into smaller, focused modules. Don’t put everything in main.lua.

Example: Complete Resource

Here’s a simple but complete example resource following Mythic structure:
fxmanifest.lua:
shared/config.lua:
server/component.lua:
server/events.lua:
client/events.lua:

Next Steps

Component System

Understand components for resource development

UI Framework

Learn React UI development for Mythic

Architecture

Framework architecture and load order

API Reference

Complete API documentation
Start simple: When creating a new resource, start with the minimal structure (fxmanifest.lua + one server or client file) and expand as needed. Don’t create empty folders.