domma-cms 0.17.0 → 0.21.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 (136) hide show
  1. package/CLAUDE.md +39 -3
  2. package/admin/css/admin.css +1 -1
  3. package/admin/css/dashboard.css +1 -1
  4. package/admin/index.html +2 -2
  5. package/admin/js/api.js +1 -1
  6. package/admin/js/app.js +4 -4
  7. package/admin/js/config/sidebar-config.js +1 -1
  8. package/admin/js/lib/card-builder.js +3 -3
  9. package/admin/js/lib/crud-tutorial.js +1 -0
  10. package/admin/js/lib/effects-builder.js +1 -1
  11. package/admin/js/lib/markdown-toolbar.js +6 -6
  12. package/admin/js/lib/project-context.js +1 -0
  13. package/admin/js/lib/sidebar-renderer.js +4 -0
  14. package/admin/js/templates/action-editor.html +7 -0
  15. package/admin/js/templates/block-editor.html +7 -0
  16. package/admin/js/templates/collection-editor.html +9 -0
  17. package/admin/js/templates/dashboard/cache.html +32 -0
  18. package/admin/js/templates/dashboard.html +4 -0
  19. package/admin/js/templates/form-editor.html +9 -0
  20. package/admin/js/templates/menu-editor.html +98 -0
  21. package/admin/js/templates/menu-locations.html +14 -0
  22. package/admin/js/templates/menus.html +14 -0
  23. package/admin/js/templates/page-editor.html +9 -2
  24. package/admin/js/templates/project-detail.html +50 -0
  25. package/admin/js/templates/project-editor.html +45 -0
  26. package/admin/js/templates/project-settings.html +60 -0
  27. package/admin/js/templates/projects.html +13 -0
  28. package/admin/js/templates/role-editor.html +11 -0
  29. package/admin/js/templates/settings.html +26 -0
  30. package/admin/js/templates/tutorials.html +335 -2
  31. package/admin/js/templates/view-editor.html +7 -0
  32. package/admin/js/views/action-editor.js +1 -1
  33. package/admin/js/views/actions-list.js +1 -1
  34. package/admin/js/views/block-editor-enhance.js +1 -1
  35. package/admin/js/views/block-editor.js +8 -8
  36. package/admin/js/views/blocks.js +2 -2
  37. package/admin/js/views/collection-editor.js +4 -4
  38. package/admin/js/views/collections.js +1 -1
  39. package/admin/js/views/dashboard/widgets/activity-feed.js +1 -1
  40. package/admin/js/views/dashboard/widgets/cache.js +1 -0
  41. package/admin/js/views/dashboard/widgets/journeys.js +1 -1
  42. package/admin/js/views/dashboard/widgets/spike-feed.js +1 -1
  43. package/admin/js/views/dashboard/widgets/top-pages.js +1 -1
  44. package/admin/js/views/dashboard.js +1 -1
  45. package/admin/js/views/form-editor.js +6 -6
  46. package/admin/js/views/forms.js +1 -1
  47. package/admin/js/views/index.js +1 -1
  48. package/admin/js/views/menu-editor.js +19 -0
  49. package/admin/js/views/menu-locations.js +1 -0
  50. package/admin/js/views/menus.js +5 -0
  51. package/admin/js/views/page-editor.js +41 -36
  52. package/admin/js/views/pages.js +3 -3
  53. package/admin/js/views/project-detail.js +4 -0
  54. package/admin/js/views/project-editor.js +1 -0
  55. package/admin/js/views/project-settings.js +1 -0
  56. package/admin/js/views/projects.js +7 -0
  57. package/admin/js/views/role-editor.js +1 -1
  58. package/admin/js/views/roles.js +3 -3
  59. package/admin/js/views/settings.js +3 -3
  60. package/admin/js/views/tutorials.js +1 -1
  61. package/admin/js/views/user-editor.js +1 -1
  62. package/admin/js/views/users.js +3 -3
  63. package/admin/js/views/view-editor.js +1 -1
  64. package/admin/js/views/views-list.js +1 -1
  65. package/config/cache.json +4 -0
  66. package/config/cache.json.example +12 -0
  67. package/config/menu-locations.json +5 -0
  68. package/config/menus/admin-sidebar.json +185 -0
  69. package/config/menus/footer.json +33 -0
  70. package/config/menus/main.json +35 -0
  71. package/config/menus/sproj-1779696558011-menu.json +17 -0
  72. package/config/menus/sproj-1779696960337-menu.json +18 -0
  73. package/config/menus/sproj-1779696985353-menu.json +18 -0
  74. package/config/site.json +6 -22
  75. package/package.json +4 -3
  76. package/plugins/analytics/daily.json +3 -0
  77. package/plugins/analytics/journeys.json +8 -0
  78. package/plugins/analytics/lifetime.json +1 -1
  79. package/public/css/site.css +1 -1
  80. package/public/js/collection-browser.js +4 -0
  81. package/public/js/forms.js +1 -1
  82. package/public/js/site.js +1 -1
  83. package/server/config.js +12 -1
  84. package/server/middleware/auth.js +88 -22
  85. package/server/routes/api/actions.js +58 -5
  86. package/server/routes/api/auth.js +2 -2
  87. package/server/routes/api/blocks.js +18 -3
  88. package/server/routes/api/cache.js +57 -0
  89. package/server/routes/api/collections.js +201 -8
  90. package/server/routes/api/forms.js +266 -21
  91. package/server/routes/api/menu-locations.js +46 -0
  92. package/server/routes/api/menus.js +115 -0
  93. package/server/routes/api/navigation.js +2 -0
  94. package/server/routes/api/pages.js +1 -1
  95. package/server/routes/api/projects.js +107 -0
  96. package/server/routes/api/scaffold.js +86 -0
  97. package/server/routes/api/settings.js +3 -0
  98. package/server/routes/api/sidebar.js +23 -0
  99. package/server/routes/api/users.js +32 -7
  100. package/server/routes/api/views.js +10 -2
  101. package/server/routes/public.js +88 -7
  102. package/server/server.js +54 -3
  103. package/server/services/actions.js +137 -8
  104. package/server/services/adapters/FileAdapter.js +23 -8
  105. package/server/services/adapters/MongoAdapter.js +36 -18
  106. package/server/services/blocks.js +23 -8
  107. package/server/services/cache/drivers/MemoryDriver.js +118 -0
  108. package/server/services/cache/drivers/NoneDriver.js +12 -0
  109. package/server/services/cache/index.js +229 -0
  110. package/server/services/cache/lru.js +61 -0
  111. package/server/services/collections.js +102 -12
  112. package/server/services/content.js +25 -6
  113. package/server/services/filterEngine.js +281 -0
  114. package/server/services/forms.js +3 -0
  115. package/server/services/hooks.js +48 -0
  116. package/server/services/markdown.js +711 -124
  117. package/server/services/menus-migration.js +107 -0
  118. package/server/services/menus.js +422 -0
  119. package/server/services/permissionRegistry.js +26 -0
  120. package/server/services/plugins.js +9 -2
  121. package/server/services/presetCollections.js +22 -0
  122. package/server/services/projects.js +429 -0
  123. package/server/services/recipes/contact-list.json +78 -0
  124. package/server/services/recipes/onboarding.json +426 -0
  125. package/server/services/references.js +174 -0
  126. package/server/services/renderer.js +237 -40
  127. package/server/services/roles.js +6 -1
  128. package/server/services/rowAccess.js +86 -13
  129. package/server/services/scaffolder.js +465 -0
  130. package/server/services/sidebar-migration.js +117 -0
  131. package/server/services/sitemap.js +112 -0
  132. package/server/services/userRoles.js +86 -0
  133. package/server/services/users.js +23 -2
  134. package/server/services/views.js +19 -4
  135. package/server/templates/page.html +135 -130
  136. /package/config/{navigation.json → navigation.json.bak} +0 -0
