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 theexposesystem. - 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
| Tool | Purpose |
|---|---|
| Bun | Runtime & package manager |
| Turborepo | Monorepo orchestration |
| Preact | UI framework |
| Vite | Bundler |
| Tailwind CSS v3 | Styling |
| Biome | Linting & formatting |
| Zod | Schema validation |
| TypeScript | Language |
Quick Start
# Install dependencies
bun install
# Start all apps in development mode
bun run dev
# Build all apps for production
bun run build