spine-framework-portal 0.1.5 → 1.0.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 (48) hide show
  1. package/LICENSE.md +223 -0
  2. package/README.md +225 -12
  3. package/custom/apps/customer-portal/LICENSE.md +13 -0
  4. package/custom/apps/customer-portal/README.md +26 -0
  5. package/{components → custom/apps/customer-portal/components}/PortalHeader.tsx +12 -7
  6. package/custom/apps/customer-portal/docs/configuration.md +265 -0
  7. package/custom/apps/customer-portal/hooks/useCommunity.ts +78 -0
  8. package/custom/apps/customer-portal/hooks/useCourses.ts +67 -0
  9. package/custom/apps/customer-portal/hooks/useItemProgress.ts +114 -0
  10. package/custom/apps/customer-portal/hooks/useKBArticles.ts +81 -0
  11. package/custom/apps/customer-portal/hooks/usePortalData.ts +102 -0
  12. package/custom/apps/customer-portal/hooks/usePortalHooks.ts +24 -0
  13. package/custom/apps/customer-portal/hooks/usePortalSignal.ts +55 -0
  14. package/custom/apps/customer-portal/hooks/usePortalThreads.ts +113 -0
  15. package/custom/apps/customer-portal/hooks/useTickets.ts +236 -0
  16. package/custom/apps/customer-portal/hooks/useTypeRegistry.ts +74 -0
  17. package/{index.tsx → custom/apps/customer-portal/index.tsx} +21 -10
  18. package/custom/apps/customer-portal/package.json +30 -0
  19. package/package.json +85 -19
  20. /package/{components → custom/apps/customer-portal/components}/CommunityModerator.tsx +0 -0
  21. /package/{components → custom/apps/customer-portal/components}/CourseProgress.tsx +0 -0
  22. /package/{components → custom/apps/customer-portal/components}/HelpfulnessRating.tsx +0 -0
  23. /package/{components → custom/apps/customer-portal/components}/KBGenerator.tsx +0 -0
  24. /package/{components → custom/apps/customer-portal/components}/ParticipationIndicator.tsx +0 -0
  25. /package/{components → custom/apps/customer-portal/components}/PortalFooter.tsx +0 -0
  26. /package/{components → custom/apps/customer-portal/components}/PortalSidebar.tsx +0 -0
  27. /package/{components → custom/apps/customer-portal/components}/ProgressTracker.tsx +0 -0
  28. /package/{components → custom/apps/customer-portal/components}/SearchFilterBar.tsx +0 -0
  29. /package/{components → custom/apps/customer-portal/components}/StatusBadge.tsx +0 -0
  30. /package/{components → custom/apps/customer-portal/components}/ThreadPanel.tsx +0 -0
  31. /package/{components → custom/apps/customer-portal/components}/UnifiedItemCard.tsx +0 -0
  32. /package/{components → custom/apps/customer-portal/components}/VotingComponent.tsx +0 -0
  33. /package/{functions → custom/apps/customer-portal/functions}/custom_portal-community-escalation.ts +0 -0
  34. /package/{functions → custom/apps/customer-portal/functions}/custom_portal-signals.ts +0 -0
  35. /package/{manifest.json → custom/apps/customer-portal/manifest.json} +0 -0
  36. /package/{pages → custom/apps/customer-portal/pages}/AccountPage.tsx +0 -0
  37. /package/{pages → custom/apps/customer-portal/pages}/CommunityPage.tsx +0 -0
  38. /package/{pages → custom/apps/customer-portal/pages}/ContentPage.tsx +0 -0
  39. /package/{pages → custom/apps/customer-portal/pages}/CoursesPage.tsx +0 -0
  40. /package/{pages → custom/apps/customer-portal/pages}/HomePage.tsx +0 -0
  41. /package/{pages → custom/apps/customer-portal/pages}/IntegrityPage.tsx +0 -0
  42. /package/{pages → custom/apps/customer-portal/pages}/KnowledgePage.tsx +0 -0
  43. /package/{pages → custom/apps/customer-portal/pages}/MarketplacePage.tsx +0 -0
  44. /package/{pages → custom/apps/customer-portal/pages}/TicketsPage.tsx +0 -0
  45. /package/{seed → custom/apps/customer-portal/seed}/link-types.json +0 -0
  46. /package/{seed → custom/apps/customer-portal/seed}/roles.json +0 -0
  47. /package/{seed → custom/apps/customer-portal/seed}/triggers.json +0 -0
  48. /package/{seed → custom/apps/customer-portal/seed}/types.json +0 -0
