spine-framework 0.3.17 → 0.3.19

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 (270) hide show
  1. package/.framework/cli/bin.mjs +16 -0
  2. package/.framework/cli/commands/create-app.ts +1 -1
  3. package/.framework/cli/commands/dev.ts +215 -33
  4. package/.framework/cli/index.ts +37 -75
  5. package/.framework/functions/_shared/app-manifest.ts +8 -15
  6. package/.framework/functions/_shared/db.ts +11 -15
  7. package/.framework/functions/_shared/index.ts +7 -16
  8. package/.framework/functions/_shared/principal.ts +4 -62
  9. package/.framework/functions/_shared/resolve-ids.ts +6 -6
  10. package/.framework/functions/_shared/webhook-registry.ts +43 -1
  11. package/.framework/functions/admin-funnel.ts +104 -0
  12. package/.framework/functions/admin-install-funnel.ts +225 -0
  13. package/.framework/functions/admin-signals.ts +241 -0
  14. package/.framework/functions/integration-routes.ts +4 -8
  15. package/.framework/migrations/001_schema.sql +406 -0
  16. package/.framework/migrations/002_rls_and_functions.sql +710 -0
  17. package/.framework/migrations/003_system_data.sql +520 -0
  18. package/.framework/migrations/004_enhancements.sql +43 -0
  19. package/.framework/public/_redirects +3 -0
  20. package/.framework/public/spine-logo.jpg +0 -0
  21. package/.framework/public/spine-logo.svg +3 -0
  22. package/{scripts → .framework/scripts}/assemble-frontend.sh +8 -5
  23. package/{scripts → .framework/scripts}/assemble-functions.sh +4 -47
  24. package/{scripts → .framework/scripts}/assemble.sh +2 -8
  25. package/{scripts → .framework/scripts}/boundary-check.sh +5 -9
  26. package/{scripts → .framework/scripts}/check-core-integrity.sh +0 -0
  27. package/.framework/seeds/link_types/account_cli_instances.json +9 -0
  28. package/.framework/seeds/types/funnel_signal_use.json +98 -0
  29. package/.framework/seeds/types/spine_instance.json +109 -0
  30. package/.framework/src/App.tsx +11 -21
  31. package/.framework/src/components/CustomAppLoader.tsx +2 -19
  32. package/.framework/src/components/ui/accordion.tsx +1 -1
  33. package/.framework/src/components/ui/alert-dialog.tsx +1 -1
  34. package/.framework/src/components/ui/aspect-ratio.tsx +1 -1
  35. package/.framework/src/components/ui/avatar.tsx +1 -1
  36. package/.framework/src/components/ui/badge.tsx +2 -2
  37. package/.framework/src/components/ui/breadcrumb.tsx +2 -2
  38. package/.framework/src/components/ui/button-group.tsx +2 -2
  39. package/.framework/src/components/ui/button.tsx +2 -2
  40. package/.framework/src/components/ui/chart.tsx +6 -1
  41. package/.framework/src/components/ui/checkbox.tsx +1 -1
  42. package/.framework/src/components/ui/collapsible.tsx +1 -1
  43. package/.framework/src/components/ui/context-menu.tsx +1 -1
  44. package/.framework/src/components/ui/dialog.tsx +1 -1
  45. package/.framework/src/components/ui/direction.tsx +17 -1
  46. package/.framework/src/components/ui/dropdown-menu.tsx +1 -1
  47. package/.framework/src/components/ui/hover-card.tsx +1 -1
  48. package/.framework/src/components/ui/item.tsx +2 -2
  49. package/.framework/src/components/ui/label.tsx +1 -1
  50. package/.framework/src/components/ui/menubar.tsx +1 -1
  51. package/.framework/src/components/ui/navigation-menu.tsx +1 -1
  52. package/.framework/src/components/ui/popover.tsx +1 -1
  53. package/.framework/src/components/ui/progress.tsx +1 -1
  54. package/.framework/src/components/ui/radio-group.tsx +1 -1
  55. package/.framework/src/components/ui/scroll-area.tsx +1 -1
  56. package/.framework/src/components/ui/select.tsx +1 -1
  57. package/.framework/src/components/ui/separator.tsx +1 -1
  58. package/.framework/src/components/ui/sheet.tsx +1 -1
  59. package/.framework/src/components/ui/sidebar.tsx +6 -6
  60. package/.framework/src/components/ui/slider.tsx +1 -1
  61. package/.framework/src/components/ui/switch.tsx +1 -1
  62. package/.framework/src/components/ui/tabs.tsx +1 -1
  63. package/.framework/src/components/ui/toggle-group.tsx +1 -1
  64. package/.framework/src/components/ui/toggle.tsx +1 -1
  65. package/.framework/src/components/ui/tooltip.tsx +1 -1
  66. package/.framework/src/pages/auth/LoginPage.tsx +10 -9
  67. package/LICENSE.md +63 -93
  68. package/README.md +254 -129
  69. package/custom/.devin/skills/install-app/SKILL.md +39 -0
  70. package/custom/.devin/workflows/app-install.yaml +83 -0
  71. package/custom/README.md +79 -0
  72. package/docs/APPS.md +232 -0
  73. package/docs/ARCHITECTURE.md +246 -0
  74. package/docs/INSTALL.md +155 -0
  75. package/docs/README.md +170 -0
  76. package/docs/design-schema-spec.md +1837 -0
  77. package/docs/dev-guides/01-create-an-app.md +183 -0
  78. package/docs/dev-guides/02-create-a-function.md +178 -0
  79. package/docs/dev-guides/03-create-a-component.md +178 -0
  80. package/docs/dev-guides/04-webhook-handlers.md +129 -0
  81. package/docs/dev-guides/05-testing.md +168 -0
  82. package/docs/dev-guides/README.md +40 -0
  83. package/docs/npm-packages-plan.md +288 -0
  84. package/docs/spine-core--api-reference.md +822 -0
  85. package/package.json +79 -150
  86. package/.framework/cli/bin.cjs +0 -14
  87. package/.framework/cli/commands/claim.ts +0 -430
  88. package/.framework/cli/commands/init.ts +0 -219
  89. package/.framework/cli/commands/install-app.ts +0 -685
  90. package/.framework/cli/commands/migrate.ts +0 -178
  91. package/.framework/cli/commands/publish.ts +0 -191
  92. package/.framework/cli/commands/status.ts +0 -268
  93. package/.framework/cli/commands/uninstall-app.ts +0 -166
  94. package/.framework/cli/commands/update-app.ts +0 -397
  95. package/.framework/cli/welcome.cjs +0 -45
  96. package/.framework/config/signal-client.ts +0 -147
  97. package/.framework/config/signals.ts +0 -70
  98. package/.framework/docs/STABILITY.md +0 -52
  99. package/.framework/docs/examples/custom-app/README.md +0 -77
  100. package/.framework/docs/examples/custom-function/README.md +0 -27
  101. package/.framework/docs/examples/custom-function/handler.ts +0 -48
  102. package/.framework/docs/examples/custom-webhook/README.md +0 -68
  103. package/.framework/functions/handler-registry.ts +0 -22
  104. package/.framework/functions/signal.ts +0 -168
  105. package/.framework/migrations/000_foundation.sql +0 -1302
  106. package/.framework/migrations/001_seed.sql +0 -163
  107. package/.framework/migrations/002_seed_constraints.sql +0 -19
  108. package/.framework/migrations/003_auth_user_trigger.sql +0 -67
  109. package/.framework/migrations/004_app_version_tracking.sql +0 -8
  110. package/.framework/migrations/005_pipelines_slug_stages.sql +0 -21
  111. package/.framework/src/pages/auth/RegisterPage.tsx +0 -163
  112. package/CHANGELOG.md +0 -71
  113. package/STRUCTURE.md +0 -150
  114. package/bin/spine-framework.cjs +0 -62
  115. package/bin/welcome.cjs +0 -58
  116. package/bin/ws-shim.ts +0 -10
  117. package/config/components.json +0 -25
  118. package/config/deno.lock +0 -108
  119. package/config/package-lock.json +0 -17183
  120. package/config/postcss.config.cjs +0 -10
  121. package/config/tailwind.config.cjs +0 -78
  122. package/config/tsconfig.build.json +0 -32
  123. package/config/tsconfig.cli.json +0 -18
  124. package/config/tsconfig.json +0 -41
  125. package/config/tsconfig.node.json +0 -17
  126. package/config/tsconfig.node.tsbuildinfo +0 -1
  127. package/config/tsconfig.tsbuildinfo +0 -1
  128. package/config/typedoc.json +0 -16
  129. package/config/vite.config.d.ts +0 -2
  130. package/config/vite.config.ts +0 -71
  131. package/dist/cli/commands/agents.d.ts +0 -39
  132. package/dist/cli/commands/agents.d.ts.map +0 -1
  133. package/dist/cli/commands/auth.d.ts +0 -36
  134. package/dist/cli/commands/auth.d.ts.map +0 -1
  135. package/dist/cli/commands/claim.d.ts +0 -38
  136. package/dist/cli/commands/claim.d.ts.map +0 -1
  137. package/dist/cli/commands/create-app.d.ts +0 -23
  138. package/dist/cli/commands/create-app.d.ts.map +0 -1
  139. package/dist/cli/commands/dev.d.ts +0 -24
  140. package/dist/cli/commands/dev.d.ts.map +0 -1
  141. package/dist/cli/commands/doctor.d.ts +0 -42
  142. package/dist/cli/commands/doctor.d.ts.map +0 -1
  143. package/dist/cli/commands/generate.d.ts +0 -36
  144. package/dist/cli/commands/generate.d.ts.map +0 -1
  145. package/dist/cli/commands/init.d.ts +0 -20
  146. package/dist/cli/commands/init.d.ts.map +0 -1
  147. package/dist/cli/commands/install-app.d.ts +0 -30
  148. package/dist/cli/commands/install-app.d.ts.map +0 -1
  149. package/dist/cli/commands/items.d.ts +0 -45
  150. package/dist/cli/commands/items.d.ts.map +0 -1
  151. package/dist/cli/commands/migrate.d.ts +0 -21
  152. package/dist/cli/commands/migrate.d.ts.map +0 -1
  153. package/dist/cli/commands/migrations.d.ts +0 -41
  154. package/dist/cli/commands/migrations.d.ts.map +0 -1
  155. package/dist/cli/commands/pipelines.d.ts +0 -40
  156. package/dist/cli/commands/pipelines.d.ts.map +0 -1
  157. package/dist/cli/commands/publish.d.ts +0 -23
  158. package/dist/cli/commands/publish.d.ts.map +0 -1
  159. package/dist/cli/commands/status.d.ts +0 -23
  160. package/dist/cli/commands/status.d.ts.map +0 -1
  161. package/dist/cli/commands/system.d.ts +0 -29
  162. package/dist/cli/commands/system.d.ts.map +0 -1
  163. package/dist/cli/commands/test.d.ts +0 -46
  164. package/dist/cli/commands/test.d.ts.map +0 -1
  165. package/dist/cli/commands/uninstall-app.d.ts +0 -23
  166. package/dist/cli/commands/uninstall-app.d.ts.map +0 -1
  167. package/dist/cli/commands/update-app.d.ts +0 -24
  168. package/dist/cli/commands/update-app.d.ts.map +0 -1
  169. package/dist/cli/context.d.ts +0 -88
  170. package/dist/cli/context.d.ts.map +0 -1
  171. package/dist/cli/env-loader.d.ts +0 -14
  172. package/dist/cli/env-loader.d.ts.map +0 -1
  173. package/dist/cli/index.d.ts +0 -44
  174. package/dist/cli/index.d.ts.map +0 -1
  175. package/dist/config/signals.d.ts +0 -82
  176. package/dist/config/signals.d.ts.map +0 -1
  177. package/dist/functions/_shared/agent-runner.d.ts +0 -156
  178. package/dist/functions/_shared/agent-runner.d.ts.map +0 -1
  179. package/dist/functions/_shared/app-manifest.d.ts +0 -68
  180. package/dist/functions/_shared/app-manifest.d.ts.map +0 -1
  181. package/dist/functions/_shared/audit.d.ts +0 -91
  182. package/dist/functions/_shared/audit.d.ts.map +0 -1
  183. package/dist/functions/_shared/db.d.ts +0 -125
  184. package/dist/functions/_shared/db.d.ts.map +0 -1
  185. package/dist/functions/_shared/index.d.ts +0 -299
  186. package/dist/functions/_shared/index.d.ts.map +0 -1
  187. package/dist/functions/_shared/middleware.d.ts +0 -315
  188. package/dist/functions/_shared/middleware.d.ts.map +0 -1
  189. package/dist/functions/_shared/permissions.d.ts +0 -626
  190. package/dist/functions/_shared/permissions.d.ts.map +0 -1
  191. package/dist/functions/_shared/pipeline-runner.d.ts +0 -124
  192. package/dist/functions/_shared/pipeline-runner.d.ts.map +0 -1
  193. package/dist/functions/_shared/principal.d.ts +0 -284
  194. package/dist/functions/_shared/principal.d.ts.map +0 -1
  195. package/dist/functions/_shared/resolve-ids.d.ts +0 -10
  196. package/dist/functions/_shared/resolve-ids.d.ts.map +0 -1
  197. package/dist/functions/_shared/schema-utils.d.ts +0 -181
  198. package/dist/functions/_shared/schema-utils.d.ts.map +0 -1
  199. package/dist/functions/_shared/testing.d.ts +0 -172
  200. package/dist/functions/_shared/testing.d.ts.map +0 -1
  201. package/dist/functions/_shared/trigger-engine.d.ts +0 -140
  202. package/dist/functions/_shared/trigger-engine.d.ts.map +0 -1
  203. package/dist/functions/_shared/webhook-registration.d.ts +0 -81
  204. package/dist/functions/_shared/webhook-registration.d.ts.map +0 -1
  205. package/dist/functions/_shared/webhook-registry.d.ts +0 -41
  206. package/dist/functions/_shared/webhook-registry.d.ts.map +0 -1
  207. package/dist/functions/account-nodes.d.ts +0 -48
  208. package/dist/functions/account-nodes.d.ts.map +0 -1
  209. package/dist/functions/admin-data.d.ts +0 -178
  210. package/dist/functions/admin-data.d.ts.map +0 -1
  211. package/dist/functions/ai-agents.d.ts +0 -125
  212. package/dist/functions/ai-agents.d.ts.map +0 -1
  213. package/dist/functions/api-keys.d.ts +0 -140
  214. package/dist/functions/api-keys.d.ts.map +0 -1
  215. package/dist/functions/apps.d.ts +0 -163
  216. package/dist/functions/apps.d.ts.map +0 -1
  217. package/dist/functions/auth.d.ts +0 -74
  218. package/dist/functions/auth.d.ts.map +0 -1
  219. package/dist/functions/debug-auth.d.ts +0 -33
  220. package/dist/functions/debug-auth.d.ts.map +0 -1
  221. package/dist/functions/embeddings.d.ts +0 -205
  222. package/dist/functions/embeddings.d.ts.map +0 -1
  223. package/dist/functions/handler-registry.d.ts +0 -22
  224. package/dist/functions/handler-registry.d.ts.map +0 -1
  225. package/dist/functions/integration-routes.d.ts +0 -45
  226. package/dist/functions/integration-routes.d.ts.map +0 -1
  227. package/dist/functions/integrations.d.ts +0 -124
  228. package/dist/functions/integrations.d.ts.map +0 -1
  229. package/dist/functions/item-progress.d.ts +0 -41
  230. package/dist/functions/item-progress.d.ts.map +0 -1
  231. package/dist/functions/logs.d.ts +0 -162
  232. package/dist/functions/logs.d.ts.map +0 -1
  233. package/dist/functions/observability.d.ts +0 -123
  234. package/dist/functions/observability.d.ts.map +0 -1
  235. package/dist/functions/pipeline-executions.d.ts +0 -190
  236. package/dist/functions/pipeline-executions.d.ts.map +0 -1
  237. package/dist/functions/pipelines.d.ts +0 -171
  238. package/dist/functions/pipelines.d.ts.map +0 -1
  239. package/dist/functions/prompt-configs.d.ts +0 -125
  240. package/dist/functions/prompt-configs.d.ts.map +0 -1
  241. package/dist/functions/roles.d.ts +0 -118
  242. package/dist/functions/roles.d.ts.map +0 -1
  243. package/dist/functions/signal.d.ts +0 -73
  244. package/dist/functions/signal.d.ts.map +0 -1
  245. package/dist/functions/system-cron.d.ts +0 -65
  246. package/dist/functions/system-cron.d.ts.map +0 -1
  247. package/dist/functions/system.d.ts +0 -29
  248. package/dist/functions/system.d.ts.map +0 -1
  249. package/dist/functions/tests.d.ts +0 -28
  250. package/dist/functions/tests.d.ts.map +0 -1
  251. package/dist/functions/timers.d.ts +0 -139
  252. package/dist/functions/timers.d.ts.map +0 -1
  253. package/dist/functions/triggers.d.ts +0 -203
  254. package/dist/functions/triggers.d.ts.map +0 -1
  255. package/dist/functions/types.d.ts +0 -151
  256. package/dist/functions/types.d.ts.map +0 -1
  257. package/dist/src/types/types.d.ts +0 -364
  258. package/dist/src/types/types.d.ts.map +0 -1
  259. package/index.html +0 -13
  260. package/netlify.toml +0 -36
  261. package/package-project.json +0 -71
  262. package/scripts/ingest-chunks.cjs +0 -202
  263. package/scripts/kb-chunk-parser.cjs +0 -312
  264. package/scripts/kb-chunk-parser.ts +0 -330
  265. package/scripts/load-test-app-install.ts +0 -484
  266. package/scripts/netlify-dev-wrapper.sh +0 -22
  267. package/vitest.config.ts +0 -45
  268. /package/{scripts → .framework/scripts}/app-install-cli.ts +0 -0
  269. /package/{scripts → .framework/scripts}/build-manifest.sh +0 -0
  270. /package/{scripts → .framework/scripts}/verify-integrity.sh +0 -0
