بنقرة واحدة
steedos-project-package
Steedos project/package init & creation (初始化项目, 创建软件包), yarn install/start (NEVER npm).
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Steedos project/package init & creation (初始化项目, 创建软件包), yarn install/start (NEVER npm).
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Steedos Server environment variables and YAML settings. TRIGGER: .env files; env vars (MONGO_URL, ROOT_URL, B6_TRANSPORTER, JWT_SECRET); Docker compose setup, production vs development config, YAML env interpolation; datasources, tenant settings, CFS file storage, SSO/OIDC, email. SKIP: B6_* internals → steedos-builder6-internals; project structure → steedos-project-package.
Steedos project automated development & testing with Playwright MCP. TRIGGER: "自动测试", "迭代开发", "dev-test", "test iterate", "构建重启", "build restart", "playwright", "browser test", "配置测试环境", "setup dev environment", copilot-instructions template. SKIP: object/field definitions → steedos-objects; UI pages → steedos-pages.
Analytics question (.question.yml) and dashboard (.dashboard.yml) files. TRIGGER: .question.yml or .dashboard.yml files; analytics reports, charts, MBQL queries, display types, visualization_settings, result_metadata; dashboard grid layout, card placement, parameter_mappings; @steedos-labs/analytics package; YAML seed data under <package>/main/default/. SKIP: custom Amis page → steedos-pages; analytics API calls → steedos-server-api.
Steedos application definition (.app.yml). TRIGGER: .app.yml files; application sidebar menu, icon/color, mobile visibility, admin_menus, tab_groups, permission_set visibility; app menu not showing (missing tabs field); required fields: name, code, tabs; icon_slds, showSidebar. SKIP: sidebar nav items → steedos-tabs; page content → steedos-pages.
Builder6 REST API: Tables, Direct MongoDB, Files, Auth, Users. TRIGGER: /api/v6/tables/:baseId/:tableId CRUD; /api/v6/direct/:objectName; /api/v6/files; /api/v6/auth/login; /api/v6/users/me; presigned URLs; Swagger UI at /api/v6; baseId/tableId addressing, batch operations, collection naming (t_{baseId}_{tableId}), lookup field resolution, DataLoader batching, DevExtreme adapter (@builder6/query-mongodb), MetaService. SKIP: /api/v6/data/ or /api/v6/objects or /api/v6/functions → steedos-server-api; GraphQL → steedos-graphql-api; architecture → steedos-builder6-internals; auth guards/files/plugins → steedos-builder6-modules.
Builder6 Server architecture: NestJS 11 + Moleculer 0.14 hybrid monorepo. TRIGGER: @builder6/* packages, monorepo structure, module organization, bootstrap, middleware, guards; B6_* environment variables, dotenv-flow, STEEDOS_ compatibility aliases, ConfigService access. SKIP: use API → steedos-builder6-api; Steedos Server internals → steedos-server-internals; project env config → steedos-configuration.
| name | steedos-project-package |
| description | Steedos project/package init & creation (初始化项目, 创建软件包), yarn install/start (NEVER npm). |
A project is a Node.js/TypeScript workspace that runs the Steedos platform. A package is a self-contained, reusable module within the project containing objects, business logic, and UI components.
项目是运行 Steedos 平台的 Node.js 工作区。软件包是项目内独立的可复用模块。
ALWAYS use yarn. NEVER use npm.
| Action | ✅ Correct | ❌ Wrong |
|---|---|---|
| Init | yarn init -y | npm init -y |
| Install | yarn install / yarn add <pkg> | npm install / npm i |
| Start | yarn start | npm start / npm run start |
| Run script | yarn <script> | npm run <script> |
| Add dep | yarn add @steedos/server | npm install @steedos/server |
my-steedos-project/
├── package.json # NPM package configuration (REQUIRED)
├── .env # Environment variables (RECOMMENDED)
├── .gitignore # Git ignore rules
└── steedos-packages/ # Custom packages (OPTIONAL)
└── my-package/
└── ...
{
"name": "my-steedos-project",
"version": "0.0.1",
"private": true,
"workspaces": [
"steedos-packages/*"
],
"scripts": {
"start": "steedos start",
"build": "lerna run build"
},
"dependencies": {
"@steedos/server": "latest"
}
}
Key Points:
@steedos/server dependency is REQUIREDworkspaces for custom packagesstart script to run Steedos (use yarn start)PORT=5100
ROOT_URL=http://localhost:5100
MONGO_URL=mongodb://127.0.0.1:27017/steedos
TRANSPORTER=redis://127.0.0.1:6379
CACHER=redis://127.0.0.1:6379/1
STEEDOS_STORAGE_DIR=./steedos-storage
B6_LOG_LEVEL=warn
my-steedos-project/
├── package.json
├── .env
├── .gitignore
├── yarn.lock
├── node_modules/
├── steedos-storage/
└── steedos-packages/
├── package-1/
│ ├── package.json
│ ├── package.service.js
│ └── main/default/
│ ├── objects/
│ ├── applications/
│ ├── triggers/
│ └── pages/
└── package-2/
└── ...
# Step 1: Create project
mkdir my-steedos-project && cd my-steedos-project
# Step 2: Initialize
yarn init -y
# Step 3: Install dependencies
yarn add @steedos/server
# Step 4: Start server
yarn start
Or use the CLI:
yarn global add @steedos/cli
steedos create my-project
cd my-project && yarn start
Recommended .gitignore:
node_modules/
.yarn/
.env
.env.local
steedos-storage/
.steedos/
logs/
*.log
dist/
build/
.cache/
steedos-packages/
└── my-package/
├── package.json # NPM package configuration
├── package.service.js # Moleculer service entry point
└── main/
└── default/
├── objects/ # Object definitions
│ └── orders/
│ ├── orders.object.yml
│ ├── fields/
│ │ ├── order_number.field.yml
│ │ └── customer.field.yml
│ ├── listviews/
│ │ ├── all.listview.yml
│ │ └── my_orders.listview.yml
│ ├── permissions/
│ │ ├── user.permission.yml
│ │ └── admin.permission.yml
│ └── buttons/
│ └── submit_order.button.yml
├── triggers/ # Server-side triggers (.trigger.yml)
│ └── orders_validate.trigger.yml
├── functions/ # Server-side functions (.function.yml)
│ └── approve_order.function.yml
├── applications/ # Application definitions (.app.yml)
│ └── order_management.app.yml
├── tabs/ # Navigation tabs (.tab.yml)
│ └── orders.tab.yml
├── pages/ # Custom pages (.page.yml + .page.amis.json)
│ ├── order_detail.page.yml
│ └── order_detail.page.amis.json
├── permissionsets/ # Permission set definitions (.permissionset.yml)
├── profiles/ # User profiles (.profile.yml)
├── roles/ # Role definitions (.role.yml)
├── workflows/ # Workflow field updates (.workflow.yml)
├── approvalProcesses/ # Approval workflows (.approvalProcess.yml)
├── restrictionRules/ # Record access restrictions (.restrictionRule.yml)
├── dashboards/ # Dashboard configurations (.dashboard.yml)
├── questions/ # Report queries (.question.yml)
├── translations/ # Translation files
├── data/ # Seed data (.data.json/.data.yml/.data.csv)
└── imports/ # Data import templates (.import.yml)
{
"name": "@steedos-packages/my-package",
"version": "1.0.0",
"description": "My Steedos Package",
"main": "package.service.js"
}
"use strict";
const project = require('./package.json');
const packageName = project.name;
const packageLoader = require('@steedos/service-package-loader');
module.exports = {
name: packageName,
namespace: "steedos",
mixins: [packageLoader],
settings: {
packageInfo: {
path: __dirname,
name: packageName,
isPackage: true
}
}
};
Register packages as NPM dependencies or in the project workspace configuration.
| Type | Extension | Location | Description |
|---|---|---|---|
| Object | .object.yml | objects/{name}/ | Object schema |
| Field | .field.yml | objects/{name}/fields/ | Field definitions |
| ListView | .listview.yml | objects/{name}/listviews/ | List view configs |
| Permission | .permission.yml | objects/{name}/permissions/ | Object permissions |
| Button | .button.yml | objects/{name}/buttons/ | Custom buttons |
| Trigger | .trigger.yml | triggers/ | Server-side event handlers |
| Function | .function.yml | functions/ | Server-side functions |
| Page | .page.yml + .page.amis.json | pages/ | Custom UI pages |
| Application | .app.yml | applications/ | App definitions |
| Tab | .tab.yml | tabs/ | Navigation tabs |
| PermissionSet | .permissionset.yml | permissionsets/ | Permission groupings |
| Profile | .profile.yml | profiles/ | User profile templates |
| Role | .role.yml | roles/ | Role definitions |
| Workflow | .workflow.yml | workflows/ | Field update workflows |
| ApprovalProcess | .approvalProcess.yml | approvalProcesses/ | Multi-step approvals |
| RestrictionRule | .restrictionRule.yml | restrictionRules/ | Record access rules |
| Dashboard | .dashboard.yml | dashboards/ | Dashboard layouts |
| Question | .question.yml | questions/ | Report queries |
| Type | Convention | Example |
|---|---|---|
| Package name | @steedos-packages/[name] (lowercase, hyphens) | @steedos-packages/contract-management |
| API names (YAML) | snake_case | orders, order_items, customer_name |
| Object file | {object_name}.object.yml | orders.object.yml |
| Field file | {field_name}.field.yml | order_number.field.yml |
| Trigger file | {trigger_name}.trigger.yml | orders_validate.trigger.yml |
| Function file | {function_name}.function.yml | approve_order.function.yml |
| Page files | {page_name}.page.yml + .page.amis.json | order_detail.page.yml |
| Application file | {app_code}.app.yml | order_management.app.yml |
triggers/ folder: NOT inside object foldersfunctions/ folder: NOT inside object folders.page.yml and .page.amis.jsonsnake_case for API names: Objects, fields, functions, triggersnpx @steedos/validate <packagePath> to catch issues early.env configurationPORT in .envlsof -ti:5100 | xargs kill