@@ -0,0 +1,185 @@
1
+ {
2
+ "slug": "admin-sidebar",
3
+ "name": "Admin sidebar",
4
+ "description": "Auto-seeded by sidebar migration on first boot",
5
+ "variant": "transparent",
6
+ "items": [
7
+ {
8
+ "text": "Overview",
9
+ "url": "",
10
+ "icon": "home",
11
+ "items": [
12
+ {
13
+ "text": "Dashboard",
14
+ "url": "#/",
15
+ "icon": "home"
16
+ }
17
+ ]
18
+ },
19
+ {
20
+ "text": "Projects",
21
+ "url": "",
22
+ "icon": "folder",
23
+ "permission": "projects",
24
+ "items": [
25
+ {
26
+ "text": "Manage Projects",
27
+ "url": "#/projects",
28
+ "icon": "folder",
29
+ "permission": "projects"
30
+ }
31
+ ]
32
+ },
33
+ {
34
+ "text": "Content",
35
+ "url": "",
36
+ "icon": "edit",
37
+ "items": [
38
+ {
39
+ "text": "Pages",
40
+ "url": "#/pages",
41
+ "icon": "file-text",
42
+ "permission": "pages"
43
+ },
44
+ {
45
+ "text": "Media",
46
+ "url": "#/media",
47
+ "icon": "image",
48
+ "permission": "media"
49
+ },
50
+ {
51
+ "text": "Menus",
52
+ "url": "#/menus",
53
+ "icon": "menu",
54
+ "permission": "menus"
55
+ }
56
+ ]
57
+ },
58
+ {
59
+ "text": "Data",
60
+ "url": "",
61
+ "icon": "database",
62
+ "items": [
63
+ {
64
+ "text": "Collections",
65
+ "url": "#/collections",
66
+ "icon": "database",
67
+ "permission": "collections"
68
+ },
69
+ {
70
+ "text": "Forms",
71
+ "url": "#/forms",
72
+ "icon": "layout",
73
+ "permission": "collections"
74
+ },
75
+ {
76
+ "text": "Views",
77
+ "url": "#/views",
78
+ "icon": "eye",
79
+ "permission": "views"
80
+ },
81
+ {
82
+ "text": "Actions",
83
+ "url": "#/actions",
84
+ "icon": "zap",
85
+ "permission": "actions"
86
+ },
87
+ {
88
+ "text": "Blocks",
89
+ "url": "#/blocks",
90
+ "icon": "box",
91
+ "permission": "pages"
92
+ },
93
+ {
94
+ "text": "Components",
95
+ "url": "#/components",
96
+ "icon": "component",
97
+ "permission": "components"
98
+ }
99
+ ]
100
+ },
101
+ {
102
+ "text": "System",
103
+ "url": "",
104
+ "icon": "settings",
105
+ "items": [
106
+ {
107
+ "text": "Notifications",
108
+ "url": "#/system/notifications",
109
+ "icon": "bell",
110
+ "permission": "notifications"
111
+ },
112
+ {
113
+ "text": "Roles",
114
+ "url": "#/roles",
115
+ "icon": "shield",
116
+ "permission": "plugins"
117
+ },
118
+ {
119
+ "text": "Users",
120
+ "url": "#/users",
121
+ "icon": "users",
122
+ "permission": "users"
123
+ },
124
+ {
125
+ "text": "Site Settings",
126
+ "url": "#/settings",
127
+ "icon": "settings",
128
+ "permission": "settings"
129
+ },
130
+ {
131
+ "text": "Effects",
132
+ "url": "#/effects",
133
+ "icon": "sparkles",
134
+ "permission": "settings"
135
+ },
136
+ {
137
+ "text": "Layouts",
138
+ "url": "#/layouts",
139
+ "icon": "layout",
140
+ "permission": "layouts"
141
+ },
142
+ {
143
+ "text": "Plugins",
144
+ "url": "#/plugins",
145
+ "icon": "package",
146
+ "permission": "plugins"
147
+ },
148
+ {
149
+ "text": "My Profile",
150
+ "url": "#/my-profile",
151
+ "icon": "user"
152
+ }
153
+ ]
154
+ },
155
+ {
156
+ "text": "Documentation",
157
+ "url": "",
158
+ "icon": "book",
159
+ "items": [
160
+ {
161
+ "text": "Usage",
162
+ "url": "#/documentation",
163
+ "icon": "book"
164
+ },
165
+ {
166
+ "text": "Tutorials",
167
+ "url": "#/tutorials",
168
+ "icon": "document"
169
+ },
170
+ {
171
+ "text": "API Reference",
172
+ "url": "#/api-reference",
173
+ "icon": "code"
174
+ }
175
+ ]
176
+ }
177
+ ],
178
+ "meta": {
179
+ "createdAt": "2026-05-25T11:11:15.223Z",
180
+ "updatedAt": "2026-05-25T13:48:21.541Z",
181
+ "bundled": false,
182
+ "presetOwner": null,
183
+ "project": null
184
+ }
185
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "slug": "footer",
3
+ "name": "Footer",
4
+ "description": "Migrated from site.json footer.links",
5
+ "items": [
6
+ {
7
+ "text": "About",
8
+ "url": "/about"
9
+ },
10
+ {
11
+ "text": "Resources",
12
+ "url": "/resources"
13
+ },
14
+ {
15
+ "text": "Contact",
16
+ "url": "/contact"
17
+ },
18
+ {
19
+ "text": "Privacy Policy",
20
+ "url": "/privacy"
21
+ },
22
+ {
23
+ "text": "GDPR",
24
+ "url": "/gdpr"
25
+ }
26
+ ],
27
+ "meta": {
28
+ "createdAt": "2026-05-24T14:51:22.419Z",
29
+ "updatedAt": "2026-05-24T14:51:22.419Z",
30
+ "bundled": false,
31
+ "presetOwner": null
32
+ }
33
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "slug": "main",
3
+ "name": "Main navigation",
4
+ "description": "Migrated from config/navigation.json",
5
+ "variant": "dark",
6
+ "position": "sticky",
7
+ "items": [
8
+ {
9
+ "text": "Home",
10
+ "url": "/",
11
+ "icon": "home"
12
+ },
13
+ {
14
+ "text": "About",
15
+ "url": "/about",
16
+ "icon": "info"
17
+ },
18
+ {
19
+ "text": "Resources",
20
+ "url": "/resources",
21
+ "icon": "book-open"
22
+ },
23
+ {
24
+ "text": "Contact",
25
+ "url": "/contact",
26
+ "icon": "mail"
27
+ }
28
+ ],
29
+ "meta": {
30
+ "createdAt": "2026-05-24T14:51:22.419Z",
31
+ "updatedAt": "2026-05-24T14:51:22.419Z",
32
+ "bundled": false,
33
+ "presetOwner": null
34
+ }
35
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "slug": "sproj-1779696558011-menu",
3
+ "name": "Test menu",
4
+ "description": "",
5
+ "items": [
6
+ {
7
+ "text": "X",
8
+ "url": "/x"
9
+ }
10
+ ],
11
+ "meta": {
12
+ "createdAt": "2026-05-25T08:09:18.015Z",
13
+ "updatedAt": "2026-05-25T08:09:18.015Z",
14
+ "bundled": true,
15
+ "presetOwner": "test-scaff-project"
16
+ }
17
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "slug": "sproj-1779696960337-menu",
3
+ "name": "Test menu",
4
+ "description": "",
5
+ "items": [
6
+ {
7
+ "text": "X",
8
+ "url": "/x"
9
+ }
10
+ ],
11
+ "meta": {
12
+ "createdAt": "2026-05-25T08:16:00.349Z",
13
+ "updatedAt": "2026-05-25T08:16:00.349Z",
14
+ "bundled": true,
15
+ "presetOwner": "test-scaff-project",
16
+ "project": "sproj-1779696960337"
17
+ }
18
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "slug": "sproj-1779696985353-menu",
3
+ "name": "Test menu",
4
+ "description": "",
5
+ "items": [
6
+ {
7
+ "text": "X",
8
+ "url": "/x"
9
+ }
10
+ ],
11
+ "meta": {
12
+ "createdAt": "2026-05-25T08:16:25.364Z",
13
+ "updatedAt": "2026-05-25T08:16:25.364Z",
14
+ "bundled": true,
15
+ "presetOwner": "test-scaff-project",
16
+ "project": "sproj-1779696985353"
17
+ }
18
+ }
package/config/site.json CHANGED
@@ -9,28 +9,7 @@
9
9
  },
