@nodestackapp/server 1.3.0 → 2.1.0

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 (201) hide show
  1. package/LICENSE +15 -0
  2. package/README.md +14 -13
  3. package/dist/NodeStack.d.ts +14 -0
  4. package/dist/NodeStack.d.ts.map +1 -1
  5. package/dist/NodeStack.js +42 -3
  6. package/dist/NodeStack.js.map +1 -1
  7. package/dist/admin/AdminUIBundler.d.ts.map +1 -1
  8. package/dist/admin/AdminUIBundler.js +10 -5
  9. package/dist/admin/AdminUIBundler.js.map +1 -1
  10. package/dist/admin/ui/css/analytics.css +68 -11
  11. package/dist/admin/ui/css/codemirror.css +98 -0
  12. package/dist/admin/ui/css/main.css +372 -78
  13. package/dist/admin/ui/css/rules.css +292 -264
  14. package/dist/admin/ui/css/webhooks.css +34 -10
  15. package/dist/admin/ui/index.html +9326 -5706
  16. package/dist/admin/ui/js/analytics.js +673 -624
  17. package/dist/admin/ui/js/api.js +60 -14
  18. package/dist/admin/ui/js/app.js +480 -263
  19. package/dist/admin/ui/js/apps.js +50 -17
  20. package/dist/admin/ui/js/codemirror.js +15 -0
  21. package/dist/admin/ui/js/collections.js +41 -13
  22. package/dist/admin/ui/js/command-palette.js +61 -19
  23. package/dist/admin/ui/js/demo.js +373 -271
  24. package/dist/admin/ui/js/functions-tester.js +432 -0
  25. package/dist/admin/ui/js/functions-workbench.js +1038 -0
  26. package/dist/admin/ui/js/functions.js +765 -0
  27. package/dist/admin/ui/js/modals.js +20 -16
  28. package/dist/admin/ui/js/plugin-tester.js +562 -559
  29. package/dist/admin/ui/js/plugins.js +221 -90
  30. package/dist/admin/ui/js/records.js +96 -61
  31. package/dist/admin/ui/js/rules.js +1 -1
  32. package/dist/admin/ui/js/schema.js +23 -9
  33. package/dist/admin/ui/js/theme.js +120 -0
  34. package/dist/admin/ui/js/views.js +680 -714
  35. package/dist/admin/ui/js/webhooks.js +1111 -1086
  36. package/dist/apps/AppScope.d.ts +6 -0
  37. package/dist/apps/AppScope.d.ts.map +1 -1
  38. package/dist/apps/AppScope.js +40 -4
  39. package/dist/apps/AppScope.js.map +1 -1
  40. package/dist/auth/ApiKeyService.d.ts +91 -0
  41. package/dist/auth/ApiKeyService.d.ts.map +1 -0
  42. package/dist/auth/ApiKeyService.js +414 -0
  43. package/dist/auth/ApiKeyService.js.map +1 -0
  44. package/dist/auth/AuthService.d.ts +33 -1
  45. package/dist/auth/AuthService.d.ts.map +1 -1
  46. package/dist/auth/AuthService.js +255 -10
  47. package/dist/auth/AuthService.js.map +1 -1
  48. package/dist/auth/oauth/AppleProvider.d.ts +23 -0
  49. package/dist/auth/oauth/AppleProvider.d.ts.map +1 -0
  50. package/dist/auth/oauth/AppleProvider.js +161 -0
  51. package/dist/auth/oauth/AppleProvider.js.map +1 -0
  52. package/dist/auth/oauth/BaseOAuthProvider.d.ts +18 -0
  53. package/dist/auth/oauth/BaseOAuthProvider.d.ts.map +1 -0
  54. package/dist/auth/oauth/BaseOAuthProvider.js +79 -0
  55. package/dist/auth/oauth/BaseOAuthProvider.js.map +1 -0
  56. package/dist/auth/oauth/DiscordProvider.d.ts +11 -0
  57. package/dist/auth/oauth/DiscordProvider.d.ts.map +1 -0
  58. package/dist/auth/oauth/DiscordProvider.js +47 -0
  59. package/dist/auth/oauth/DiscordProvider.js.map +1 -0
  60. package/dist/auth/oauth/GitHubProvider.d.ts +13 -0
  61. package/dist/auth/oauth/GitHubProvider.d.ts.map +1 -0
  62. package/dist/auth/oauth/GitHubProvider.js +90 -0
  63. package/dist/auth/oauth/GitHubProvider.js.map +1 -0
  64. package/dist/auth/oauth/GoogleProvider.d.ts +11 -0
  65. package/dist/auth/oauth/GoogleProvider.d.ts.map +1 -0
  66. package/dist/auth/oauth/GoogleProvider.js +43 -0
  67. package/dist/auth/oauth/GoogleProvider.js.map +1 -0
  68. package/dist/auth/oauth/MicrosoftProvider.d.ts +11 -0
  69. package/dist/auth/oauth/MicrosoftProvider.d.ts.map +1 -0
  70. package/dist/auth/oauth/MicrosoftProvider.js +83 -0
  71. package/dist/auth/oauth/MicrosoftProvider.js.map +1 -0
  72. package/dist/auth/oauth/OAuthProviderRegistry.d.ts +32 -0
  73. package/dist/auth/oauth/OAuthProviderRegistry.d.ts.map +1 -0
  74. package/dist/auth/oauth/OAuthProviderRegistry.js +232 -0
  75. package/dist/auth/oauth/OAuthProviderRegistry.js.map +1 -0
  76. package/dist/auth/oauth/types.d.ts +63 -0
  77. package/dist/auth/oauth/types.d.ts.map +1 -0
  78. package/dist/auth/oauth/types.js +3 -0
  79. package/dist/auth/oauth/types.js.map +1 -0
  80. package/dist/cli/cli.d.ts.map +1 -1
  81. package/dist/cli/cli.js +74 -10
  82. package/dist/cli/cli.js.map +1 -1
  83. package/dist/core/config/ConfigService.d.ts +1 -0
  84. package/dist/core/config/ConfigService.d.ts.map +1 -1
  85. package/dist/core/config/ConfigService.js +4 -1
  86. package/dist/core/config/ConfigService.js.map +1 -1
  87. package/dist/core/container/Tokens.d.ts +4 -0
  88. package/dist/core/container/Tokens.d.ts.map +1 -1
  89. package/dist/core/container/Tokens.js +4 -0
  90. package/dist/core/container/Tokens.js.map +1 -1
  91. package/dist/core/plugins/PluginManager.d.ts.map +1 -1
  92. package/dist/core/plugins/PluginManager.js +73 -19
  93. package/dist/core/plugins/PluginManager.js.map +1 -1
  94. package/dist/database/migrations/SystemMigrations.d.ts.map +1 -1
  95. package/dist/database/migrations/SystemMigrations.js +41 -1
  96. package/dist/database/migrations/SystemMigrations.js.map +1 -1
  97. package/dist/demo/DemoService.d.ts +15 -103
  98. package/dist/demo/DemoService.d.ts.map +1 -1
  99. package/dist/demo/DemoService.js +14 -419
  100. package/dist/demo/DemoService.js.map +1 -1
  101. package/dist/functions/FunctionService.d.ts +80 -0
  102. package/dist/functions/FunctionService.d.ts.map +1 -0
  103. package/dist/functions/FunctionService.js +610 -0
  104. package/dist/functions/FunctionService.js.map +1 -0
  105. package/dist/functions/runtime/IFunctionRuntime.d.ts +23 -0
  106. package/dist/functions/runtime/IFunctionRuntime.d.ts.map +1 -0
  107. package/dist/functions/runtime/IFunctionRuntime.js +3 -0
  108. package/dist/functions/runtime/IFunctionRuntime.js.map +1 -0
  109. package/dist/functions/runtime/QuickJsWasmRuntime.d.ts +21 -0
  110. package/dist/functions/runtime/QuickJsWasmRuntime.d.ts.map +1 -0
  111. package/dist/functions/runtime/QuickJsWasmRuntime.js +418 -0
  112. package/dist/functions/runtime/QuickJsWasmRuntime.js.map +1 -0
  113. package/dist/functions/runtime/SandboxedRunner.d.ts +31 -0
  114. package/dist/functions/runtime/SandboxedRunner.d.ts.map +1 -0
  115. package/dist/functions/runtime/SandboxedRunner.js +61 -0
  116. package/dist/functions/runtime/SandboxedRunner.js.map +1 -0
  117. package/dist/functions/security/SsrfGuard.d.ts +41 -0
  118. package/dist/functions/security/SsrfGuard.d.ts.map +1 -0
  119. package/dist/functions/security/SsrfGuard.js +470 -0
  120. package/dist/functions/security/SsrfGuard.js.map +1 -0
  121. package/dist/functions/types.d.ts +109 -0
  122. package/dist/functions/types.d.ts.map +1 -0
  123. package/dist/functions/types.js +3 -0
  124. package/dist/functions/types.js.map +1 -0
  125. package/dist/http/HttpServer.d.ts +9 -1
  126. package/dist/http/HttpServer.d.ts.map +1 -1
  127. package/dist/http/HttpServer.js +108 -8
  128. package/dist/http/HttpServer.js.map +1 -1
  129. package/dist/http/controllers/ApiKeyController.d.ts +31 -0
  130. package/dist/http/controllers/ApiKeyController.d.ts.map +1 -0
  131. package/dist/http/controllers/ApiKeyController.js +52 -0
  132. package/dist/http/controllers/ApiKeyController.js.map +1 -0
  133. package/dist/http/controllers/AuthController.d.ts +29 -1
  134. package/dist/http/controllers/AuthController.d.ts.map +1 -1
  135. package/dist/http/controllers/AuthController.js +42 -1
  136. package/dist/http/controllers/AuthController.js.map +1 -1
  137. package/dist/http/controllers/DemoController.d.ts.map +1 -1
  138. package/dist/http/controllers/DemoController.js +1 -0
  139. package/dist/http/controllers/DemoController.js.map +1 -1
  140. package/dist/http/controllers/FunctionController.d.ts +64 -0
  141. package/dist/http/controllers/FunctionController.d.ts.map +1 -0
  142. package/dist/http/controllers/FunctionController.js +202 -0
  143. package/dist/http/controllers/FunctionController.js.map +1 -0
  144. package/dist/http/controllers/HealthController.js +2 -2
  145. package/dist/http/controllers/RecordController.d.ts.map +1 -1
  146. package/dist/http/controllers/RecordController.js +4 -0
  147. package/dist/http/controllers/RecordController.js.map +1 -1
  148. package/dist/http/controllers/SnapshotController.d.ts +58 -0
  149. package/dist/http/controllers/SnapshotController.d.ts.map +1 -0
  150. package/dist/http/controllers/SnapshotController.js +79 -0
  151. package/dist/http/controllers/SnapshotController.js.map +1 -0
  152. package/dist/http/middleware/AuthMiddleware.d.ts +6 -1
  153. package/dist/http/middleware/AuthMiddleware.d.ts.map +1 -1
  154. package/dist/http/middleware/AuthMiddleware.js +79 -8
  155. package/dist/http/middleware/AuthMiddleware.js.map +1 -1
  156. package/dist/index.d.ts +15 -2
  157. package/dist/index.d.ts.map +1 -1
  158. package/dist/index.js +28 -3
  159. package/dist/index.js.map +1 -1
  160. package/dist/plugins/chat-notifications.d.ts +51 -0
  161. package/dist/plugins/chat-notifications.d.ts.map +1 -0
  162. package/dist/plugins/chat-notifications.js +545 -0
  163. package/dist/plugins/chat-notifications.js.map +1 -0
  164. package/dist/plugins/index.d.ts +1 -1
  165. package/dist/plugins/index.d.ts.map +1 -1
  166. package/dist/plugins/index.js +1 -1
  167. package/dist/plugins/index.js.map +1 -1
  168. package/dist/plugins/webhooks.d.ts +5 -34
  169. package/dist/plugins/webhooks.d.ts.map +1 -1
  170. package/dist/plugins/webhooks.js +11 -412
  171. package/dist/plugins/webhooks.js.map +1 -1
  172. package/dist/records/MockDataService.d.ts.map +1 -1
  173. package/dist/records/MockDataService.js +3 -0
  174. package/dist/records/MockDataService.js.map +1 -1
  175. package/dist/records/QueryFilterParser.d.ts.map +1 -1
  176. package/dist/records/QueryFilterParser.js +2 -1
  177. package/dist/records/QueryFilterParser.js.map +1 -1
  178. package/dist/records/RecordService.d.ts.map +1 -1
  179. package/dist/records/RecordService.js +70 -43
  180. package/dist/records/RecordService.js.map +1 -1
  181. package/dist/records/RecordValidator.d.ts +6 -0
  182. package/dist/records/RecordValidator.d.ts.map +1 -0
  183. package/dist/records/RecordValidator.js +100 -0
  184. package/dist/records/RecordValidator.js.map +1 -0
  185. package/dist/rules/RuleEngine.d.ts +14 -0
  186. package/dist/rules/RuleEngine.d.ts.map +1 -1
  187. package/dist/rules/RuleEngine.js +144 -1
  188. package/dist/rules/RuleEngine.js.map +1 -1
  189. package/dist/schema/OpenApiGenerator.js +3 -3
  190. package/dist/snapshots/SnapshotService.d.ts +75 -0
  191. package/dist/snapshots/SnapshotService.d.ts.map +1 -0
  192. package/dist/snapshots/SnapshotService.js +775 -0
  193. package/dist/snapshots/SnapshotService.js.map +1 -0
  194. package/dist/snapshots/types.d.ts +63 -0
  195. package/dist/snapshots/types.d.ts.map +1 -0
  196. package/dist/snapshots/types.js +5 -0
  197. package/dist/snapshots/types.js.map +1 -0
  198. package/dist/templates/definitions/ecommerce.js +13 -13
  199. package/dist/templates/definitions/ecommerce.js.map +1 -1
  200. package/dist/webhooks/WebhookService.js +1 -1
  201. package/package.json +4 -3