package/LICENSE.md ADDED
@@ -0,0 +1,223 @@
1
+ # Spine Framework Internal Use License 1.0.0
2
+
3
+ **Source-available. Free for internal use. Commercial rights reserved.**
4
+
5
+ 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.
6
+
7
+ ## Required Notice
8
+
9
+ Required Notice: Copyright © 2026 Dahl Ventures Inc. All rights reserved.
10
+
11
+ ## 1. Acceptance
12
+
13
+ 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.
14
+
15
+ 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.
16
+
17
+ ## 2. Definitions
18
+
19
+ **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.
20
+
21
+ **Licensor** means the legal owner of Spine Framework.
22
+
23
+ **You** means the individual or legal entity receiving the Software.
24
+
25
+ **Your Company** means the legal entity on whose behalf you use the Software, including that entity's employees and authorized contractors.
26
+
27
+ **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.
28
+
29
+ **Third Party** means any person or legal entity other than You or Your Company.
30
+
31
+ **Commercial License** means a separate written agreement signed by the Licensor that grants rights beyond this license.
32
+
33
+ ## 3. Copyright License
34
+
35
+ 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.
36
+
37
+ You may install, run, access, evaluate, test, configure, and use the Software for Internal Business Use.
38
+
39
+ 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.
40
+
41
+ You may not distribute the Software except as expressly allowed in these terms.
42
+
43
+ ## 4. Changes and New Works
44
+
45
+ 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.
46
+
47
+ You may create internal applications, extensions, workflows, integrations, automations, schemas, roles, agents, triggers, pipelines, dashboards, reports, and other internal business systems using the Software.
48
+
49
+ 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.
50
+
51
+ ## 5. Internal Contractors
52
+
53
+ 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.
54
+
55
+ Contractors do not receive any independent right to use the Software for themselves, their other clients, their own products, or any Third Party.
56
+
57
+ Your Company is responsible for all use of the Software by its employees, contractors, agents, and representatives.
58
+
59
+ ## 6. Your Data and Application-Specific Work
60
+
61
+ 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.
62
+
63
+ These terms do not give the Licensor ownership of Your Company's data or independently created application-specific business content.
64
+
65
+ 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.
66
+
67
+ ## 7. Prohibited Uses
68
+
69
+ You may not do any of the following without a Commercial License:
70
+
71
+ 1. Sell, resell, sublicense, rent, lease, lend, transfer, assign, publish, or distribute the Software.
72
+ 2. 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.
73
+ 3. 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, or similar commercial service.
74
+ 4. White-label, private-label, rebrand, or remove Spine Framework identity from the Software in order to provide it to Third Parties.
75
+ 5. 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.
76
+ 6. 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.
77
+ 7. Use the Software to build, operate, or improve a competing framework, platform, marketplace, application generator, agentic software infrastructure product, or commercial development infrastructure product.
78
+ 8. 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.
79
+ 9. 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.
80
+ 10. Use the Software in violation of law, regulation, third-party rights, or these terms.
81
+
82
+ ## 8. Examples of Permitted Use
83
+
84
+ The following are permitted under this license, provided they are solely for Internal Business Use:
85
+
86
+ 1. A company installs Spine Framework to build its own internal CRM.
87
+ 2. A company uses Spine Framework to operate an internal customer support portal for its own support team and its own customers.
88
+ 3. A company modifies Spine Framework for its internal workflows, roles, permissions, automations, pipelines, and integrations.
89
+ 4. A company lets its employees and authorized contractors configure, maintain, and support its internal Spine Framework installation.
90
+ 5. A company creates internal dashboards, agents, knowledge bases, audit trails, and operational tools on top of Spine Framework.
91
+
92
+ ## 9. Examples Requiring a Commercial License
93
+
94
+ The following are not permitted under this license and require a Commercial License:
95
+
96
+ 1. Selling Spine Framework or a modified version of Spine Framework.
97
+ 2. Offering Spine Framework as a hosted SaaS product.
98
+ 3. Offering a white-labeled application built on Spine Framework to customers.
99
+ 4. Packaging Spine Framework into a commercial starter kit, template, marketplace app, agency offering, or developer platform.
100
+ 5. Running Spine Framework for multiple clients as a managed service provider, agency, consultant, systems integrator, or outsourcing firm.
101
+ 6. Embedding Spine Framework into a product sold to customers.
102
+ 7. Forking Spine Framework to launch a competing framework, backend, app platform, AI-agent platform, or development infrastructure product.
103
+ 8. Publishing modified Spine Framework source code to a public repository.
104
+ 9. Giving a customer, client, partner, reseller, or affiliate a copy of Spine Framework.
105
+
106
+ ## 10. Distribution
107
+
108
+ 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.
109
+
110
+ 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.
111
+
112
+ Any copy of the Software must include this license and all Required Notices.
113
+
114
+ ## 11. Trademarks
115
+
116
+ 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.
117
+
118
+ 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.
119
+
120
+ ## 12. Patent License
121
+
122
+ 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.
123
+
124
+ ## 13. Patent Defense
125
+
126
+ 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.
127
+
128
+ If Your Company makes such a claim, Your Company's patent license ends immediately.
129
+
130
+ ## 14. Fair Use and Other Legal Rights
131
+
132
+ 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.
133
+
134
+ ## 15. No Other Rights
135
+
136
+ These terms do not allow You to sublicense, transfer, assign, or delegate any license granted under these terms except as expressly allowed here.
137
+
138
+ These terms do not prevent the Licensor from granting licenses to anyone else.
139
+
140
+ These terms do not imply any license other than the licenses expressly granted here.
141
+
142
+ All rights not expressly granted are reserved by the Licensor.
143
+
144
+ ## 16. Violations and Cure
145
+
146
+ 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:
147
+
148
+ 1. come into full compliance with these terms;
149
+ 2. take practical steps to correct past violations; and
150
+ 3. complete both within 32 days of receiving written notice.
151
+
152
+ If You do not satisfy those requirements, all licenses granted to You under these terms end immediately.
153
+
154
+ For any later violation, all licenses granted to You under these terms end immediately without any cure period.
155
+
156
+ ## 17. Termination
157
+
158
+ 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.
159
+
160
+ Sections concerning ownership, prohibited uses, trademarks, patent defense, no other rights, violations, termination, no warranty, limitation of liability, and general terms survive termination.
161
+
162
+ ## 18. No Warranty
163
+
164
+ As far as the law allows, the Software is provided as is and as available, without any warranty or condition, express or implied.
165
+
166
+ 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.
167
+
168
+ ## 19. Limitation of Liability
169
+
170
+ 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.
171
+
172
+ 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.
173
+
174
+ 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.
175
+
176
+ ## 20. Commercial Licensing
177
+
178
+ Rights not granted under this license may be available under a separate Commercial License from the Licensor.
179
+
180
+ 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.
181
+
182
+ To request commercial rights, contact:
183
+
184
+ - spine-framework.com
185
+ - webmaster@spine-framework.com
186
+
187
+ ## 21. License Updates
188
+
189
+ The Licensor may publish updated versions of this license from time to time.
190
+
191
+ 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.
192
+
193
+ 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.
194
+
195
+ 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.
196
+
197
+ Nothing in this section gives You rights to continue using future versions of the Software under earlier license terms.
198
+
199
+ ## 22. General Terms
200
+
201
+ If any part of these terms is held unenforceable, the rest remains in effect as far as the law allows.
202
+
203
+ Failure by the Licensor to enforce any term is not a waiver.
204
+
205
+ Any waiver must be in writing and signed by the Licensor.
206
+
207
+ These terms are the entire license terms for the Software unless You and the Licensor have signed a separate written agreement.
208
+
209
+ ## 23. Plain-English Summary
210
+
211
+ This summary is not part of the legal license.
212
+
213
+ You may use Spine Framework inside your own company for your own internal business operations.
214
+
215
+ You may modify Spine Framework for your own internal use.
216
+
217
+ You may let your employees and contractors work on your internal Spine Framework installation.
218
+
219
+ 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.
220
+
221
+ Future versions, updates, services, support, portals, packs, license keys, and commercial features may require acceptance of updated terms.
222
+
223
+ Spine Framework is source-available. It is not open source.
package/README.md CHANGED
@@ -1,26 +1,239 @@
1
- # spine-framework-portal
1
+ # Spine Framework Customer Portal
2
2
 