10
10
  "footer": {
11
11
  "copyright": "© My Site. All rights reserved.",
12
- "links": [
13
- {
14
- "text": "About",
15
- "url": "/about"
16
- },
17
- {
18
- "text": "Resources",
19
- "url": "/resources"
20
- },
21
- {
22
- "text": "Contact",
23
- "url": "/contact"
24
- },
25
- {
26
- "text": "Privacy Policy",
27
- "url": "/privacy"
28
- },
29
- {
30
- "text": "GDPR",
31
- "url": "/gdpr"
32
- }
33
- ]
12
+ "links": []
34
13
  },
35
14
  "social": {
36
15
  "twitter": "",
@@ -99,5 +78,10 @@
99
78
  "position": "TR",
100
79
  "offsetX": 64,
101
80
  "offsetY": 64
81
+ },
82
+ "brand": {
83
+ "text": "My Bloggy Thing",
84
+ "logo": null,
85
+ "url": "/"
102
86
  }
103
87
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "domma-cms",
3
- "version": "0.17.0",
3
+ "version": "0.21.0",
4
4
  "description": "File-based CMS powered by Domma and Fastify. Run npx domma-cms my-site to create a new project.",
5
5
  "type": "module",
6
6
  "main": "server/server.js",
@@ -66,6 +66,7 @@
66
66
  "url": "https://github.com/pinpointzero73/domma-cms/issues"
