Overview
The monorepo contains two main applications:Workspace Configuration
The rootpackage.json defines the workspace structure:
apps/ directory are automatically included as workspaces.
Package Details
create-node-blueprint (CLI)
Location:apps/create-node-blueprint/
Package Name: create-node-blueprint
Version: 1.6.1
Purpose: The main CLI package that users install via npm create node-blueprint
Directory Structure
Key Files
index.ts: The main entry point for the CLIsrc/template/: Contains all template files that get copied to generated projectspackage.json: Defines the CLI package configuration and dependencies
Build Process
The CLI uses a custom build process:- clean: Removes old build artifacts
- tsc: Compiles TypeScript to JavaScript
- copy: Copies template files to dist (templates aren’t compiled)
- postbuild: Makes the CLI executable
Dependencies
Key Dependencies:@clack/prompts- Beautiful CLI promptsyargs- Command-line argument parsingejs- Template renderingfs-extra- Enhanced file system operationsconsola- Console loggingora- Terminal spinners
web (Documentation Site)
Location:apps/web/
Package Name: @node-blueprint/web
Purpose: The documentation website built with React and Vite
Technology Stack
- Framework: React 19
- Build Tool: Vite
- Styling: Tailwind CSS 4
- UI Components: Radix UI
- Routing: React Router 7
- Analytics: Vercel Analytics & PostHog
Build Process
Workspace Scripts
The rootpackage.json provides convenient scripts to work with both packages:
Script Breakdown
| Script | Description |
|---|---|
yarn dev:web | Start the docs site dev server |
yarn dev:cli | Run the CLI with tsx (no build needed) |
yarn build:web | Build the docs site for production |
yarn build:cli | Build the CLI package |
yarn build | Build both CLI and docs |
Working with Workspaces
Running Commands in a Specific Workspace
Installing Dependencies
Why Yarn Workspaces?
Benefits:- Single lockfile - All dependencies locked in one place
- Shared dependencies - Common packages are deduplicated
- Easy cross-package development - Work on multiple packages simultaneously
- Simplified scripts - Run commands across all packages from root
- Consistent versioning - Manage versions from one place
Template Organization
The template system is organized by concern:Development Flow
Typical development workflow:Next Steps
Local Setup
Set up your development environment
Adding Templates
Learn how to add new templates