Overview
The FiveM NUI NextJS Boilerplate is a tool that allows users to quickly get started with the right tools for their FiveM UI development. This boilerplate provides features such as Typescript, NextJS 14, Next-themes, Tailwindcss, and Redux Toolkit. It also includes instructions on how to integrate it with FiveM and deploy it via Vercel or manually.
Features
- Typescript: Utilize the benefits of static typing and improved tooling with Typescript.
- NextJS 14: Make use of the latest features and improvements in NextJS for your UI development.
- Next-themes: Easily implement theming functionality in your UI using Next-themes.
- Tailwindcss: Take advantage of the utility-first CSS framework, Tailwindcss, for quicker styling.
- Redux Toolkit: Use Redux Toolkit for state management in your UI.
Installation
To get started with the FiveM NUI NextJS Boilerplate, follow these steps:
FiveM Resource
- Clone this repository or download it as a zip file.
- Extract the zip file (if downloaded as a zip file).
- Move the folder
fivem-nextjs-exampleto your resources folder. - Add
ensure fivem-nextjs-exampleto yourserver.cfgfile. - Update
ui_pageurl infxmanifest.luato your UI deployment url. - Edit
config.luato your liking. - Start your server.
NextJS UI
- Deploy via Vercel:
- Create a new repository from the template button (upper right corner).
- Create a new project on vercel.com/new.
- Connect your Github repository to Vercel.
- Add the environment variables from
.envin the Vercel dashboard. - Deploy your project.
- Update
ui_pageurl infxmanifest.luato your UI deployment url. - Start your server.
- Deploy manually:
- Clone this repository or download it as a zip file.
- Extract the zip file (if downloaded as a zip file).
- Go to the
uifolder. - Run
npm installoryarn installorpnpm installto install the dependencies. - Run
npm run buildoryarn buildorpnpm buildto build the project. - Run
npm run startoryarn startorpnpm startto start the project. - Update
ui_pageurl infxmanifest.luato your UI deployment url. - Start your server.
Summary
The FiveM NUI NextJS Boilerplate is a helpful tool for developers looking to quickly start their FiveM UI development. With features such as Typescript, NextJS 14, Next-themes, Tailwindcss, and Redux Toolkit, it provides a powerful foundation for creating UIs in FiveM. The boilerplate also offers instructions for integrating with FiveM and deploying the UI either via Vercel or manually. Overall, this boilerplate streamlines the initial setup process and offers a solid starting point for UI development in FiveM.