67
67
  },
68
68
  "dependencies": {
69
+ "@fastify/compress": "^8.3.1",
69
70
  "@fastify/cors": "^11.2.0",
70
71
  "@fastify/helmet": "^13.0.2",
71
72
  "@fastify/jwt": "^10.0.0",
@@ -73,7 +74,7 @@
73
74
  "@fastify/rate-limit": "^10.3.0",
74
75
  "@fastify/static": "9.1.1",
75
76
  "bcryptjs": "^3.0.3",
76
- "domma-js": "^0.25.1",
77
+ "domma-js": "^0.27.0",
77
78
  "dotenv": "^17.2.3",
78
79
  "fastify": "5.8.5",
79
80
  "gray-matter": "^4.0.3",
@@ -81,7 +82,7 @@
81
82
  "nodemailer": "8.0.5",
82
83
  "sanitize-html": "^2.17.0",
83
84
  "sharp": "^0.34.5",
84
- "uuid": "^13.0.0"
85
+ "uuid": "13.0.1"
85
86
  },
86
87
  "optionalDependencies": {
87
88
  "mongodb": "^6.21.0"
@@ -1,5 +1,8 @@
1
1
  {
2
2
  "2026-05-06": {
3
3
  "/test-from-controller": 1
4
+ },
5
+ "2026-05-22": {
6
+ "/about": 1
4
7
  }
5
8
  }
@@ -6,5 +6,13 @@
6
6
  "url": "/test-from-controller",
7
7
  "ref": "/"
8
8
  }
9
+ ],
10
+ "2026-05-22": [
11
+ {
12
+ "sid": "test-sid-123",
13
+ "t": 1779450391054,
14
+ "url": "/about",
15
+ "ref": ""
16
+ }
9
17
  ]
10
18
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "/": 162,
3
- "/about": 88,
3
+ "/about": 89,
4
4
  "/blog": 42,
5
5
  "/contact": 31,
6
6
  "/resources/typography": 4,