package/README.md CHANGED
@@ -1,129 +1,254 @@
1
- # Spine Framework
2
-
3
- **We're building Spine Framework in the open.** The source is visible, the roadmap is public, and we share what we learn along the way. That said, Spine Framework is not open source — commercial use requires a license. See [LICENSE.md](./LICENSE.md) for details.
4
-
5
- ---
6
-
7
- Spine Framework is an enterprise application framework for agentic IDEs. It gives Windsurf, Cursor, and other AI coding tools a production-ready backend to build on — multi-tenant data model, auth, roles, permissions, Netlify functions, and a CLI for installation and app management.
8
-
9
- You bring the use case. Spine Framework brings the infrastructure.
10
-
11
- ## Requirements
12
-
13
- - Node.js 18+
14
- - A [Supabase](https://supabase.com) project
15
- - [Netlify CLI](https://docs.netlify.com/cli/get-started/) (`npm install -g netlify-cli`)
16
-
17
- ## Getting Started
18
-
19
- ### 1. Install Spine Framework
20
-
21
- In a new empty directory:
22
-
23
- ```bash
24
- npm install spine-framework@latest
25
- ```
26
-
27
- ### 2. Initialize the project
28
-
29
- ```bash
30
- npx spine-framework init
31
- ```
32
-
33
- This scaffolds the project structure, writes a full `package.json`, and creates a `.env` file for your Supabase credentials.
34
-
35
- ### 3. Add your Supabase credentials
36
-
37
- Edit `.env`:
38
-
39
- ```
40
- SUPABASE_URL=https://<project>.supabase.co
41
- SUPABASE_ANON_KEY=<anon-key>
42
- SUPABASE_SERVICE_ROLE_KEY=<service-role-key>
43
- SUPABASE_DB_PASSWORD=<db-password>
44
- ```
45
-
46
- Get these from **Supabase Dashboard → Your Project → Settings → API**.
47
-
48
- ### 4. Run migrations
49
-
50
- ```bash
51
- npx spine-framework migrate
52
- ```
53
-
54
- Applies the foundation schema and seed data to your Supabase project.
55
-
56
- ### 5. Install apps (optional)
57
-
58
- ```bash
59
- npx spine-framework install-app spine-framework-portal@latest
60
- npx spine-framework install-app spine-framework-cortex@latest
61
- ```
62
-
63
- ### 6. Start the dev server
64
-
65
- ```bash
66
- npm run assemble && netlify dev
67
- ```
68
-
69
- ## CLI Reference
70
-
71
- ```
72
- npx spine-framework <command>
73
-
74
- Commands:
75
- init Scaffold a new Spine Framework project
76
- migrate Apply database migrations
77
- install-app Install a Spine Framework app from npm
78
- uninstall-app Remove an installed app
79
- update-app Update an installed app to a newer version
80
- status Show installed apps and framework version
81
- migrate Run pending migrations
82
- ```
83
-
84
- Run `npx spine-framework <command> --help` for options on any command.
85
-
86
- ## Project Structure
87
-
88
- After `init`, your project will look like this:
89
-
90
- ```
91
- .framework/ # Framework internals (do not edit)
92
- cli/ # CLI commands
93
- config/ # Framework configuration
94
- functions/ # Netlify function handlers
95
- migrations/ # SQL migrations
96
- src/ # React components and core UI
97
- bin/ # CLI entry point
98
- config/ # Vite, Tailwind, TypeScript config
99
- scripts/ # Assembly scripts
100
- custom/ # Your code lives here
101
- apps/ # Custom or installed apps
102
- functions/ # Custom Netlify functions
103
- components/ # Custom React components
104
- migrations/ # Custom SQL migrations
105
- tests/ # Custom tests
106
- .env # Supabase credentials (not committed)
107
- ```
108
-
109
- ## Apps
110
-
111
- Spine Framework apps are npm packages. Install them with the CLI:
112
-
113
- ```bash
114
- npx spine-framework install-app spine-framework-portal@latest
115
- ```
116
-
117
- Each app seeds its own roles, types, and configuration into your database and integrates with the Spine Framework navigation and permission system.
118
-
119
- ## License
120
-
121
- Spine Framework is **source-available, free for internal use**. Commercial use — including SaaS, resale, managed services, and white-labeling — requires a separate commercial license.
122
-
123
- See [LICENSE.md](./LICENSE.md) for full terms.
124
-
125
- For commercial licensing: [spine-framework.com](https://spine-framework.com) · webmaster@spine-framework.com
126
-
127
- ---
128
-
129
- Copyright © 2026 Dahl Ventures Inc. All rights reserved.
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."
@@ -0,0 +1,79 @@
1
+ # Spine Framework Custom Workspace
2
+
3
+ This directory is your extension workspace for the Spine Framework. Customize your instance here without modifying the core framework code.
4
+
5
+ ## Directory Structure
6
+
7
+ ```
8
+ custom/
9
+ ├── apps/ # Custom apps extending Spine
10
+ │ ├── cortex/ # AI-powered support & CRM
11
+ │ ├── portal/ # Customer portal & courses
12
+ │ └── your-app/ # Your custom app
13
+ ├── components/ # Shared React components
14
+ ├── functions/ # Edge functions (Netlify/Vercel)
15
+ ├── migrations/ # Database migrations
16
+ ├── npm/ # Local npm packages
17
+ ├── tests/ # Custom tests
18
+ └── .devin/ # Devin workflows & skills
19
+ ```
20
+
21
+ ## Getting Started
22
+
23
+ ### 1. Install an App
24
+
25
+ Use the Devin skill to install an app:
26
+ ```
27
+ Install the cortex app
28
+ ```
29
+
30
+ Or manually copy an app package to `custom/apps/`.
31
+
32
+ ### 2. Apply Seed Data
33
+
34
+ Seed data defines types, roles, and configuration:
35
+ ```bash
36
+ npm run seed -- --app=cortex
37
+ ```
38
+
39
+ ### 3. Start Development
40
+
41
+ ```bash
42
+ npm run dev
43
+ ```
44
+
45
+ ## Creating Custom Apps
46
+
47
+ 1. Create `custom/apps/my-app/` with:
48
+ - `index.tsx` - App entry point
49
+ - `manifest.json` - App configuration
50
+ - `seed/types.json` - Custom types
51
+ - `seed/roles.json` - Custom roles
52
+ - `pages/` - Page components
53
+ - `components/` - App-specific components
54
+
55
+ 2. Add navigation items in `manifest.json`
56
+
57
+ 3. Restart the dev server
58
+
59
+ ## Database Migrations
60
+
61
+ Place custom migrations in `custom/migrations/`:
62
+ ```
63
+ custom/migrations/001_add_custom_table.sql
64
+ ```
65
+
66
+ Migrations are applied automatically on startup.
67
+
68
+ ## Best Practices
69
+
70
+ - **Never modify `.framework/`** - Use this `custom/` directory instead
71
+ - **Keep apps self-contained** - Each app should have its own seed data
72
+ - **Use the CLI** - `spine-cli` helps manage apps and migrations
73
+ - **Test in isolation** - Apps should work standalone
74
+
75
+ ## Support
76
+
77
+ - Framework docs: `.framework/docs/`
78
+ - Devin skills: `custom/.devin/skills/`
79
+ - Community: https://github.com/spine-framework/spine