@nocobase/plugin-ai 2.1.0-alpha.34 → 2.1.0-alpha.35

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.
Files changed (103) hide show
  1. package/client-v2.d.ts +1 -0
  2. package/client-v2.js +1 -0
  3. package/dist/ai/docs/nocobase/ai/index.md +1 -1
  4. package/dist/ai/docs/nocobase/ai-employees/built-in/atlas.md +24 -0
  5. package/dist/ai/docs/nocobase/ai-employees/built-in/dara.md +22 -0
  6. package/dist/ai/docs/nocobase/ai-employees/built-in/dex.md +32 -0
  7. package/dist/ai/docs/nocobase/ai-employees/built-in/ellis.md +22 -0
  8. package/dist/ai/docs/nocobase/ai-employees/built-in/index.md +25 -0
  9. package/dist/ai/docs/nocobase/ai-employees/built-in/lexi.md +26 -0
  10. package/dist/ai/docs/nocobase/ai-employees/built-in/lina.md +142 -0
  11. package/dist/ai/docs/nocobase/ai-employees/built-in/nathan.md +36 -0
  12. package/dist/ai/docs/nocobase/ai-employees/built-in/vera.md +22 -0
  13. package/dist/ai/docs/nocobase/ai-employees/built-in/viz.md +25 -0
  14. package/dist/ai/docs/nocobase/ai-employees/features/built-in-employee.md +1 -29
  15. package/dist/ai/docs/nocobase/ai-employees/features/collaborate.md +17 -7
  16. package/dist/ai/docs/nocobase/ai-employees/features/enable-ai-employee.md +4 -4
  17. package/dist/ai/docs/nocobase/ai-employees/features/model-settings.md +87 -0
  18. package/dist/ai/docs/nocobase/ai-employees/index.md +1 -1
  19. package/dist/ai/docs/nocobase/ai-employees/scenarios/localization-hy-mt.md +241 -0
  20. package/dist/ai/docs/nocobase/ai-employees/workflow/nodes/employee/configuration.md +1 -1
  21. package/dist/ai/docs/nocobase/cluster-mode/index.md +5 -1
  22. package/dist/ai/docs/nocobase/cluster-mode/preparations.md +58 -3
  23. package/dist/ai/docs/nocobase/get-started/deployment/how-to-deploy-nocobase-faster.mdx +384 -0
  24. package/dist/ai/docs/nocobase/get-started/upgrading/docker.md +1 -1
  25. package/dist/ai/docs/nocobase/interface-builder/actions/types/js-action.md +1 -1
  26. package/dist/ai/docs/nocobase/interface-builder/actions/types/js-item.md +1 -1
  27. package/dist/ai/docs/nocobase/interface-builder/blocks/other-blocks/js-block.md +1 -1
  28. package/dist/ai/docs/nocobase/interface-builder/fields/specific/js-column.md +1 -1
  29. package/dist/ai/docs/nocobase/interface-builder/fields/specific/js-field.md +1 -1
  30. package/dist/ai/docs/nocobase/interface-builder/fields/specific/js-item.md +1 -1
  31. package/dist/ai/docs/nocobase/security/guide.md +13 -1
  32. package/dist/ai/docs/nocobase/system-management/localization/index.md +25 -1
  33. package/dist/client/462.1708385b148779cd.js +10 -0
  34. package/dist/client/{559.39872901b9053629.js → 559.585f80c3bcea0bed.js} +1 -1
  35. package/dist/client/646.b0ed728921b007d4.js +10 -0
  36. package/dist/client/{927.ac9ee9a8c1cb4f1d.js → 927.d95c74ebb8fd51c9.js} +1 -1
  37. package/dist/client/ai-employees/admin/ModelSettings.d.ts +10 -0
  38. package/dist/client/ai-employees/admin/hooks.d.ts +1 -1
  39. package/dist/client/ai-employees/avatars.d.ts +9 -783
  40. package/dist/client/ai-employees/chatbox/model.d.ts +6 -3
  41. package/dist/client/ai-employees/types.d.ts +23 -0
  42. package/dist/client/features/vector-database-provider.d.ts +1 -1
  43. package/dist/client/index.js +4 -4
  44. package/dist/client/llm-services/component/EnabledModelsSelect.d.ts +1 -14
  45. package/dist/client-v2/ai-employees/AIEmployeeShortcut.d.ts +21 -0
  46. package/dist/client-v2/ai-employees/ProfileCard.d.ts +17 -0
  47. package/dist/client-v2/ai-employees/avatars.d.ts +783 -0
  48. package/dist/client-v2/ai-employees/types.d.ts +20 -0
  49. package/dist/client-v2/index.d.ts +17 -0
  50. package/dist/client-v2/index.js +10 -0
  51. package/dist/client-v2/llm-services/model-label.d.ts +22 -0
  52. package/dist/collections/ai-employees.d.ts +2 -1
  53. package/dist/collections/ai-employees.js +1 -1
  54. package/dist/externalVersion.js +17 -17
  55. package/dist/locale/en-US.json +15 -1
  56. package/dist/locale/zh-CN.json +15 -1
  57. package/dist/node_modules/@langchain/xai/package.json +1 -1
  58. package/dist/node_modules/fs-extra/package.json +1 -1
  59. package/dist/node_modules/jsonrepair/package.json +1 -1
  60. package/dist/node_modules/just-bash/package.json +1 -1
  61. package/dist/node_modules/nodejs-snowflake/package.json +1 -1
  62. package/dist/node_modules/openai/package.json +1 -1
  63. package/dist/node_modules/zod/package.json +1 -1
  64. package/dist/server/ai-employees/ai-conversations.d.ts +1 -0
  65. package/dist/server/ai-employees/ai-conversations.js +4 -1
  66. package/dist/server/ai-employees/ai-employee.d.ts +15 -1
  67. package/dist/server/ai-employees/ai-employee.js +140 -9
  68. package/dist/server/ai-employees/ai-employees-manager.d.ts +4 -0
  69. package/dist/server/ai-employees/ai-employees-manager.js +41 -0
  70. package/dist/server/ai-employees/ai-knowledge-base.js +7 -7
  71. package/dist/server/ai-employees/middleware/conversation.d.ts +1 -0
  72. package/dist/server/ai-employees/middleware/conversation.js +4 -2
  73. package/dist/server/ai-employees/sub-agents/dispatcher.js +2 -4
  74. package/dist/server/ai-employees/utils.d.ts +6 -3
  75. package/dist/server/ai-employees/utils.js +7 -1
  76. package/dist/server/features/knowledge-base.d.ts +3 -2
  77. package/dist/server/index.d.ts +2 -0
  78. package/dist/server/index.js +3 -0
  79. package/dist/server/llm-providers/common/reasoning.d.ts +2 -0
  80. package/dist/server/llm-providers/common/reasoning.js +15 -2
  81. package/dist/server/llm-providers/dashscope.d.ts +2 -1
  82. package/dist/server/llm-providers/dashscope.js +39 -0
  83. package/dist/server/llm-providers/deepseek.js +2 -0
  84. package/dist/server/llm-providers/provider.d.ts +15 -1
  85. package/dist/server/llm-providers/provider.js +21 -2
  86. package/dist/server/manager/ai-chat-conversation.js +3 -4
  87. package/dist/server/manager/ai-manager.d.ts +17 -0
  88. package/dist/server/manager/ai-manager.js +65 -0
  89. package/dist/server/manager/llm-stream-manager.d.ts +16 -10
  90. package/dist/server/manager/llm-stream-manager.js +121 -27
  91. package/dist/server/migrations/20260407170416-ai-employee-knowledge-base-add-key.d.ts +14 -0
  92. package/dist/server/migrations/20260407170416-ai-employee-knowledge-base-add-key.js +61 -0
  93. package/dist/server/resource/ai.js +1 -41
  94. package/dist/server/resource/aiConversations.d.ts +12 -13
  95. package/dist/server/resource/aiConversations.js +129 -121
  96. package/dist/server/resource/aiEmployees.js +32 -1
  97. package/dist/server/types/knowledge-base.type.d.ts +3 -2
  98. package/dist/server/utils.d.ts +4 -0
  99. package/dist/server/utils.js +9 -0
  100. package/dist/server/workflow/nodes/employee/index.js +4 -2
  101. package/package.json +2 -2
  102. package/dist/client/343.6f36d97dd122c5b6.js +0 -10
  103. package/dist/client/646.5860101cb28c8272.js +0 -10