3
- Customer self-service portal app for Spine Framework.
3
+ A self-service portal for customers to access tickets, knowledge base, courses, and community built on the Spine Framework.
4
+
5
+ ## Overview
6
+
7
+ Customer Portal provides a comprehensive self-service experience for your customers:
8
+
9
+ - **Tickets** - Submit and track support requests
10
+ - **Knowledge Base** - Browse articles and documentation
11
+ - **Courses** - Access learning content and lessons
12
+ - **Community** - Join discussions and connect with other users
13
+ - **Marketplace** - Discover apps and integrations
4
14
 
5
15
  ## Installation
6
16
 
7
- ```bash
8
- npm install spine-framework-portal
17
+ ### Prerequisites
18
+
19
+ - Spine Framework installed
20
+ - Node.js 18+
21
+ - PostgreSQL database
22
+ - Supabase project (for database and auth)
23
+
24
+ ### Setup
25
+
26
+ 1. **Install the package**:
27
+ ```bash
28
+ npm install spine-framework-portal
29
+ ```
30
+
31
+ 2. **Configure the database**:
32
+ See [docs/configuration.md](custom/apps/customer-portal/docs/configuration.md) for complete database setup instructions.
33
+
34
+ 3. **Install the app**:
35
+ ```bash
36
+ npx spine install-app customer-portal
37
+ ```
38
+
39
+ ## Configuration
40
+
41
+ ### Database Setup
42
+
43
+ Customer Portal requires specific database tables and configurations:
44
+
45
+ ```sql
46
+ -- Insert Customer Portal app
47
+ INSERT INTO public.apps (
48
+ slug, name, description, route_prefix, renderer,
49
+ required_roles, nav_items, is_active, is_public, auth_required
50
+ ) VALUES (
51
+ 'customer-portal', 'Customer Portal',
52
+ 'Self-service portal for customers to access tickets, knowledge base, courses, and community',
53
+ '/portal', 'custom', '["member"]',
54
+ -- nav_items JSON from manifest.json
55
+ true, true, true
56
+ );
57
+
58
+ -- Install for your account
59
+ INSERT INTO public.app_installations (account_id, app_slug, is_enabled)
60
+ VALUES ('your-account-id', 'customer-portal', true);
9
61
  ```
10
62
 
11
- ## Usage
63
+ ### Route Configuration
64
+
65
+ By default, Customer Portal serves from `/portal`. To serve from root:
12
66
 
13
- ```bash
14
- npx spine-framework install-app customer-portal
67
+ ```sql
68
+ UPDATE public.apps SET route_prefix = '/' WHERE slug = 'customer-portal';
15
69
  ```
