@bts-soft/create-starter

中文文档
1.7.2发布于 2026/11/05Apache-2.0ES Module近 30 天下载 2596

Production-ready NestJS 12 starter CLI template generator: provisions GraphQL (Apollo code-first), TypeORM + PostgreSQL, Redis, JWT auth with refresh rotation, RBAC, OAuth2, rate limiting, S3/MinIO media upload, BullMQ workers, WebSocket gateways, and mul

原始使用文档
文档目录9 节
  1. Overview
  2. Prerequisites
  3. Quick Start
  4. 1. Generate a New Project
  5. 2. What Happens Automatically
  6. 3. Next Steps
  7. Target Project Architecture
  8. Publishing & Maintenance
  9. License

@bts-soft/create-starter

CLI template generator for the production-ready NestJS 12 enterprise starter template (Omar-Sa6ry/nest-starter).


Overview

@bts-soft/create-starter provides a zero-configuration command line interface to clone, rebrand, and initialize a production-grade NestJS backend. It automates repetitive setup chores:

  • Clones the official starter repository directly from GitHub via degit.
  • Automatically strips internal scaffolding directories (create-starter/ and media-frontend/).
  • Performs recursive multi-file string replacements customizing project name, package name, database names, and service identifiers.
  • Executes dependency installation (make install) automatically.
  • Provides immediate actionable next steps for launching Docker development services and starting the app.

Prerequisites

Ensure your host system meets the following requirements:

  • Node.js: >= 22.0.0
  • npm: >= 10.0.0
  • make: GNU Make (optional if invoking npm/docker commands manually)
  • Docker & Docker Compose: Required for running the database, cache, and object storage stacks

Quick Start

1. Generate a New Project

Execute the generator using npm create:

npm create @bts-soft/starter my-service

Alternatively, if you run the command without an argument, an interactive prompt will ask for the target project name:

npm create @bts-soft/starter

2. What Happens Automatically

During initialization, @bts-soft/create-starter performs the following sequence:

  1. Downloads the repository snapshot from Omar-Sa6ry/nest-starter#main (or #master).
  2. Cleans up development scaffolding directories:
    • Removes create-starter/
    • Removes media-frontend/
  3. Customizes service configurations:
    • Renames package name in package.json to your project name.
    • Adjusts TypeORM database names (e.g. my_service_db, my_service_test_db, my_service_staging).
    • Updates alert manager, Prometheus job names, and Docker container identifiers.
  4. Automatically updates dependencies (npm run update) and installs dependencies by executing make install.

3. Next Steps

Navigate to your newly generated project folder:

cd my-service

Start the local backing services (PostgreSQL, Redis, MinIO S3, Prometheus):

make docker-dev-up

Start the application in development watch mode:

make dev

Target Project Architecture

The generated project is pre-configured with:

  • NestJS 12: Fastify/Express under native ECMAScript Modules (ESM).
  • GraphQL: Code-first schema generation with Apollo Server.
  • Relational Storage: TypeORM + PostgreSQL with migrations, soft deletes, and seeders.
  • In-Memory Caching & State: Redis cache manager, token blacklist, and distributed session storage.
  • Security & RBAC: JWT access/refresh token rotation, Google OAuth 2.0, Helmet, CORS, and permission decorators.
  • Media & File Processing: S3/MinIO compatible presigned upload sessions, multipart uploads, and BullMQ worker queue processing.
  • Realtime Gateway: Socket.IO gateway with Redis adapter support for horizontal clustering.
  • Multi-Channel Notifications: Email (Nodemailer), SMS (Twilio), and Push Notifications (Firebase Admin).
  • Payments Engine: Unified gateway for Stripe, PayPal, Paymob, and Fawry Pay with automated webhook verification.
  • Observability: Prometheus metrics (/metrics), health probes (/health, /health/ready), and structured Winston/Pino logging with trace correlation.
  • Docker Compose Stacks: Dedicated compose environments for development, test, staging, and production.

Publishing & Maintenance

To release a new version of this CLI tool:

  1. Update the version number in package.json:
    npm version patch
    
  2. Commit and push the changes to GitHub.
  3. Authenticate and publish the package to the public npm registry:
    npm publish --access public
    

License

This package is licensed under the Apache-2.0 License.

版本与发布记录

@bts-soft/create-starter 共发布 15 个版本,首次发布于 2026/10/25;过去 12 个月发布了 15 个版本。

版本发布日期距今
1.7.2latest2026/11/053 天前
1.6.22026/11/044 天前
1.5.02026/11/026 天前
1.4.92026/11/017 天前
1.3.92026/10/318 天前
1.2.92026/10/309 天前

关于 @bts-soft/create-starter 的常见问题

@bts-soft/create-starter 是什么?

Production-ready NestJS 12 starter CLI template generator: provisions GraphQL (Apollo code-first), TypeORM + PostgreSQL, Redis, JWT auth with refresh rotation, RBAC, OAuth2, rate limiting, S3/MinIO media upload, BullMQ workers, WebSocket gateways, and mul

如何安装 @bts-soft/create-starter?

在项目目录运行 npm install @bts-soft/create-starter,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 create-starter,可以用 npx create-starter 直接运行。

@bts-soft/create-starter 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/bts-soft__create-starter 是否存在。

@bts-soft/create-starter 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@bts-soft/create-starter 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.0.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@bts-soft/create-starter 可以商用吗?

@bts-soft/create-starter 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@bts-soft/create-starter 的下载量有多少?

根据 npm 官方下载统计,@bts-soft/create-starter 在 2026/10/09 – 2026/11/07 这 30 天内被下载 2,596 次,日均约 87 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@bts-soft/create-starter 还在维护吗?

最新版本 1.7.2 发布于 2026/11/05(3 天前);至今共发布 15 个版本,其中过去 12 个月发布了 15 个;首次发布于 2026/10/25。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。