spine-framework 0.1.61 → 0.2.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 (246) hide show
  1. package/.framework/cli/commands/create-app.ts +1 -1
  2. package/.framework/cli/commands/dev.ts +215 -33
  3. package/.framework/cli/index.ts +37 -63
  4. package/.framework/functions/_shared/app-manifest.ts +8 -15
  5. package/.framework/functions/_shared/db.ts +11 -15
  6. package/.framework/functions/_shared/index.ts +0 -9
  7. package/.framework/functions/_shared/principal.ts +4 -62
  8. package/.framework/functions/_shared/resolve-ids.ts +6 -6
  9. package/.framework/functions/_shared/webhook-registry.ts +1 -1
  10. package/.framework/functions/admin-funnel.ts +104 -0
  11. package/.framework/functions/admin-install-funnel.ts +225 -0
  12. package/.framework/functions/admin-signals.ts +241 -0
  13. package/.framework/migrations/001_schema.sql +406 -0
  14. package/.framework/migrations/002_rls_and_functions.sql +710 -0
  15. package/.framework/migrations/003_system_data.sql +520 -0
  16. package/.framework/migrations/004_enhancements.sql +43 -0
  17. package/.framework/public/_redirects +3 -0
  18. package/.framework/public/spine-logo.jpg +0 -0
  19. package/.framework/public/spine-logo.svg +3 -0
  20. package/{scripts → .framework/scripts}/assemble-frontend.sh +1 -1
  21. package/{scripts → .framework/scripts}/assemble-functions.sh +1 -1
  22. package/{scripts → .framework/scripts}/assemble.sh +2 -8
  23. package/{scripts → .framework/scripts}/check-core-integrity.sh +0 -0
  24. package/.framework/seeds/link_types/account_cli_instances.json +9 -0
  25. package/.framework/seeds/types/funnel_signal_use.json +98 -0
  26. package/.framework/seeds/types/spine_instance.json +109 -0
  27. package/.framework/src/App.tsx +6 -4
  28. package/.framework/src/components/ui/accordion.tsx +1 -1
  29. package/.framework/src/components/ui/alert-dialog.tsx +1 -1
  30. package/.framework/src/components/ui/aspect-ratio.tsx +1 -1
  31. package/.framework/src/components/ui/avatar.tsx +1 -1
  32. package/.framework/src/components/ui/badge.tsx +2 -2
  33. package/.framework/src/components/ui/breadcrumb.tsx +2 -2
  34. package/.framework/src/components/ui/button-group.tsx +2 -2
  35. package/.framework/src/components/ui/button.tsx +2 -2
  36. package/.framework/src/components/ui/chart.tsx +6 -1
  37. package/.framework/src/components/ui/checkbox.tsx +1 -1
  38. package/.framework/src/components/ui/collapsible.tsx +1 -1
  39. package/.framework/src/components/ui/context-menu.tsx +1 -1
  40. package/.framework/src/components/ui/dialog.tsx +1 -1
  41. package/.framework/src/components/ui/direction.tsx +17 -1
  42. package/.framework/src/components/ui/dropdown-menu.tsx +1 -1
  43. package/.framework/src/components/ui/hover-card.tsx +1 -1
  44. package/.framework/src/components/ui/item.tsx +2 -2
  45. package/.framework/src/components/ui/label.tsx +1 -1
  46. package/.framework/src/components/ui/menubar.tsx +1 -1
  47. package/.framework/src/components/ui/navigation-menu.tsx +1 -1
  48. package/.framework/src/components/ui/popover.tsx +1 -1
  49. package/.framework/src/components/ui/progress.tsx +1 -1
  50. package/.framework/src/components/ui/radio-group.tsx +1 -1
  51. package/.framework/src/components/ui/scroll-area.tsx +1 -1
  52. package/.framework/src/components/ui/select.tsx +1 -1
  53. package/.framework/src/components/ui/separator.tsx +1 -1
  54. package/.framework/src/components/ui/sheet.tsx +1 -1
  55. package/.framework/src/components/ui/sidebar.tsx +6 -6
  56. package/.framework/src/components/ui/slider.tsx +1 -1
  57. package/.framework/src/components/ui/switch.tsx +1 -1
  58. package/.framework/src/components/ui/tabs.tsx +1 -1
  59. package/.framework/src/components/ui/toggle-group.tsx +1 -1
  60. package/.framework/src/components/ui/toggle.tsx +1 -1
  61. package/.framework/src/components/ui/tooltip.tsx +1 -1
  62. package/.framework/src/pages/auth/LoginPage.tsx +10 -9
  63. package/LICENSE.md +193 -0
  64. package/README.md +254 -0
  65. package/custom/.devin/skills/install-app/SKILL.md +39 -0
  66. package/custom/.devin/workflows/app-install.yaml +83 -0
  67. package/custom/README.md +79 -0
  68. package/docs/APPS.md +232 -0
  69. package/docs/ARCHITECTURE.md +246 -0
  70. package/docs/INSTALL.md +155 -0
  71. package/docs/README.md +170 -0
  72. package/docs/design-schema-spec.md +1837 -0
  73. package/docs/dev-guides/01-create-an-app.md +183 -0
  74. package/docs/dev-guides/02-create-a-function.md +178 -0
  75. package/docs/dev-guides/03-create-a-component.md +178 -0
  76. package/docs/dev-guides/04-webhook-handlers.md +129 -0
  77. package/docs/dev-guides/05-testing.md +168 -0
  78. package/docs/dev-guides/README.md +40 -0
  79. package/docs/npm-packages-plan.md +288 -0
  80. package/docs/spine-core--api-reference.md +822 -0
  81. package/package.json +78 -144
  82. package/.framework/cli/bin.cjs +0 -14
  83. package/.framework/cli/commands/init.ts +0 -186
  84. package/.framework/cli/commands/install-app.ts +0 -565
  85. package/.framework/cli/commands/migrate.ts +0 -139
  86. package/.framework/cli/commands/status.ts +0 -197
  87. package/.framework/cli/commands/uninstall-app.ts +0 -166
  88. package/.framework/cli/welcome.cjs +0 -45
  89. package/.framework/docs/STABILITY.md +0 -52
  90. package/.framework/docs/examples/custom-app/README.md +0 -77
  91. package/.framework/docs/examples/custom-function/README.md +0 -27
  92. package/.framework/docs/examples/custom-function/handler.ts +0 -48
  93. package/.framework/docs/examples/custom-webhook/README.md +0 -68
  94. package/.framework/migrations/000_foundation.sql +0 -1266
  95. package/.framework/migrations/001_seed.sql +0 -163
  96. package/.framework/migrations/002_seed_constraints.sql +0 -19
  97. package/.framework/migrations/003_auth_user_trigger.sql +0 -67
  98. package/.framework/src/pages/auth/RegisterPage.tsx +0 -163
  99. package/STRUCTURE.md +0 -150
  100. package/bin/spine-framework.cjs +0 -62
  101. package/bin/welcome.cjs +0 -45
  102. package/bin/ws-shim.cjs +0 -8
  103. package/bin/ws-shim.ts +0 -10
  104. package/config/components.json +0 -25
  105. package/config/deno.lock +0 -108
  106. package/config/package-lock.json +0 -17183
  107. package/config/postcss.config.cjs +0 -10
  108. package/config/tailwind.config.cjs +0 -78
  109. package/config/tsconfig.build.json +0 -32
  110. package/config/tsconfig.cli.json +0 -18
  111. package/config/tsconfig.json +0 -41
  112. package/config/tsconfig.node.json +0 -17
  113. package/config/tsconfig.node.tsbuildinfo +0 -1
  114. package/config/tsconfig.tsbuildinfo +0 -1
  115. package/config/typedoc.json +0 -16
  116. package/config/vite.config.d.ts +0 -2
  117. package/config/vite.config.ts +0 -72
  118. package/dist/cli/commands/agents.d.ts +0 -39
  119. package/dist/cli/commands/agents.d.ts.map +0 -1
  120. package/dist/cli/commands/auth.d.ts +0 -36
  121. package/dist/cli/commands/auth.d.ts.map +0 -1
  122. package/dist/cli/commands/create-app.d.ts +0 -23
  123. package/dist/cli/commands/create-app.d.ts.map +0 -1
  124. package/dist/cli/commands/dev.d.ts +0 -24
  125. package/dist/cli/commands/dev.d.ts.map +0 -1
  126. package/dist/cli/commands/doctor.d.ts +0 -42
  127. package/dist/cli/commands/doctor.d.ts.map +0 -1
  128. package/dist/cli/commands/generate.d.ts +0 -36
  129. package/dist/cli/commands/generate.d.ts.map +0 -1
  130. package/dist/cli/commands/init.d.ts +0 -20
  131. package/dist/cli/commands/init.d.ts.map +0 -1
  132. package/dist/cli/commands/install-app.d.ts +0 -30
  133. package/dist/cli/commands/install-app.d.ts.map +0 -1
  134. package/dist/cli/commands/items.d.ts +0 -45
  135. package/dist/cli/commands/items.d.ts.map +0 -1
  136. package/dist/cli/commands/migrate.d.ts +0 -21
  137. package/dist/cli/commands/migrate.d.ts.map +0 -1
  138. package/dist/cli/commands/migrations.d.ts +0 -41
  139. package/dist/cli/commands/migrations.d.ts.map +0 -1
  140. package/dist/cli/commands/pipelines.d.ts +0 -40
  141. package/dist/cli/commands/pipelines.d.ts.map +0 -1
  142. package/dist/cli/commands/status.d.ts +0 -23
  143. package/dist/cli/commands/status.d.ts.map +0 -1
  144. package/dist/cli/commands/system.d.ts +0 -29
  145. package/dist/cli/commands/system.d.ts.map +0 -1
  146. package/dist/cli/commands/test.d.ts +0 -46
  147. package/dist/cli/commands/test.d.ts.map +0 -1
  148. package/dist/cli/commands/uninstall-app.d.ts +0 -23
  149. package/dist/cli/commands/uninstall-app.d.ts.map +0 -1
  150. package/dist/cli/context.d.ts +0 -88
  151. package/dist/cli/context.d.ts.map +0 -1
  152. package/dist/cli/env-loader.d.ts +0 -14
  153. package/dist/cli/env-loader.d.ts.map +0 -1
  154. package/dist/cli/index.d.ts +0 -41
  155. package/dist/cli/index.d.ts.map +0 -1
  156. package/dist/functions/_shared/agent-runner.d.ts +0 -156
  157. package/dist/functions/_shared/agent-runner.d.ts.map +0 -1
  158. package/dist/functions/_shared/app-manifest.d.ts +0 -68
  159. package/dist/functions/_shared/app-manifest.d.ts.map +0 -1
  160. package/dist/functions/_shared/audit.d.ts +0 -91
  161. package/dist/functions/_shared/audit.d.ts.map +0 -1
  162. package/dist/functions/_shared/db.d.ts +0 -125
  163. package/dist/functions/_shared/db.d.ts.map +0 -1
  164. package/dist/functions/_shared/index.d.ts +0 -299
  165. package/dist/functions/_shared/index.d.ts.map +0 -1
  166. package/dist/functions/_shared/middleware.d.ts +0 -315
  167. package/dist/functions/_shared/middleware.d.ts.map +0 -1
  168. package/dist/functions/_shared/permissions.d.ts +0 -626
  169. package/dist/functions/_shared/permissions.d.ts.map +0 -1
  170. package/dist/functions/_shared/pipeline-runner.d.ts +0 -124
  171. package/dist/functions/_shared/pipeline-runner.d.ts.map +0 -1
  172. package/dist/functions/_shared/principal.d.ts +0 -284
  173. package/dist/functions/_shared/principal.d.ts.map +0 -1
  174. package/dist/functions/_shared/resolve-ids.d.ts +0 -10
  175. package/dist/functions/_shared/resolve-ids.d.ts.map +0 -1
  176. package/dist/functions/_shared/schema-utils.d.ts +0 -181
  177. package/dist/functions/_shared/schema-utils.d.ts.map +0 -1
  178. package/dist/functions/_shared/testing.d.ts +0 -172
  179. package/dist/functions/_shared/testing.d.ts.map +0 -1
  180. package/dist/functions/_shared/trigger-engine.d.ts +0 -140
  181. package/dist/functions/_shared/trigger-engine.d.ts.map +0 -1
  182. package/dist/functions/_shared/webhook-registration.d.ts +0 -81
  183. package/dist/functions/_shared/webhook-registration.d.ts.map +0 -1
  184. package/dist/functions/_shared/webhook-registry.d.ts +0 -57
  185. package/dist/functions/_shared/webhook-registry.d.ts.map +0 -1
  186. package/dist/functions/account-nodes.d.ts +0 -48
  187. package/dist/functions/account-nodes.d.ts.map +0 -1
  188. package/dist/functions/admin-data.d.ts +0 -178
  189. package/dist/functions/admin-data.d.ts.map +0 -1
  190. package/dist/functions/ai-agents.d.ts +0 -125
  191. package/dist/functions/ai-agents.d.ts.map +0 -1
  192. package/dist/functions/api-keys.d.ts +0 -140
  193. package/dist/functions/api-keys.d.ts.map +0 -1
  194. package/dist/functions/apps.d.ts +0 -163
  195. package/dist/functions/apps.d.ts.map +0 -1
  196. package/dist/functions/auth.d.ts +0 -74
  197. package/dist/functions/auth.d.ts.map +0 -1
  198. package/dist/functions/debug-auth.d.ts +0 -33
  199. package/dist/functions/debug-auth.d.ts.map +0 -1
  200. package/dist/functions/embeddings.d.ts +0 -205
  201. package/dist/functions/embeddings.d.ts.map +0 -1
  202. package/dist/functions/integration-routes.d.ts +0 -45
  203. package/dist/functions/integration-routes.d.ts.map +0 -1
  204. package/dist/functions/integrations.d.ts +0 -124
  205. package/dist/functions/integrations.d.ts.map +0 -1
  206. package/dist/functions/item-progress.d.ts +0 -41
  207. package/dist/functions/item-progress.d.ts.map +0 -1
  208. package/dist/functions/logs.d.ts +0 -162
  209. package/dist/functions/logs.d.ts.map +0 -1
  210. package/dist/functions/observability.d.ts +0 -123
  211. package/dist/functions/observability.d.ts.map +0 -1
  212. package/dist/functions/pipeline-executions.d.ts +0 -190
  213. package/dist/functions/pipeline-executions.d.ts.map +0 -1
  214. package/dist/functions/pipelines.d.ts +0 -171
  215. package/dist/functions/pipelines.d.ts.map +0 -1
  216. package/dist/functions/prompt-configs.d.ts +0 -125
  217. package/dist/functions/prompt-configs.d.ts.map +0 -1
  218. package/dist/functions/roles.d.ts +0 -118
  219. package/dist/functions/roles.d.ts.map +0 -1
  220. package/dist/functions/system-cron.d.ts +0 -65
  221. package/dist/functions/system-cron.d.ts.map +0 -1
  222. package/dist/functions/system.d.ts +0 -29
  223. package/dist/functions/system.d.ts.map +0 -1
  224. package/dist/functions/tests.d.ts +0 -28
  225. package/dist/functions/tests.d.ts.map +0 -1
  226. package/dist/functions/timers.d.ts +0 -139
  227. package/dist/functions/timers.d.ts.map +0 -1
  228. package/dist/functions/triggers.d.ts +0 -203
  229. package/dist/functions/triggers.d.ts.map +0 -1
  230. package/dist/functions/types.d.ts +0 -151
  231. package/dist/functions/types.d.ts.map +0 -1
  232. package/dist/src/types/types.d.ts +0 -364
  233. package/dist/src/types/types.d.ts.map +0 -1
  234. package/index.html +0 -13
  235. package/netlify.toml +0 -36
  236. package/package-project.json +0 -64
  237. package/scripts/ingest-chunks.cjs +0 -202
  238. package/scripts/kb-chunk-parser.cjs +0 -312
  239. package/scripts/kb-chunk-parser.ts +0 -330
  240. package/scripts/load-test-app-install.ts +0 -484
  241. package/scripts/netlify-dev-wrapper.sh +0 -22
  242. package/vitest.config.ts +0 -45
  243. /package/{scripts → .framework/scripts}/app-install-cli.ts +0 -0
  244. /package/{scripts → .framework/scripts}/boundary-check.sh +0 -0
  245. /package/{scripts → .framework/scripts}/build-manifest.sh +0 -0
  246. /package/{scripts → .framework/scripts}/verify-integrity.sh +0 -0
