node-ts-scaffold
v1.2.0
Published
CLI tool to scaffold TypeScript projects with ESLint and Prettier
Maintainers
Readme
node-ts-scaffold
A CLI tool to quickly scaffold Node.js projects with TypeScript, ESLint, Prettier, and Vitest. Choose between a single Node.js project or a full-stack mono-repo with a React client and Hono RPC server powered by ts-procedures.
Features
- Sets up a TypeScript project with modern configuration
- Integrates ESLint for code linting
- Configures Prettier for consistent code formatting
- Adds Vitest for testing
- Creates a standardized project structure
- Includes helpful npm scripts for development
- Mono-repo option: scaffold a React (Vite) client + Hono server with type-safe RPC via ts-procedures
Installation
Global Installation
npm install -g node-ts-scaffoldLocal Usage with npx
npx node-ts-scaffoldUsage
node-ts-scaffoldFollow the interactive prompts to configure your project:
- Project type — Node.js or Mono-repo (React + Hono RPC)
- Project name
- Description
- Author
- Whether to install dependencies automatically
Project Structures
Node.js Project
your-project/
├── src/ # Source code
│ └── index.ts # Main entry point
├── test/ # Test files
│ └── index.test.ts # Sample test
├── build/ # Compiled output (generated)
├── .prettierrc # Prettier configuration
├── .gitignore # Git ignore file
├── eslint.config.js # ESLint configuration
├── tsconfig.json # TypeScript configuration
├── vitest.config.ts # Vitest configuration
└── package.json # Project dependencies and scriptsMono-repo (React + Hono RPC)
your-project/
├── packages/
│ ├── server/ # Hono + ts-procedures server
│ │ ├── src/
│ │ │ ├── index.ts # Server entry (serves on :3001)
│ │ │ ├── rpc.ts # RPC procedures (HealthCheck, GetItem, ListItems)
│ │ │ └── rpc.test.ts # Vitest tests for RPC endpoints
│ │ ├── tsconfig.json
│ │ ├── vitest.config.ts
│ │ └── package.json
│ └── client/ # Vite + React client
│ ├── src/
│ │ ├── main.tsx
│ │ ├── App.tsx # Demo component calling server RPC
│ │ ├── App.css
│ │ └── vite-env.d.ts
│ ├── index.html
│ ├── tsconfig.json
│ ├── vite.config.ts # Proxies /api to server on :3001
│ └── package.json
├── .prettierrc
├── .gitignore
├── eslint.config.js
├── tsconfig.json # Base config with project references
└── package.json # npm workspaces rootIncluded Scripts
Node.js Project
npm run dev- Run the project using tsxnpm test- Run tests with Vitest and verify TypeScript and ESLintnpm run build- Build the project with TypeScriptnpm run lint- Run ESLintnpm run format- Format code with Prettier
Mono-repo
npm run dev- Start client and server concurrentlynpm run build- Build all packagesnpm test- Run tests across all packagesnpm run lint- Lint all packagesnpm run format- Format all packages
Requirements
- Node.js 22.x or higher
License
MIT
