A clean FiveM resource template with modern web technologies and database support.
- React 19 - UI framework
- TypeScript - Type safety
- Vite - Build tool & dev server
- Material-UI - Component library
- Tailwind CSS - Utility-first CSS
- Lua - FiveM scripting
- FiveM - Game server platform
- MySQL - Database support
sTemplate/
├── client/ # Client-side Lua scripts
├── server/ # Server-side Lua scripts
├── shared/ # Shared Lua configuration & database utilities
├── web/ # React frontend
│ ├── src/ # Source code
│ └── dist/ # Built files
└── fxmanifest.lua # FiveM resource manifest
-
Install MySQL/MySQL-Async
# Add to your server.cfg ensure mysql-async -
Configure database connection
- Edit
shared/database.luawith your MySQL credentials - Create database tables using the provided schema
- Edit
-
Initialize database
-- In your server script Database.Initialize()
-
Install dependencies
cd web npm install -
Build frontend
npm run build
-
Setup database
- Configure MySQL connection in
shared/database.lua - Run database initialization
- Configure MySQL connection in
-
Deploy to FiveM
- Copy folder to server resources
- Add
ensure sTemplateto server.cfg
- Edit Lua scripts in
client/,server/,shared/ - Modify React app in
web/src/ - Database utilities available in
shared/database.lua - Rebuild with
npm run buildafter changes
The template includes basic database utilities:
-- Initialize database connection
Database.Initialize()Ready to build your FiveM resource! 🎮