@@ -13,30 +13,30 @@ function renderCollectionsHubView() {
13
13
  <div class="hub-hero-banner">
14
14
  <div style="display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:0.75rem;">
15
15
  <div>
16
- <h2 style="font-size:18px; font-weight:800; color:#fff; letter-spacing:-0.02em;">Collections & Schema Directory</h2>
16
+ <h2 style="font-size:18px; font-weight:800; color:var(--text-heading); letter-spacing:-0.02em;">Collections & Schema Directory</h2>
17
17
  <p style="font-size:12px; color:var(--text-muted); margin-top:3px;">
18
18
  Embedded SQLite database tables with instant REST API, CRUD endpoints, and realtime subscriptions.
19
19
  </p>
20
20
  </div>
21
21
  <div style="display:flex; align-items:center; gap:0.5rem;">
22
22
  <button class="btn btn-primary btn-sm" onclick="openNewCollectionModal()">+ New Collection</button>
23
- <button class="btn btn-secondary btn-sm" onclick="openTemplatesModal()">✨ Starter Recipes</button>
24
- <button class="btn btn-secondary btn-sm" onclick="openImportModal()"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="display:inline-block; vertical-align:-1px; margin-right:4px;"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>Import JSON</button>
23
+ <button class="btn btn-secondary btn-sm" onclick="openTemplatesModal()"><svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="display:inline-block; vertical-align:-1px; margin-right:4px; color:var(--accent-primary);"><path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"/></svg>Starter Recipes</button>
24
+ <button class="btn btn-secondary btn-sm" onclick="openImportJsonModal()"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="display:inline-block; vertical-align:-1px; margin-right:4px; color:var(--accent-primary);"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>Import JSON</button>
25
25
  </div>
26
26
  </div>
27
27
 
28
28
  <div class="hub-stats-row" style="margin-top:0.5rem;">
29
29
  <div class="hub-stat-card">
30
30
  <span style="font-size:11px; font-weight:700; color:var(--text-muted); text-transform:uppercase;">Total Collections</span>
31
- <span style="font-size:20px; font-weight:800; color:#fff;">${allCols.length}</span>
31
+ <span style="font-size:20px; font-weight:800; color:var(--text-heading);">${allCols.length}</span>
32
32
  </div>
33
33
  <div class="hub-stat-card">
34
34
  <span style="font-size:11px; font-weight:700; color:var(--text-muted); text-transform:uppercase;">User Collections</span>
35
- <span style="font-size:20px; font-weight:800; color:#60a5fa;">${userCols.length}</span>
35
+ <span style="font-size:20px; font-weight:800; color:var(--text-heading);">${userCols.length}</span>
36
36
  </div>
37
37
  <div class="hub-stat-card">
38
38
  <span style="font-size:11px; font-weight:700; color:var(--text-muted); text-transform:uppercase;">System Tables</span>
39
- <span style="font-size:20px; font-weight:800; color:#34d399;">${systemCols.length}</span>
39
+ <span style="font-size:20px; font-weight:800; color:var(--text-heading);">${systemCols.length}</span>
40
40
  </div>
41
41
  </div>
42
42
  </div>
@@ -53,7 +53,9 @@ function renderCollectionsHubView() {
53
53
  <div class="hub-card" onclick="selectCollection('${escapeHtml(col.name)}')">
54
54
  <div class="hub-card-header">
55
55
  <div class="hub-card-title">
56
- <span>${isSys ? '⚙️' : '📁'}</span>
56
+ ${isSys
57
+ ? '<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="color:var(--text-muted);"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"/></svg>'
58
+ : '<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="color:var(--accent-primary);"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path></svg>'}
57
59
  <span>${escapeHtml(col.name)}</span>
58
60
  </div>
59
61
  <div style="display:flex; align-items:center; gap:4px;">
@@ -233,7 +235,7 @@ function renderCollectionsList() {
233
235
  }
234
236
 
235
237
  // Select Collection
236
- async function selectCollection(name) {
238
+ async function selectCollection(name, pushState = true) {
237
239
  state.activeNav = 'collection';
238
240
  const allCols = Array.isArray(state.collections)
239
241
  ? state.collections
@@ -275,16 +277,30 @@ async function selectCollection(name) {
275
277
  } else {
276
278
  renderSchemaView();
277
279
  }
280
+
281
+ if (pushState) {
282
+ const sub = (state.collectionTab === 'schema') ? '/schema' : '';
283
+ if (typeof updateUrl === 'function') {
284
+ updateUrl('/_/collections/' + encodeURIComponent(name) + sub);
285
+ }
286
+ }
278
287
  }
279
288
 
280
289
  // Collection Tabs
281
- function switchCollectionTab(tab) {
290
+ function switchCollectionTab(tab, pushState = true) {
282
291
  state.collectionTab = tab;
283
292
  document.getElementById('tab-records').className = tab === 'records' ? 'tab-btn active' : 'tab-btn';
284
293
  document.getElementById('tab-schema').className = tab === 'schema' ? 'tab-btn active' : 'tab-btn';
285
294
 
286
295
  updateBreadcrumbs();
287
296
 
297
+ if (pushState && state.activeCollection) {
298
+ const sub = (tab === 'schema') ? '/schema' : '';
299
+ if (typeof updateUrl === 'function') {
300
+ updateUrl('/_/collections/' + encodeURIComponent(state.activeCollection.name) + sub);
301
+ }
302
+ }
303
+
288
304
  if (tab === 'records') {
289
305
  renderRecordsView();
290
306
  loadRecords();
@@ -343,16 +359,28 @@ function updateBreadcrumbs() {
343
359
  } else {
344
360
  crumbs.push({ label: 'Webhooks', active: true });
345
361
  }
362
+ } else if (state.activeNav === 'functions') {
363
+ if (typeof functionsState !== 'undefined' && functionsState.currentView === 'editor' && functionsState.activeFunctionForEdit) {
364
+ crumbs.push({ label: 'Functions', clickable: true, action: () => { if (typeof closeFunctionEditor === 'function') closeFunctionEditor(); } });
365
+ const editLabel = functionsState.activeFunctionForEdit.isNew
366
+ ? (functionsState.activeFunctionForEdit.name || 'New Function')
367
+ : functionsState.activeFunctionForEdit.name;
368
+ crumbs.push({ label: editLabel, active: true });
369
+ } else if (typeof functionsState !== 'undefined' && functionsState.subTab === 'logs') {
370
+ crumbs.push({ label: 'Functions', clickable: true, action: () => { if (typeof switchFunctionsTab === 'function') switchFunctionsTab('functions'); } });
371
+ crumbs.push({ label: 'Execution Logs', active: true });
372
+ } else {
373
+ crumbs.push({ label: 'Functions', active: true });
374
+ }
346
375
  } else if (state.activeNav === 'home') {
347
376
  crumbs.push({ label: 'Overview', active: true });
348
377
  } else if (state.activeNav === 'analytics') {
349
- crumbs.push({ label: 'Analytics & Metrics', active: true });
378
+ crumbs.push({ label: 'Analytics', active: true });
350
379
  } else if (state.activeNav === 'snapshots') {
351
380
  crumbs.push({ label: 'Snapshots', active: true });
352
381
  } else if (state.activeNav === 'logs') {
353
- crumbs.push({ label: 'Traffic & Logs', active: true });
354
- } else if (state.activeNav === 'settings') {
355
- crumbs.push({ label: 'System Info', active: true });
382
+ crumbs.push({ label: 'Audit Logs', active: true });
383
+
356
384
  } else if (state.pluginNavItems && state.pluginNavItems.some(p => p.id === state.activeNav)) {
357
385
  const item = state.pluginNavItems.find(p => p.id === state.activeNav);
358
386
  crumbs.push({ label: 'Plugins', clickable: true, action: () => selectNav('plugins') });
@@ -30,7 +30,7 @@ function getAllCommandPaletteItems() {
30
30
  // 2. Navigation items
31
31
  items.push({
32
32
  id: 'nav-home',
33
- title: 'Dashboard Overview',
33
+ title: 'Overview',
34
34
  description: 'Server status, collections list, quick stats',
35
35
  category: 'Navigation',
36
36
  badge: 'PAGE',
@@ -57,7 +57,7 @@ function getAllCommandPaletteItems() {
57
57
  category: 'Navigation',
58
58
  badge: 'PAGE',
59
59
  icon: '🧩',
60
- keywords: ['plugins', 'extensions', 'addons', 'stripe', 's3', 'resend', 'webhooks', 'algolia'],
60
+ keywords: ['plugins', 'extensions', 'addons', 'stripe', 's3', 'resend', 'chat notifications', 'discord', 'slack', 'webhooks', 'algolia'],
61
61
  action: () => selectNav('plugins')
62
62
  });
63
63
 
@@ -72,21 +72,33 @@ function getAllCommandPaletteItems() {
72
72
  action: () => selectNav('webhooks')
73
73
  });
74
74
 
75
+ items.push({
76
+ id: 'nav-functions',
77
+ title: 'Serverless Functions',
78
+ description: 'Sandboxed QuickJS serverless functions, API routes and event hooks',
79
+ category: 'Navigation',
80
+ badge: 'PAGE',
81
+ icon: '⚡',
82
+ keywords: ['functions', 'serverless', 'lambda', 'quickjs', 'wasm', 'sandbox', 'api', 'hooks', 'code'],
83
+ action: () => selectNav('functions')
84
+ });
85
+
75
86
  items.push({
76
87
  id: 'nav-analytics',
77
- title: 'Analytics & Metrics',
88
+ title: 'Analytics',
78
89
  description: 'Realtime telemetry, latency and request throughput',
79
90
  category: 'Navigation',
80
91
  badge: 'PAGE',
81
92
  icon: '📊',
82
- keywords: ['metrics', 'analytics', 'telemetry', 'stats', 'traffic', 'latency'],
93
+ keywords: ['metrics', 'analytics', 'telemetry', 'stats', 'traffic', 'latency', 'uptime', 'system'],
83
94
  action: () => selectNav('analytics')
84
95
  });
85
96
 
86
97
  items.push({
87
98
  id: 'nav-snapshots',
88
- title: 'Demo Snapshots',
89
- description: 'Capture or restore database demo state snapshots',
99
+ title: 'Snapshots',
100
+ description: 'Capture or restore application state snapshots',
101
+
90
102
  category: 'Navigation',
91
103
  badge: 'PAGE',
92
104
  icon: '📸',
@@ -96,26 +108,15 @@ function getAllCommandPaletteItems() {
96
108
 
97
109
  items.push({
98
110
  id: 'nav-logs',
99
- title: 'Traffic & Logs',
111
+ title: 'Audit Logs',
100
112
  description: 'Live HTTP request activity, errors and slow queries',
101
113
  category: 'Navigation',
102
114
  badge: 'PAGE',
103
115
  icon: '📝',
104
- keywords: ['logs', 'traffic', 'requests', 'errors', 'debug'],
116
+ keywords: ['audit', 'logs', 'traffic', 'requests', 'errors', 'debug'],
105
117
  action: () => selectNav('logs')
106
118
  });
107
119
 
108
- items.push({
109
- id: 'nav-settings',
110
- title: 'System Info',
111
- description: 'System specifications, runtime version, and server hooks',
112
- category: 'Navigation',
113
- badge: 'PAGE',
114
- icon: '⚙️',
115
- keywords: ['settings', 'system', 'system info', 'info', 'runtime', 'uptime', 'version', 'hooks'],
116
- action: () => selectNav('settings')
117
- });
118
-
119
120
  // 2.5 Plugin navigation items
120
121
  if (state.pluginNavItems && state.pluginNavItems.length > 0) {
121
122
  for (const p of state.pluginNavItems) {
@@ -332,6 +333,47 @@ function getAllCommandPaletteItems() {
332
333
  }
333
334
  });
334
335
 
336
+
337
+ // 9. Appearance & Theme
338
+ items.push({
339
+ id: 'theme-system',
340
+ title: 'Theme: System (Auto)',
341
+ description: 'Sync admin appearance with your operating system preference',
342
+ category: 'Appearance',
343
+ badge: 'THEME',
344
+ icon: '💻',
345
+ keywords: ['theme', 'appearance', 'system', 'auto', 'mode', 'color'],
346
+ action: () => {
347
+ if (typeof setTheme === 'function') setTheme('system');
348
+ }
349
+ });
350
+
351
+ items.push({
352
+ id: 'theme-light',
353
+ title: 'Theme: Light Mode',
354
+ description: 'Switch admin portal to clean light appearance',
355
+ category: 'Appearance',
356
+ badge: 'THEME',
357
+ icon: '☀️',
358
+ keywords: ['theme', 'appearance', 'light', 'white', 'day', 'mode', 'color'],
359
+ action: () => {
360
+ if (typeof setTheme === 'function') setTheme('light');
361
+ }
362
+ });
363
+
364
+ items.push({
365
+ id: 'theme-dark',
366
+ title: 'Theme: Dark Mode',
367
+ description: 'Switch admin portal to dark night appearance',
368
+ category: 'Appearance',
369
+ badge: 'THEME',
370
+ icon: '🌙',
371
+ keywords: ['theme', 'appearance', 'dark', 'black', 'night', 'mode', 'color'],
372
+ action: () => {
373
+ if (typeof setTheme === 'function') setTheme('dark');
374
+ }
375
+ });
376
+
335
377
  return items;
336
378
  }
337
379