16
70
 
71
+ See [docs/configuration.md](custom/apps/customer-portal/docs/configuration.md) for detailed configuration options.
72
+
17
73
  ## Features
18
74
 
19
- - Community discussion and Q&A
20
- - Course and lesson content delivery
21
- - Support ticket submission and tracking
22
- - Knowledge base article access
75
+ ### Tickets
76
+ - Submit new support requests
77
+ - Track ticket status and progress
78
+ - View ticket history and communications
79
+ - AI-powered triage and routing
80
+
81
+ ### Knowledge Base
82
+ - Browse articles and documentation
83
+ - Search functionality with AI-powered results
84
+ - Category and tag organization
85
+ - Article ratings and feedback
86
+
87
+ ### Courses
88
+ - Access structured learning content
89
+ - Track progress and completion
90
+ - Interactive lessons and quizzes
91
+ - Certificates and achievements
92
+
93
+ ### Community
94
+ - Join discussion forums
95
+ - Ask questions and share experiences
96
+ - Connect with other users
97
+ - Community moderation
98
+
99
+ ### Marketplace
100
+ - Discover apps and integrations
101
+ - Browse plugins and extensions
102
+ - Installation and configuration guides
103
+ - User reviews and ratings
104
+
105
+ ## Development
106
+
107
+ ### Project Structure
108
+
109
+ ```
110
+ custom/apps/customer-portal/
111
+ ├── index.tsx # Main app component
112
+ ├── manifest.json # App configuration
113
+ ├── components/ # Reusable components
114
+ │ ├── PortalHeader.tsx # Navigation header
115
+ │ └── PortalFooter.tsx # Footer component
116
+ ├── pages/ # Page components
117
+ │ ├── HomePage.tsx # Dashboard/landing page
118
+ │ ├── TicketsPage.tsx # Ticket management
119
+ │ ├── KnowledgePage.tsx # Knowledge base
120
+ │ ├── CoursesPage.tsx # Course listing
121
+ │ ├── CommunityPage.tsx # Community forums
122
+ │ └── MarketplacePage.tsx # App marketplace
123
+ ├── hooks/ # Custom React hooks
124
+ │ ├── useTickets.ts # Ticket management
125
+ │ ├── useKBArticles.ts # Knowledge base
126
+ │ ├── useCourses.ts # Course data
127
+ │ └── useCommunity.ts # Community features
128
+ ├── config/ # Configuration files
129
+ ├── seed/ # Seed data
130
+ ├── functions/ # Serverless functions
131
+ ├── migrations/ # Database migrations
132
+ └── docs/ # Documentation
133
+ ```
134
+
135
+ ### Prefix-Aware Routing
136
+
137
+ Customer Portal uses prefix-aware routing that automatically adapts to the configured `route_prefix`:
138
+
139
+ ```typescript
140
+ // Automatically works for both /portal and / serving
141
+ const base = app.route_prefix === '/' ? '' : (app.route_prefix || '')
142
+ const NavLink to={`${base}${path}`}
143
+ ```
144
+
145
+ ### Customization
146
+
147
+ 1. **Branding**: Update `PortalHeader.tsx` and `PortalFooter.tsx`
148
+ 2. **Features**: Modify `manifest.json` routes and nav_items
149
+ 3. **Workflows**: Add custom functions in `functions/`
150
+ 4. **Data**: Extend with custom migrations in `migrations/`
151
+
152
+ ## Deployment
153
+
154
+ ### Subdirectory Deployment (Default)
155
+
156
+ - Access: `https://yourdomain.com/portal`
157
+ - Safe for multi-app deployments
158
+ - Default configuration
159
+
160
+ ### Root Deployment
161
+
162
+ - Access: `https://yourdomain.com/`
163
+ - Set `route_prefix: "/"` in database
164
+ - For dedicated customer portal deployments
165
+
166
+ ## Authentication & Authorization
167
+
168
+ Customer Portal requires users to have the `member` role:
169
+
170
+ ```sql
171
+ -- Create member role
172
+ INSERT INTO public.roles (slug, name, description)
173
+ VALUES ('member', 'Member', 'Can access customer portal features');
174
+
175
+ -- Assign to users
176
+ INSERT INTO public.people (account_id, user_id, role_id)
177
+ VALUES ('account-id', 'user-id', (SELECT id FROM roles WHERE slug = 'member'));
178
+ ```
179
+
180
+ ### Authentication Flow
181
+
182
+ 1. **Public Access**: Landing page visible without login
183
+ 2. **Authentication Required**: Users must sign in to access features
184
+ 3. **Role-Based Access**: Only users with `member` role can use the portal
185
+
186
+ ## Required Dependencies
187
+
188
+ Customer Portal requires these Spine Framework types:
189
+
190
+ - `support_ticket` - For ticket management
191
+ - `kb_article` - For knowledge base articles
192
+ - `course_lesson` - For course content
193
+ - `community_post` - For community discussions
194
+
195
+ Ensure these types exist in your `types` table or install appropriate seed data.
196
+
197
+ ## API Integration
198
+
199
+ Customer Portal integrates with Spine Framework APIs:
200
+
201
+ - `/api/apps?action=list` - App discovery
202
+ - `/.netlify/functions/admin-data` - Data management
203
+ - `/.netlify/functions/custom_support-triage` - AI triage
204
+ - `/.netlify/functions/ai-agents` - AI features
205
+ - Custom functions in `functions/` directory
206
+
207
+ ## Feature Configuration
208
+
209
+ Control feature availability via the `config` field in the apps table:
210
+
211
+ ```json
212
+ {
213
+ "features": {
214
+ "tickets": true,
215
+ "kb": true,
216
+ "courses": true,
217
+ "community": true,
218
+ "marketplace": false
219
+ }
220
+ }
221
+ ```
222
+
223
+ ## Support
224
+
225
+ - **Documentation**: [docs/configuration.md](custom/apps/customer-portal/docs/configuration.md)
226
+ - **Issues**: Report via your Spine Framework support channel
227
+ - **Community**: Join the Spine Framework community
23
228
 
