@burdenoff/microfe-support 2026.510.52
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.
- package/README.md +290 -0
- package/dist/generated/global-operations.js +1118 -0
- package/dist/generated/global-operations.js.map +1 -0
- package/dist/generated/global-types.js +20 -0
- package/dist/generated/global-types.js.map +1 -0
- package/dist/index.js +11 -0
- package/dist/microfe-support.css +2 -0
- package/dist/node_modules/clsx/dist/clsx.js +18 -0
- package/dist/node_modules/clsx/dist/clsx.js.map +1 -0
- package/dist/node_modules/dompurify/dist/purify.es.js +555 -0
- package/dist/node_modules/dompurify/dist/purify.es.js.map +1 -0
- package/dist/node_modules/marked/lib/marked.esm.js +1430 -0
- package/dist/node_modules/marked/lib/marked.esm.js.map +1 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +1674 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
- package/dist/support/SupportAdminRoot.js +69 -0
- package/dist/support/SupportAdminRoot.js.map +1 -0
- package/dist/support/SupportAdminRoutes.js +73 -0
- package/dist/support/SupportAdminRoutes.js.map +1 -0
- package/dist/support/SupportUserRoot.js +42 -0
- package/dist/support/SupportUserRoot.js.map +1 -0
- package/dist/support/SupportUserRoutes.js +49 -0
- package/dist/support/SupportUserRoutes.js.map +1 -0
- package/dist/support/components/NotificationToast.js +34 -0
- package/dist/support/components/NotificationToast.js.map +1 -0
- package/dist/support/components/PageLayout.js +87 -0
- package/dist/support/components/PageLayout.js.map +1 -0
- package/dist/support/components/RouteHelpers.js +22 -0
- package/dist/support/components/RouteHelpers.js.map +1 -0
- package/dist/support/components/analytics/CategoryBreakdown.js +63 -0
- package/dist/support/components/analytics/CategoryBreakdown.js.map +1 -0
- package/dist/support/components/analytics/MetricCard.js +31 -0
- package/dist/support/components/analytics/MetricCard.js.map +1 -0
- package/dist/support/components/analytics/PriorityBreakdown.js +59 -0
- package/dist/support/components/analytics/PriorityBreakdown.js.map +1 -0
- package/dist/support/components/analytics/SLAReport.js +110 -0
- package/dist/support/components/analytics/SLAReport.js.map +1 -0
- package/dist/support/components/analytics/SatisfactionDistribution.js +150 -0
- package/dist/support/components/analytics/SatisfactionDistribution.js.map +1 -0
- package/dist/support/components/analytics/TopAgents.js +70 -0
- package/dist/support/components/analytics/TopAgents.js.map +1 -0
- package/dist/support/components/analytics/TrendChart.js +48 -0
- package/dist/support/components/analytics/TrendChart.js.map +1 -0
- package/dist/support/components/kb/ArticleForm.js +244 -0
- package/dist/support/components/kb/ArticleForm.js.map +1 -0
- package/dist/support/components/kb/index.js +1 -0
- package/dist/support/components/settings/CannedResponsesSettings.js +84 -0
- package/dist/support/components/settings/CannedResponsesSettings.js.map +1 -0
- package/dist/support/components/settings/SLAPoliciesSettings.js +249 -0
- package/dist/support/components/settings/SLAPoliciesSettings.js.map +1 -0
- package/dist/support/components/settings/TicketCategoriesSettings.js +360 -0
- package/dist/support/components/settings/TicketCategoriesSettings.js.map +1 -0
- package/dist/support/components/tickets/AttachmentList.js +54 -0
- package/dist/support/components/tickets/AttachmentList.js.map +1 -0
- package/dist/support/components/tickets/MarkdownContent.js +11 -0
- package/dist/support/components/tickets/MarkdownContent.js.map +1 -0
- package/dist/support/components/tickets/MessageComposer.js +137 -0
- package/dist/support/components/tickets/MessageComposer.js.map +1 -0
- package/dist/support/components/tickets/MessageThread.js +88 -0
- package/dist/support/components/tickets/MessageThread.js.map +1 -0
- package/dist/support/components/tickets/TicketDetailHeader.js +123 -0
- package/dist/support/components/tickets/TicketDetailHeader.js.map +1 -0
- package/dist/support/components/tickets/TicketHeader.js +191 -0
- package/dist/support/components/tickets/TicketHeader.js.map +1 -0
- package/dist/support/components/tickets/TicketSidebar.js +271 -0
- package/dist/support/components/tickets/TicketSidebar.js.map +1 -0
- package/dist/support/components/ui.js +2 -0
- package/dist/support/constants.js +6 -0
- package/dist/support/constants.js.map +1 -0
- package/dist/support/hooks/index.js +5 -0
- package/dist/support/hooks/useAnalyticsOperations.js +61 -0
- package/dist/support/hooks/useAnalyticsOperations.js.map +1 -0
- package/dist/support/hooks/useAttachmentsFailedToast.js +22 -0
- package/dist/support/hooks/useAttachmentsFailedToast.js.map +1 -0
- package/dist/support/hooks/useChatOperations.js +146 -0
- package/dist/support/hooks/useChatOperations.js.map +1 -0
- package/dist/support/hooks/useKnowledgeBaseOperations.js +194 -0
- package/dist/support/hooks/useKnowledgeBaseOperations.js.map +1 -0
- package/dist/support/hooks/useNotification.js +26 -0
- package/dist/support/hooks/useNotification.js.map +1 -0
- package/dist/support/hooks/useRegisterFooter.js +17 -0
- package/dist/support/hooks/useRegisterFooter.js.map +1 -0
- package/dist/support/hooks/useSettingsOperations.js +145 -0
- package/dist/support/hooks/useSettingsOperations.js.map +1 -0
- package/dist/support/hooks/useSupportAttachments.js +37 -0
- package/dist/support/hooks/useSupportAttachments.js.map +1 -0
- package/dist/support/hooks/useTicketOperations.js +222 -0
- package/dist/support/hooks/useTicketOperations.js.map +1 -0
- package/dist/support/index.js +10 -0
- package/dist/support/pages/AnalyticsPage.js +206 -0
- package/dist/support/pages/AnalyticsPage.js.map +1 -0
- package/dist/support/pages/ArticleDetailAdminPage.js +350 -0
- package/dist/support/pages/ArticleDetailAdminPage.js.map +1 -0
- package/dist/support/pages/ArticleDetailUserPage.js +150 -0
- package/dist/support/pages/ArticleDetailUserPage.js.map +1 -0
- package/dist/support/pages/ContactInquiriesPage.js +314 -0
- package/dist/support/pages/ContactInquiriesPage.js.map +1 -0
- package/dist/support/pages/ContactInquiryDetailPage.js +481 -0
- package/dist/support/pages/ContactInquiryDetailPage.js.map +1 -0
- package/dist/support/pages/CreateArticlePage.js +120 -0
- package/dist/support/pages/CreateArticlePage.js.map +1 -0
- package/dist/support/pages/CreateTicketPage.js +281 -0
- package/dist/support/pages/CreateTicketPage.js.map +1 -0
- package/dist/support/pages/EditArticlePage.js +151 -0
- package/dist/support/pages/EditArticlePage.js.map +1 -0
- package/dist/support/pages/KnowledgeBaseAdminPage.js +208 -0
- package/dist/support/pages/KnowledgeBaseAdminPage.js.map +1 -0
- package/dist/support/pages/KnowledgeBaseUserPage.js +188 -0
- package/dist/support/pages/KnowledgeBaseUserPage.js.map +1 -0
- package/dist/support/pages/SettingsPage.js +215 -0
- package/dist/support/pages/SettingsPage.js.map +1 -0
- package/dist/support/pages/TicketDetailAdminPage.js +157 -0
- package/dist/support/pages/TicketDetailAdminPage.js.map +1 -0
- package/dist/support/pages/TicketDetailUserPage.js +292 -0
- package/dist/support/pages/TicketDetailUserPage.js.map +1 -0
- package/dist/support/pages/TicketListPage.js +337 -0
- package/dist/support/pages/TicketListPage.js.map +1 -0
- package/dist/support/providers/SupportProvider.js +40 -0
- package/dist/support/providers/SupportProvider.js.map +1 -0
- package/dist/support/store/supportStore.js +102 -0
- package/dist/support/store/supportStore.js.map +1 -0
- package/dist/support/utils/cn.js +10 -0
- package/dist/support/utils/cn.js.map +1 -0
- package/dist/support/utils/context.js +32 -0
- package/dist/support/utils/context.js.map +1 -0
- package/dist/support/utils/errors.js +13 -0
- package/dist/support/utils/errors.js.map +1 -0
- package/dist/support/utils/i18n.js +9 -0
- package/dist/support/utils/i18n.js.map +1 -0
- package/dist/support/utils/index.js +105 -0
- package/dist/support/utils/index.js.map +1 -0
- package/dist/support/utils/markdown.js +47 -0
- package/dist/support/utils/markdown.js.map +1 -0
- package/dist/support/utils/supportFiles.js +116 -0
- package/dist/support/utils/supportFiles.js.map +1 -0
- package/dist/utils/nativeBridge.js +2 -0
- package/package.json +145 -0
package/README.md
ADDED
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
# @burdenoff/microfe-support
|
|
2
|
+
|
|
3
|
+
> Customer support and help desk system for the Burdenoff platform
|
|
4
|
+
|
|
5
|
+
[](https://www.typescriptlang.org/)
|
|
6
|
+
[](https://reactjs.org/)
|
|
7
|
+
[](https://vitejs.dev/)
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
The Support microfrontend provides a comprehensive customer support platform with ticket management, ticket-backed conversations, knowledge base, analytics, and SLA tracking. Deliver customer support with durable ticket history and operational insights.
|
|
12
|
+
|
|
13
|
+
**Port:** `5154`
|
|
14
|
+
**Module Type:** Tenant Module
|
|
15
|
+
**API Gateway:** Port 4018
|
|
16
|
+
|
|
17
|
+
## Features
|
|
18
|
+
|
|
19
|
+
- **Ticket Management**
|
|
20
|
+
- Create and manage support tickets
|
|
21
|
+
- Priority levels (Low, Normal, High, Critical)
|
|
22
|
+
- Status tracking (New, In Progress, Resolved, Closed)
|
|
23
|
+
- Ticket assignment and escalation
|
|
24
|
+
- Internal notes and customer replies
|
|
25
|
+
- File attachments
|
|
26
|
+
|
|
27
|
+
- **Ticket-Backed Conversations**
|
|
28
|
+
- Customer and agent replies on support tickets
|
|
29
|
+
- Message subscriptions for ticket updates
|
|
30
|
+
- Durable conversation history
|
|
31
|
+
- Canned responses
|
|
32
|
+
- Assignment and escalation through ticket workflows
|
|
33
|
+
|
|
34
|
+
- **Knowledge Base**
|
|
35
|
+
- Self-service articles
|
|
36
|
+
- Category organization
|
|
37
|
+
- Article search
|
|
38
|
+
- View tracking
|
|
39
|
+
- Helpful/not helpful voting
|
|
40
|
+
- Related articles
|
|
41
|
+
|
|
42
|
+
- **SLA Management**
|
|
43
|
+
- Configure SLA policies
|
|
44
|
+
- Track response times
|
|
45
|
+
- Resolution time monitoring
|
|
46
|
+
- SLA breach alerts
|
|
47
|
+
- Business hours configuration
|
|
48
|
+
- Custom SLA rules per priority
|
|
49
|
+
|
|
50
|
+
- **Analytics Dashboard**
|
|
51
|
+
- Ticket volume trends
|
|
52
|
+
- Response time metrics
|
|
53
|
+
- Resolution time metrics
|
|
54
|
+
- Agent performance
|
|
55
|
+
- Customer satisfaction scores
|
|
56
|
+
- Category breakdowns
|
|
57
|
+
|
|
58
|
+
- **Settings & Configuration**
|
|
59
|
+
- General settings
|
|
60
|
+
- Working hours
|
|
61
|
+
- SLA policies
|
|
62
|
+
- Canned responses
|
|
63
|
+
- Email templates
|
|
64
|
+
- Ticket categories
|
|
65
|
+
|
|
66
|
+
## Installation
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
# Install dependencies
|
|
70
|
+
bun install
|
|
71
|
+
|
|
72
|
+
# Generate GraphQL types
|
|
73
|
+
bun run codegen
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Development
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# Start development server (port 5154)
|
|
80
|
+
bun run dev
|
|
81
|
+
|
|
82
|
+
# Run linter
|
|
83
|
+
bun run lint
|
|
84
|
+
|
|
85
|
+
# Format code
|
|
86
|
+
bun run format
|
|
87
|
+
|
|
88
|
+
# Type check
|
|
89
|
+
bun run type:check
|
|
90
|
+
|
|
91
|
+
# Build for production
|
|
92
|
+
bun run build
|
|
93
|
+
|
|
94
|
+
# Run all quality checks
|
|
95
|
+
bun run sanity
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Project Structure
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
src/
|
|
102
|
+
├── dev/ # Development harness
|
|
103
|
+
├── support/ # Main module
|
|
104
|
+
│ ├── components/ # React components
|
|
105
|
+
│ │ ├── PageLayout.tsx
|
|
106
|
+
│ │ ├── analytics/ # Analytics components
|
|
107
|
+
│ │ ├── chat/ # Chat components
|
|
108
|
+
│ │ ├── settings/ # Settings components
|
|
109
|
+
│ │ ├── shared/ # Shared components
|
|
110
|
+
│ │ ├── tickets/ # Ticket components
|
|
111
|
+
│ │ └── ui.tsx # UI components
|
|
112
|
+
│ ├── graphql/ # GraphQL operations
|
|
113
|
+
│ │ ├── client.ts
|
|
114
|
+
│ │ ├── generated/ # Generated types
|
|
115
|
+
│ │ └── operations/ # Queries/Mutations
|
|
116
|
+
│ ├── hooks/ # Custom React hooks
|
|
117
|
+
│ │ ├── useAnalyticsOperations.ts
|
|
118
|
+
│ │ ├── useChatOperations.ts
|
|
119
|
+
│ │ ├── useKnowledgeBaseOperations.ts
|
|
120
|
+
│ │ ├── useSettingsOperations.ts
|
|
121
|
+
│ │ └── useTicketOperations.ts
|
|
122
|
+
│ ├── pages/ # Page components
|
|
123
|
+
│ ├── providers/ # Context providers
|
|
124
|
+
│ ├── store/ # State management
|
|
125
|
+
│ ├── types/ # TypeScript types
|
|
126
|
+
│ └── utils/ # Utility functions
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## GraphQL Operations
|
|
130
|
+
|
|
131
|
+
### Queries
|
|
132
|
+
- `getTickets` - List support tickets
|
|
133
|
+
- `getTicketDetail` - Get ticket messages and status
|
|
134
|
+
- `mySupportTickets` - List my support tickets
|
|
135
|
+
- `getArticles` - List KB articles
|
|
136
|
+
- `getArticle` - Get article details
|
|
137
|
+
- `getSupportAnalytics` - Get analytics
|
|
138
|
+
- `getSLAPolicies` - List SLA policies
|
|
139
|
+
- `getCannedResponses` - Get canned responses
|
|
140
|
+
|
|
141
|
+
### Mutations
|
|
142
|
+
- `createTicket` - Create support ticket
|
|
143
|
+
- `updateTicket` - Update ticket
|
|
144
|
+
- `addTicketMessage` - Add message to ticket
|
|
145
|
+
- `assignTicket` - Assign to agent
|
|
146
|
+
- `changeTicketStatus` - Update status
|
|
147
|
+
- `createSLAPolicy` - Create SLA policy
|
|
148
|
+
- `createCannedResponse` - Create canned response
|
|
149
|
+
|
|
150
|
+
### Subscriptions
|
|
151
|
+
- `ticketUpdated` - Ticket status changes (in generated code)
|
|
152
|
+
- `ticketMessageAdded` - Real-time ticket conversation updates (in generated code)
|
|
153
|
+
|
|
154
|
+
## Configuration
|
|
155
|
+
|
|
156
|
+
### Environment Variables
|
|
157
|
+
|
|
158
|
+
```env
|
|
159
|
+
VITE_API_GATEWAY_URL=http://localhost:4018/graphql
|
|
160
|
+
VITE_TENANT_ID=your-tenant-id
|
|
161
|
+
VITE_WORKSPACE_ID=your-workspace-id
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Integration with Shell
|
|
165
|
+
|
|
166
|
+
```tsx
|
|
167
|
+
import { SupportRoot } from '@burdenoff/microfe-support';
|
|
168
|
+
|
|
169
|
+
function App() {
|
|
170
|
+
return (
|
|
171
|
+
<SupportRoot
|
|
172
|
+
basePath="/support"
|
|
173
|
+
navigate={navigate}
|
|
174
|
+
apiGatewayUrl="http://localhost:4018/graphql"
|
|
175
|
+
workspaceId="workspace-123"
|
|
176
|
+
currentUser={{
|
|
177
|
+
id: 'user-1',
|
|
178
|
+
email: 'agent@example.com',
|
|
179
|
+
displayName: 'Support Agent',
|
|
180
|
+
}}
|
|
181
|
+
onTicketCreated={(ticket) => {
|
|
182
|
+
console.log('Ticket created:', ticket);
|
|
183
|
+
}}
|
|
184
|
+
onChatStarted={(session) => {
|
|
185
|
+
console.log('Ticket conversation started:', session);
|
|
186
|
+
}}
|
|
187
|
+
onArticleViewed={(article) => {
|
|
188
|
+
console.log('Article viewed:', article);
|
|
189
|
+
}}
|
|
190
|
+
/>
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
## Ticket Priorities
|
|
196
|
+
|
|
197
|
+
| Priority | SLA Response | SLA Resolution | Use Case |
|
|
198
|
+
|----------|--------------|----------------|----------|
|
|
199
|
+
| **Critical** | 15 minutes | 4 hours | System down, data loss |
|
|
200
|
+
| **High** | 1 hour | 8 hours | Major feature broken |
|
|
201
|
+
| **Normal** | 4 hours | 24 hours | General issues |
|
|
202
|
+
| **Low** | 24 hours | 72 hours | Questions, requests |
|
|
203
|
+
|
|
204
|
+
## Ticket Statuses
|
|
205
|
+
|
|
206
|
+
- **New** - Just created, not yet assigned
|
|
207
|
+
- **In Progress** - Being worked on by agent
|
|
208
|
+
- **Waiting on Customer** - Awaiting customer response
|
|
209
|
+
- **Resolved** - Issue fixed, awaiting confirmation
|
|
210
|
+
- **Closed** - Confirmed resolved
|
|
211
|
+
- **Reopened** - Reopened after closure
|
|
212
|
+
|
|
213
|
+
## SLA Breach Status
|
|
214
|
+
|
|
215
|
+
- **None** - On track
|
|
216
|
+
- **Warning 50%** - 50% of time elapsed
|
|
217
|
+
- **Warning 75%** - 75% of time elapsed
|
|
218
|
+
- **Warning 90%** - 90% of time elapsed
|
|
219
|
+
- **Breached** - SLA time exceeded
|
|
220
|
+
|
|
221
|
+
## Knowledge Base
|
|
222
|
+
|
|
223
|
+
### Article Structure
|
|
224
|
+
- Title and description
|
|
225
|
+
- Article content (Markdown)
|
|
226
|
+
- Category assignment
|
|
227
|
+
- Tags for search
|
|
228
|
+
- Related articles
|
|
229
|
+
- View count tracking
|
|
230
|
+
- Helpful ratings
|
|
231
|
+
|
|
232
|
+
### SEO-Friendly URLs
|
|
233
|
+
```
|
|
234
|
+
/knowledge-base/getting-started
|
|
235
|
+
/knowledge-base/account-management/password-reset
|
|
236
|
+
/knowledge-base/billing/upgrade-plan
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
## Available Scripts
|
|
240
|
+
|
|
241
|
+
| Script | Description |
|
|
242
|
+
|--------|-------------|
|
|
243
|
+
| `bun run dev` | Start development server |
|
|
244
|
+
| `bun run build` | Build for production |
|
|
245
|
+
| `bun run lint` | Run ESLint |
|
|
246
|
+
| `bun run format` | Format with Prettier |
|
|
247
|
+
| `bun run type:check` | TypeScript type checking |
|
|
248
|
+
| `bun run codegen` | Generate GraphQL types |
|
|
249
|
+
| `bun run sanity` | Run all quality checks |
|
|
250
|
+
|
|
251
|
+
## Technology Stack
|
|
252
|
+
|
|
253
|
+
- **Framework:** React 19 with TypeScript 5.9
|
|
254
|
+
- **Build Tool:** Vite 7
|
|
255
|
+
- **State Management:** Zustand 5
|
|
256
|
+
- **GraphQL Client:** Apollo Client
|
|
257
|
+
- **Styling:** Tailwind CSS v4
|
|
258
|
+
- **UI Components:** Radix UI
|
|
259
|
+
- **Icons:** Lucide React
|
|
260
|
+
- **Routing:** React Router DOM 7
|
|
261
|
+
- **Real-time:** GraphQL Subscriptions
|
|
262
|
+
|
|
263
|
+
## Known Issues
|
|
264
|
+
|
|
265
|
+
### GraphQL Generated Code
|
|
266
|
+
There are 2 TypeScript errors in `src/support/graphql/generated/operations.ts` (lines 778, 787) related to Apollo Client subscription type compatibility. These are in **generated code** and will be resolved when the GraphQL schema is regenerated. The module is fully functional despite these errors.
|
|
267
|
+
|
|
268
|
+
## Best Practices
|
|
269
|
+
|
|
270
|
+
1. **Ticket Management**
|
|
271
|
+
- Respond within SLA times
|
|
272
|
+
- Keep customers updated
|
|
273
|
+
- Use internal notes for team communication
|
|
274
|
+
- Close resolved tickets promptly
|
|
275
|
+
|
|
276
|
+
2. **Live Chat**
|
|
277
|
+
- Greet customers promptly
|
|
278
|
+
- Use canned responses for efficiency
|
|
279
|
+
- Transfer to specialist when needed
|
|
280
|
+
- End chats politely
|
|
281
|
+
|
|
282
|
+
3. **Knowledge Base**
|
|
283
|
+
- Write clear, concise articles
|
|
284
|
+
- Include screenshots/videos
|
|
285
|
+
- Keep content up-to-date
|
|
286
|
+
- Monitor article helpfulness
|
|
287
|
+
|
|
288
|
+
## License
|
|
289
|
+
|
|
290
|
+
Proprietary - Copyright © 2025 Burdenoff Consultancy Services Pvt. Ltd.
|