sandala 0.1.0__tar.gz

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 (222) hide show
  1. sandala-0.1.0/LICENSE +21 -0
  2. sandala-0.1.0/MANIFEST.in +9 -0
  3. sandala-0.1.0/PKG-INFO +68 -0
  4. sandala-0.1.0/README.md +42 -0
  5. sandala-0.1.0/admin-ui/index.html +140 -0
  6. sandala-0.1.0/admin-ui/package-lock.json +2737 -0
  7. sandala-0.1.0/admin-ui/package.json +38 -0
  8. sandala-0.1.0/admin-ui/playwright.config.ts +20 -0
  9. sandala-0.1.0/admin-ui/public/config.js +4 -0
  10. sandala-0.1.0/admin-ui/src/app/App.tsx +45 -0
  11. sandala-0.1.0/admin-ui/src/assets/sandala-icon.svg +1 -0
  12. sandala-0.1.0/admin-ui/src/components/ApiErrorDetailsOverlay.tsx +51 -0
  13. sandala-0.1.0/admin-ui/src/components/AppShell.tsx +133 -0
  14. sandala-0.1.0/admin-ui/src/components/Button.tsx +19 -0
  15. sandala-0.1.0/admin-ui/src/components/Card.tsx +10 -0
  16. sandala-0.1.0/admin-ui/src/components/ChipRemoveButton.tsx +22 -0
  17. sandala-0.1.0/admin-ui/src/components/CompactOptionMenu.tsx +140 -0
  18. sandala-0.1.0/admin-ui/src/components/DropdownMenu.tsx +81 -0
  19. sandala-0.1.0/admin-ui/src/components/EmptyState.tsx +8 -0
  20. sandala-0.1.0/admin-ui/src/components/Field.tsx +69 -0
  21. sandala-0.1.0/admin-ui/src/components/Form.tsx +62 -0
  22. sandala-0.1.0/admin-ui/src/components/Icon.tsx +106 -0
  23. sandala-0.1.0/admin-ui/src/components/IconButton.tsx +28 -0
  24. sandala-0.1.0/admin-ui/src/components/MultiValueSelect.tsx +172 -0
  25. sandala-0.1.0/admin-ui/src/components/OverlayCloseButton.tsx +8 -0
  26. sandala-0.1.0/admin-ui/src/components/OverlayDialog.tsx +24 -0
  27. sandala-0.1.0/admin-ui/src/components/Panel.tsx +5 -0
  28. sandala-0.1.0/admin-ui/src/components/RichTextField.tsx +516 -0
  29. sandala-0.1.0/admin-ui/src/components/Select.tsx +103 -0
  30. sandala-0.1.0/admin-ui/src/components/Spinner.tsx +7 -0
  31. sandala-0.1.0/admin-ui/src/components/SplitPane.tsx +169 -0
  32. sandala-0.1.0/admin-ui/src/components/StringListInput.tsx +93 -0
  33. sandala-0.1.0/admin-ui/src/components/TopbarContent.tsx +26 -0
  34. sandala-0.1.0/admin-ui/src/components/TreeNav.tsx +125 -0
  35. sandala-0.1.0/admin-ui/src/components/usePopover.ts +96 -0
  36. sandala-0.1.0/admin-ui/src/features/auth/LoginForm.tsx +66 -0
  37. sandala-0.1.0/admin-ui/src/features/entities/EntityEditor.tsx +362 -0
  38. sandala-0.1.0/admin-ui/src/features/entities/FieldEditorNode.tsx +187 -0
  39. sandala-0.1.0/admin-ui/src/features/entities/FieldEditorOverlay.tsx +211 -0
  40. sandala-0.1.0/admin-ui/src/features/entities/ModuleEditor.tsx +370 -0
  41. sandala-0.1.0/admin-ui/src/features/entities/StructureDeleteOverlay.tsx +62 -0
  42. sandala-0.1.0/admin-ui/src/features/entities/api.ts +131 -0
  43. sandala-0.1.0/admin-ui/src/features/entities/entityFieldOverlaySections.tsx +432 -0
  44. sandala-0.1.0/admin-ui/src/features/entities/fieldEditorSchema.ts +873 -0
  45. sandala-0.1.0/admin-ui/src/features/entities/presentation.ts +11 -0
  46. sandala-0.1.0/admin-ui/src/features/entities/schema.ts +428 -0
  47. sandala-0.1.0/admin-ui/src/features/nodes/NodeAclOverlay.tsx +154 -0
  48. sandala-0.1.0/admin-ui/src/features/nodes/NodeAclReference.tsx +10 -0
  49. sandala-0.1.0/admin-ui/src/features/nodes/NodeAssetFieldControls.tsx +476 -0
  50. sandala-0.1.0/admin-ui/src/features/nodes/NodeDeleteOverlay.tsx +50 -0
  51. sandala-0.1.0/admin-ui/src/features/nodes/NodeDisplayLabel.tsx +25 -0
  52. sandala-0.1.0/admin-ui/src/features/nodes/NodeEditor.tsx +261 -0
  53. sandala-0.1.0/admin-ui/src/features/nodes/NodeEditorLoader.tsx +61 -0
  54. sandala-0.1.0/admin-ui/src/features/nodes/NodeEditorOverlay.tsx +38 -0
  55. sandala-0.1.0/admin-ui/src/features/nodes/NodeFieldEditorSurface.tsx +61 -0
  56. sandala-0.1.0/admin-ui/src/features/nodes/NodeFieldRenderer.tsx +815 -0
  57. sandala-0.1.0/admin-ui/src/features/nodes/NodeLinkSelect.tsx +368 -0
  58. sandala-0.1.0/admin-ui/src/features/nodes/NodeMetadataSummary.tsx +48 -0
  59. sandala-0.1.0/admin-ui/src/features/nodes/NodeParentPicker.tsx +48 -0
  60. sandala-0.1.0/admin-ui/src/features/nodes/NodePermissionsEditor.tsx +29 -0
  61. sandala-0.1.0/admin-ui/src/features/nodes/NodeTableColumnsOverlay.tsx +41 -0
  62. sandala-0.1.0/admin-ui/src/features/nodes/NodeTableEditing.tsx +464 -0
  63. sandala-0.1.0/admin-ui/src/features/nodes/NodeTableFilterOverlay.tsx +647 -0
  64. sandala-0.1.0/admin-ui/src/features/nodes/NodeTablePermissionsOverlay.tsx +12 -0
  65. sandala-0.1.0/admin-ui/src/features/nodes/NodeTableSortOverlay.tsx +169 -0
  66. sandala-0.1.0/admin-ui/src/features/nodes/NodeTreePicker.tsx +201 -0
  67. sandala-0.1.0/admin-ui/src/features/nodes/NodesTableHeader.tsx +104 -0
  68. sandala-0.1.0/admin-ui/src/features/nodes/NodesTableRow.tsx +149 -0
  69. sandala-0.1.0/admin-ui/src/features/nodes/NodesTableScene.tsx +11 -0
  70. sandala-0.1.0/admin-ui/src/features/nodes/NodesTableView.tsx +382 -0
  71. sandala-0.1.0/admin-ui/src/features/nodes/api.ts +256 -0
  72. sandala-0.1.0/admin-ui/src/features/nodes/editorSchema.ts +337 -0
  73. sandala-0.1.0/admin-ui/src/features/nodes/linkSearch.ts +43 -0
  74. sandala-0.1.0/admin-ui/src/features/nodes/nodeAccess.ts +53 -0
  75. sandala-0.1.0/admin-ui/src/features/nodes/nodeCreate.ts +142 -0
  76. sandala-0.1.0/admin-ui/src/features/nodes/nodeFieldUtils.ts +111 -0
  77. sandala-0.1.0/admin-ui/src/features/nodes/nodeTableColumns.ts +127 -0
  78. sandala-0.1.0/admin-ui/src/features/nodes/nodeTableFields.ts +117 -0
  79. sandala-0.1.0/admin-ui/src/features/nodes/nodeTableFilter.ts +637 -0
  80. sandala-0.1.0/admin-ui/src/features/nodes/nodeTablePresenters.tsx +509 -0
  81. sandala-0.1.0/admin-ui/src/features/nodes/nodeTableSort.ts +74 -0
  82. sandala-0.1.0/admin-ui/src/features/nodes/nodeTableSystemFields.ts +57 -0
  83. sandala-0.1.0/admin-ui/src/features/nodes/nodeValidation.ts +598 -0
  84. sandala-0.1.0/admin-ui/src/features/nodes/presentation.ts +103 -0
  85. sandala-0.1.0/admin-ui/src/features/nodes/treeCapabilities.ts +96 -0
  86. sandala-0.1.0/admin-ui/src/features/nodes/useNodeDraft.ts +559 -0
  87. sandala-0.1.0/admin-ui/src/features/nodes/useNodeTableState.ts +290 -0
  88. sandala-0.1.0/admin-ui/src/features/nodes/useVirtualizedNodeTable.ts +112 -0
  89. sandala-0.1.0/admin-ui/src/features/settings/PatSection.tsx +389 -0
  90. sandala-0.1.0/admin-ui/src/features/settings/patApi.ts +54 -0
  91. sandala-0.1.0/admin-ui/src/lib/api.ts +67 -0
  92. sandala-0.1.0/admin-ui/src/lib/config.ts +41 -0
  93. sandala-0.1.0/admin-ui/src/lib/dateTime.ts +142 -0
  94. sandala-0.1.0/admin-ui/src/lib/errors.ts +187 -0
  95. sandala-0.1.0/admin-ui/src/lib/queryKeys.ts +5 -0
  96. sandala-0.1.0/admin-ui/src/lib/queryOptions.ts +15 -0
  97. sandala-0.1.0/admin-ui/src/lib/references.ts +15 -0
  98. sandala-0.1.0/admin-ui/src/lib/session.ts +51 -0
  99. sandala-0.1.0/admin-ui/src/lib/url.ts +31 -0
  100. sandala-0.1.0/admin-ui/src/locales/en-US.json +397 -0
  101. sandala-0.1.0/admin-ui/src/locales/index.ts +22 -0
  102. sandala-0.1.0/admin-ui/src/locales/ru-RU.json +397 -0
  103. sandala-0.1.0/admin-ui/src/main.tsx +10 -0
  104. sandala-0.1.0/admin-ui/src/pages/EntitiesPage.tsx +507 -0
  105. sandala-0.1.0/admin-ui/src/pages/LoginPage.tsx +34 -0
  106. sandala-0.1.0/admin-ui/src/pages/NodesPage.tsx +1441 -0
  107. sandala-0.1.0/admin-ui/src/pages/SettingsPage.tsx +74 -0
  108. sandala-0.1.0/admin-ui/src/providers/AuthProvider.tsx +72 -0
  109. sandala-0.1.0/admin-ui/src/providers/I18nProvider.tsx +108 -0
  110. sandala-0.1.0/admin-ui/src/providers/ThemeProvider.tsx +46 -0
  111. sandala-0.1.0/admin-ui/src/router/routeConfig.ts +3 -0
  112. sandala-0.1.0/admin-ui/src/router/router.tsx +175 -0
  113. sandala-0.1.0/admin-ui/src/styles/global.css +3233 -0
  114. sandala-0.1.0/admin-ui/src/vite-env.d.ts +12 -0
  115. sandala-0.1.0/admin-ui/tests/smoke.spec.ts +8 -0
  116. sandala-0.1.0/admin-ui/tsconfig.app.json +22 -0
  117. sandala-0.1.0/admin-ui/tsconfig.json +7 -0
  118. sandala-0.1.0/admin-ui/tsconfig.node.json +11 -0
  119. sandala-0.1.0/admin-ui/vite.config.ts +91 -0
  120. sandala-0.1.0/pyproject.toml +51 -0
  121. sandala-0.1.0/sandala/__init__.py +0 -0
  122. sandala-0.1.0/sandala/admin_ui_dist/config.js +4 -0
  123. sandala-0.1.0/sandala/admin_ui_dist/index.html +136 -0
  124. sandala-0.1.0/sandala/admin_ui_dist/static/RichTextField-C--mFWhR.js +146 -0
  125. sandala-0.1.0/sandala/admin_ui_dist/static/app-BeJOszdi.css +1 -0
  126. sandala-0.1.0/sandala/admin_ui_dist/static/app-XZ4Y80CK.js +275 -0
  127. sandala-0.1.0/sandala/admin_ui_dist/static/en-US-BSVPx4WU.js +1 -0
  128. sandala-0.1.0/sandala/admin_ui_dist/static/manifest.json +37 -0
  129. sandala-0.1.0/sandala/admin_ui_dist/static/ru-RU-B1mtu9p_.js +1 -0
  130. sandala-0.1.0/sandala/api/__init__.py +0 -0
  131. sandala-0.1.0/sandala/api/__main__.py +15 -0
  132. sandala-0.1.0/sandala/api/app.py +51 -0
  133. sandala-0.1.0/sandala/api/auth.py +60 -0
  134. sandala-0.1.0/sandala/api/errors.py +122 -0
  135. sandala-0.1.0/sandala/api/payloads.py +90 -0
  136. sandala-0.1.0/sandala/api/route_prefixes.py +1 -0
  137. sandala-0.1.0/sandala/api/routes_admin.py +42 -0
  138. sandala-0.1.0/sandala/api/routes_assets.py +88 -0
  139. sandala-0.1.0/sandala/api/routes_auth.py +168 -0
  140. sandala-0.1.0/sandala/api/routes_entity.py +63 -0
  141. sandala-0.1.0/sandala/api/routes_module.py +63 -0
  142. sandala-0.1.0/sandala/api/routes_node.py +102 -0
  143. sandala-0.1.0/sandala/bootstrap.py +84 -0
  144. sandala-0.1.0/sandala/config.py +149 -0
  145. sandala-0.1.0/sandala/core/__init__.py +0 -0
  146. sandala-0.1.0/sandala/core/access.py +29 -0
  147. sandala-0.1.0/sandala/core/assets/__init__.py +1 -0
  148. sandala-0.1.0/sandala/core/assets/field_resolver.py +72 -0
  149. sandala-0.1.0/sandala/core/assets/image_processor.py +150 -0
  150. sandala-0.1.0/sandala/core/assets/key_builder.py +28 -0
  151. sandala-0.1.0/sandala/core/assets/url_builder.py +7 -0
  152. sandala-0.1.0/sandala/core/errors.py +294 -0
  153. sandala-0.1.0/sandala/core/query/__init__.py +35 -0
  154. sandala-0.1.0/sandala/core/query/acl_filter.py +52 -0
  155. sandala-0.1.0/sandala/core/query/filter_compiler.py +199 -0
  156. sandala-0.1.0/sandala/core/query/lookup_pipeline_builder.py +280 -0
  157. sandala-0.1.0/sandala/core/query/lookup_planner.py +162 -0
  158. sandala-0.1.0/sandala/core/query/path_utils.py +24 -0
  159. sandala-0.1.0/sandala/core/query/pipeline_builder.py +65 -0
  160. sandala-0.1.0/sandala/core/query/projection_normalizer.py +72 -0
  161. sandala-0.1.0/sandala/core/query/reference_resolution_conflicts.py +63 -0
  162. sandala-0.1.0/sandala/core/query/schema_resolver.py +268 -0
  163. sandala-0.1.0/sandala/core/query/schema_utils.py +33 -0
  164. sandala-0.1.0/sandala/core/query/semantic_registry.py +220 -0
  165. sandala-0.1.0/sandala/core/query/system_fields.py +129 -0
  166. sandala-0.1.0/sandala/core/query/visibility_exclusions.py +75 -0
  167. sandala-0.1.0/sandala/core/query_builder.py +367 -0
  168. sandala-0.1.0/sandala/core/security.py +45 -0
  169. sandala-0.1.0/sandala/core/services/__init__.py +0 -0
  170. sandala-0.1.0/sandala/core/services/asset_service.py +320 -0
  171. sandala-0.1.0/sandala/core/services/auth_service.py +328 -0
  172. sandala-0.1.0/sandala/core/services/entity_service.py +267 -0
  173. sandala-0.1.0/sandala/core/services/module_service.py +219 -0
  174. sandala-0.1.0/sandala/core/services/node_hooks.py +152 -0
  175. sandala-0.1.0/sandala/core/services/node_service.py +1462 -0
  176. sandala-0.1.0/sandala/core/time_utils.py +26 -0
  177. sandala-0.1.0/sandala/core/users/__init__.py +7 -0
  178. sandala-0.1.0/sandala/core/users/bootstrap.py +307 -0
  179. sandala-0.1.0/sandala/core/users/hooks.py +622 -0
  180. sandala-0.1.0/sandala/core/users/schemas.py +240 -0
  181. sandala-0.1.0/sandala/core/validation/__init__.py +0 -0
  182. sandala-0.1.0/sandala/core/validation/error_normalizer.py +92 -0
  183. sandala-0.1.0/sandala/core/validation/schema_validator.py +874 -0
  184. sandala-0.1.0/sandala/storage/__init__.py +0 -0
  185. sandala-0.1.0/sandala/storage/blob/__init__.py +1 -0
  186. sandala-0.1.0/sandala/storage/blob/local_fs.py +35 -0
  187. sandala-0.1.0/sandala/storage/blob/s3.py +45 -0
  188. sandala-0.1.0/sandala/storage/errors.py +6 -0
  189. sandala-0.1.0/sandala/storage/mongo/__init__.py +0 -0
  190. sandala-0.1.0/sandala/storage/mongo/asset_repository.py +23 -0
  191. sandala-0.1.0/sandala/storage/mongo/auth_session_repository.py +63 -0
  192. sandala-0.1.0/sandala/storage/mongo/client.py +11 -0
  193. sandala-0.1.0/sandala/storage/mongo/entity_repository.py +56 -0
  194. sandala-0.1.0/sandala/storage/mongo/identity_repository.py +57 -0
  195. sandala-0.1.0/sandala/storage/mongo/module_repository.py +30 -0
  196. sandala-0.1.0/sandala/storage/mongo/node_repository.py +170 -0
  197. sandala-0.1.0/sandala/storage/mongo/pat_repository.py +36 -0
  198. sandala-0.1.0/sandala.egg-info/PKG-INFO +68 -0
  199. sandala-0.1.0/sandala.egg-info/SOURCES.txt +220 -0
  200. sandala-0.1.0/sandala.egg-info/dependency_links.txt +1 -0
  201. sandala-0.1.0/sandala.egg-info/requires.txt +15 -0
  202. sandala-0.1.0/sandala.egg-info/top_level.txt +1 -0
  203. sandala-0.1.0/scripts/build_distribution.py +39 -0
  204. sandala-0.1.0/scripts/verify_distribution.py +68 -0
  205. sandala-0.1.0/setup.cfg +4 -0
  206. sandala-0.1.0/tests/test_app_hook_modules.py +140 -0
  207. sandala-0.1.0/tests/test_asset_api.py +194 -0
  208. sandala-0.1.0/tests/test_asset_service.py +712 -0
  209. sandala-0.1.0/tests/test_auth_api.py +296 -0
  210. sandala-0.1.0/tests/test_auth_service.py +621 -0
  211. sandala-0.1.0/tests/test_config.py +57 -0
  212. sandala-0.1.0/tests/test_distribution_scripts.py +78 -0
  213. sandala-0.1.0/tests/test_entity_api.py +198 -0
  214. sandala-0.1.0/tests/test_entity_service.py +1463 -0
  215. sandala-0.1.0/tests/test_module_api.py +149 -0
  216. sandala-0.1.0/tests/test_module_service.py +334 -0
  217. sandala-0.1.0/tests/test_node_api.py +391 -0
  218. sandala-0.1.0/tests/test_node_hooks.py +93 -0
  219. sandala-0.1.0/tests/test_node_repository.py +137 -0
  220. sandala-0.1.0/tests/test_node_service.py +3393 -0
  221. sandala-0.1.0/tests/test_query_builder.py +1962 -0
  222. sandala-0.1.0/tests/test_users_module.py +1508 -0
