npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@builder6/server

v3.2.13

Published

The Builder6 is a comprehensive low-code platform designed to facilitate a wide range of functionalities and integrations.

Readme

Builder6 Server

Builder6 主服务器应用,基于 NestJS 和 Moleculer 构建的综合性低代码平台服务端核心。

简介

Builder6 Server 是一个全功能的低代码平台服务端应用,集成了多个功能模块,提供完整的后端服务支持。它采用现代化的微服务架构,结合了 NestJS 的模块化设计和 Moleculer 的微服务能力。

主要功能

  • 用户认证与授权: JWT 认证、OIDC 集成
  • 数据管理: MongoDB 数据库支持、动态表格管理
  • 文件管理: 文件上传下载、存储管理
  • 实时通信: WebSocket 支持、房间协作
  • 文档管理: 在线文档编辑、OnlyOffice 集成
  • 邮件服务: 邮件发送和队列管理
  • 自动化服务: 微服务编排、Node-RED 工作流
  • API 文档: Swagger/OpenAPI 自动生成
  • 插件系统: 动态加载和管理插件

安装

npm install @builder6/server

yarn add @builder6/server

快速开始

启动服务

# 开发模式
npm run start:dev

# 生产模式
npm run start:prod

# 调试模式
npm run start:debug

使用 CLI 启动

yarn add @builder6/server
yarn b6 start

环境变量

基本配置

# 服务端口
B6_PORT=5100

# 服务地址
B6_HOST=http://127.0.0.1:5100

# MongoDB 连接
B6_MONGO_URL=mongodb://127.0.0.1:27017/steedos

# Redis 连接(用于微服务通信)
B6_CLUSTER_TRANSPORTER=redis://127.0.0.1:6379

# Redis 连接(用于缓存)
B6_CLUSTER_CACHER=redis://127.0.0.1:6379

# JWT 密钥
B6_JWT_SECRET=your-secret-key

# Session 配置
B6_SESSION_SECRET=your-session-secret
B6_SESSION_PREFIX=steedos-session:

插件配置

# 启动时自动安装的软件包
B6_PLUGIN_PACKAGES=@builder6/node-red,lodash

# 使用淘宝源
B6_PLUGIN_NPMRC=registry=https://registry.npmmirror.com

# 启动时加载的 Moleculer 服务
B6_PLUGIN_SERVICES=@builder6/node-red

# 启动时加载的 NestJS 模块
B6_PLUGIN_MODULE=@builder6/node-red

集成模块

Builder6 Server 集成了以下核心模块:

  • @builder6/core: 核心基础功能(包含认证模块)
  • @builder6/cli: 命令行工具
  • @builder6/moleculer: Moleculer 微服务框架
  • @builder6/microservices: 微服务通信
  • @builder6/tables: 动态表格管理
  • @builder6/files: 文件管理
  • @builder6/rooms: 实时协作房间
  • @builder6/email: 邮件服务
  • @builder6/docs: 文档管理
  • @builder6/pages: 页面管理
  • @builder6/services: 微服务管理
  • @builder6/steedos: Steedos 平台集成
  • @builder6/onlyoffice: OnlyOffice 集成
  • @builder6/sharepoint: SharePoint 集成
  • @builder6/oidc: OpenID Connect 客户端
  • @builder6/oidc-provider: OpenID Connect 提供者

API 文档

启动服务后,可以通过以下地址访问 Swagger API 文档:

http://localhost:5100/api/v6

下载 OpenAPI JSON 文档:

http://localhost:5100/api/v6-json

插件系统

动态安装软件包

启动时自动安装 npm 包:

B6_PLUGIN_PACKAGES=@builder6/node-red,lodash
B6_PLUGIN_NPMRC=registry=https://registry.npmmirror.com

加载 Moleculer 服务

如果包含 package.service.js 文件,将作为 Moleculer 服务加载:

B6_PLUGIN_SERVICES=@builder6/node-red

加载 NestJS 模块

如果包含 dist/plugin.module.js 文件,将作为 NestJS 模块加载:

B6_PLUGIN_MODULE=@builder6/node-red

开发

构建

npm run build

使用 Webpack 构建

npm run build:webpack
npm run start:webpack

测试

# 单元测试
npm run test

# 测试监听模式
npm run test:watch

# 测试覆盖率
npm run test:cov

# E2E 测试
npm run test:e2e

代码检查

npm run lint

格式化代码

npm run format

Moleculer REPL

npm run moleculer:repl

配置服务

系统自动识别 B6_STEEDOS_ 开头的环境变量,转换为 NestJS ConfigService 配置。

例如:

import { ConfigService } from '@nestjs/config';

constructor(private configService: ConfigService) {
  // B6_MONGO_URL 转换为 mongo.url
  const mongoUrl = this.configService.get('mongo.url');
  
  // B6_JWT_SECRET 转换为 jwt.secret
  const jwtSecret = this.configService.get('jwt.secret');
}

架构特点

  • 微服务架构: 基于 Moleculer 的分布式微服务
  • 混合通信: 支持 HTTP、WebSocket、Redis 传输
  • 模块化设计: 清晰的模块边界,易于扩展
  • 插件系统: 动态加载和管理功能模块
  • 高性能日志: 基于 Pino 的高性能日志系统
  • Session 管理: Redis 存储的分布式 Session
  • CORS 支持: 灵活的跨域资源共享配置

调试外网

使用 ngrok 将本地服务暴露到外网:

brew install ngrok
ngrok http 5100

然后配置环境变量:

B6_HOST=https://your-ngrok-url.ngrok.io

License

AGPL-3.0-only