@@ -1,6 +1,6 @@
1
1
  import * as React from "react"
2
2
  import { cva, type VariantProps } from "class-variance-authority"
3
- import * as TogglePrimitive from "@radix-ui/react-toggle"
3
+ import { Toggle as TogglePrimitive } from "radix-ui"
4
4
 
5
5
  import { cn } from "@/lib/utils"
6
6
 
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
 
3
3
  import * as React from "react"
4
- import * as TooltipPrimitive from "@radix-ui/react-tooltip"
4
+ import { Tooltip as TooltipPrimitive } from "radix-ui"
5
5
 
6
6
  import { cn } from "@/lib/utils"
7
7
 
@@ -38,17 +38,18 @@ export function LoginPage() {
38
38
  return
39
39
  }
40
40
 
41
- // Find app matching user's role, or fall back to first routable app
42
- const userRole = user.roles?.[0]
43
- const routableApps = apps.filter(a => a.route_prefix && a.renderer !== 'none')
44
- const matchingApp = (userRole && routableApps.find(app => app.min_role === userRole))
45
- || routableApps[0]
46
- if (matchingApp?.route_prefix) {
47
- navigate(matchingApp.route_prefix, { replace: true })
48
- return
41
+ // Find app matching user's role
42
+ const userRole = user.roles?.[0] // Single role per person
43
+ if (userRole) {
44
+ const matchingApp = apps.find(app => app.min_role === userRole)
45
+ if (matchingApp?.route_prefix) {
46
+ navigate(matchingApp.route_prefix, { replace: true })
47
+ return
48
+ }
49
49
  }
50
50
 
51
- // No routable apps installed — stay on login
51
+ // No matching app - show 404
52
+ // The 404 will be handled by the catch-all route in App.tsx
52
53
  }
