@nocobase/plugin-ai 3.0.0-alpha.5 → 3.0.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai/docs/nocobase/ai/ai-quick-start.md +1 -1
- package/dist/ai/docs/nocobase/ai/claude-code/index.md +1 -1
- package/dist/ai/docs/nocobase/ai/codex/index.md +1 -1
- package/dist/ai/docs/nocobase/ai/hermes-agent/index.md +1 -1
- package/dist/ai/docs/nocobase/ai/index.md +6 -25
- package/dist/ai/docs/nocobase/ai/install-nocobase-app.md +1 -1
- package/dist/ai/docs/nocobase/ai/openclaw/index.md +1 -1
- package/dist/ai/docs/nocobase/ai/opencode/index.md +1 -1
- package/dist/ai/docs/nocobase/ai/quick-start.mdx +9 -7
- package/dist/ai/docs/nocobase/ai/workbuddy/index.md +1 -1
- package/dist/ai/docs/nocobase/ai-builder/ai-portal/agent-workflow.md +153 -0
- package/dist/ai/docs/nocobase/ai-builder/ai-portal/components.md +134 -0
- package/dist/ai/docs/nocobase/ai-builder/ai-portal/deploy.md +164 -0
- package/dist/ai/docs/nocobase/ai-builder/ai-portal/index.md +144 -0
- package/dist/ai/docs/nocobase/ai-builder/ai-portal/project-structure.md +128 -0
- package/dist/ai/docs/nocobase/ai-builder/index.md +73 -32
- package/dist/ai/docs/nocobase/ai-builder/ui-builder.md +2 -0
- package/dist/ai/docs/nocobase/ai-dev/index.md +2 -1
- package/dist/ai/docs/nocobase/api/cli/index.md +1 -1
- package/dist/ai/docs/nocobase/api/cli/portal/config.md +5 -3
- package/dist/ai/docs/nocobase/api/cli/portal/create.md +3 -6
- package/dist/ai/docs/nocobase/api/cli/portal/deploy.md +1 -1
- package/dist/ai/docs/nocobase/api/cli/portal/destroy.md +6 -4
- package/dist/ai/docs/nocobase/api/cli/portal/dev.md +21 -9
- package/dist/ai/docs/nocobase/api/cli/portal/index.md +19 -13
- package/dist/ai/docs/nocobase/api/cli/portal/info.md +3 -3
- package/dist/ai/docs/nocobase/api/cli/portal/list.md +5 -5
- package/dist/ai/docs/nocobase/api/cli/portal/pull.md +11 -1
- package/dist/ai/docs/nocobase/api/cli/portal/push.md +1 -1
- package/dist/ai/docs/nocobase/nocobase-cli/installation/cli.md +1 -1
- package/dist/client/244.da833c04c5b64be4.js +10 -0
- package/dist/client/index.js +1 -1
- package/dist/client-v2/244.7451d5c4713eced3.js +10 -0
- package/dist/client-v2/index.js +1 -1
- package/dist/client-v2/pages/EmployeesPage.d.ts +3 -0
- package/dist/externalVersion.js +15 -15
- package/dist/locale/en-US.json +3 -0
- package/dist/locale/zh-CN.json +3 -0
- package/dist/node_modules/@langchain/mistralai/package.json +1 -1
- package/dist/node_modules/@langchain/xai/package.json +1 -1
- package/dist/node_modules/fs-extra/package.json +1 -1
- package/dist/node_modules/jsonrepair/package.json +1 -1
- package/dist/node_modules/just-bash/package.json +1 -1
- package/dist/node_modules/nodejs-snowflake/package.json +1 -1
- package/dist/node_modules/openai/package.json +1 -1
- package/dist/node_modules/zod/package.json +1 -1
- package/dist/server/ai-employees/ai-conversations.d.ts +2 -1
- package/dist/server/ai-employees/ai-conversations.js +2 -0
- package/dist/server/collections/ai-conversations.js +5 -0
- package/dist/server/migrations/20260803185305-migrate-ai-conversations-portal-name.d.ts +14 -0
- package/dist/server/migrations/20260803185305-migrate-ai-conversations-portal-name.js +52 -0
- package/dist/server/resource/aiConversations.js +14 -2
- package/package.json +2 -2
- package/dist/client/244.145eb763339a109b.js +0 -10
- package/dist/client-v2/244.64cb9d3ee27dcdc6.js +0 -10
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "AI Portal Quick Start"
|
|
3
|
+
description: "AI Portal building lets an AI Agent write your business system code, with NocoBase providing authentication, database, API, and permissions as the foundation. The code lives in an application entry called AI Portal."
|
|
4
|
+
keywords: "AI Portal building,AI Builder,AI Portal,NocoBase AI,NocoBase foundation,frontend development,React,shadcn/ui,AI Agent,quick start"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# AI Portal Quick Start
|
|
8
|
+
|
|
9
|
+
We found that AI vibe coding can produce a good-looking page, but it has a hard time connecting to a real business system — or it ends up reimplementing authentication, permissions, and collection design from scratch.
|
|
10
|
+
|
|
11
|
+
NocoBase, as a low-code/no-code platform, already provides all of that. You can treat it as the foundation of your system kernel, letting the AI Agent focus on business logic while NocoBase supplies reliable authentication, database, API, and permission infrastructure.
|
|
12
|
+
|
|
13
|
+
For this we provide an application entry called **AI Portal**. Its source code lives locally and is reserved for the AI Agent to write. Code written in this entry can access NocoBase's built-in capabilities directly, and the built pages are ready to visit.
|
|
14
|
+
|
|
15
|
+