@@ -0,0 +1,384 @@
1
+ ---
2
+ title: How to Deploy Faster
3
+ description: Optimize NocoBase deployment with HTTP/2, CDN, server location, compression, and caching to significantly reduce load times.
4
+ keywords: NocoBase, deployment, performance, HTTP/2, CDN, optimization
5
+ ---
6
+
7
+ # How to Deploy Faster
8
+
9
+ Many users may find that NocoBase runs slower than expected after deployment. This is often due to network environment, server configurations, or deployment architecture. Before diving into optimization techniques, let's first look at reference values for normal NocoBase loading speeds to avoid unnecessary concerns.
10
+
11
+ ### NocoBase Normal Loading Speed Reference
12
+
13
+ The following are loading speeds tested in the NocoBase demo environment:
14
+
15
+ * Time required to enter the application for the first time by entering the URL: approximately 2 seconds
16
+ * Time required to switch pages within the application: approximately 50-300 milliseconds
17
+
18
+ <video autoplay loop width="100%">
19
+ <source src="https://static-docs.nocobase.com/886b8e6afd4eea8fd1ff601fdbaecaf0.mp4" />
20
+ </video>
21
+
22
+ <video autoplay loop width="100%">
23
+ <source src="https://static-docs.nocobase.com/c240cf4029820f0e4c2bbb58723e2d76.mp4" />
24
+ </video>
25
+
26
+ Next, I'll share a series of simple yet effective deployment optimization techniques that can significantly improve access speed by adjusting deployment settings, without needing to modify any code:
27
+
28
+ ## I. Network and Infrastructure Optimization
29
+
30
+ ### 1. HTTP Protocol Version: Easily Embrace HTTP/2
31
+
32
+ 【Prerequisites】
33
+
34
+ - **HTTPS Support Required**: This is important! Almost all modern browsers only support HTTP/2 over HTTPS connections, so you must configure SSL certificates first.
35
+ - **Server Requirements**: You need to use server software that supports HTTP/2, such as Nginx 1.9.5+ or Apache 2.4.17+.
36
+ - **TLS Version**: TLS 1.2 or higher is recommended (TLS 1.3 is best), as older SSL versions don't support HTTP/2.
37
+
38
+ 【Tips】
39
+
40
+ Traditional HTTP/1.1 protocol has limitations when handling multiple requests—typically only 6-8 connections simultaneously, which is like waiting in line to buy tickets, easily causing delays.
41
+ ![250416_http1_en](https://static-docs.nocobase.com/250416_http1_en.png)
42
+
43
+ HTTP/2 uses "multiplexing" technology to handle multiple requests simultaneously, greatly accelerating resource loading; while the latest HTTP/3 performs even better in unstable networks, with excellent results.
44
+
45
+ ![250416_http2_en](https://static-docs.nocobase.com/250416_http2_en.png)
46
+
47
+ 【Optimization Suggestions】
48
+
49
+ - Make sure your web server has HTTP/2 support enabled, which is easy to configure on most servers (like Nginx, Caddy).
50
+ - In Nginx, simply add the `http2` parameter after the listen directive:
51
+
52
+ ```nginx
53
+ listen 443 ssl http2;
54
+ ```
55
+
56
+ 【Verification】
57
+
58
+ In your browser's developer panel, open the "Network" option, right-click and check "Protocol" to see the current connection protocol version:
59
+ ![20250407145442](https://static-docs.nocobase.com/20250407145442.png)
60
+
61
+ Based on our tests, overall speed improves by about 10%, with more significant performance improvements when the system has many blocks and resources.
62
+
63
+ ### 2. Network Bandwidth: Bigger is Better, Flexible Billing
64
+
65
+ 【Tips】
66
+
67
+ Just like highways are smoother than local roads, bandwidth determines data transmission efficiency. When NocoBase loads for the first time, it needs to download many frontend resources, and insufficient bandwidth can easily become a bottleneck.
68
+
69
+ 【Optimization Suggestions】
70
+
71
+ - Choose sufficient bandwidth (50Mbps+ recommended for many users), don't skimp on this critical resource.
72
+ - Recommend "pay-as-you-go" billing: many cloud providers offer this flexible model, allowing you to enjoy higher bandwidth during peak times while controlling costs during normal usage.
73
+
74
+ ### 3. Network Latency and Server Geographic Location: Closer Means Faster
75
+
76
+ 【Tips】
77
+
78
+ Latency is the waiting time for data transmission. Even with sufficient bandwidth, if the server is too far from users (e.g., users in China but server in the US), each request response may be slowed down due to the long distance.
79
+
80
+ 【Optimization Suggestions】
81
+
82
+ - Try to deploy NocoBase in regions closer to your main user base.
83
+ - If your users are globally distributed, consider using global acceleration services (such as Alibaba Cloud Global Accelerator or AWS Global Accelerator) to optimize network routing and reduce latency.
84
+
85
+ 【Verification】
86
+
87
+ Use the ping command to test latency from different regions.
88
+ This approach shows the most obvious improvement, with access speed increasing 1-3 times or more depending on the region.
89
+ Across 12 time zones, 13 seconds:
90
+ ![20250416130618](https://static-docs.nocobase.com/20250416130618.png)
91
+
92
+ Across 2 time zones, 8 seconds:
93
+ ![20250409131039](https://static-docs.nocobase.com/20250409131039.png)
94
+
95
+ Current region, about 3 seconds:
96
+ ![20250409130928](https://static-docs.nocobase.com/20250409130928.png)
97
+
98
+ ## II. Deployment Architecture Optimization
99
+
100
+ ### 4. Server Deployment and Proxy Methods: Choose the Most Suitable Architecture
101
+
102
+ 【Prerequisites】
103
+
104
+ - **Server Permissions**: You need root or sudo access to configure services like Nginx.
105
+ - **Basic Skills**: Some basic server configuration knowledge is required, but don't worry, specific configuration examples will be provided.
106
+ - **Port Access**: Ensure your firewall allows access to ports 80 (HTTP) and 443 (HTTPS).
107
+
108
+ 【Tips】
109
+
110
+ When users access NocoBase, requests go directly to your server. An appropriate deployment method allows your server to handle requests more efficiently, providing faster responses.
111
+
112
+ 【Different Solutions and Recommendations】
113
+
114
+ **Starting NocoBase without using a reverse proxy for static resources (not recommended):**
115
+
116
+ - Disadvantages: This method is simple but performs poorly when handling high concurrency or static files; suitable for development and testing only.
117
+ - Recommendation: Please avoid this method if possible.
118
+
119
+ > Reference "[Installation Documentation](https://v2.docs.nocobase.com/get-started/quickstart)"
120
+
121
+ Without a reverse proxy, homepage loading takes about 6.1 seconds
122
+ ![20250409131357](https://static-docs.nocobase.com/20250409131357.png)
123
+
124
+ **Using Nginx / Caddy as reverse proxy (strongly recommended):**
125
+
126
+ - Advantages: Reverse proxy servers can efficiently handle concurrent connections, serve static files, implement load balancing, and make HTTP/2 configuration simple.
127
+ - Recommendation: In production environments, after application deployment (source code deployment / create-nocobase-app / Docker image), use Nginx or Caddy as a reverse proxy.
128
+
129
+ > Reference "[Deployment Documentation](https://v2.docs.nocobase.com/get-started/deployment/production)"
130
+
131
+ With Nginx proxy, homepage loading takes about 3-4 seconds
132
+ ![20250409131541](https://static-docs.nocobase.com/20250409131541.png)
133
+
134
+ ![20250416081410](https://static-docs.nocobase.com/20250416081410.png)
135
+
136
+ **Using cluster deployment with load balancing (suitable for high concurrency and high availability scenarios):**
137
+
138
+ - Advantages: By deploying multiple instances to handle requests, you can significantly improve overall system stability and concurrency capacity.
139
+ - For specific deployment methods, see **[Cluster Mode](https://docs.nocobase.com/welcome/getting-started/deployment/cluster-mode)**
140
+
141
+ ### 5. Using CDN to Accelerate Static Resources
142
+
143
+ 【Prerequisites】
144
+
145
+ - **Domain Requirements**: You need a registered domain name and the ability to manage its DNS settings.
146
+ - **SSL Certificate**: Most CDN services require SSL certificate configuration (you can use free Let's Encrypt certificates).
147
+ - **Service Selection**: Choose appropriate CDN providers based on user regions (users in mainland China need CDNs with ICP filing).
148
+
149
+ 【Tips】
150
+ CDN (Content Delivery Network) caches your static resources at nodes around the world, allowing users to get resources from the nearest node, like getting water from a nearby source, greatly reducing loading delays.
151
+
152
+ Additionally, the greatest advantage of CDNs is their ability to **significantly reduce the load and bandwidth pressure on your application server**. When many users access NocoBase simultaneously without a CDN, all static resource requests (JavaScript, CSS, images, etc.) hit your server directly, potentially causing bandwidth saturation, performance degradation, or even server crashes. By offloading these requests to a CDN, your server can focus on processing core business logic, providing users with a more stable experience.
153
+
154
+ ![20250416_0826](https://static-docs.nocobase.com/20250416_0826.png)
155
+
156
+ 【Optimization Suggestions】• Configure your server to distribute static resource requests through CDN.• Choose suitable CDN providers based on user location:
157
+
158
+ - Global users: Cloudflare, Akamai, AWS CloudFront;
159
+ - Mainland China users: Alibaba Cloud CDN, Tencent Cloud CDN, Baidu Cloud Acceleration.Example configuration:
160
+
161
+ ```nginx
162
+ # Redirect static resources to CDN domain
163
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
164
+ rewrite ^(.*)$ https://your-cdn-domain.com$1 permanent;
165
+ }
166
+ ```
167
+
168
+ - For small projects, Cloudflare's free plan can provide good CDN acceleration:
169
+
170
+ 1. Register a Cloudflare account and add your domain;
171
+ 2. Modify DNS to point your domain to Cloudflare's servers;
172
+ 3. Set appropriate cache levels in the control panel.
173
+
174
+ **Special Note**: Even if all your users are in the same region, it's still strongly recommended to use a CDN as it effectively reduces server burden, improves overall system stability, especially during high traffic periods.
175
+
176
+ ## III. Static Resource Optimization
177
+
178
+ ### 6. Server Compression and Cache Configuration
179
+
180
+ 【Prerequisites】
181
+
182
+ - **CPU Resources**: Compression increases server CPU load, so your server should have sufficient processing power.
183
+ - **Nginx Module Support**: Gzip compression is generally built-in, but Brotli compression may require additional module installation.
184
+ - **Configuration Permissions**: You need permission to modify server configurations.
185
+
186
+ 【Tips】
187
+
188
+ By enabling compression and implementing reasonable cache strategies, you can significantly reduce data transfer volume and repeated requests, essentially "slimming down" your resources to make loading speeds take off.
189
+ ![20250416081719](https://static-docs.nocobase.com/20250416081719.png)
190
+
191
+ 【Optimization Suggestions】
192
+
193
+ - Simplest solution: Use Cloudflare's free CDN service, which automatically enables Gzip compression.
194
+ - Enable Gzip or Brotli compression, which can be set in Nginx like this:
195
+
196
+ ```nginx
197
+ # Enable Gzip compression
198
+ gzip on;
199
+ gzip_comp_level 6;
200
+ gzip_min_length 1000;
201
+ gzip_proxied any;
202
+ gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
203
+
204
+ # If Brotli compression is supported, enable it for more efficient compression
205
+ brotli on;
206
+ brotli_comp_level 6;
207
+ brotli_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
208
+ ```
209
+
210
+ - Set appropriate cache headers for static resources to reduce repeated loading:
211
+
212
+ ```nginx
213
+ location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
214
+ expires 30d;
215
+ add_header Cache-Control "public, max-age=2592000";
216
+ access_log off;
217
+ }
218
+ ```
219
+
220
+ ### 7. Using SSL/TLS and Optimizing Performance
221
+
222
+ 【Prerequisites】
223
+
224
+ - **SSL Certificate**: You need a valid SSL certificate (you can use free Let's Encrypt certificates).
225
+ - **Server Configuration Permissions**: You need to be able to modify SSL configurations.
226
+ - **DNS Configuration**: Configure reliable DNS resolvers for OCSP Stapling.
227
+
228
+ 【Tips】
229
+
230
+ Security always comes first, but improper HTTPS configuration can add some delay. Here are some optimization tricks to help you maintain high performance while ensuring security.
231
+
232
+ 【Optimization Suggestions】
233
+
234
+ - Use TLS 1.3, which is currently the fastest TLS version. Configure in Nginx:
235
+
236
+ ```nginx
237
+ ssl_protocols TLSv1.2 TLSv1.3;
238
+ ssl_prefer_server_ciphers on;
239
+ ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305;
240
+ ```
241
+
242
+ - Enable OCSP Stapling to reduce certificate verification time:
243
+
244
+ ```nginx
245
+ ssl_stapling on;
246
+ ssl_stapling_verify on;
247
+ resolver 8.8.8.8 8.8.4.4 valid=300s;
248
+ resolver_timeout 5s;
249
+ ```
250
+
251
+ - Reduce repeated handshake time through session reuse:
252
+
253
+ ```nginx
254
+ ssl_session_cache shared:SSL:10m;
255
+ ssl_session_timeout 10m;
256
+ ```
257
+
258
+ 【Cross-Region Optimization Effect】
259
+ **Special Note**: The following shows optimization effects in a cross-region/cross-12-timezone scenario, which is fundamentally different from the local access scenario (about 3 seconds) mentioned earlier. Network latency caused by geographical distance is unavoidable, but optimization can still significantly improve speed:
260
+
261
+ With Http2 + CDN caching + Gzip compression + Brotli compression combined:
262
+ Before optimization (cross-region access), 13 seconds:
263
+ ![20250416130618](https://static-docs.nocobase.com/20250416130618.png)
264
+ After optimization (cross-region access), 8 seconds:
265
+ ![20250409173528](https://static-docs.nocobase.com/20250409173528.png)
266
+
267
+ This example shows that even when geographical locations are far apart, appropriate optimization measures can still reduce loading time by about 40%, greatly improving user experience.
268
+
269
+ ## IV. Monitoring and Troubleshooting
270
+
271
+ ### 8. Performance Monitoring and Basic Analysis
272
+
273
+ 【Prerequisites】
274
+
275
+ - **Accessibility**: Your website must be publicly accessible to use most online testing tools.
276
+ - **Basic Skills**: You need to understand the basic meaning of performance metrics, though we'll explain each key indicator.
277
+
278
+ 【Tips】
279
+
280
+ It's difficult to optimize precisely without knowing where the bottlenecks are. We recommend using some free tools to monitor website performance to help identify problems.
281
+
282
+ 【Optimization Suggestions】
283
+
284
+ **Use the following free tools to check website performance:**
285
+
286
+ - [Google PageSpeed Insights](https://pagespeed.web.dev/)
287
+ - [WebPageTest](https://www.webpagetest.org/)
288
+ - [Pingdom](https://tools.pingdom.com/)
289
+
290
+ **Focus on these key metrics:**
291
+
292
+ - Page load time
293
+ - Server response time
294
+ - DNS resolution time
295
+ - SSL handshake time
296
+
297
+ **Common problem solutions:**
298
+
299
+ - Slow DNS resolution? Consider changing DNS service or enabling DNS pre-resolution.
300
+ - Slow SSL handshake? Optimize SSL configuration, enable session reuse.
301
+ - Slow server response? Check server resources, upgrade if necessary.
302
+ - Slow static resource loading? Try implementing CDN and adjusting cache strategies.
303
+
304
+ ## Deployment Optimization Quick Checklist
305
+
306
+ The following checklist can help you quickly check and optimize your NocoBase deployment:
307
+
308
+ 1. **HTTP Version Check**
309
+
310
+ - [ ] HTTPS enabled (prerequisite for HTTP/2)
311
+ - [ ] HTTP/2 enabled
312
+ - [ ] Consider supporting HTTP/3 if conditions allow
313
+ 2. **Bandwidth Assessment**
314
+
315
+ - [ ] Sufficient server bandwidth (at least 10Mbps recommended, 50Mbps+ preferred)
316
+ - [ ] Consider pay-as-you-go billing model rather than fixed bandwidth
317
+ 3. **Server Location Selection**
318
+
319
+ - [ ] Server location should be close to user regions
320
+ - [ ] Consider using global acceleration services for worldwide users
321
+ 4. **Deployment Architecture**
322
+
323
+ - [ ] Use Nginx/Caddy as reverse proxy to separate static resources from API
324
+ - [ ] If needed, adopt multi-instance deployment and load balancing technology
325
+ 5. **CDN Implementation**
326
+
327
+ - [ ] Accelerate static resource distribution through CDN
328
+ - [ ] Configure appropriate caching strategies
329
+ - [ ] Ensure CDN supports HTTP/2 or HTTP/3
330
+ 6. **Compression and Caching**
331
+
332
+ - [ ] Enable Gzip or Brotli compression
333
+ - [ ] Set appropriate browser cache headers
334
+ 7. **SSL/TLS Optimization**
335
+
336
+ - [ ] Use TLS 1.3 to improve handshake speed
337
+ - [ ] Enable OCSP Stapling
338
+ - [ ] Configure SSL session reuse
339
+ 8. **Performance Monitoring**
340
+
341
+ - [ ] Regularly use performance testing tools to evaluate your website
342
+ - [ ] Monitor key metrics (loading, response, resolution, handshake times)
343
+ - [ ] Optimize based on identified issues
344
+
345
+ ## Frequently Asked Questions
346
+
347
+ 【Q】My server is deployed in a different region than my users, causing slow access. What should I do?
348
+
349
+ 【A】The best solution is to choose a cloud server in the same region as your primary users. If that's not possible, you can also:
350
+
351
+ 1. Use a CDN service to accelerate static resources;
352
+ 2. Utilize global acceleration services to optimize network routing;
353
+ 3. Enable all compression and cache optimization measures as much as possible.
354
+
355
+ 【Q】Why is my NocoBase slow on first load but fast afterward?
356
+
357
+ 【A】Slow first load is normal because it needs to download many resources initially.
358
+
359
+ Using our official Demo as an example, the first load typically takes about 3 seconds. Subsequent daily access when entering the URL takes about 1-2 seconds, while navigating between pages within the application is very fast at approximately 50-300 milliseconds, with very low latency.
360
+
361
+ ![20250416130719](https://static-docs.nocobase.com/20250416130719.png)
362
+
363
+ For excessively long loading times, there's still room for optimization:
364
+
365
+ 1. Ensure HTTP/2 is enabled;
366
+ 2. Implement CDN acceleration;
367
+ 3. Enable Gzip/Brotli compression;
368
+ 4. Check if server bandwidth is sufficient.
369
+
370
+ 【Q】I'm currently using shared hosting and cannot modify Nginx configuration. What should I do?
371
+
372
+ 【A】In this case, although optimization options are fewer, we still recommend:
373
+
374
+ 1. Try using CDN services (like Cloudflare);
375
+ 2. Optimize parameters that can be adjusted within the application;
376
+ 3. If conditions allow, consider upgrading to a VPS that supports more custom configurations.
377
+
378
+ ---
379
+
380
+ Through these simple yet practical deployment optimization strategies, you can significantly improve NocoBase access speed and provide users with a smoother experience. Many optimization measures can be completed within a few hours, require no code changes, and easily show results.
381
+
382
+ Daily operations:
383
+ ![2504161639operatio_user2](https://static-docs.nocobase.com/2504161639operatio_user2.gif)
384
+ ![2504161639operation3](https://static-docs.nocobase.com/2504161639operation3.gif)
@@ -73,4 +73,4 @@ Confirm that you have changed `image` to the new version number and successfully
73
73
 
74
74
  **Q: Commercial plugin download or update failed**
75
75
 
76
- For commercial plugins, please verify the license key in the system, and then restart the Docker container. For details, see [NocoBase Commercial License Activation Guide](https://www.nocobase.com/blog/nocobase-commercial-license-activation-guide).
76
+ For commercial plugins, please verify the license key in the system, and then restart the Docker container. For details, see [NocoBase Commercial License Activation Guide](https://www.nocobase.com/en/blog/nocobase-commercial-license-activation-guide).
@@ -35,7 +35,7 @@ JS Action is used to execute JavaScript when a button is clicked, allowing for c
35
35
  ![jsaction-toolbars-20251029](https://static-docs.nocobase.com/jsaction-toolbars-20251029.png)
36
36
 
37
37
 
38
- - You can use AI employees to generate/modify scripts: [AI Employee · Nathan: Frontend Engineer](/ai-employees/features/built-in-employee)
38
+ - You can use AI employees to generate/modify scripts: [AI Employee · Nathan: Frontend Engineer](/ai-employees/built-in/)
39
39
 
40
40
  ## Common Usage (Simplified Examples)
41
41
 
@@ -47,7 +47,7 @@ The JS Item runtime injects common capabilities that you can use directly in the
47
47
 
48
48
  ![](https://static-docs.nocobase.com/JS-Item-03-27-2026_03_35_PM.png)
49
49
 
50
- - You can use AI employees to generate / modify scripts: [AI Employee · Nathan: Frontend Engineer](/ai-employees/features/built-in-employee)
50
+ - You can use AI employees to generate / modify scripts: [AI Employee · Nathan: Frontend Engineer](/ai-employees/built-in/)
51
51
 
52
52
  ## Common Usage (Simplified Examples)
53
53
 
@@ -38,7 +38,7 @@ The JS Block's script editor supports syntax highlighting, error hints, and buil
38
38
 
39
39
  Additionally, you can directly summon the AI employee "Frontend Engineer · Nathan" from the top-right corner of the editor. Nathan can help you write or modify scripts based on the current context. You can then "Apply to editor" with one click and run the code to see the effect. For details, see:
40
40
 
41
- - [AI Employee · Nathan: Frontend Engineer](/ai-employees/features/built-in-employee)
41
+ - [AI Employee · Nathan: Frontend Engineer](/ai-employees/built-in/)
42
42
 
43
43
  ## Runtime Environment and Security
44
44
 
@@ -37,7 +37,7 @@ The script editor for JS Column supports syntax highlighting, error hints, and b
37
37
 
38
38
  You can also use an AI Employee to generate code:
39
39
 
40
- - [AI Employee · Nathan: Frontend Engineer](/ai-employees/features/built-in-employee)
40
+ - [AI Employee · Nathan: Frontend Engineer](/ai-employees/built-in/)
41
41
 
42
42
  ## Common Usage
43
43
 
@@ -58,7 +58,7 @@ The JS Field script editor supports syntax highlighting, error hints, and built-
58
58
 
59
59
  You can also generate code with the AI Employee:
60
60
 
61
- - [AI Employee · Nathan: Frontend Engineer](/ai-employees/features/built-in-employee)
61
+ - [AI Employee · Nathan: Frontend Engineer](/ai-employees/built-in/)
62
62
 
63
63
  ## Common Usage
64
64
 
@@ -32,7 +32,7 @@ JS Item is used for "custom items" (not bound to a field) in a form. You can use
32
32
  ![jsitem-toolbars-20251029](https://static-docs.nocobase.com/jsitem-toolbars-20251029.png)
33
33
 
34
34
 
35
- - Can be used with AI Employee to generate/modify scripts: [AI Employee · Nathan: Frontend Engineer](/ai-employees/features/built-in-employee)
35
+ - Can be used with AI Employee to generate/modify scripts: [AI Employee · Nathan: Frontend Engineer](/ai-employees/built-in/)
36
36
 
37
37
  ## Common Usage (Simplified Examples)
38
38
 
@@ -213,6 +213,18 @@ If you need to store sensitive files, it is recommended to use a cloud storage s
213
213
 
214
214
  ![](https://static-docs.nocobase.com/202501031623549.png)
215
215
 
216
+ For local storage or other public storage that can be accessed directly through same-origin application URLs, you should also pay extra attention to the risks introduced by active content files. Files such as `html`, `xhtml`, and `svg` may be parsed and executed directly by the browser. If an attacker can upload such a file and trick a user into opening it, the attacker may use your trusted application domain to host a malicious page or script.
217
+
218
+ In most cases, we recommend that administrators:
219
+
220
+ - Prefer private storage, signed URLs, or a separate file domain, so that user-uploaded files are not served directly from the same origin as the main application.
221
+ - Enforce a strict MIME type allowlist for uploads and only allow the file types that are actually required by the business.
222
+ - Be cautious about allowing active content types such as `text/html`, `application/xhtml+xml`, and `image/svg+xml`. Even if the system tries to return these files as downloads, this should not be considered a complete replacement for upload restrictions and origin isolation.
223
+ - Apply consistent security settings to reverse proxies, CDNs, object storage, and any other static file delivery layer, so dangerous files are not returned inline by bypassing application-layer protections.
224
+ - Do not use local/public storage to host untrusted web content. If you really need this capability, use an isolated domain and separately evaluate CSP, download behavior, and access control.
225
+
226
+ If an administrator explicitly allows dangerous file types to be uploaded, they should assess the resulting phishing, same-origin script execution, and sensitive information leakage risks on their own, and ensure that the Web Server, gateway, CDN, and storage services in the deployment chain enforce consistent restrictions.
227
+
216
228
 
217
229
  ### Application Backup
218
230
 
@@ -293,4 +305,4 @@ NocoBase provides multiple log types to help users understand the system's runni
293
305
  - Request log: API request logs, including accessed URLs, HTTP methods, request parameters, response times, and status codes.
294
306
  - System log: Records application running events, including service startup, configuration changes, error messages, and key operations.
295
307
  - SQL log: Records database operation statements and their execution times, covering operations such as query, update, insert, and delete.
296
- - Workflow log: Execution log of the workflow, including execution time, running information, and error information.
308
+ - Workflow log: Execution log of the workflow, including execution time, running information, and error information.
@@ -4,6 +4,8 @@
4
4
 
5
5
  The Localization Management plugin is used to manage and implement NocoBase's localization resources. It can translate system menus, collections, fields, and all plugins to adapt to the language and culture of specific regions.
6
6
 
7
+ If you want to contribute default translations for the system and official plugins to NocoBase, see [Translation Contribution](/get-started/translations).
8
+
7
9
  ## Installation
8
10
 
9
11
  This plugin is built-in and requires no additional installation.
@@ -36,6 +38,8 @@ After synchronization, the system will list all translatable entries for the cur
36
38
  Different modules may have the same original text entries, which need to be translated separately.
37
39
  :::
38
40
 
41
+ If translations for system or plugin built-in entries are manually changed or overwritten by AI translation, select `Reset system built-in entry translations` during synchronization. After synchronization, the system will overwrite existing built-in entry translations for the current language with translations from the built-in language pack to restore the defaults.
42
+
39
43
  ### Automatically Create Translation Entries
40
44
 
41
45
  When editing a page, custom text within each block will automatically generate the corresponding i18n entry and simultaneously create the translation for the current language.
@@ -54,6 +58,26 @@ When defining text in code, you need to manually specify the ns (namespace), for
54
58
 
55
59
  <img src="https://static-docs.nocobase.com/202404202142836.png"/>
56
60
 
61
+ ### Using AI Translation
62
+
63
+ Localization Management supports translating entries through the AI Employee Lina. After enabling AI Employees and configuring a model service, you can use AI translation on the Localization Management page to batch generate translations for the current language.
64
+
65
+ ![](https://static-docs.nocobase.com/202605121152196.png)
66
+
67
+ Supported translation scopes:
68
+
69
+ - **Full translation**: translate all eligible entries in the current language.
70
+ - **Incremental translation**: only translate entries that do not have translations yet.
71
+ - **Selected translation**: select entries in the table and translate only the selected content.
72
+
73
+ AI translation creates a background task. You can view progress while the task runs. After completion, translations are written to the corresponding language and should still be reviewed and corrected according to the actual context.
74
+
75
+ For the complete guide, see [AI Employee - Lina](/ai-employees/built-in/lina).
76
+
77
+ :::warning{title=Note}
78
+ AI-generated translations may have semantic deviations, inconsistent terminology, or insufficient context understanding. Before publishing, manually review important pages, business terminology, and user-facing copy.
79
+ :::
80
+
57
81
  ### Publishing Translations
58
82
 
59
83
  After completing the translation, you need to click the "Publish" button to make the changes take effect.
@@ -76,4 +100,4 @@ Synchronize the entries.
76
100
 
77
101
  Translate and publish.
78
102
 
79
- <img src="https://static-docs.nocobase.com/202404202143135.png"/>
103
+ <img src="https://static-docs.nocobase.com/202404202143135.png"/>