53
54
  }, [user, loading, apps, navigate])
54
55
 
package/LICENSE.md ADDED
@@ -0,0 +1,193 @@
1
+ Spine Framework Internal Use License 1.0.0
2
+ Source-available. Free for internal use. Commercial rights reserved.
3
+
4
+ This license is based on the structure and intent of the PolyForm Internal Use License 1.0.0, but it has been modified for Spine Framework. This is not the unmodified PolyForm Internal Use License.
5
+
6
+ Required Notice
7
+ Required Notice: Copyright © 2026 Dahl Ventures Inc. All rights reserved.
8
+
9
+ 1. Acceptance
10
+ In order to receive any license under these terms, you must agree to these terms as both strict obligations and conditions to all licenses granted to you.
11
+
12
+ If you do not agree to these terms, you do not have permission to use, copy, modify, run, install, access, or create works based on Spine Framework.
13
+
14
+ 2. Definitions
15
+ Software means Spine Framework, including its source code, object code, packages, modules, templates, schemas, migrations, configuration files, documentation, examples, command-line tools, SDKs, application packs, and related materials provided by the licensor.
16
+
17
+ Licensor means the legal owner of Spine Framework.
18
+
19
+ You means the individual or legal entity receiving the Software.
20
+
21
+ Your Company means the legal entity on whose behalf you use the Software, including that entity's employees and authorized contractors.
22
+
23
+ Internal Business Use means use of the Software solely inside Your Company for Your Company's own internal business operations, internal workflows, internal applications, internal data, internal users, and internal customers or accounts.
24
+
25
+ Third Party means any person or legal entity other than You or Your Company.
26
+
27
+ Commercial License means a separate written agreement signed by the Licensor that grants rights beyond this license.
28
+
29
+ 3. Copyright License
30
+ The Licensor grants You a copyright license to do everything with the Software that would otherwise infringe the Licensor's copyright, but only for Internal Business Use and only as permitted by these terms.
31
+
32
+ You may install, run, access, evaluate, test, configure, and use the Software for Internal Business Use.
33
+
34
+ You may copy the Software only as reasonably necessary for Internal Business Use, including backup, deployment, development, testing, staging, disaster recovery, and internal security review.
35
+
36
+ You may not distribute the Software except as expressly allowed in these terms.
37
+
38
+ 4. Changes and New Works
39
+ The Licensor grants You a copyright license to modify the Software and create new works based on the Software, but only for Internal Business Use.
40
+
41
+ You may create internal applications, extensions, workflows, integrations, automations, schemas, roles, agents, triggers, pipelines, dashboards, reports, and other internal business systems using the Software.
42
+
43
+ You may not distribute, sell, sublicense, transfer, lease, rent, host for others, white-label, resell, or commercially exploit any modified version, derivative work, extension, application pack, template, or implementation of the Software except under a Commercial License.
44
+
45
+ 5. Internal Contractors
46
+ Your Company may allow employees and contractors to access and use the Software solely on behalf of Your Company and solely for Your Company's Internal Business Use.
47
+
48
+ Contractors do not receive any independent right to use the Software for themselves, their other clients, their own products, or any Third Party.
49
+
50
+ Your Company is responsible for all use of the Software by its employees, contractors, agents, and representatives.
51
+
52
+ 6. Your Data and Application-Specific Work
53
+ As between You and the Licensor, You own Your Company's data, records, content, prompts, business logic, customer records, internal workflows, and application-specific code that You independently create using the Software.
54
+
55
+ These terms do not give the Licensor ownership of Your Company's data or independently created application-specific business content.
56
+
57
+ However, ownership of Your Company's data or application-specific work does not give You the right to distribute, resell, white-label, host, or commercially exploit the Software or any portion of the Software except as allowed by these terms or a Commercial License.
58
+
59
+ 7. Prohibited Uses
60
+ You may not do any of the following without a Commercial License:
61
+
62
+ Sell, resell, sublicense, rent, lease, lend, transfer, assign, publish, or distribute the Software.
63
+ Offer the Software, or any modified version of the Software, to Third Parties as software, infrastructure, a framework, a platform, a service, or a hosted product.
64
+ Offer the Software as SaaS, PaaS, IaaS, framework-as-a-service, backend-as-a-service, workflow-as-a-service, automation-as-a-service, AI-agent platform, managed service, support service, or similar commercial service.
65
+ White-label, private-label, rebrand, or remove Spine Framework identity from the Software in order to provide it to Third Parties.
66
+ Embed, bundle, package, or include the Software in any product, service, appliance, marketplace offering, application pack, starter kit, template library, SDK, CLI, distribution, or managed implementation made available to Third Parties.
67
+ Use the Software to operate, power, support, or provide a product or service for Third Parties where those Third Parties receive access to the Software or to functionality substantially provided by the Software.
68
+ Use the Software to build, operate, or improve a competing framework, platform, marketplace, application generator, agentic software infrastructure product, or commercial development infrastructure product.
69
+ Provide implementation, consulting, hosting, support, customization, training, migration, or managed services for the Software to Third Parties as a paid or commercial offering, except as expressly authorized by the Licensor.
70
+ Remove, alter, obscure, or bypass copyright notices, license notices, attribution, trademarks, branding, license keys, license checks, usage limits, or technical protection measures included in the Software.
71
+ Use the Software in violation of law, regulation, third-party rights, or these terms.
72
+ 8. Examples of Permitted Use
73
+ The following are permitted under this license, provided they are solely for Internal Business Use:
74
+
75
+ A company installs Spine Framework to build its own internal CRM.
76
+ A company uses Spine Framework to operate an internal customer support portal for its own support team and its own customers.
77
+ A company modifies Spine Framework for its internal workflows, roles, permissions, automations, pipelines, and integrations.
78
+ A company lets its employees and authorized contractors configure, maintain, and support its internal Spine Framework installation.
79
+ A company creates internal dashboards, agents, knowledge bases, audit trails, and operational tools on top of Spine Framework.
80
+ 9. Examples Requiring a Commercial License
81
+ The following are not permitted under this license and require a Commercial License:
82
+
83
+ Selling Spine Framework or a modified version of Spine Framework.
84
+ Offering Spine Framework as a hosted SaaS product.
85
+ Offering a white-labeled application built on Spine Framework to customers.
86
+ Packaging Spine Framework into a commercial starter kit, template, marketplace app, agency offering, or developer platform.
87
+ Running Spine Framework for multiple clients as a managed service provider, agency, consultant, systems integrator, or outsourcing firm.
88
+ Embedding Spine Framework into a product sold to customers.
89
+ Forking Spine Framework to launch a competing framework, backend, app platform, AI-agent platform, or development infrastructure product.
90
+ Publishing modified Spine Framework source code to a public repository.
91
+ Giving a customer, client, partner, reseller, or affiliate a copy of Spine Framework.
92
+ 10. Distribution
93
+ You may not distribute the Software, modified versions of the Software, or works based on the Software to any Third Party except as expressly permitted by these terms or a Commercial License.
94
+
95
+ You may share copies of the Software with employees and contractors of Your Company only as necessary for Internal Business Use and only if they are bound by obligations consistent with these terms.
96
+
97
+ Any copy of the Software must include this license and all Required Notices.
98
+
99
+ 11. Trademarks
100
+ This license does not grant You any right to use the Licensor's names, trademarks, service marks, logos, product names, domain names, or branding except as necessary to identify the Software for Internal Business Use.
101
+
102
+ You may not use Spine Framework branding in a way that suggests sponsorship, endorsement, partnership, certification, resale authorization, or commercial authorization without written permission from the Licensor.
103
+
104
+ 12. Patent License
105
+ The Licensor grants You a patent license for the Software that covers patent claims the Licensor can license, or later becomes able to license, that You would infringe by using the Software as permitted by these terms.
106
+
107
+ 13. Patent Defense
108
+ If You make any written claim that the Software infringes or contributes to infringement of any patent, Your patent license for the Software ends immediately.
109
+
110
+ If Your Company makes such a claim, Your Company's patent license ends immediately.
111
+
112
+ 14. Fair Use and Other Legal Rights
113
+ You may have fair use, fair dealing, or other rights under applicable law. These terms do not limit rights that the law does not allow these terms to limit.
114
+
115
+ 15. No Other Rights
116
+ These terms do not allow You to sublicense, transfer, assign, or delegate any license granted under these terms except as expressly allowed here.
117
+
118
+ These terms do not prevent the Licensor from granting licenses to anyone else.
119
+
120
+ These terms do not imply any license other than the licenses expressly granted here.
121
+
122
+ All rights not expressly granted are reserved by the Licensor.
123
+
124
+ 16. Violations and Cure
125
+ The first time You are notified in writing that You have violated these terms, or done anything with the Software not covered by these terms, Your licenses can continue if You:
126
+
127
+ come into full compliance with these terms;
128
+ take practical steps to correct past violations; and
129
+ complete both within 32 days of receiving written notice.
130
+ If You do not satisfy those requirements, all licenses granted to You under these terms end immediately.
131
+
132
+ For any later violation, all licenses granted to You under these terms end immediately without any cure period.
133
+
134
+ 17. Termination
135
+ When Your licenses end, You must stop all use of the Software and destroy all copies of the Software in Your possession or control, except copies you are legally required to retain for archival, compliance, or legal purposes.
136
+
137
+ Sections concerning ownership, prohibited uses, trademarks, patent defense, no other rights, violations, termination, no warranty, limitation of liability, and general terms survive termination.
138
+
139
+ 18. No Warranty
140
+ As far as the law allows, the Software is provided as is and as available, without any warranty or condition, express or implied.
141
+
142
+ The Licensor disclaims all warranties and conditions, including warranties of merchantability, fitness for a particular purpose, title, non-infringement, availability, accuracy, security, and quiet enjoyment.
143
+
144
+ 19. Limitation of Liability
145
+ As far as the law allows, the Licensor will not be liable to You for any indirect, incidental, special, consequential, exemplary, punitive, or other damages arising out of these terms or the Software.
146
+
147
+ As far as the law allows, the Licensor will not be liable for lost profits, lost revenue, lost savings, lost data, business interruption, security incidents, procurement of substitute services, or loss of goodwill.
148
+
149
+ The Licensor's total liability arising out of these terms or the Software will not exceed the amount You paid the Licensor for the Software during the 12 months before the event giving rise to liability, or USD $100 if You paid nothing.
150
+
151
+ 20. Commercial Licensing
152
+ Rights not granted under this license may be available under a separate Commercial License from the Licensor.
153
+
154
+ A Commercial License is required for resale, redistribution, SaaS, managed services, white-label use, OEM use, marketplace distribution, partner use, commercial hosting, commercial support offerings, or any use outside Internal Business Use.
155
+
156
+ To request commercial rights, contact:
157
+
158
+ spine-framework.com
159
+ webmaster@spine-framework.com
160
+ 21. License Updates
161
+ The Licensor may publish updated versions of this license from time to time.
162
+
163
+ Each release, package, download, or copy of the Software is governed by the license terms included with that release, package, download, or copy, unless You and the Licensor have signed a separate written agreement.
164
+
165
+ Updated license terms apply only to future releases, downloads, packages, updates, upgrades, patches, hosted access, or other versions of the Software made available after the updated terms are published.
166
+
167
+ The Licensor may require acceptance of updated license terms as a condition of receiving or using future releases, updates, hosted services, commercial features, support, documentation, marketplace access, license keys, portals, application packs, or other Spine Framework services.
168
+
169
+ Nothing in this section gives You rights to continue using future versions of the Software under earlier license terms.
170
+
171
+ 22. General Terms
172
+ If any part of these terms is held unenforceable, the rest remains in effect as far as the law allows.
173
+
174
+ Failure by the Licensor to enforce any term is not a waiver.
175
+
176
+ Any waiver must be in writing and signed by the Licensor.
177
+
178
+ These terms are the entire license terms for the Software unless You and the Licensor have signed a separate written agreement.
179
+
180
+ 23. Plain-English Summary
181
+ This summary is not part of the legal license.
182
+
183
+ You may use Spine Framework inside your own company for your own internal business operations.
184
+
185
+ You may modify Spine Framework for your own internal use.
186
+
187
+ You may let your employees and contractors work on your internal Spine Framework installation.
188
+
189
+ You may not sell it, redistribute it, white-label it, host it for others, offer it as SaaS, package it into another product, use it as a managed service offering, or use it to build a competing framework without a separate commercial license.
190
+
191
+ Future versions, updates, services, support, portals, packs, license keys, and commercial features may require acceptance of updated terms.
192
+
193
+ Spine Framework is source-available. It is not open source.
package/README.md ADDED
@@ -0,0 +1,254 @@
1
+ Spine Framework
2
+ A complete enterprise application framework built on Supabase + Netlify + React for building scalable multi-tenant applications with extensible app ecosystems.
3
+
4
+ Overview
5
+ Spine Framework is a complete, runnable framework that provides everything you need to build enterprise applications:
6
+
7
+ Multi-tenant Architecture: Support for tenant hierarchies and isolated deployments
8
+ Role-Based Access Control: Fine-grained permissions and authorization
9
+ App Ecosystem: Install and manage custom applications
10
+ Real-time Features: Built-in support for real-time collaboration and notifications
11
+ AI Integration: Native support for AI agents and intelligent workflows
12
+ Developer Tools: Comprehensive tooling for development, testing, and deployment
13
+ Quick Start
14
+ Prerequisites
15
+ Node.js 18+
16
+ PostgreSQL database (via Supabase recommended)
17
+ Netlify account (for deployment)
18
+ Installation
19
+ # Clone the framework
20
+ git clone https://github.com/spine-framework/spine-framework.git
21
+ cd spine-framework
22
+
23
+ # Install dependencies
24
+ npm install
25
+
26
+ # Set up environment
27
+ cp .env.example .env
28
+ # Edit .env with your Supabase and Netlify credentials
29
+
30
+ # Start development
31
+ npm run dev
32
+ Install Custom Apps
33
+ # Install Cortex (CRM, Support, Community, Knowledge Base)
34
+ npm run app-install cortex
35
+
36
+ # Install Customer Portal
37
+ npm run app-install customer-portal
38
+
39
+ # List available apps
40
+ npm run spine-framework list-apps
41
+ Architecture
42
+ Core Components
43
+ Framework Core: Base functionality, authentication, and data models
44
+ App Registry: System for managing and distributing applications
45
+ Multi-tenant Engine: Tenant isolation and hierarchy management
46
+ Authorization Layer: Role-based permissions and access control
47
+ Real-time Infrastructure: WebSocket support and live updates
48
+ AI Agent System: Integration with AI services and workflows
49
+ App Ecosystem
50
+ Spine Framework supports a growing ecosystem of applications:
51
+
52
+ Cortex: CRM, Support, Community, and Knowledge Base
53
+ Customer Portal: Self-service customer portal
54
+ Custom Apps: Build your own applications using the framework
55
+ Database Schema
56
+ The framework uses a clean, normalized schema with:
57
+
58
+ Accounts & Tenants: Multi-tenant hierarchy support
59
+ People & Roles: User management and permissions
60
+ Items & Threads: Flexible data modeling system
61
+ Apps & Integrations: Extensible app registry
62
+ AI Agents: Intelligent workflow automation
63
+ Development
64
+ Project Structure
65
+ my-spine-project/
66
+ ├── src/
67
+ │ ├── components/ # Reusable UI components
68
+ │ ├── pages/ # Application pages
69
+ │ ├── hooks/ # Custom React hooks
70
+ │ ├── contexts/ # React contexts
71
+ │ └── utils/ # Utility functions
72
+ ├── functions/ # Serverless functions
73
+ ├── migrations/ # Database migrations
74
+ ├── custom/ # Custom app extensions
75
+ └── docs/ # Documentation
76
+ Building Apps
77
+ Create custom applications using the Spine Framework:
78
+
79
+ // src/apps/my-app/index.tsx
80
+ import { AppLayout, useCurrentApp } from '@spine-framework/core'
81
+
82
+ export default function MyApp() {
83
+ const app = useCurrentApp()
84
+
85
+ return (
86
+ <AppLayout>
87
+ <h1>{app.name}</h1>
88
+ {/* Your app content */}
89
+ </AppLayout>
90
+ )
91
+ }
92
+ Database Extensions
93
+ Add custom database schema:
94
+
95
+ -- migrations/001_my_app.sql
96
+ CREATE TABLE my_app_data (
97
+ id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
98
+ account_id UUID REFERENCES accounts(id),
99
+ title TEXT NOT NULL,
100
+ created_at TIMESTAMPTZ DEFAULT now()
101
+ );
102
+
103
+ -- Enable RLS
104
+ ALTER TABLE my_app_data ENABLE ROW LEVEL SECURITY;
105
+ Configuration
106
+ Environment Variables
107
+ # Database
108
+ DATABASE_URL=postgresql://...
109
+
110
+ # Supabase
111
+ SUPABASE_URL=your-project.supabase.co
112
+ SUPABASE_ANON_KEY=your-anon-key
113
+ SUPABASE_SERVICE_ROLE_KEY=your-service-key
114
+
115
+ # Framework
116
+ SPINE_ENV=development
117
+ SPINE_LOG_LEVEL=info
118
+ Framework Configuration
119
+ // spine.config.ts
120
+ export default {
121
+ database: {
122
+ url: process.env.DATABASE_URL,
123
+ poolSize: 10,
124
+ },
125
+ auth: {
126
+ providers: ['email', 'github', 'google'],
127
+ sessionTimeout: '24h',
128
+ },
129
+ apps: {
130
+ registry: 'https://registry.spine-framework.com',
131
+ autoUpdate: true,
132
+ },
133
+ ai: {
134
+ provider: 'openai',
135
+ model: 'gpt-4',
136
+ }
137
+ }
138
+ Deployment
139
+ Development
140
+ # Start development server
141
+ npm run dev
142
+
143
+ # Run tests
144
+ npm test
145
+
146
+ # Type checking
147
+ npm run type-check
148
+ Production
149
+ # Build for production
150
+ npm run build
151
+
152
+ # Deploy to Netlify
153
+ netlify deploy --prod
154
+
155
+ # Or deploy to your preferred platform
156
+ Database Migrations
157
+ # Run migrations
158
+ npx spine migrate up
159
+
160
+ # Create new migration
161
+ npx spine migrate create add_new_feature
162
+
163
+ # Rollback migration
164
+ npx spine migrate down
165
+ Available Apps
166
+ Official Apps
167
+ spine-framework-cortex
168
+
169
+ CRM, Support, Community, Knowledge Base
170
+ npm install spine-framework-cortex
171
+ spine-framework-portal
172
+
173
+ Customer self-service portal
174
+ npm install spine-framework-portal
175
+ Installing Apps
176
+ # Install an app
177
+ npx spine install-app cortex
178
+
179
+ # List available apps
180
+ npx spine list-apps
181
+
182
+ # Update an app
183
+ npx spine update-app cortex
184
+ API Reference
185
+ Core Hooks
186
+ // Authentication
187
+ import { useAuth, useUser } from '@spine-framework/core'
188
+
189
+ // App Management
190
+ import { useApps, useCurrentApp } from '@spine-framework/core'
191
+
192
+ // Data Management
193
+ import { useItems, useThreads } from '@spine-framework/core'
194
+
195
+ // Real-time
196
+ import { useWebSocket } from '@spine-framework/core'
197
+ Database Functions
198
+ -- Get account apps
199
+ SELECT * FROM get_account_apps(account_id, true, false);
200
+
201
+ -- Get accessible accounts
202
+ SELECT * FROM get_accessible_accounts(user_id);
203
+
204
+ -- Check permissions
205
+ SELECT * FROM has_permission(user_id, 'action', 'resource');
206
+ Contributing
207
+ Development Setup
208
+ # Clone the repository
209
+ git clone https://github.com/spine-framework/spine-framework.git
210
+ cd spine-framework
211
+
212
+ # Install dependencies
213
+ npm install
214
+
215
+ # Start development
216
+ npm run dev
217
+ Submitting Changes
218
+ Fork the repository
219
+ Create a feature branch
220
+ Make your changes
221
+ Add tests
222
+ Submit a pull request
223
+ Building Apps for Distribution
224
+ If you want to contribute an app to the ecosystem:
225
+
226
+ Create your app using the framework
227
+ Follow the app structure guidelines
228
+ Include comprehensive documentation
229
+ Submit for review
230
+ License
231
+ This framework is licensed under the Spine Framework Internal Use License.
232
+
233
+ ✅ Free for internal business use
234
+ ❌ Commercial redistribution requires separate license
235
+ 📞 Contact: spine-framework.com for commercial licensing
236
+ Support
237
+ Documentation: docs.spine-framework.com
238
+ Issues: GitHub Issues
239
+ Community: Discord Server
240
+ Commercial: Contact Us
241
+ Version History
242
+ v1.0.0
243
+ Initial release
244
+ Multi-tenant architecture
245
+ App registry system
246
+ Role-based access control
247
+ Real-time features
248
+ AI integration
249
+ Roadmap
250
+ v1.1: Enhanced AI capabilities
251
+ v1.2: Advanced analytics and reporting
252
+ v1.3: Mobile app support
253
+ v2.0: Microservices architecture
254
+ Spine Framework - Build enterprise applications with confidence.
@@ -0,0 +1,39 @@
1
+ # Install App
2
+
3
+ Installs a Spine Framework app into the custom workspace.
4
+
5
+ ## When to Use
6
+
7
+ Use this skill when you need to:
8
+ - Install an app package (portal, cortex, or third-party) into custom/apps/
9
+ - Configure seed data for the app
10
+ - Set up migrations required by the app
11
+
12
+ ## Installation Process
13
+
14
+ 1. **Copy app files** from the package to `custom/apps/<app-slug>/`
15
+ 2. **Copy seed data** to `custom/apps/<app-slug>/seed/`
16
+ 3. **Copy migrations** (if any) to `custom/migrations/`
17
+ 4. **Update workspace configuration** to include the app
18
+
19
+ ## Critical Safeguards
20
+
21
+ - **NEVER** delete existing `custom/apps/`, `custom/functions/`, or `custom/migrations/` content
22
+ - **ALWAYS** preserve existing custom apps during installation
23
+ - Seed data is additive - existing types/roles are not modified
24
+
25
+ ## Usage
26
+
27
+ ```
28
+ Install the cortex app from spine-framework-cortex package
29
+ ```
30
+
31
+ The skill will:
32
+ 1. Locate the package in node_modules or local path
33
+ 2. Copy app files to custom/apps/cortex/
34
+ 3. Copy seed files (types.json, roles.json, link-types.json)
35
+ 4. Report what was installed
36
+
37
+ ## Output
38
+
39
+ Reports installed files and any conflicts that need manual resolution.
@@ -0,0 +1,83 @@
1
+ name: Install App
2
+ version: 1.0.0
3
+ description: Install a Spine Framework app into the custom workspace
4
+
5
+ triggers:
6
+ - type: user-prompt
7
+ patterns:
8
+ - "install app"
9
+ - "add app"
10
+ - "setup app"
11
+
12
+ steps:
13
+ - name: Identify app package
14
+ action: ask-user
15
+ prompt: "Which app would you like to install? (e.g., cortex, portal, or package name)"
16
+ store: app_name
17
+
18
+ - name: Check for existing installation
19
+ action: shell
20
+ command: "test -d /Users/thistle/CascadeProjects/spine-ia/custom/apps/${app_name} && echo 'exists' || echo 'new'"
21
+ store: exists_status
22
+
23
+ - name: Warn about existing installation
24
+ condition: exists_status == "exists"
25
+ action: ask-user
26
+ prompt: "App ${app_name} already exists in custom/apps/. Overwrite? (yes/no)"
27
+ store: confirm_overwrite
28
+
29
+ - name: Exit on no confirmation
30
+ condition: exists_status == "exists" && confirm_overwrite != "yes"
31
+ action: exit
32
+ message: "Installation cancelled. Existing app preserved."
33
+
34
+ - name: Locate package
35
+ action: shell
36
+ command: |
37
+ if [ -d "/Users/thistle/CascadeProjects/spine-ia/custom/apps/${app_name}" ]; then
38
+ echo "/Users/thistle/CascadeProjects/spine-ia/custom/apps/${app_name}"
39
+ elif [ -d "/Users/thistle/CascadeProjects/spine-ia/custom/npm/${app_name}" ]; then
40
+ echo "/Users/thistle/CascadeProjects/spine-ia/custom/npm/${app_name}"
41
+ else
42
+ echo "not_found"
43
+ fi
44
+ store: package_path
45
+
46
+ - name: Report package not found
47
+ condition: package_path == "not_found"
48
+ action: exit
49
+ message: "Could not find app package. Expected at custom/apps/${app_name} or custom/npm/${app_name}"
50
+
51
+ - name: Install app files
52
+ action: shell
53
+ command: |
54
+ mkdir -p "/Users/thistle/CascadeProjects/spine-ia/custom/apps/${app_name}"
55
+ cp -r "${package_path}"/*/ "/Users/thistle/CascadeProjects/spine-ia/custom/apps/${app_name}/" 2>/dev/null || true
56
+ echo "App files copied"
57
+
58
+ - name: Install seed data
59
+ action: shell
60
+ command: |
61
+ if [ -d "${package_path}/seed" ]; then
62
+ mkdir -p "/Users/thistle/CascadeProjects/spine-ia/custom/apps/${app_name}/seed"
63
+ cp "${package_path}/seed/"*.json "/Users/thistle/CascadeProjects/spine-ia/custom/apps/${app_name}/seed/" 2>/dev/null || true
64
+ echo "Seed data copied"
65
+ else
66
+ echo "No seed data found"
67
+ fi
68
+
69
+ - name: Report installation
70
+ action: message
71
+ message: |
72
+ App ${app_name} installed successfully!
73
+
74
+ Location: custom/apps/${app_name}/
75
+
76
+ Next steps:
77
+ 1. Review the installed files
78
+ 2. Apply seed data: npm run seed -- --app=${app_name}
79
+ 3. Restart the development server
80
+
81
+ output:
82
+ success: "App ${app_name} installed to custom/apps/${app_name}/"
83
+ failure: "Failed to install app. Check the logs above."