workflow-agent-cli 1.1.2
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/dist/chunk-VFN3BY56.js +120 -0
- package/dist/chunk-VFN3BY56.js.map +1 -0
- package/dist/chunk-X2NQJ2ZY.js +170 -0
- package/dist/chunk-X2NQJ2ZY.js.map +1 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +1206 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/config/index.d.ts +8 -0
- package/dist/config/index.js +11 -0
- package/dist/config/index.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -0
- package/dist/schema-CiJ4W7in.d.ts +97 -0
- package/dist/scripts/postinstall.d.ts +1 -0
- package/dist/scripts/postinstall.js +73 -0
- package/dist/scripts/postinstall.js.map +1 -0
- package/dist/validators/index.d.ts +16 -0
- package/dist/validators/index.js +17 -0
- package/dist/validators/index.js.map +1 -0
- package/package.json +80 -0
- package/templates/AGENT_EDITING_INSTRUCTIONS.md +887 -0
- package/templates/BRANCHING_STRATEGY.md +442 -0
- package/templates/COMPONENT_LIBRARY.md +611 -0
- package/templates/CUSTOM_SCOPE_TEMPLATE.md +228 -0
- package/templates/DEPLOYMENT_STRATEGY.md +509 -0
- package/templates/Guidelines.md +62 -0
- package/templates/LIBRARY_INVENTORY.md +615 -0
- package/templates/PROJECT_TEMPLATE_README.md +347 -0
- package/templates/SCOPE_CREATION_WORKFLOW.md +286 -0
- package/templates/SELF_IMPROVEMENT_MANDATE.md +298 -0
- package/templates/SINGLE_SOURCE_OF_TRUTH.md +492 -0
- package/templates/TESTING_STRATEGY.md +801 -0
- package/templates/_TEMPLATE_EXAMPLE.md +28 -0
|
@@ -0,0 +1,615 @@
|
|
|
1
|
+
# Library Inventory
|
|
2
|
+
|
|
3
|
+
> **Purpose**: This document serves as the single source of truth for all dependencies in the project. Agent must check this document before suggesting any new library and must update it when new libraries are approved.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Table of Contents
|
|
8
|
+
|
|
9
|
+
1. [Core Framework](#core-framework)
|
|
10
|
+
2. [Backend & Data](#backend--data)
|
|
11
|
+
3. [UI Components](#ui-components)
|
|
12
|
+
4. [Forms & Validation](#forms--validation)
|
|
13
|
+
5. [Drag & Drop](#drag--drop)
|
|
14
|
+
6. [Rich Text Editing](#rich-text-editing)
|
|
15
|
+
7. [Styling & Animation](#styling--animation)
|
|
16
|
+
8. [Testing](#testing)
|
|
17
|
+
9. [Utilities](#utilities)
|
|
18
|
+
10. [Adding New Libraries](#adding-new-libraries)
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Core Framework
|
|
23
|
+
|
|
24
|
+
### Next.js
|
|
25
|
+
|
|
26
|
+
| Property | Value |
|
|
27
|
+
| ------------- | ------------------------------------------------------------------ |
|
|
28
|
+
| Package | `next` |
|
|
29
|
+
| Version | `^16.1.1` |
|
|
30
|
+
| Purpose | React framework with App Router, server components, server actions |
|
|
31
|
+
| Documentation | https://nextjs.org/docs |
|
|
32
|
+
|
|
33
|
+
**Usage Patterns:**
|
|
34
|
+
|
|
35
|
+
- App Router: All routes in `app/` directory
|
|
36
|
+
- Server Actions: `'use server'` directive in `app/actions/`
|
|
37
|
+
- Server Components: Default for pages, use `'use client'` for interactivity
|
|
38
|
+
- Middleware: `middleware.ts` for auth redirects
|
|
39
|
+
|
|
40
|
+
### React
|
|
41
|
+
|
|
42
|
+
| Property | Value |
|
|
43
|
+
| ------------- | -------------------- |
|
|
44
|
+
| Package | `react`, `react-dom` |
|
|
45
|
+
| Version | `^18.3.1` |
|
|
46
|
+
| Purpose | UI library |
|
|
47
|
+
| Documentation | https://react.dev |
|
|
48
|
+
|
|
49
|
+
**Usage Patterns:**
|
|
50
|
+
|
|
51
|
+
- Hooks: `useState`, `useEffect`, `useCallback`, `useMemo`, `useContext`
|
|
52
|
+
- Context: Defined in `app/providers.tsx` (or `app/providers/`)
|
|
53
|
+
- Custom hooks: `hooks/use*.tsx`
|
|
54
|
+
|
|
55
|
+
### TypeScript
|
|
56
|
+
|
|
57
|
+
| Property | Value |
|
|
58
|
+
| -------- | --------------- |
|
|
59
|
+
| Package | `typescript` |
|
|
60
|
+
| Version | `^5.3.0` |
|
|
61
|
+
| Purpose | Type safety |
|
|
62
|
+
| Config | `tsconfig.json` |
|
|
63
|
+
|
|
64
|
+
**Usage Patterns:**
|
|
65
|
+
|
|
66
|
+
- Strict mode enabled
|
|
67
|
+
- Path aliases: `@/*`, `@/components/*`, etc.
|
|
68
|
+
- Types in `types/index.ts`, database types in `types/supabase.ts`
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Backend & Data
|
|
73
|
+
|
|
74
|
+
### Supabase
|
|
75
|
+
|
|
76
|
+
| Property | Value |
|
|
77
|
+
| ------------- | -------------------------------------------------------------- |
|
|
78
|
+
| Packages | `@supabase/supabase-js`, `@supabase/ssr` |
|
|
79
|
+
| Versions | `^2.89.0`, `^0.8.0` |
|
|
80
|
+
| Purpose | Database (PostgreSQL), authentication, real-time subscriptions |
|
|
81
|
+
| Documentation | https://supabase.com/docs |
|
|
82
|
+
|
|
83
|
+
**Usage Patterns:**
|
|
84
|
+
|
|
85
|
+
```typescript
|
|
86
|
+
// Browser client (singleton)
|
|
87
|
+
import { getSupabaseClient } from '@/lib/supabase/client';
|
|
88
|
+
|
|
89
|
+
// Server client (for server components/actions)
|
|
90
|
+
import { createServerClient } from '@/lib/supabase/server';
|
|
91
|
+
|
|
92
|
+
// Admin client (bypasses RLS)
|
|
93
|
+
import { createAdminClient } from '@/lib/supabase/admin';
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Files:**
|
|
97
|
+
|
|
98
|
+
- `lib/supabase/client.ts` - Browser client
|
|
99
|
+
- `lib/supabase/server.ts` - Server client
|
|
100
|
+
- `lib/supabase/admin.ts` - Admin client
|
|
101
|
+
- `lib/supabase/middleware.ts` - Session refresh
|
|
102
|
+
|
|
103
|
+
### TanStack Query (React Query)
|
|
104
|
+
|
|
105
|
+
| Property | Value |
|
|
106
|
+
| ------------- | ----------------------------------------------- |
|
|
107
|
+
| Package | `@tanstack/react-query` |
|
|
108
|
+
| Version | `^5.90.16` |
|
|
109
|
+
| Purpose | Server state management, caching, data fetching |
|
|
110
|
+
| Documentation | https://tanstack.com/query/latest |
|
|
111
|
+
|
|
112
|
+
**Usage Patterns:**
|
|
113
|
+
|
|
114
|
+
```typescript
|
|
115
|
+
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';
|
|
116
|
+
|
|
117
|
+
// Fetching data
|
|
118
|
+
const { data, isLoading, error } = useQuery({
|
|
119
|
+
queryKey: ['tasks', boardId],
|
|
120
|
+
queryFn: () => getTasks(boardId),
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
// Mutations with cache invalidation
|
|
124
|
+
const queryClient = useQueryClient();
|
|
125
|
+
const mutation = useMutation({
|
|
126
|
+
mutationFn: createTask,
|
|
127
|
+
onSuccess: () => {
|
|
128
|
+
queryClient.invalidateQueries({ queryKey: ['tasks'] });
|
|
129
|
+
},
|
|
130
|
+
});
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## UI Components
|
|
136
|
+
|
|
137
|
+
### Radix UI Primitives
|
|
138
|
+
|
|
139
|
+
| Property | Value |
|
|
140
|
+
| ------------- | ----------------------------------- |
|
|
141
|
+
| Packages | `@radix-ui/react-*` (20+ packages) |
|
|
142
|
+
| Purpose | Unstyled, accessible UI primitives |
|
|
143
|
+
| Documentation | https://www.radix-ui.com/primitives |
|
|
144
|
+
|
|
145
|
+
**Installed Primitives:**
|
|
146
|
+
|
|
147
|
+
- `@radix-ui/react-accordion`
|
|
148
|
+
- `@radix-ui/react-alert-dialog`
|
|
149
|
+
- `@radix-ui/react-avatar`
|
|
150
|
+
- `@radix-ui/react-checkbox`
|
|
151
|
+
- `@radix-ui/react-collapsible`
|
|
152
|
+
- `@radix-ui/react-context-menu`
|
|
153
|
+
- `@radix-ui/react-dialog`
|
|
154
|
+
- `@radix-ui/react-dropdown-menu`
|
|
155
|
+
- `@radix-ui/react-hover-card`
|
|
156
|
+
- `@radix-ui/react-label`
|
|
157
|
+
- `@radix-ui/react-menubar`
|
|
158
|
+
- `@radix-ui/react-navigation-menu`
|
|
159
|
+
- `@radix-ui/react-popover`
|
|
160
|
+
- `@radix-ui/react-progress`
|
|
161
|
+
- `@radix-ui/react-radio-group`
|
|
162
|
+
- `@radix-ui/react-scroll-area`
|
|
163
|
+
- `@radix-ui/react-select`
|
|
164
|
+
- `@radix-ui/react-separator`
|
|
165
|
+
- `@radix-ui/react-slider`
|
|
166
|
+
- `@radix-ui/react-slot`
|
|
167
|
+
- `@radix-ui/react-switch`
|
|
168
|
+
- `@radix-ui/react-tabs`
|
|
169
|
+
- `@radix-ui/react-toggle`
|
|
170
|
+
- `@radix-ui/react-toggle-group`
|
|
171
|
+
- `@radix-ui/react-tooltip`
|
|
172
|
+
|
|
173
|
+
**Usage**: Import from `components/ui/` which wraps Radix primitives with styling.
|
|
174
|
+
|
|
175
|
+
### shadcn/ui Components
|
|
176
|
+
|
|
177
|
+
| Property | Value |
|
|
178
|
+
| ------------- | ----------------------------------------- |
|
|
179
|
+
| Location | `components/ui/` |
|
|
180
|
+
| Purpose | Pre-styled Radix components with Tailwind |
|
|
181
|
+
| Documentation | https://ui.shadcn.com |
|
|
182
|
+
|
|
183
|
+
**Available Components** (48 files in `components/ui/`):
|
|
184
|
+
|
|
185
|
+
- Accordion, Alert, AlertDialog, Avatar
|
|
186
|
+
- Badge, Button, Calendar, Card
|
|
187
|
+
- Checkbox, Collapsible, Command, ContextMenu
|
|
188
|
+
- Dialog, Drawer, DropdownMenu, Form
|
|
189
|
+
- HoverCard, Input, Label, Menubar
|
|
190
|
+
- NavigationMenu, Popover, Progress, RadioGroup
|
|
191
|
+
- ScrollArea, Select, Separator, Sheet
|
|
192
|
+
- Skeleton, Slider, Sonner (toasts), Switch
|
|
193
|
+
- Table, Tabs, Textarea, Toast
|
|
194
|
+
- Toggle, ToggleGroup, Tooltip
|
|
195
|
+
- And more...
|
|
196
|
+
|
|
197
|
+
**Usage Pattern:**
|
|
198
|
+
|
|
199
|
+
```typescript
|
|
200
|
+
import { Button } from '@/components/ui/button';
|
|
201
|
+
import { Dialog, DialogContent, DialogHeader } from '@/components/ui/dialog';
|
|
202
|
+
import { Input } from '@/components/ui/input';
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### Lucide React (Icons)
|
|
206
|
+
|
|
207
|
+
| Property | Value |
|
|
208
|
+
| ------------- | -------------------------------------- |
|
|
209
|
+
| Package | `lucide-react` |
|
|
210
|
+
| Version | `0.487.0` |
|
|
211
|
+
| Purpose | Icon library (Feather icons successor) |
|
|
212
|
+
| Documentation | https://lucide.dev |
|
|
213
|
+
|
|
214
|
+
**Usage Pattern:**
|
|
215
|
+
|
|
216
|
+
```typescript
|
|
217
|
+
import { Plus, Trash, Settings, ChevronDown } from "lucide-react";
|
|
218
|
+
|
|
219
|
+
<Button>
|
|
220
|
+
<Plus className="h-4 w-4 mr-2" />
|
|
221
|
+
Add Task
|
|
222
|
+
</Button>
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
### Sonner (Toasts)
|
|
226
|
+
|
|
227
|
+
| Property | Value |
|
|
228
|
+
| ------------- | ---------------------------- |
|
|
229
|
+
| Package | `sonner` |
|
|
230
|
+
| Version | `2.0.3` |
|
|
231
|
+
| Purpose | Toast notifications |
|
|
232
|
+
| Documentation | https://sonner.emilkowal.ski |
|
|
233
|
+
|
|
234
|
+
**Usage Pattern:**
|
|
235
|
+
|
|
236
|
+
```typescript
|
|
237
|
+
import { toast } from 'sonner';
|
|
238
|
+
|
|
239
|
+
toast.success('Task created successfully');
|
|
240
|
+
toast.error('Failed to delete task');
|
|
241
|
+
toast.loading('Saving changes...');
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### Vaul (Drawer)
|
|
245
|
+
|
|
246
|
+
| Property | Value |
|
|
247
|
+
| -------- | -------------------------------- |
|
|
248
|
+
| Package | `vaul` |
|
|
249
|
+
| Version | `1.1.2` |
|
|
250
|
+
| Purpose | Mobile-friendly drawer component |
|
|
251
|
+
|
|
252
|
+
### cmdk (Command Palette)
|
|
253
|
+
|
|
254
|
+
| Property | Value |
|
|
255
|
+
| -------- | ------------------------------ |
|
|
256
|
+
| Package | `cmdk` |
|
|
257
|
+
| Version | `1.1.1` |
|
|
258
|
+
| Purpose | Command palette / command menu |
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
## Forms & Validation
|
|
263
|
+
|
|
264
|
+
### React Hook Form
|
|
265
|
+
|
|
266
|
+
| Property | Value |
|
|
267
|
+
| ------------- | --------------------------- |
|
|
268
|
+
| Package | `react-hook-form` |
|
|
269
|
+
| Version | `7.55.0` |
|
|
270
|
+
| Purpose | Form state management |
|
|
271
|
+
| Documentation | https://react-hook-form.com |
|
|
272
|
+
|
|
273
|
+
**Usage Pattern:**
|
|
274
|
+
|
|
275
|
+
```typescript
|
|
276
|
+
import { useForm } from 'react-hook-form';
|
|
277
|
+
import { zodResolver } from '@hookform/resolvers/zod';
|
|
278
|
+
|
|
279
|
+
const form = useForm<FormData>({
|
|
280
|
+
resolver: zodResolver(formSchema),
|
|
281
|
+
defaultValues: { title: '', description: '' },
|
|
282
|
+
});
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### Zod
|
|
286
|
+
|
|
287
|
+
| Property | Value |
|
|
288
|
+
| ------------- | --------------------------------- |
|
|
289
|
+
| Package | `zod` |
|
|
290
|
+
| Version | `^4.3.2` |
|
|
291
|
+
| Purpose | Schema validation, type inference |
|
|
292
|
+
| Documentation | https://zod.dev |
|
|
293
|
+
|
|
294
|
+
**Usage Patterns:**
|
|
295
|
+
|
|
296
|
+
```typescript
|
|
297
|
+
import { z } from 'zod';
|
|
298
|
+
|
|
299
|
+
// Define schema
|
|
300
|
+
export const TaskSchema = z.object({
|
|
301
|
+
id: z.string().uuid(),
|
|
302
|
+
title: z.string().min(1).max(255),
|
|
303
|
+
priority: z.enum(['low', 'medium', 'high', 'critical']),
|
|
304
|
+
});
|
|
305
|
+
|
|
306
|
+
// Infer type from schema
|
|
307
|
+
export type Task = z.infer<typeof TaskSchema>;
|
|
308
|
+
|
|
309
|
+
// Validate data
|
|
310
|
+
const result = TaskSchema.safeParse(data);
|
|
311
|
+
if (!result.success) {
|
|
312
|
+
console.error(result.error);
|
|
313
|
+
}
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
**Schema Files:** `lib/validations/*.schema.ts`
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
## Drag & Drop
|
|
321
|
+
|
|
322
|
+
### react-dnd
|
|
323
|
+
|
|
324
|
+
| Property | Value |
|
|
325
|
+
| ------------- | ----------------------------------------------------------------- |
|
|
326
|
+
| Packages | `react-dnd`, `react-dnd-html5-backend`, `react-dnd-touch-backend` |
|
|
327
|
+
| Versions | `16.0.1`, `16.0.1`, `^16.0.1` |
|
|
328
|
+
| Purpose | Drag and drop for Kanban boards |
|
|
329
|
+
| Documentation | https://react-dnd.github.io/react-dnd |
|
|
330
|
+
|
|
331
|
+
**Usage Pattern:**
|
|
332
|
+
|
|
333
|
+
```typescript
|
|
334
|
+
import { useDrag, useDrop } from "react-dnd";
|
|
335
|
+
import { DndProvider } from "react-dnd";
|
|
336
|
+
import { HTML5Backend } from "react-dnd-html5-backend";
|
|
337
|
+
|
|
338
|
+
// In provider (already set up in app/providers.tsx)
|
|
339
|
+
<DndProvider backend={HTML5Backend}>
|
|
340
|
+
{children}
|
|
341
|
+
</DndProvider>
|
|
342
|
+
|
|
343
|
+
// In draggable component
|
|
344
|
+
const [{ isDragging }, drag] = useDrag({
|
|
345
|
+
type: "TASK",
|
|
346
|
+
item: { id: task.id },
|
|
347
|
+
collect: (monitor) => ({
|
|
348
|
+
isDragging: monitor.isDragging(),
|
|
349
|
+
}),
|
|
350
|
+
});
|
|
351
|
+
|
|
352
|
+
// In drop target
|
|
353
|
+
const [{ isOver }, drop] = useDrop({
|
|
354
|
+
accept: "TASK",
|
|
355
|
+
drop: (item) => handleDrop(item),
|
|
356
|
+
collect: (monitor) => ({
|
|
357
|
+
isOver: monitor.isOver(),
|
|
358
|
+
}),
|
|
359
|
+
});
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
---
|
|
363
|
+
|
|
364
|
+
## Rich Text Editing
|
|
365
|
+
|
|
366
|
+
### TipTap
|
|
367
|
+
|
|
368
|
+
| Property | Value |
|
|
369
|
+
| ------------- | ------------------------------------------------------------- |
|
|
370
|
+
| Packages | `@tiptap/react`, `@tiptap/starter-kit`, `@tiptap/extension-*` |
|
|
371
|
+
| Versions | `^3.13.0` |
|
|
372
|
+
| Purpose | Rich text editor for task descriptions, comments |
|
|
373
|
+
| Documentation | https://tiptap.dev |
|
|
374
|
+
|
|
375
|
+
**Installed Extensions:**
|
|
376
|
+
|
|
377
|
+
- `@tiptap/starter-kit` - Basic editing (bold, italic, lists, etc.)
|
|
378
|
+
- `@tiptap/extension-image` - Image support
|
|
379
|
+
- `@tiptap/extension-link` - Hyperlinks
|
|
380
|
+
- `@tiptap/extension-mention` - @mentions
|
|
381
|
+
- `@tiptap/extension-placeholder` - Placeholder text
|
|
382
|
+
|
|
383
|
+
**Usage Location:** `components/RichTextEditor.tsx`, `components/EnhancedRichTextEditor.tsx`
|
|
384
|
+
|
|
385
|
+
### DOMPurify
|
|
386
|
+
|
|
387
|
+
| Property | Value |
|
|
388
|
+
| -------- | ---------------------------- |
|
|
389
|
+
| Package | `dompurify` |
|
|
390
|
+
| Version | `^3.3.1` |
|
|
391
|
+
| Purpose | Sanitize HTML to prevent XSS |
|
|
392
|
+
|
|
393
|
+
---
|
|
394
|
+
|
|
395
|
+
## Styling & Animation
|
|
396
|
+
|
|
397
|
+
### Tailwind CSS
|
|
398
|
+
|
|
399
|
+
| Property | Value |
|
|
400
|
+
| -------- | ------------------------------------- |
|
|
401
|
+
| Package | `tailwindcss`, `@tailwindcss/postcss` |
|
|
402
|
+
| Version | `4.1.12` |
|
|
403
|
+
| Purpose | Utility-first CSS |
|
|
404
|
+
| Config | `postcss.config.mjs`, inline config |
|
|
405
|
+
|
|
406
|
+
### Class Utilities
|
|
407
|
+
|
|
408
|
+
| Property | Value |
|
|
409
|
+
| -------- | -------------------------------------------------------- |
|
|
410
|
+
| Packages | `clsx`, `tailwind-merge`, `class-variance-authority` |
|
|
411
|
+
| Versions | `2.1.1`, `3.2.0`, `0.7.1` |
|
|
412
|
+
| Purpose | Conditional classes, merge conflicts, variant management |
|
|
413
|
+
|
|
414
|
+
**Usage Pattern:**
|
|
415
|
+
|
|
416
|
+
```typescript
|
|
417
|
+
import { cn } from "@/lib/utils"; // combines clsx + tailwind-merge
|
|
418
|
+
|
|
419
|
+
<div className={cn(
|
|
420
|
+
"base-styles",
|
|
421
|
+
isActive && "active-styles",
|
|
422
|
+
className
|
|
423
|
+
)} />
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
### Motion (Framer Motion)
|
|
427
|
+
|
|
428
|
+
| Property | Value |
|
|
429
|
+
| ------------- | ------------------ |
|
|
430
|
+
| Package | `motion` |
|
|
431
|
+
| Version | `12.23.24` |
|
|
432
|
+
| Purpose | Animation library |
|
|
433
|
+
| Documentation | https://motion.dev |
|
|
434
|
+
|
|
435
|
+
### next-themes
|
|
436
|
+
|
|
437
|
+
| Property | Value |
|
|
438
|
+
| -------- | ----------------------- |
|
|
439
|
+
| Package | `next-themes` |
|
|
440
|
+
| Version | `0.4.6` |
|
|
441
|
+
| Purpose | Dark/light mode theming |
|
|
442
|
+
|
|
443
|
+
---
|
|
444
|
+
|
|
445
|
+
## Testing
|
|
446
|
+
|
|
447
|
+
### Vitest (Unit Testing)
|
|
448
|
+
|
|
449
|
+
| Property | Value |
|
|
450
|
+
| ------------- | --------------------------------------------- |
|
|
451
|
+
| Packages | `vitest`, `@vitest/ui`, `@vitest/coverage-v8` |
|
|
452
|
+
| Versions | `^1.6.1` |
|
|
453
|
+
| Purpose | Unit testing framework |
|
|
454
|
+
| Config | `vitest.config.ts` |
|
|
455
|
+
| Documentation | https://vitest.dev |
|
|
456
|
+
|
|
457
|
+
**Usage:**
|
|
458
|
+
|
|
459
|
+
```bash
|
|
460
|
+
pnpm test # Run tests once
|
|
461
|
+
pnpm test:watch # Watch mode
|
|
462
|
+
pnpm test:ui # Visual UI
|
|
463
|
+
pnpm test:coverage # With coverage
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
### Playwright (E2E Testing)
|
|
467
|
+
|
|
468
|
+
| Property | Value |
|
|
469
|
+
| ------------- | -------------------------- |
|
|
470
|
+
| Package | `@playwright/test` |
|
|
471
|
+
| Version | `^1.57.0` |
|
|
472
|
+
| Purpose | End-to-end browser testing |
|
|
473
|
+
| Config | `playwright.config.ts` |
|
|
474
|
+
| Documentation | https://playwright.dev |
|
|
475
|
+
|
|
476
|
+
**Usage:**
|
|
477
|
+
|
|
478
|
+
```bash
|
|
479
|
+
pnpm test:e2e # Run E2E tests
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
### Testing Library
|
|
483
|
+
|
|
484
|
+
| Property | Value |
|
|
485
|
+
| -------- | ------------------------------------------------------------------------------------ |
|
|
486
|
+
| Packages | `@testing-library/react`, `@testing-library/jest-dom`, `@testing-library/user-event` |
|
|
487
|
+
| Versions | `^14.3.1`, `^6.9.1`, `^14.6.1` |
|
|
488
|
+
| Purpose | React component testing utilities |
|
|
489
|
+
|
|
490
|
+
### MSW (Mock Service Worker)
|
|
491
|
+
|
|
492
|
+
| Property | Value |
|
|
493
|
+
| -------- | -------------------------- |
|
|
494
|
+
| Package | `msw` |
|
|
495
|
+
| Version | `^2.12.4` |
|
|
496
|
+
| Purpose | API mocking for tests |
|
|
497
|
+
| Handlers | `lib/test-utils/handlers/` |
|
|
498
|
+
|
|
499
|
+
### jsdom
|
|
500
|
+
|
|
501
|
+
| Property | Value |
|
|
502
|
+
| -------- | -------------------------- |
|
|
503
|
+
| Package | `jsdom` |
|
|
504
|
+
| Version | `^24.1.3` |
|
|
505
|
+
| Purpose | DOM environment for Vitest |
|
|
506
|
+
|
|
507
|
+
---
|
|
508
|
+
|
|
509
|
+
## Utilities
|
|
510
|
+
|
|
511
|
+
### date-fns
|
|
512
|
+
|
|
513
|
+
| Property | Value |
|
|
514
|
+
| ------------- | -------------------- |
|
|
515
|
+
| Package | `date-fns` |
|
|
516
|
+
| Version | `3.6.0` |
|
|
517
|
+
| Purpose | Date manipulation |
|
|
518
|
+
| Documentation | https://date-fns.org |
|
|
519
|
+
|
|
520
|
+
**Usage Pattern:**
|
|
521
|
+
|
|
522
|
+
```typescript
|
|
523
|
+
import { format, parseISO, differenceInDays } from 'date-fns';
|
|
524
|
+
|
|
525
|
+
format(new Date(), 'MMM d, yyyy'); // "Jan 8, 2026"
|
|
526
|
+
differenceInDays(endDate, startDate);
|
|
527
|
+
```
|
|
528
|
+
|
|
529
|
+
### Recharts
|
|
530
|
+
|
|
531
|
+
| Property | Value |
|
|
532
|
+
| -------- | ----------------------------- |
|
|
533
|
+
| Package | `recharts` |
|
|
534
|
+
| Version | `2.15.2` |
|
|
535
|
+
| Purpose | Charts and data visualization |
|
|
536
|
+
|
|
537
|
+
### Resend
|
|
538
|
+
|
|
539
|
+
| Property | Value |
|
|
540
|
+
| -------- | -------------------------------------------- |
|
|
541
|
+
| Package | `resend` |
|
|
542
|
+
| Version | `^6.6.0` |
|
|
543
|
+
| Purpose | Transactional email (invites, notifications) |
|
|
544
|
+
|
|
545
|
+
### Faker.js
|
|
546
|
+
|
|
547
|
+
| Property | Value |
|
|
548
|
+
| -------- | -------------------------------------- |
|
|
549
|
+
| Package | `@faker-js/faker` |
|
|
550
|
+
| Version | `^10.1.0` |
|
|
551
|
+
| Purpose | Generate fake data for testing/seeding |
|
|
552
|
+
|
|
553
|
+
### Other Utilities
|
|
554
|
+
|
|
555
|
+
| Package | Version | Purpose |
|
|
556
|
+
| -------------------------- | --------- | ----------------------- |
|
|
557
|
+
| `react-day-picker` | `8.10.1` | Date picker component |
|
|
558
|
+
| `react-resizable-panels` | `2.1.7` | Resizable panel layouts |
|
|
559
|
+
| `react-responsive-masonry` | `2.7.1` | Masonry grid layout |
|
|
560
|
+
| `embla-carousel-react` | `8.6.0` | Carousel component |
|
|
561
|
+
| `input-otp` | `1.4.2` | OTP input component |
|
|
562
|
+
| `react-popper` | `2.3.0` | Popper positioning |
|
|
563
|
+
| `@popperjs/core` | `2.11.8` | Popper core |
|
|
564
|
+
| `tippy.js` | `^6.3.7` | Tooltip library |
|
|
565
|
+
| `@use-gesture/react` | `^10.3.1` | Gesture handling |
|
|
566
|
+
|
|
567
|
+
---
|
|
568
|
+
|
|
569
|
+
## Adding New Libraries
|
|
570
|
+
|
|
571
|
+
### Process
|
|
572
|
+
|
|
573
|
+
1. **Check this document first** - Ensure the functionality isn't already covered
|
|
574
|
+
2. **Propose the library** - Explain why it's needed and alternatives considered
|
|
575
|
+
3. **Get approval** - Do not add without explicit user approval
|
|
576
|
+
4. **Install** - Add to `package.json` with appropriate version
|
|
577
|
+
5. **Document** - Add entry to this file following the format above
|
|
578
|
+
6. **Example** - Add usage example in the relevant source file
|
|
579
|
+
|
|
580
|
+
### Documentation Template
|
|
581
|
+
|
|
582
|
+
When adding a new library, use this template:
|
|
583
|
+
|
|
584
|
+
```markdown
|
|
585
|
+
### [Library Name]
|
|
586
|
+
|
|
587
|
+
| Property | Value |
|
|
588
|
+
| ------------- | ----------------- |
|
|
589
|
+
| Package | `package-name` |
|
|
590
|
+
| Version | `x.x.x` |
|
|
591
|
+
| Purpose | Brief description |
|
|
592
|
+
| Documentation | https://... |
|
|
593
|
+
|
|
594
|
+
**Usage Patterns:**
|
|
595
|
+
\`\`\`typescript
|
|
596
|
+
// Code example
|
|
597
|
+
\`\`\`
|
|
598
|
+
|
|
599
|
+
**Files:** Where it's primarily used
|
|
600
|
+
```
|
|
601
|
+
|
|
602
|
+
---
|
|
603
|
+
|
|
604
|
+
## MUI (Legacy - Consider Migration)
|
|
605
|
+
|
|
606
|
+
> ⚠️ **Note**: MUI packages are installed but the project primarily uses Radix/shadcn. Consider removing if not actively used.
|
|
607
|
+
|
|
608
|
+
| Packages | Versions |
|
|
609
|
+
| --------------------- | --------- |
|
|
610
|
+
| `@mui/material` | `7.3.5` |
|
|
611
|
+
| `@mui/icons-material` | `7.3.5` |
|
|
612
|
+
| `@emotion/react` | `11.14.0` |
|
|
613
|
+
| `@emotion/styled` | `11.14.1` |
|
|
614
|
+
|
|
615
|
+
If these are only used in specific legacy components, consider migrating to Radix equivalents.
|