Monospace

Introduction

A monorepo for developing FiveM NUI interfaces with Preact, Vite, and Tailwind CSS.

Monospace is a monorepo for developing FiveM NUI (Native UI) interfaces. Built with Bun, Turborepo, Preact, Vite, and Tailwind CSS, it provides shared configurations, UI utilities, and a consistent development workflow across multiple NUI projects.

Why Monospace?

Building FiveM NUI interfaces often involves repetitive setup — configuring bundlers, linters, TypeScript, and styling for each project. Monospace solves this by centralizing everything into a single monorepo with shared packages:

  • Consistent tooling — Every NUI app shares the same Vite, Tailwind, TypeScript, and Biome configurations.
  • Shared UI library — Reusable Preact components and FiveM-specific utilities like fetchNui, useEvent, and the expose system.
  • Fast builds — Turborepo caches and parallelizes builds across all apps.
  • Type safety — Full TypeScript support with strict mode and Zod schema validation for NUI events.

Tech Stack

ToolPurpose
BunRuntime & package manager
TurborepoMonorepo orchestration
PreactUI framework
ViteBundler
Tailwind CSS v3Styling
BiomeLinting & formatting
ZodSchema validation
TypeScriptLanguage

Quick Start

# Install dependencies
bun install

# Start all apps in development mode
bun run dev

# Build all apps for production
bun run build

Next Steps

On this page