Merinaa
A modular TypeScript framework for FiveM servers: Deepkit DI, decorator- based controllers, YAML config with ENV substitution, Deepkit ORM + migrations, a lazy-loaded React NUI with a page / overlay registry, Vitest with live Discord reports, and a CLI that scaffolds the whole thing in one command.
Quick start
npm init merinaa my-server
cd my-server
pnpm install
cp .env.example .env
pnpm run build
pnpm run docker:up
Connect with FiveM: localhost:30120.
Why
-
One consumer surface, three bundles. You edit
merinaa.config.ts- per-module
module.config.ts. The generator produces server, client and UI entry points — you never hand-wire bundle entries.
- per-module
-
Decorators over config files.
@Module,@Controller,@OnClient,@OnServer,@Cron,@Guard,@Interceptor,@Pipecover the whole server lifecycle. -
Lazy-loaded React NUI. Each page is a separate chunk. Preloaded inside
createUI()before the first render — no missed events. -
Automatic focus management.
showPage('bank', data)applies the declared options (SetNuiFocus, theDisableControlActionloop for movement/camera, Escape-to-close) automatically. -
Vitest with live Discord reports. Point
testing.discord.webhookat a channel and every test run edits a single embed as results come in.
Where to next
-
Getting started — install +
hellomodule walkthrough -
Architecture — manifests, generator, bundle layout
-
Module authoring — services, controllers, pages, overlays, the
showPageAPI -
Security — guards, rate limiting, input validation
-
Plugins & overrides — ship reusable modules
-
CLI reference —
merinaa init,merinaa module