Template for building external apps for NPWD v4.
- Click Use this template on GitHub
- Replace
examplewith your app ID in:server/server.ts— theidandnameinRegisterExternalAppweb/vite.config.ts— thenamefield (__npwd_ext_<your-id>)web/src/index.tsx— your app component and iconpackage.json— the packagename(used as the resource folder name)fxmanifest.lua— thedescription
- Install dependencies:
npm install && cd web && npm install
- Build:
npm run build
- Copy to your FiveM server resources and
ensureit
├── client/ # FiveM client script (NUI callbacks, natives)
├── server/ # FiveM server script (RegisterExternalApp)
├── web/src/ # React UI (bundled as IIFE)
├── shared/ # Shared types between client/server/web
├── scripts/ # esbuild config for client + server
├── fxmanifest.lua # FiveM resource manifest
└── .github/ # CI: builds + creates GitHub Release on tag push
Your web bundle can use these — they're provided by NPWD at runtime:
react,react/jsx-runtime,react-domlucide-react— icons@npwd/keyos— NPWD's UI component library@npwd/sdk— NPWD SDK utilitiesmotion/react— Framer Motion
Push a version tag to trigger the GitHub Action:
git tag v1.0.0 && git push --tagsThe action builds the resource, zips it, computes the SHA-256 hash, and creates a GitHub Release. Add the app to the NPWD registry to make it available in the App Store.