A modern FiveM resource boilerplate featuring TypeScript, Vue 3, Vuetify, and a robust build system with hot reload support.
- 🚀 TypeScript - Full TypeScript support for client, server, and web
- 🎨 Vue 3 + Vuetify - Modern UI framework with Material Design components
- 🔄 Hot Reload - Watch mode for rapid development
- 📦 ESBuild - Lightning-fast builds
- 🌍 Localization - Built-in i18n support
- 🗄️ Database Migrations - Structured database migration system
- 🎯 Type Safety - End-to-end type safety across client, server, and UI
- Node.js (v22 or higher)
- Yarn package manager
- FiveM Server (Build 13068 or higher)
- OneSync enabled on your server
-
Clone or download this resource to your FiveM server's
resourcesfolder -
Navigate to the resource directory:
cd resources/[standalone]/stockmarket- Install dependencies:
yarn installFor active development with automatic rebuilds:
yarn watchThis will:
- Watch for changes in TypeScript files
- Automatically rebuild on file changes
- Watch and rebuild the Vue/Vite web UI
To develop the UI with Vite's dev server and HMR:
yarn web:devAccess the UI at http://localhost:5173 (or the port shown in console)
Build the resource for production:
yarn buildThis will:
- Compile all TypeScript code (client/server)
- Bundle and minify the web UI
- Generate the
fxmanifest.lua - Output compiled files to the
distfolder
stockmarket/
├── src/
│ ├── client/ # Client-side TypeScript code
│ ├── server/ # Server-side TypeScript code
│ │ └── migrations/ # Database migration files
│ └── common/ # Shared code between client/server
│ ├── config.ts # Configuration loader
│ ├── locale.ts # Localization utilities
│ └── utils.ts # Common utilities
├── web/
│ ├── src/
│ │ ├── components/ # Vue components
│ │ ├── pages/ # Vue pages (file-based routing)
│ │ ├── composables/ # Vue composables
│ │ ├── utils/ # Web utilities
│ │ └── plugins/ # Vue plugins (Vuetify, etc.)
│ └── public/ # Static assets
├── static/
│ └── config.json # Runtime configuration
├── locales/
│ └── en.json # English translations
├── scripts/
│ ├── build.js # Build configuration
│ └── utils.js # Build utilities
└── dist/ # Compiled output (generated)
├── client.js
├── server.js
└── web/
| Command | Description |
|---|---|
yarn install |
Install dependencies |
yarn build |
Build for production |
yarn watch |
Development mode with auto-rebuild |
yarn web:dev |
Start Vite dev server for UI development |
yarn format |
Format code with Biome and ESLint |
yarn lint |
Lint code with Biome and ESLint |
Edit static/config.json to configure your resource. This file is loaded at runtime and can be modified without rebuilding.
Add or modify translation files in the locales/ directory:
en.json- English (default)- Add more languages as needed (e.g.,
fr.json,de.json)
Database migrations are located in src/server/migrations/. To create a new migration:
- Copy
TEMPLATE.tsin the migrations folder - Name it with a sequential number (e.g.,
002_add_users_table.ts) - Implement the
upanddownfunctions - Migrations run automatically on resource start
- TypeScript - Type-safe JavaScript
- ESBuild - Fast bundler
- Node.js 22 - Runtime environment
- Vue 3 - Progressive JavaScript framework
- Vuetify - Material Design component framework
- Vue Router - File-based routing
- Vite - Next-generation frontend tooling
- TypeScript - Full type safety
- ox_lib - Utility library
- NativeWrappers - Type-safe native calls
- Type Safety: Use TypeScript's type system to catch errors early
- Hot Reload: Use
yarn watchduring development for instant feedback - UI Development: Use
yarn web:devfor faster UI iteration with HMR - Code Quality: Run
yarn lintbefore committing changes - Formatting: Use
yarn formatto maintain consistent code style
This project is based on the Overextended FiveM TypeScript Boilerplate.
For issues or questions:
- Check the Issues page
- Review FiveM documentation
- Join relevant Discord communities
SaiCode
Note: This is a boilerplate template. Customize it for your specific resource needs.