Getting Started
Prerequisites
- Node.js
^22.18.0 || ^24.11.0 || >=26.0.0 - pnpm
11.21.0(pinned by the rootpackageManagerfield)
Installation
Clone the Repository
git clone https://github.com/YunYouJun/starter-monorepo.git
cd starter-monorepoInstall Dependencies
pnpm installProject Structure
starter-monorepo/
├── apps/
│ └── web/ # Optional deployable Nuxt application
├── docs/ # Documentation site
│ ├── .vitepress/ # VitePress config
│ ├── guide/ # English guides
│ ├── zh/guide/ # Chinese guides
│ ├── api/ # API docs (auto-generated)
│ └── public/ # Static assets
├── packages/
│ └── pkg-placeholder/ # Example package
│ ├── src/ # Source code
│ ├── test/ # Tests
│ ├── tsdown.config.ts # Build configuration
│ └── dist/ # Build output
├── package.json # Root package.json
├── pnpm-workspace.yaml # pnpm workspace config
└── tsconfig.json # TypeScript configOptional Nuxt application
Use apps/web for a general deployable Nuxt application. The name web describes its platform while leaving room for its role to grow and for sibling applications such as apps/mobile, apps/desktop, or apps/admin.
Reserve apps/site for an explicitly content, marketing, or corporate website that may coexist with a separate product web app. Avoid framework-based names such as apps/nuxt; application directories should communicate their responsibility or platform.
The workspace already includes the apps/* package glob. Once apps/web/package.json exists, pnpm will discover it automatically. See the Nuxt Web Application guide for the recommended Nuxt 4 structure and instructions for adapting Vitesse Nuxt without creating a nested workspace or lockfile.
Development
Build All Packages
pnpm buildRun in Development Mode
pnpm devRun Tests
pnpm testType Check
pnpm typecheckLint Code
pnpm lintWorking with Documentation
Start Documentation Site
pnpm docs:devVisit http://localhost:5173 to view the documentation.
Generate API Documentation
pnpm predocsThis will:
- Read source code from
packages/*/src - Parse JSDoc comments and TypeScript types
- Generate Markdown docs in
docs/api/
Build Documentation
pnpm docs:buildPreview Built Documentation
pnpm docs:previewCreating a New Package
- Create a new directory in
packages/:
mkdir packages/my-package
cd packages/my-package- Initialize package.json:
{
"name": "my-package",
"version": "0.0.0",
"type": "module",
"exports": {
".": "./dist/index.mjs",
"./package.json": "./package.json"
},
"types": "./dist/index.d.mts",
"files": ["dist"]
}- Create source files:
mkdir src
echo "export const hello = 'world'" > src/index.ts- Add build config (
tsdown.config.ts):
import { defineConfig } from 'tsdown'
export default defineConfig({
entry: ['src/index.ts'],
dts: true,
exports: true,
publint: true,
})Next Steps
- Learn about Configuration
- Explore the API Reference
- Read the Changelog