sandala-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Sandala contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,9 @@
1
+ recursive-include sandala/admin_ui_dist *
2
+ graft admin-ui
3
+ prune admin-ui/node_modules
4
+ prune admin-ui/dist
5
+ prune admin-ui/playwright-report
6
+ prune admin-ui/test-results
7
+ global-exclude .DS_Store
8
+ include scripts/build_distribution.py
9
+ include scripts/verify_distribution.py
sandala-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,68 @@
1
+ Metadata-Version: 2.4
2
+ Name: sandala
3
+ Version: 0.1.0
4
+ Summary: Headless CMS for structured data, built on MongoDB with an admin UI
5
+ License-Expression: MIT
6
+ Project-URL: Documentation, https://sandala-project.github.io/sandala/
7
+ Project-URL: Source, https://github.com/sandala-project/sandala
8
+ Project-URL: Issues, https://github.com/sandala-project/sandala/issues
9
+ Requires-Python: >=3.11
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+ Requires-Dist: Flask>=3.0.0
13
+ Requires-Dist: pymongo>=4.6.0
14
+ Requires-Dist: jsonschema>=4.22.0
15
+ Requires-Dist: rfc3339-validator>=0.1.4
16
+ Requires-Dist: argon2-cffi>=23.1.0
17
+ Requires-Dist: Pillow>=10.0.0
18
+ Provides-Extra: dev
19
+ Requires-Dist: build; extra == "dev"
20
+ Requires-Dist: twine; extra == "dev"
21
+ Requires-Dist: pytest; extra == "dev"
22
+ Requires-Dist: testcontainers[mongodb]; extra == "dev"
23
+ Provides-Extra: s3
24
+ Requires-Dist: boto3>=1.34.0; extra == "s3"
25
+ Dynamic: license-file
26
+
27
+ # Sandala
28
+
29
+ **Define your data. Get an API and an admin UI. Keep the power of MongoDB.**
30
+
31
+ Sandala is an open-source headless CMS for structured data, built on MongoDB.
32
+ Define your data models and get a REST API and a ready-to-use admin UI — with
33
+ validation, relationships, permissions, authentication, and file storage built in.
34
+
35
+ Your data doesn't have to fit into flat tables. Use MongoDB's document model to
36
+ embed objects and arrays, connect documents with references, and combine both
37
+ approaches in the same model — with schemas that keep your data structured.
38
+
39
+ ## Why Sandala?
40
+
41
+ - **Model your domain, not just tables.** Nested structures, typed references,
42
+ and optional trees let you organize data the way your application needs.
43
+ - **Query through relationships.** Filter and sort by linked data, choose the
44
+ fields you need, and fetch related documents in one API request.
45
+ - **Skip building the back office.** Manage schemas, browse data, and edit
46
+ content in an admin UI that follows your data model.
47
+ - **Build on the essentials.** Node permissions, field-level access controls,
48
+ users, groups, and local or S3-compatible file storage are already there.
49
+ - **Make it yours.** Run Sandala as a standalone backend, extend it with Python
50
+ hooks, or embed it in your own Python application.
51
+
52
+ [![Designing a Book data model in the Sandala admin UI](https://sandala-project.github.io/sandala/assets/admin-ui/schema-editor-wide.png)](https://sandala-project.github.io/sandala/guides/using-the-admin-ui/)
53
+
54
+ ## Get started
55
+
56
+ - [Install Sandala](https://sandala-project.github.io/sandala/getting-started/installation/) — run with Docker or
57
+ install the Python package. The admin UI is included.
58
+ - [Follow the quickstart](https://sandala-project.github.io/sandala/getting-started/quickstart/) — define your first
59
+ data model, create records, and query them through the API.
60
+ - [Explore the demo library](https://sandala-project.github.io/sandala/guides/demo-library/) — try a sample catalogue
61
+ with books, authors, linked data, and a browsable tree.
62
+
63
+ The [full documentation](https://sandala-project.github.io/sandala/) covers data modelling, API usage,
64
+ deployment, Python integration, and Sandala's internals.
65
+
66
+ ## License
67
+
68
+ Sandala is licensed under the [MIT License](https://github.com/sandala-project/sandala/blob/main/LICENSE).
@@ -0,0 +1,42 @@
1
+ # Sandala
2
+
3
+ **Define your data. Get an API and an admin UI. Keep the power of MongoDB.**
4
+
5
+ Sandala is an open-source headless CMS for structured data, built on MongoDB.
6
+ Define your data models and get a REST API and a ready-to-use admin UI — with
7
+ validation, relationships, permissions, authentication, and file storage built in.
8
+
9
+ Your data doesn't have to fit into flat tables. Use MongoDB's document model to
10
+ embed objects and arrays, connect documents with references, and combine both
11
+ approaches in the same model — with schemas that keep your data structured.
12
+
13
+ ## Why Sandala?
14
+
15
+ - **Model your domain, not just tables.** Nested structures, typed references,
16
+ and optional trees let you organize data the way your application needs.
17
+ - **Query through relationships.** Filter and sort by linked data, choose the
18
+ fields you need, and fetch related documents in one API request.
19
+ - **Skip building the back office.** Manage schemas, browse data, and edit
20
+ content in an admin UI that follows your data model.
21
+ - **Build on the essentials.** Node permissions, field-level access controls,
22
+ users, groups, and local or S3-compatible file storage are already there.
23
+ - **Make it yours.** Run Sandala as a standalone backend, extend it with Python
24
+ hooks, or embed it in your own Python application.
25
+
26
+ [![Designing a Book data model in the Sandala admin UI](https://sandala-project.github.io/sandala/assets/admin-ui/schema-editor-wide.png)](https://sandala-project.github.io/sandala/guides/using-the-admin-ui/)
27
+
28
+ ## Get started
29
+
30
+ - [Install Sandala](https://sandala-project.github.io/sandala/getting-started/installation/) — run with Docker or
31
+ install the Python package. The admin UI is included.
32
+ - [Follow the quickstart](https://sandala-project.github.io/sandala/getting-started/quickstart/) — define your first
33
+ data model, create records, and query them through the API.
34
+ - [Explore the demo library](https://sandala-project.github.io/sandala/guides/demo-library/) — try a sample catalogue
35
+ with books, authors, linked data, and a browsable tree.
36
+
37
+ The [full documentation](https://sandala-project.github.io/sandala/) covers data modelling, API usage,
38
+ deployment, Python integration, and Sandala's internals.
39
+
40
+ ## License
41
+
42
+ Sandala is licensed under the [MIT License](https://github.com/sandala-project/sandala/blob/main/LICENSE).
@@ -0,0 +1,140 @@
1
+ <!doctype html>
2
+ <html lang="en-US">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Sandala Admin UI</title>
7
+ <script>
8
+ (() => {
9
+ const routePrefix = __SANDALA_APP_ROUTE_MARKER__;
10
+ const pathname = window.location.pathname;
11
+ const routeIndex = pathname.indexOf(routePrefix);
12
+ const mountPath = routeIndex >= 0
13
+ ? pathname.slice(0, routeIndex + 1)
14
+ : pathname.endsWith("/")
15
+ ? pathname
16
+ : `${pathname}/`;
17
+ const base = document.createElement("base");
18
+ base.href = new URL(mountPath, window.location.origin).toString();
19
+ document.head.prepend(base);
20
+ window.__SANDALA_RUNTIME_CONFIG__ = { basePath: mountPath };
21
+ })();
22
+ </script>
23
+ <!-- SANDALA_PRODUCTION_BOOTSTRAP_START -->
24
+ <script id="sandala-production-bootstrap">
25
+ (() => {
26
+ const entryKey = "src/main.tsx";
27
+ const mountPath = window.__SANDALA_RUNTIME_CONFIG__?.basePath ?? "/";
28
+ const mountUrl = new URL(mountPath, window.location.origin);
29
+
30
+ function loadClassicScript(url) {
31
+ return new Promise((resolve, reject) => {
32
+ const script = document.createElement("script");
33
+ script.src = url;
34
+ script.onload = resolve;
35
+ script.onerror = reject;
36
+ document.head.appendChild(script);
37
+ });
38
+ }
39
+
40
+ function appendStylesheets(manifest) {
41
+ const stylesheets = new Set();
42
+ const visited = new Set();
43
+
44
+ function visit(key) {
45
+ if (visited.has(key)) {
46
+ return;
47
+ }
48
+ visited.add(key);
49
+ const chunk = manifest[key];
50
+ if (chunk === undefined) {
51
+ return;
52
+ }
53
+
54
+ for (const stylesheet of chunk.css ?? []) {
55
+ stylesheets.add(stylesheet);
56
+ }
57
+ for (const importedKey of chunk.imports ?? []) {
58
+ visit(importedKey);
59
+ }
60
+ }
61
+
62
+ visit(entryKey);
63
+ for (const stylesheet of stylesheets) {
64
+ const link = document.createElement("link");
65
+ link.rel = "stylesheet";
66
+ link.href = new URL(stylesheet, mountUrl).toString();
67
+ document.head.appendChild(link);
68
+ }
69
+ }
70
+
71
+ function appendModulePreloads(manifest) {
72
+ const preloads = new Set();
73
+ const visited = new Set();
74
+
75
+ function visit(key) {
76
+ if (visited.has(key)) {
77
+ return;
78
+ }
79
+ visited.add(key);
80
+ const chunk = manifest[key];
81
+ if (chunk === undefined) {
82
+ return;
83
+ }
84
+
85
+ if (key !== entryKey && typeof chunk.file === "string") {
86
+ preloads.add(chunk.file);
87
+ }
88
+ for (const importedKey of chunk.imports ?? []) {
89
+ visit(importedKey);
90
+ }
91
+ }
92
+
93
+ visit(entryKey);
94
+ for (const preload of preloads) {
95
+ const link = document.createElement("link");
96
+ link.rel = "modulepreload";
97
+ link.href = new URL(preload, mountUrl).toString();
98
+ document.head.appendChild(link);
99
+ }
100
+ }
101
+
102
+ async function bootstrap() {
103
+ await loadClassicScript(new URL("config.js", mountUrl).toString());
104
+ const response = await fetch(new URL("static/manifest.json", mountUrl), { cache: "no-cache" });
105
+ if (!response.ok) {
106
+ throw new Error(`Unable to load frontend manifest: ${response.status}`);
107
+ }
108
+
109
+ const manifest = await response.json();
110
+ const entry = manifest[entryKey];
111
+ if (entry === undefined || typeof entry.file !== "string") {
112
+ throw new Error("Frontend manifest does not contain the application entry");
113
+ }
114
+
115
+ appendStylesheets(manifest);
116
+ appendModulePreloads(manifest);
117
+
118
+ const script = document.createElement("script");
119
+ script.type = "module";
120
+ script.src = new URL(entry.file, mountUrl).toString();
121
+ document.head.appendChild(script);
122
+ }
123
+
124
+ void bootstrap().catch((error) => {
125
+ console.error("Sandala Admin UI bootstrap failed", error);
126
+ });
127
+ })();
128
+ </script>
129
+ <!-- SANDALA_PRODUCTION_BOOTSTRAP_END -->
130
+ <!-- SANDALA_DEV_BOOTSTRAP_START -->
131
+ <script vite-ignore src="./config.js"></script>
132
+ <!-- SANDALA_DEV_BOOTSTRAP_END -->
133
+ </head>
134
+ <body>
135
+ <div id="root"></div>
136
+ <!-- SANDALA_DEV_ENTRY_START -->
137
+ <script type="module" src="/src/main.tsx"></script>
138
+ <!-- SANDALA_DEV_ENTRY_END -->
139
+ </body>
140
+ </html>