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 # LockfileWorkspaces
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:
| App | Description |
|---|---|
example | Reference NUI app demonstrating all shared packages |
Packages Directory
The packages/ directory contains shared configurations and libraries:
| Package | Scope | Description |
|---|---|---|
biome-config | @repo/biome-config | Centralized linter and formatter rules |
tailwind-config | @repo/tailwind-config | Shared Tailwind CSS, PostCSS config, and base styles |
typescript-config | @repo/typescript-config | Reusable tsconfig base files |
ui | @repo/ui | Preact components and FiveM NUI utilities |
vite-config | @repo/vite-config | Pre-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 builtlint— Runs linting across all packagescheck-types— Type-checks all packagesdev— Starts dev servers (not cached, persistent)