24
229
  ## License
25
230
 
26
- MIT
231
+ This package is licensed under the [Spine Framework Internal Use License](LICENSE.md).
232
+
233
+ - ✅ Free for internal business use
234
+ - ❌ Commercial redistribution requires separate license
235
+ - 📞 Contact: spine-framework.com for commercial licensing
236
+
237
+ ## Version History
238
+
239
+ See [manifest.json](custom/apps/customer-portal/manifest.json) for version information and changelog.
@@ -0,0 +1,13 @@
1
+ # Spine Framework Internal Use License 1.0.0
2
+
3
+ **Source-available. Free for internal use. Commercial rights reserved.**
4
+
5
+ Copyright © 2026 Dahl Ventures Inc. All rights reserved.
6
+
7
+ This software is licensed under the Spine Framework Internal Use License 1.0.0.
8
+
9
+ For full license terms, see: https://github.com/spine-framework/spine-framework/blob/main/LICENSE.md
10
+
11
+ **Summary:** You may use this software for internal business use only. Commercial use, resale, SaaS offering, white-labeling, and distribution require a separate Commercial License.
12
+
13
+ Contact: webmaster@spine-framework.com
@@ -0,0 +1,26 @@
1
+ # spine-framework-portal
2
+
3
+ Customer self-service portal app for Spine Framework.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install spine-framework-portal
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```bash
14
+ npx spine-framework install-app customer-portal
15
+ ```
16
+
17
+ ## Features
18
+
19
+ - Community discussion and Q&A
20
+ - Course and lesson content delivery
21
+ - Support ticket submission and tracking
22
+ - Knowledge base article access
23
+
24
+ ## License
25
+
26
+ MIT
@@ -2,6 +2,7 @@ import { useState } from 'react'
2
2
  import { NavLink, useNavigate } from 'react-router-dom'