|
|
16
|
+
|
|
17
|
+
## What NocoBase provides
|
|
18
|
+
|
|
19
|
+
When you build a business system, the time usually goes not into the pages but into everything behind them — user login, permission checks, collection design, CRUD APIs, file upload and download. Every system needs these, and building them from scratch each time doesn't pay off.
|
|
20
|
+
|
|
21
|
+
NocoBase already provides all of them:
|
|
22
|
+
|
|
23
|
+
- **Authentication** — Username and password login works out of the box. OIDC, SAML, CAS, LDAP, SMS, DingTalk, WeCom and others work once enabled on the server, and the frontend just needs to hook into them
|
|
24
|
+
- **Database and multiple data sources** — Built-in collection management, plus connections to external data sources such as MySQL and PostgreSQL
|
|
25
|
+
- **REST API** — Once a collection exists, its CRUD endpoints come with it, supporting filtering, sorting, pagination, and association fields
|
|
26
|
+
- **Access control** — Role-based ACL down to the field and record level. The frontend can read the current user's permissions and decide what to show
|
|
27
|
+
- **Workflow** — Business process automation, triggered from the frontend or by data changes
|
|
28
|
+
- **File storage** — Upload and download
|
|
29
|
+
|
|
30
|
+

|
|
31
|
+
|
|
32
|
+
On top of these capabilities we built a standard [system template](https://github.com/nocobase/portal-template-default) that the AI Agent can copy to get a working application running. NocoBase also provides a set of Skills such as [Data Modeling](../data-modeling.md) and [ACL Configuration](../acl.md), so once you describe your business requirements, the AI Agent not only generates frontend pages but also creates the collections and configures the permissions, giving you a complete business system.
|
|
33
|
+
|
|
34
|
+
## Prerequisites
|
|
35
|
+
|
|
36
|
+
- NocoBase >= 3.0.0-alpha.6
|
|
37
|
+
- Node.js >= 22
|
|
38
|
+
- [pnpm](https://pnpm.io/installation) — the Portal template uses it to install dependencies and start the dev server
|
|
39
|
+
- The alpha version of `nocobase cli` (**note: only the alpha version is supported for now**)
|
|
40
|
+
- `npm install -g @nocobase/cli@alpha`
|
|
41
|
+
- Plus a NocoBase application already initialized through `nb init --ui`. See the [AI Agent Integration Guide](../../ai/quick-start.md)
|
|
42
|
+
- An AI Agent, such as Claude Code, Codex, or Cursor
|
|
43
|
+
|
|
44
|
+
## Step 1: Confirm you already have an AI Portal
|
|
45
|
+
|
|
46
|
+
First confirm the default `main` is there:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
nb portal list
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+

|
|
53
|
+
|
|
54
|
+
The output lists the Portal name, access URL, Portal type, source storage, dev path, enabled status, and default status.
|
|
55
|
+
|
|
56
|
+
After pulling the source, `info` gives you more detail, such as where the dev path and the deploy path each point:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
nb portal info main
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Step 2: Start development mode
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# Pull the portal source
|
|
66
|
+
nb portal pull main
|
|
67
|
+
# Start the dev server
|
|
68
|
+
nb portal dev main
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
The dev server runs on `http://localhost:5173` by default.
|
|
72
|
+
|
|
73
|
+
The template ships with a user management page built on NocoBase's `users` collection. Log in and take a look — it also makes a good starting sample for the AI to follow.
|
|
74
|
+
|
|
75
|
+

|
|
76
|
+
|
|
77
|
+
## Step 3: Have the AI change a page
|
|
78
|
+
|
|
79
|
+
Go into the Portal's dev workspace (`pull` puts it in `./main` by default; if you're not sure, check the dev path with `nb portal info main`), open your AI Agent there — Claude Code, Codex, Cursor, whichever — and give it a prompt:
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
Add a customer management page
|
|
83
|
+
with a customer list, search by name, and a detail drawer that opens when a row is clicked
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
<!-- 需要一个视频,展示从输入提示词到 AI 完成页面编写、开发服务热更新出效果的完整过程 -->
|
|
87
|
+
|
|
88
|
+
The AI reads through the existing pages and extensions, writes the new page following the template's conventions, and you'll see the result at `http://localhost:5173`.
|
|
89
|
+
|
|
90
|
+
To learn how to work with an AI Agent effectively, see [Building with an AI Agent](./agent-workflow.md).
|
|
91
|
+
|
|
92
|
+
## Step 4: Deploy
|
|
93
|
+
|
|
94
|
+
Once the local changes look right, push the source to the remote, then build and deploy:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
nb portal push main --message "Add customer management page"
|
|
98
|
+
nb portal deploy main
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Where `push` sends the source depends on this Portal's source storage setting. The default is `nocobase`, where NocoBase manages the source. If you set it to `git` with [`nb portal config`](../../api/cli/portal/config.md), `push` commits and pushes the source to the Git repository you specified, and `--message` becomes the Git commit message. See [Deployment and Source Management](./deploy.md#source-storage) for details.
|
|
102
|
+
|
|
103
|
+
Once deployed, visit `/x/main/` to see your changes.
|
|
104
|
+
|
|
105
|
+
That completes the full loop — describe what you need, the AI writes the code, you check it locally, then push and deploy.
|
|
106
|
+
|
|
107
|
+
## When you need more entries
|
|
108
|
+
|
|
109
|
+
An application can have several Portals. Internal staff use one, external customers another — pages and permissions stay fully separate while the data is shared:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
nb portal create customer
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Creating generates `./customer` in the current directory as the dev workspace, or you can point it elsewhere with `--path`. A new Portal is developed with `nb portal dev` and deployed with `nb portal deploy` just like the first one — go into its workspace and open your AI Agent. See [Deployment and Source Management](./deploy.md) for details.
|
|
116
|
+
|
|
117
|
+
## Try the demo
|
|
118
|
+
|
|
119
|
+
If you want to see AI Portal building in action, request a demo environment at https://demo.nocobase.com/new. After you fill in the form, we generate a dedicated demo environment for you, containing several AI Portal applications built on the NocoBase foundation.
|
|
120
|
+
|
|
121
|
+

|
|
122
|
+
|
|
123
|
+
Then pick an AI Portal and go in:
|
|
124
|
+
|
|
125
|
+

|
|
126
|
+
|
|
127
|
+
The Portal welcome page also gives you a prompt that lets your AI Agent connect to this AI Portal application directly, pull the application code, start a dev server locally, change pages, then push and deploy back to the demo environment. Refresh the page after a successful deployment and you'll see the result.
|
|
128
|
+
|
|
129
|
+
## What's next
|
|
130
|
+
|
|
131
|
+
- [Building with an AI Agent](./agent-workflow.md) — How to write prompts, and how to roll back when the AI gets it wrong
|
|
132
|
+
- [Project Structure and Tech Stack](./project-structure.md) — The template's directory conventions and common commands
|
|
133
|
+
- [Deployment and Source Management](./deploy.md) — Putting Portal source under Git, and multi-environment deployment
|
|
134
|
+
|
|
135
|
+
## Related Links
|
|
136
|
+
|
|
137
|
+
- [Building with an AI Agent](./agent-workflow.md) — Drive the AI to write Portal pages in natural language
|
|
138
|
+
- [Project Structure and Tech Stack](./project-structure.md) — The template's directory conventions and common commands
|
|
139
|
+
- [Standard Components and Extensions](./components.md) — The shadcn/ui component base and the extension mechanism
|
|
140
|
+
- [Deployment and Source Management](./deploy.md) — The full develop, push, and deploy flow
|
|
141
|
+
- [AI Agent Integration Guide](../../ai/quick-start.md) — Install NocoBase CLI and complete initialization
|
|
142
|
+
- [AI Builder Quick Start](../index.md) — The other way to build, without writing code
|
|
143
|
+
- [Version Control](../version-control.md) — Version snapshots for no-code building
|
|
144
|
+
- [`nb portal` Command Reference](../../api/cli/portal/index.md) — Complete parameter reference for all Portal commands
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Project Structure and Tech Stack"
|
|
3
|
+
description: "The AI Portal template's tech stack, directory conventions, environment variables, and common commands, so you can tell whether the AI put its code in the right place."
|
|
4
|
+
keywords: "AI Portal,project structure,tech stack,React,Vite,Refine,Tailwind CSS,shadcn/ui,environment variables"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Project Structure and Tech Stack
|
|
8
|
+
|
|
9
|
+
:::tip Prerequisites
|
|
10
|
+
|
|
11
|
+
Before reading this page, make sure you have your first Portal running by following the [AI Portal Quick Start](./index.md).
|
|
12
|
+
|
|
13
|
+
:::
|
|
14
|
+
|
|
15
|
+
Most day-to-day development can be left to the AI. Still, knowing the template's structure lets you tell whether the AI put its code in the right place, and makes problems easier to locate.
|
|
16
|
+
|
|
17
|
+
## Tech stack
|
|
18
|
+
|
|
19
|
+
The Portal template is based on `@nocobase/portal-template-default`, with source at [nocobase/portal-template-default](https://github.com/nocobase/portal-template-default).
|
|
20
|
+
|
|
21
|
+
| Technology | Purpose |
|
|
22
|
+
| --- | --- |
|
|
23
|
+
| React 19 + TypeScript | Frontend framework |
|
|
24
|
+
| Vite | Dev server and build tool |
|
|
25
|
+
| [Refine](https://refine.dev/docs/) | Data layer framework, handling resources, routing, forms, and permissions |
|
|
26
|
+
| Tailwind CSS 4 | Styling |
|
|
27
|
+
| [shadcn/ui](https://ui.shadcn.com/) | Component base, source owned by the project |
|
|
28
|
+
| lucide | Icon library |
|
|
29
|
+
| pnpm | Package manager |
|
|
30
|
+
|
|
31
|
+
This combination is the frontend stack AI is most familiar with today, which makes what it writes more accurate.
|
|
32
|
+
|
|
33
|
+
The Portal is a pure frontend project for now, with business logic handled through NocoBase's API, standard components, and so on. Support for having the AI Agent write Portal backend code is coming.
|
|
34
|
+
|
|
35
|
+
## Directory structure
|
|
36
|
+
|
|
37
|
+
```text
|
|
38
|
+
src/
|
|
39
|
+
├── app/ Routing and extension loading
|
|
40
|
+
├── pages/ Login, registration, forgot password, and so on
|
|
41
|
+
├── components/ Components
|
|
42
|
+
│ ├── ui/ shadcn/ui component base
|
|
43
|
+
│ ├── app-shell/ Layout, navigation, loading states
|
|
44
|
+
│ ├── auth/ Authentication components
|
|
45
|
+
│ └── ...
|
|
46
|
+
├── extensions/ Extensions, active once installed
|
|
47
|
+
├── lib/ NocoBase client wrapper and ACL logic
|
|
48
|
+
├── providers/ Refine providers
|
|
49
|
+
├── hooks/ Custom hooks
|
|
50
|
+
└── locales/ Localized strings
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
A few key locations:
|
|
54
|
+
|
|
55
|
+
- **`src/app/routes.tsx`** — Route structure. Authenticated and unauthenticated routes are separate, and routes provided by extensions are mounted automatically
|
|
56
|
+
- **`src/app/extensions.tsx`** — Extension loading, using `import.meta.glob` to scan `src/extensions/*/extension.tsx`
|
|
57
|
+
- **`src/providers/data.ts`** — Refine's data provider, translating Refine's query syntax into NocoBase API parameters
|
|
58
|
+
- **`src/lib/nocobase/client.ts`** — `NocoBaseClient`, the low-level wrapper behind every request
|
|
59
|
+
- **`src/components/ui/`** — 60-odd shadcn/ui components, ready to use
|
|
60
|
+
|
|
61
|
+
Business pages usually go under `src/extensions/`, one directory per feature module. See [Standard Components and Extensions](./components.md).
|
|
62
|
+
|
|
63
|
+
## Key files
|
|
64
|
+
|
|
65
|
+
| File | Purpose |
|
|
66
|
+
| --- | --- |
|
|
67
|
+
| `AGENTS.md` | Development conventions for the AI Agent. You can add your own project rules here |
|
|
68
|
+
| `components.json` | shadcn/ui configuration, including style, icon library, and path aliases |
|
|
69
|
+
| `.env` / `.env.local` | Environment variables, refreshed automatically by `nb portal dev` and `deploy` |
|
|
70
|
+
| `vite.config.ts` | Build configuration, including the API proxy used during development |
|
|
71
|
+
|
|
72
|
+
## Environment variables
|
|
73
|
+
|
|
74
|
+
| Variable | Description |
|
|
75
|
+
| --- | --- |
|
|
76
|
+
| `NOCOBASE_API_URL` | NocoBase REST API root, **must end with `/api`**. Usually `/api` for same-origin deployments |
|
|
77
|
+
| `NOCOBASE_PORTAL_BASE` | Public path the Portal is mounted at. `/` for local development, the actual deployment path such as `/x/main/` for builds |
|
|
78
|
+
| `NOCOBASE_AUTHENTICATOR` | Authenticator name, `basic` by default |
|
|
79
|
+
| `NOCOBASE_API_TOKEN` | Temporary token for development. Don't commit a real value |
|
|
80
|
+
| `API_CLIENT_STORAGE_PREFIX` | Token storage prefix. Keep it aligned if the server customizes it |
|
|
81
|
+
| `API_CLIENT_STORAGE_TYPE` | Token storage method, `localStorage` by default |
|
|
82
|
+
| `API_CLIENT_SHARE_TOKEN` | Whether to share the token, `false` by default |
|
|
83
|
+
|
|
84
|
+
`nb portal dev` and `nb portal deploy` write these for you, so you usually don't need to touch them. The last three only need aligning when the server has customized how auth tokens are stored.
|
|
85
|
+
|
|
86
|
+
During development, if `NOCOBASE_API_URL` is an absolute address, Vite sets up a proxy to forward requests, so you don't have to deal with CORS yourself.
|
|
87
|
+
|
|
88
|
+
## Common commands
|
|
89
|
+
|
|
90
|
+
These are the ones you'll use day to day. Dependency installation, environment variable refreshing, and builds are all handled by the CLI behind the scenes:
|
|
91
|
+
|
|
92
|
+
| Command | Purpose |
|
|
93
|
+
| --- | --- |
|
|
94
|
+
| `nb portal list` | See which Portals the current application has |
|
|
95
|
+
| `nb portal info <portal>` | Check a Portal's dev path, deploy path, and access URL |
|
|
96
|
+
| `nb portal create <portal>` | Create a new Portal's dev workspace from the template |
|
|
97
|
+
| `nb portal pull <portal>` | Pull the remote Portal source into the local dev workspace |
|
|
98
|
+
| `nb portal dev <portal>` | Start the local dev server and see changes live |
|
|
99
|
+
| `nb portal push <portal>` | Push local source changes to the remote |
|
|
100
|
+
| `nb portal deploy <portal>` | Build and deploy, making changes live for users |
|
|
101
|
+
| `nb portal config <portal>` | Adjust source storage, Git settings, and the dev workspace path |
|
|
102
|
+
| `nb portal destroy <portal>` | Delete the Portal record and its deployed files |
|
|
103
|
+
|
|
104
|
+
For the full parameters of each command, see the [`nb portal` Command Reference](../../api/cli/portal/index.md).
|
|
105
|
+
|
|
106
|
+
## Where the dev workspace lives
|
|
107
|
+
|
|
108
|
+
A Portal's dev workspace goes into the directory you were in when you ran `nb portal create` or `nb portal pull`:
|
|
109
|
+
|
|
110
|
+
```text
|
|
111
|
+
./<portal>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
You can point it elsewhere with `--path` when creating or pulling. The built deployment artifacts go somewhere else — under the target application's storage, kept in sync by `nb portal deploy`, and not something you normally deal with.
|
|
115
|
+
|
|
116
|
+
If you're not sure where a Portal's dev workspace is, just check:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
nb portal info main
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Related Links
|
|
123
|
+
|
|
124
|
+
- [AI Portal Quick Start](./index.md) — Get your first AI-written frontend entry running
|
|
125
|
+
- [Standard Components and Extensions](./components.md) — The shadcn/ui component base and the extension mechanism
|
|
126
|
+
- [Deployment and Source Management](./deploy.md) — The build and deploy flow, and source storage
|
|
127
|
+
- [Building with an AI Agent](./agent-workflow.md) — Drive the AI to write pages in natural language
|
|
128
|
+
- [`nb portal info`](../../api/cli/portal/info.md) — Check where a Portal's dev workspace is
|
|
@@ -1,15 +1,64 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "AI Builder Quick Start"
|
|
3
|
-
description: "AI Builder is NocoBase's AI-assisted building capability.
|
|
4
|
-
keywords: "AI Builder,NocoBase AI,Agent Skills,natural language building,low-code AI,quick start"
|
|
3
|
+
description: "AI Builder is NocoBase's AI-assisted building capability. Use natural language for data modeling, UI building, workflow orchestration, and permission setup, through either no-code configuration or AI-written code."
|
|
4
|
+
keywords: "AI Builder,NocoBase AI,Agent Skills,natural language building,low-code AI,AI Portal,quick start"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# AI Builder Quick Start
|
|
8
8
|
|
|
9
|
-
AI Builder is NocoBase's AI-assisted building capability — you
|
|
9
|
+
AI Builder is NocoBase's AI-assisted building capability — you describe your business requirements in natural language, and an AI Agent builds the system for you. It covers the whole chain, from data modeling, UI building, workflow orchestration, and permission setup through to going live.
|
|
10
|
+
|
|
11
|
+
When it comes to **how the interface gets built**, there are two ways:
|
|
12
|
+
|
|
13
|
+
- **AI + no-code Portal building** — The AI builds your interface through NocoBase's no-code configuration capabilities, producing configuration stored in the database. This suits standard CRUD and internal admin backends, and business users can keep adjusting it in the interface afterwards
|
|
14
|
+
- **AI Portal building** — NocoBase provides the foundation (data, authentication, permissions, and more) while the AI Agent writes code locally, with output you can commit straight to Git. After building and deploying, it's reachable through the [AI Portal](./ai-portal/index.md). This suits custom interactions, complex business systems, and cases with specific visual requirements
|
|
15
|
+
|
|
16
|
+
Either way, collections, permissions, and workflows go through the same set of Skills — while the AI Agent writes pages, it can create your collections and set up permissions along the way, building a complete business system step by step through conversation.
|
|
17
|
+
|
|
18
|
+
## Choosing between the two
|
|
19
|
+
|
|
20
|
+
Each of those two ways corresponds to an access entry. A NocoBase application can have several entries sharing the same data, and the access path tells you which is which:
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
/v/<name> no-code Portal
|
|
24
|
+
/x/<name> AI Portal
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+

|
|
28
|
+
|
|
29
|
+
The differences:
|
|
30
|
+
|
|
31
|
+
| | no-code Portal | AI Portal |
|
|
32
|
+
| --- | --- | --- |
|
|
33
|
+
| Access path | `/v/<name>` | `/x/<name>` |
|
|
34
|
+
| Where pages come from | Configured in the interface, with AI able to help change the configuration | React source, written by the AI Agent |
|
|
35
|
+
| Output | Configuration stored in the database | Source you can commit to Git |
|
|
36
|
+
| How you iterate | Click through the interface, or have the AI change the configuration | Change code, `dev` → `deploy` |
|
|
37
|
+
| Version management | Snapshots through [Version Control](./version-control.md) | Git, or NocoBase source storage |
|
|
38
|
+
| Interface freedom | Bound by block capabilities, with established patterns for layout and interaction | Whatever you want it to be |
|
|
39
|
+
| Ready-made capabilities | Dashboard, calendar, kanban and other blocks work out of the box | The standard template code we provide, or whatever the AI Agent implements |
|
|
40
|
+
| Learning curve | Requires knowing NocoBase blocks, fields, and so on | Requires some familiarity with working with AI Agents |
|
|
41
|
+
| Suits | Standard CRUD, internal admin backends | Custom interactions, complex business systems, specific visual requirements |
|
|
42
|
+
|
|
43
|
+
A no-code Portal is enough in these cases:
|
|
44
|
+
|
|
45
|
+
- The page structure is very standard — a regular table plus a form, where configuring is faster than writing code
|
|
46
|
+
- Business users who don't write code need to adjust pages themselves
|
|
47
|
+
- You only want NocoBase's built-in block capabilities, such as dashboards, calendar views, and kanban views
|
|
48
|
+
- You're building alone, or don't need several people building together
|
|
49
|
+
|
|
50
|
+
For everything else we recommend building with the [AI Portal](./ai-portal/index.md). With no-code Portal building, the AI has too much context to learn — block types, configuration structures, linkage rules — and for business systems that need complex building, efficiency, maintainability, and team collaboration all fall short.
|
|
51
|
+
|
|
52
|
+
So we took a different approach: **writing frontend code is what AI does best**, so let it do what it does best. NocoBase acts as the foundation of the system kernel, and the frontend is left to the AI. Same requirements, faster and better. **AI builds freely. NocoBase keeps it reliable.**
|
|
53
|
+
|
|
54
|
+
The two modes can also be mixed: configure the internal admin backend quickly with a no-code Portal, and fine-tune the customer-facing portal with an AI Portal — both in the same application, sharing one set of data and users.
|
|
10
55
|
|
|
11
56
|
## Quick Start
|
|
12
57
|
|
|
58
|
+
::: warning Note
|
|
59
|
+
To try AI Portal building, install the alpha version of the NocoBase CLI (`npm install -g @nocobase/cli@alpha`).
|
|
60
|
+
:::
|
|
61
|
+
|
|
13
62
|
If you have already installed the [NocoBase CLI](../ai/quick-start.md), you can skip this step.
|
|
14
63
|
|
|
15
64
|
### One-Click AI Installation
|
|
@@ -23,7 +72,7 @@ Help me install NocoBase CLI and complete initialization: https://docs.nocobase.
|
|
|
23
72
|
### Manual Installation
|
|
24
73
|
|
|
25
74
|
```bash
|
|
26
|
-
npm install -g @nocobase/cli
|
|
75
|
+
npm install -g @nocobase/cli@alpha
|
|
27
76
|
nb init --ui
|
|
28
77
|
```
|
|
29
78
|
|
|
@@ -49,17 +98,19 @@ The AI automatically generated data tables for customers, contacts, opportunitie
|
|
|
49
98
|
|
|
50
99
|
To learn more about data modeling, see [Data Modeling](./data-modeling).
|
|
51
100
|
|
|
52
|
-
###
|
|
101
|
+
### Build a milestone, and the AI saves a restorable version for you
|
|
53
102
|
|
|
54
|
-
|
|
103
|
+
After finishing a page, a set of data tables, or a workflow, let the AI save the current state as a version — if a configuration goes wrong, you can always roll back to the last clear milestone.
|
|
55
104
|
|
|
56
105
|
```
|
|
57
|
-
|
|
106
|
+
Save the current build as a version: completed customer management page, filter area, and edit form configuration
|
|
58
107
|
```
|
|
59
108
|
|
|
60
|
-

|
|
61
110
|
|
|
62
|
-
|
|
111
|
+
The AI won't save a version every time it changes a field; it only saves after completing and verifying a clear milestone, which keeps the version list easy to read and makes it easier to decide where to roll back to.
|
|
112
|
+
|
|
113
|
+
To learn more about version control, see [Version Control](./version-control).
|
|
63
114
|
|
|
64
115
|
### Orchestrate Automated Workflows with One Sentence
|
|
65
116
|
|
|
@@ -73,41 +124,29 @@ Help me orchestrate a workflow that automatically deducts product inventory afte
|
|
|
73
124
|
|
|
74
125
|
To learn more about workflows, see [Workflow Management](./workflow).
|
|
75
126
|
|
|
76
|
-
###
|
|
77
|
-
|
|
78
|
-
:::warning Note
|
|
127
|
+
### Describe Pages in Business Language, AI Builds Them
|
|
79
128
|
|
|
80
|
-
|
|
129
|
+
NocoBase provides an **AI Portal** and a **no-code Portal** by default. No need to learn configuration rules — just say what kind of page you want. Search boxes, tables, filters — just describe them and they're done.
|
|
81
130
|
|
|
82
|
-
|
|
131
|
+

|
|
83
132
|
|
|
84
|
-
|
|
133
|
+
For building through a no-code Portal (the default Portal is named admin):
|
|
85
134
|
|
|
86
135
|
```
|
|
87
|
-
Help me
|
|
136
|
+
Help me create a customer management page in admin, with a name search box and a customer table showing name, phone, email, and creation time
|
|
88
137
|
```
|
|
89
138
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-

|
|
93
|
-
|
|
94
|
-

|
|
95
|
-
|
|
96
|
-
To learn more about building complete systems, see [Solutions](./dsl-reconciler).
|
|
97
|
-
|
|
98
|
-
### Build a milestone, and the AI saves a restorable version for you
|
|
139
|
+

|
|
99
140
|
|
|
100
|
-
|
|
141
|
+
For building through an AI Portal (the default Portal is named main):
|
|
101
142
|
|
|
102
143
|
```
|
|
103
|
-
|
|
144
|
+
Help me create a customer management page in the main portal, with a search box and a customer table showing name, phone, and industry
|
|
104
145
|
```
|
|
105
146
|
|
|
106
|
-

|
|
107
148
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
To learn more about version control, see [Version Control](./version-control).
|
|
149
|
+
To learn more about UI configuration, see [UI Configuration](./ui-builder) or [AI Portal Building](./ai-portal/index.md).
|
|
111
150
|
|
|
112
151
|
## Security & Audit
|
|
113
152
|
|
|
@@ -115,7 +154,7 @@ Before letting an AI Agent operate NocoBase, we recommend understanding the auth
|
|
|
115
154
|
|
|
116
155
|
## NocoBase Skills
|
|
117
156
|
|
|
118
|
-
[NocoBase Skills](https://github.com/nocobase/skills) are domain knowledge packages that can be installed into AI Agents, enabling AI to understand NocoBase's configuration system. NocoBase provides
|
|
157
|
+
[NocoBase Skills](https://github.com/nocobase/skills) are domain knowledge packages that can be installed into AI Agents, enabling AI to understand NocoBase's configuration system. NocoBase provides several Skills covering the entire building workflow:
|
|
119
158
|
|
|
120
159
|
- [Environment Management](./env-bootstrap) — Environment checks, installation, deployment, upgrades, and troubleshooting
|
|
121
160
|
- [Data Modeling](./data-modeling) — Create and manage data tables, fields, and relationships
|
|
@@ -126,6 +165,7 @@ Before letting an AI Agent operate NocoBase, we recommend understanding the auth
|
|
|
126
165
|
- [Plugin Management](./plugin-manage) — View, enable, and disable plugins
|
|
127
166
|
- [Release Management](./publish) — Cross-environment releases, backup & restore, and migration
|
|
128
167
|
- [Version Control](./version-control) — Save restorable versions after completed milestones
|
|
168
|
+
- [AI Portal Building](https://github.com/nocobase/skills/blob/main/skills/nocobase-ai-builder/SKILL.md) - Have the AI Agent write code in an AI Portal to build system interfaces
|
|
129
169
|
|
|
130
170
|
:::tip
|
|
131
171
|
|
|
@@ -135,6 +175,7 @@ NocoBase CLI automatically installs Skills during initialization (`nb init`), so
|
|
|
135
175
|
|
|
136
176
|
## Related Links
|
|
137
177
|
|
|
178
|
+
- [AI Portal](./ai-portal/index.md) — The other way to build, with the AI Agent writing frontend code directly
|
|
138
179
|
- [NocoBase CLI](../ai/quick-start.md) — Command-line tool for installing and managing NocoBase
|
|
139
180
|
- [NocoBase CLI Reference](../api/cli/index.md) — Complete parameter reference for all commands
|
|
140
181
|
- [AI Plugin Development](../ai-dev/index.md) — Develop NocoBase plugins with AI assistance
|
|
@@ -33,6 +33,7 @@ Cannot do:
|
|
|
33
33
|
- Cannot design data table structures (use the [Data Modeling Skill](./data-modeling))
|
|
34
34
|
- Cannot orchestrate workflows (use the [Workflow Management Skill](./workflow))
|
|
35
35
|
- Cannot handle non-modern page (v1) navigation, only supports v2 pages.
|
|
36
|
+
- Does not handle AI Portal frontend source (use [AI Portal](./ai-portal/index.md))
|
|
36
37
|
|
|
37
38
|
## Prompt Examples
|
|
38
39
|
|
|
@@ -98,3 +99,4 @@ If manual configuration and AI configuration are done simultaneously, they may i
|
|
|
98
99
|
- [Data Modeling](./data-modeling) — Create and manage data tables, fields, and relationships with AI
|
|
99
100
|
- [ACL Configuration](./acl) — Configure roles and data access permissions
|
|
100
101
|
- [Workflow Management](./workflow) — Create, edit, and diagnose workflows
|
|
102
|
+
- [AI Portal](./ai-portal/index.md) — The other way to go when a page needs custom code
|
|
@@ -25,7 +25,7 @@ Help me install NocoBase CLI and complete initialization: https://docs.nocobase.
|
|
|
25
25
|
### Manual Installation
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
|
-
npm install -g @nocobase/cli
|
|
28
|
+
npm install -g @nocobase/cli@alpha
|
|
29
29
|
nb init --ui
|
|
30
30
|
```
|
|
31
31
|
|
|
@@ -99,4 +99,5 @@ Detailed descriptions and sample prompts for each capability -> [Supported Capab
|
|
|
99
99
|
- [NocoBase CLI](../ai/quick-start.md) -- Command-line tool for installing and managing NocoBase
|
|
100
100
|
- [NocoBase CLI Reference](../api/cli/index.md) -- Complete parameter documentation for all commands
|
|
101
101
|
- [Plugin Development](../plugin-development/index.md) -- The complete guide to NocoBase plugin development
|
|
102
|
+
- [AI Portal](../ai-builder/ai-portal/index.md) -- Have AI write frontend pages. A plugin extends NocoBase itself; a Portal builds a standalone entry on top of those capabilities
|
|
102
103
|
- [AI Builder](../ai-builder/index.md) -- Build NocoBase applications with AI (no coding required)
|
|
@@ -39,7 +39,7 @@ The following command groups are shown in `nb --help`:
|
|
|
39
39
|
| [`nb env`](./env/index.md) | Manage NocoBase project environments, the current env, status, details, and runtime commands. |
|
|
40
40
|
| [`nb license`](./license/index.md) | Manage commercial licenses and licensed plugins. |
|
|
41
41
|
| [`nb plugin`](./plugin/index.md) | Manage plugins in the selected NocoBase env. |
|
|
42
|
-
| [`nb portal`](./portal/index.md) | Manage
|
|
42
|
+
| [`nb portal`](./portal/index.md) | Manage a Portal's local source directory: configure, create, develop, sync source, deploy, and destroy. |
|
|
43
43
|
| [`nb scaffold`](./scaffold/index.md) | Generate scaffolding for NocoBase plugin development. |
|
|
44
44
|
| [`nb self`](./self/index.md) | Check or update NocoBase CLI itself. |
|
|
45
45
|
| [`nb session`](./session/index.md) | Configure `NB_SESSION_ID` so the current env is isolated by shell or agent runtime. |
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "nb portal config"
|
|
3
|
-
description: "nb portal config command reference: update source storage and Git source configuration for a portal."
|
|
3
|
+
description: "nb portal config command reference: update the development path, source storage, and Git source configuration for a portal."
|
|
4
4
|
keywords: "nb portal config,NocoBase CLI,Portal"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# nb portal config
|
|
8
8
|
|
|
9
|
-
Update the
|
|
9
|
+
Update the portal development path, source storage, and Git source configuration
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
@@ -21,6 +21,7 @@ nb portal config <portal> [flags]
|
|
|
21
21
|
| `<portal>` | string | Portal name or slug |
|
|
22
22
|
| `--env`, `-e` | string | CLI env name. If omitted, the current env is used. |
|
|
23
23
|
| `--yes`, `-y` | boolean | Skip cross-env confirmation. |
|
|
24
|
+
| `--path` | string | Portal development workspace directory. |
|
|
24
25
|
| `--source-storage` | `nocobase` \| `git` | Where portal source code is managed. |
|
|
25
26
|
| `--git-repo` | string | Git repository URL used with `--source-storage=git`. |
|
|
26
27
|
| `--git-branch` | string | Git branch used with `--source-storage=git`. |
|
|
@@ -29,6 +30,7 @@ nb portal config <portal> [flags]
|
|
|
29
30
|
## Examples
|
|
30
31
|
|
|
31
32
|
```bash
|
|
33
|
+
nb portal config customer --path ./portals/customer
|
|
32
34
|
nb portal config customer --source-storage nocobase
|
|
33
35
|
nb portal config customer --source-storage git --git-repo git@github.com:nocobase/customer-portal.git
|
|
34
36
|
nb portal config customer --git-branch main --git-path portals/customer
|
|
@@ -36,7 +38,7 @@ nb portal config customer --git-branch main --git-path portals/customer
|
|
|
36
38
|
|
|
37
39
|
## Notes
|
|
38
40
|
|
|
39
|
-
Pass at least one configuration flag.
|
|
41
|
+
Pass at least one configuration flag. `--path` updates the selected CLI env config. `--source-storage` and `--git-*` update the remote portal record options.
|
|
40
42
|
|
|
41
43
|
## Related Commands
|
|
42
44
|
|
|
@@ -23,24 +23,21 @@ nb portal create <portal> [flags]
|
|
|
23
23
|
| `--env`, `-e` | string | CLI env name. If omitted, the current env is used. |
|
|
24
24
|
| `--yes`, `-y` | boolean | Skip cross-env confirmation. |
|
|
25
25
|
| `--title` | string | Portal display title. |
|
|
26
|
+
| `--path` | string | Portal workspace directory. Default: `./<portal>`. |
|
|
26
27
|
| `--force` | boolean | Delete the existing workspace and recreate it. |
|
|
27
|
-
| `--source-storage` | `nocobase` \| `git` | Where portal source code is managed. Default: `nocobase`. |
|
|
28
|
-
| `--git-repo` | string | Git repository URL used with `--source-storage=git`. |
|
|
29
|
-
| `--git-branch` | string | Git branch used with `--source-storage=git`. |
|
|
30
|
-
| `--git-path` | string | Directory inside the Git repository; defaults to the repository root (`.`). |
|
|
31
28
|
|
|
32
29
|
## Examples
|
|
33
30
|
|
|
34
31
|
```bash
|
|
35
32
|
nb portal create customer
|
|
33
|
+
nb portal create customer --path ./portals/customer
|
|
36
34
|
nb portal create customer --template @nocobase/portal-template-default
|
|
37
35
|
nb portal create customer --env dev --yes
|
|
38
|
-
nb portal create customer --source-storage git --git-repo git@github.com:nocobase/customer-portal.git
|
|
39
36
|
```
|
|
40
37
|
|
|
41
38
|
## Notes
|
|
42
39
|
|
|
43
|
-
The command writes `.env
|
|
40
|
+
The command writes `.env` and `.env.local`, stores the workspace path in the selected CLI env config, and runs `pnpm install` when the template contains `package.json`. Portal names must use lowercase letters, numbers, underscores, or hyphens, and start with a lowercase letter or number.
|
|
44
41
|
|
|
45
42
|
## Related Commands
|
|
46
43
|
|
|
@@ -31,7 +31,7 @@ nb portal deploy customer --env dev --yes
|
|
|
31
31
|
|
|
32
32
|
## Notes
|
|
33
33
|
|
|
34
|
-
The command refreshes `.env` and `.env.local`,
|
|
34
|
+
The command refreshes `.env` and `.env.local`, builds from the development path stored in the selected CLI env config, and syncs deployment output to the target app storage. Source storage and Git settings are managed by `nb portal config` in the remote portal record.
|
|
35
35
|
|
|
36
36
|
## Related Commands
|
|
37
37
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "nb portal destroy"
|
|
3
|
-
description: "nb portal destroy command reference: delete a portal record and its
|
|
3
|
+
description: "nb portal destroy command reference: delete a portal record and its deployed files."
|
|
4
4
|
keywords: "nb portal destroy,NocoBase CLI,Portal"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# nb portal destroy
|
|
8
8
|
|
|
9
|
-
Delete the portal record and
|
|
9
|
+
Delete the portal record and deployed files.
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
@@ -21,19 +21,21 @@ nb portal destroy <portal> [flags]
|
|
|
21
21
|
| `<portal>` | string | Portal name or slug. |
|
|
22
22
|
| `--env`, `-e` | string | CLI env name. If omitted, the current env is used. |
|
|
23
23
|
| `--yes`, `-y` | boolean | Skip confirmation prompts. |
|
|
24
|
-
| `--force` | boolean | Ignore missing portal records or
|
|
24
|
+
| `--force` | boolean | Ignore missing portal records or deployment directories. |
|
|
25
|
+
| `--delete-dev-path`, `-D` | boolean | Delete the portal development directory in addition to the deployed portal. |
|
|
25
26
|
|
|
26
27
|
## Examples
|
|
27
28
|
|
|
28
29
|
```bash
|
|
29
30
|
nb portal destroy customer --yes
|
|
31
|
+
nb portal destroy customer --delete-dev-path --yes
|
|
30
32
|
nb portal destroy customer --env dev --yes
|
|
31
33
|
nb portal destroy customer --force --yes
|
|
32
34
|
```
|
|
33
35
|
|
|
34
36
|
## Notes
|
|
35
37
|
|
|
36
|
-
This command
|
|
38
|
+
This command deletes the remote portal record and deployed files. The development directory is retained by default; pass `--delete-dev-path` to delete it as well. In non-interactive mode, pass `--yes`. Use `--force` to ignore missing records or deployment files.
|
|
37
39
|
|
|
38
40
|
## Related Commands
|
|
39
41
|
|