Monospace

Project Structure

Overview of the Monospace monorepo layout and organization.

Directory Layout

monospace/
├── apps/
│   └── example/              # Reference NUI app
├── packages/
│   ├── biome-config/          # @repo/biome-config
│   ├── tailwind-config/       # @repo/tailwind-config
│   ├── typescript-config/     # @repo/typescript-config
│   ├── ui/                    # @repo/ui
│   └── vite-config/           # @repo/vite-config
├── package.json               # Root workspace config
├── turbo.json                 # Turborepo pipeline config
├── biome.json                 # Root Biome config
└── bun.lock                   # Lockfile

Workspaces

Monospace uses Bun workspaces to manage multiple packages. The root package.json defines:

{
  "workspaces": [
    "apps/*",
    "packages/*"
  ]
}

All packages are published under the @repo/* scope and consumed via workspace linking — no npm publishing required.

Apps Directory

The apps/ directory contains NUI applications. Each app is a standalone Vite + Preact project that references the shared packages.

Currently includes:

AppDescription
exampleReference NUI app demonstrating all shared packages

Packages Directory

The packages/ directory contains shared configurations and libraries:

PackageScopeDescription
biome-config@repo/biome-configCentralized linter and formatter rules
tailwind-config@repo/tailwind-configShared Tailwind CSS, PostCSS config, and base styles
typescript-config@repo/typescript-configReusable tsconfig base files
ui@repo/uiPreact components and FiveM NUI utilities
vite-config@repo/vite-configPre-configured Vite setup for NUI apps

Turborepo Pipeline

The turbo.json file defines the build pipeline:

{
  "tasks": {
    "build": {
      "dependsOn": ["^build", "lint"]
    },
    "lint": {
      "dependsOn": ["^lint"]
    },
    "check-types": {
      "dependsOn": ["^check-types"]
    },
    "dev": {
      "cache": false,
      "persistent": true
    }
  }
}
  • build — Runs after linting and after all dependencies are built
  • lint — Runs linting across all packages
  • check-types — Type-checks all packages
  • dev — Starts dev servers (not cached, persistent)

On this page