3
3
  import { Ticket, Users, BookOpen, GraduationCap, Store, LayoutGrid, User, LogOut, Save } from 'lucide-react'
4
4
  import { useAuth } from '@core/contexts/AuthContext'
5
+ import { useCurrentApp } from '@core/contexts/AppContext'
5
6
  import { Button } from '@core/components/ui/button'
6
7
  import { Avatar, AvatarFallback } from '@core/components/ui/avatar'
7
8
  import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from '@core/components/ui/dialog'
@@ -10,19 +11,23 @@ import { Label } from '@core/components/ui/label'
10
11
  import { Separator } from '@core/components/ui/separator'
11
12
 
12
13
  const NAV_ITEMS = [
13
- { label: 'Tickets', path: '/portal/tickets', icon: Ticket },
14
- { label: 'Knowledge Base', path: '/portal/kb', icon: BookOpen },
15
- { label: 'Courses', path: '/portal/courses', icon: GraduationCap },
16
- { label: 'Community', path: '/portal/community', icon: Users },
17
- { label: 'Marketplace', path: '/portal/marketplace', icon: Store },
14
+ { label: 'Tickets', path: '/tickets', icon: Ticket },
15
+ { label: 'Knowledge Base', path: '/kb', icon: BookOpen },
16
+ { label: 'Courses', path: '/courses', icon: GraduationCap },
17
+ { label: 'Community', path: '/community', icon: Users },
18
+ { label: 'Marketplace', path: '/marketplace', icon: Store },
18
19
  ]
19
20
 
20
21
  export function PortalHeader() {
21
22
  const { user, logout } = useAuth()
23
+ const app = useCurrentApp()
22
24
  const navigate = useNavigate()
23
25
  const [accountOpen, setAccountOpen] = useState(false)
24
26
  const [displayName, setDisplayName] = useState(user?.full_name || user?.email?.split('@')[0] || '')
25
27
 
28
+ // Normalize route_prefix: '/' → '' so paths are /, /tickets, /kb, etc.
29
+ const base = app.route_prefix === '/' ? '' : (app.route_prefix || '')
30
+
26
31
  const initials = (displayName || user?.email || 'U')
27
32
  .split(' ')
28
33
  .map((w: string) => w[0])
@@ -43,7 +48,7 @@ export function PortalHeader() {
43
48
  <>
44
49
  <header className="sticky top-0 z-50 bg-background border-b border-border shadow-sm">
45
50
  <div className="flex items-center h-14 px-6 gap-6">
46
- <NavLink to="/portal" className="flex items-center gap-2 shrink-0 text-foreground hover:text-primary transition-colors">
51
+ <NavLink to={`${base}/`} className="flex items-center gap-2 shrink-0 text-foreground hover:text-primary transition-colors">
47
52
  <LayoutGrid size={18} className="text-primary" />
48
53
  <span className="font-semibold tracking-tight text-sm">Customer Portal</span>
49
54
  </NavLink>
@@ -52,7 +57,7 @@ export function PortalHeader() {
52
57
  {NAV_ITEMS.map(({ label, path, icon: Icon }) => (
53
58
  <NavLink
54
59
  key={path}
55
- to={path}
60
+ to={`${base}${path}`}
56
61
  className={({ isActive }) =>
57
62
  [
58
63
  'flex items-center gap-1.5 px-3 py-1.5 rounded-md text-sm font-medium transition-colors',