oneie 1.3.3 → 1.4.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.
- package/.claude/agents/engineering-architect.md +39 -56
- package/.claude/agents/engineering-developer.md +37 -57
- package/.claude/agents/engineering-director.md +37 -144
- package/.claude/agents/engineering-ingestor.md +229 -0
- package/.claude/agents/engineering-quality-assurance.md +40 -206
- package/.claude/agents/engineering-user-experience.md +36 -207
- package/.claude/agents/improver.md +454 -0
- package/.claude/agents/marketing-brand-identity.md +37 -48
- package/.claude/agents/marketing-director.md +9 -0
- package/.claude/agents/one-orchestrator.md +50 -136
- package/.claude/agents/story-teller.md +10 -0
- package/.claude/agents/task-master.md +10 -0
- package/.claude/agents/turbo-repo-builder.md +51 -0
- package/.claude/claude-code-hooks.json +20 -233
- package/.claude/commands/agent-balance +111 -0
- package/.claude/commands/agent.md +24 -7
- package/.claude/commands/cascade-status.md +128 -0
- package/.claude/commands/ingest.md +290 -0
- package/.claude/commands/ingestor.md +136 -0
- package/.claude/commands/mission.md +26 -8
- package/.claude/commands/one.md +351 -14
- package/.claude/commands/quality-check.md +204 -0
- package/.claude/commands/smart-route.md +220 -0
- package/.claude/commands/start.md +9 -8
- package/.claude/commands/story.md +18 -3
- package/.claude/commands/task.md +22 -1
- package/.claude/settings.local.json +18 -3
- package/.obsidian/core-plugins.json +3 -1
- package/.one/checklists/agent-quality-checklist.md +24 -15
- package/.one/checklists/story-quality-checklist.md +24 -15
- package/.one/checklists/task-quality-checklist.md +24 -15
- package/.one/templates/bun-workspace-guide-template.md +188 -0
- package/.one/templates/bunfig-template.toml +95 -0
- package/.one/templates/root-package-template.json +37 -21
- package/.one/templates/turbo-config-template.json +18 -3
- package/.one/tools/bump-core-version.js +0 -0
- package/.one/tools/bump-expansion-version.js +0 -0
- package/.one/tools/code-generators.js +0 -0
- package/.one/tools/compression-engine.js +638 -0
- package/.one/tools/content-deduplicator.js +336 -0
- package/.one/tools/convert-wav-to-mp3.js +0 -0
- package/.one/tools/foundation-wizard.js +0 -0
- package/.one/tools/generate-toc.js +0 -0
- package/.one/tools/ingestor/cascade-integration.js +523 -0
- package/.one/tools/ingestor/cli.ts +234 -0
- package/.one/tools/ingestor/context-mapper.ts +604 -0
- package/.one/tools/ingestor/error-handling-monitor.js +742 -0
- package/.one/tools/ingestor/file-discovery.ts +484 -0
- package/.one/tools/ingestor/file-transformer.ts +524 -0
- package/.one/tools/ingestor/ingestor-orchestrator.ts +416 -0
- package/.one/tools/ingestor/package.json +47 -0
- package/.one/tools/ingestor/usage-examples.md +458 -0
- package/.one/tools/lazy-loader.js +489 -0
- package/.one/tools/minimal-generators.js +0 -0
- package/.one/tools/performance-benchmark.js +300 -0
- package/.one/tools/premium-manager.js +0 -0
- package/.one/tools/semantic-release-sync-installer.js +0 -0
- package/.one/tools/size-memory-optimizer.js +475 -0
- package/.one/tools/sync-installer-version.js +0 -0
- package/.one/tools/text-to-speech.js +0 -0
- package/.one/tools/transformative-ai-engine.js +0 -0
- package/.one/workflows/safe-improvement-deployment.yaml +420 -0
- package/CLAUDE.md +30 -0
- package/README.md +41 -10
- package/bin/oneie/index.js +733 -64
- package/one/cache/benchmark-results.json +43 -0
- package/one/cache/file-index.json +12480 -0
- package/one/config/agent-routing.yaml +124 -0
- package/one/config/agent-skills.yaml +451 -0
- package/one/config/cache-config.yaml +304 -0
- package/one/config/feedback-templates.yaml +152 -0
- package/one/config/performance-config.yaml +281 -0
- package/one/config/quality-automation.yaml +405 -0
- package/one/config/routing-logic.yaml +292 -0
- package/one/data/task-registry.yaml +224 -0
- package/one/stories/story-1.10-parallel-task-execution-orchestration.md +119 -0
- package/one/stories/story-3.1-external-repository-foundation.md +374 -0
- package/one/stories/story-3.2-3-levels-architecture-integration.md +449 -0
- package/one/stories/story-3.3-multi-platform-application-development.md +677 -0
- package/one/stories/story-3.4-shared-package-system-ui-components.md +854 -0
- package/one/stories/story-3.5-backend-integration-production-deployment.md +1034 -0
- package/one/tasks/task-1.10.1-design-parallel-execution-architecture.md +108 -0
- package/one/tasks/task-1.10.2-create-task-dependency-mapping-system.md +82 -0
- package/one/tasks/task-1.10.3-build-agent-spawning-orchestration-engine.md +120 -0
- package/one/tasks/task-1.10.4-implement-task-queue-dependency-resolution.md +125 -0
- package/one/tasks/task-1.10.5-create-task-numbering-convention-system.md +542 -0
- package/one/tasks/task-3.1.1-external-repository-creation.md +303 -0
- package/one/tasks/task-3.1.2-turborepo-configuration-optimization.md +402 -0
- package/one/tasks/task-3.1.3-shared-configuration-packages.md +571 -0
- package/one/tasks/task-3.1.4-bun-package-management-optimization.md +627 -0
- package/one/tools/task-numbering-validator.js +429 -0
- package/package.json +1 -1
- package/quality-gate-optimization-analysis.md +260 -0
- package/turbo-benchmark.js +268 -0
- package/turbo-optimization-guide.md +163 -0
- package/turbo-workspace-template.json +83 -0
- package/turbo.json +178 -0
- package/.claude/commands/analyst.md +0 -70
- package/.claude/commands/architect.md +0 -67
- package/.claude/commands/commander.md +0 -78
- package/.claude/commands/deploy.md +0 -68
- package/.claude/commands/dev.md +0 -60
- package/.claude/commands/playbook.md +0 -81
- package/.claude/commands/pm.md +0 -64
- package/.claude/commands/po.md +0 -68
- package/.claude/commands/qa.md +0 -59
- package/.claude/commands/taskmaster.md +0 -85
- package/.claude/commands/ux-expert.md +0 -58
- package/.one/stories/bullstamp-attract-module-complete.md +0 -255
- package/.one/stories/bullstamp-deployment-master-plan.md +0 -518
- package/.one/stories/bullstamp-executive-implementation-summary.md +0 -254
- package/.one/stories/bullstamp-project-status-complete.md +0 -257
- package/.one/stories/obsidian-pandoc-config.md +0 -159
- package/.one/stories/story-1.1-perfect-filesystem-organization.md +0 -270
- package/.one/stories/story-1.1.1.md +0 -136
- package/.one/stories/story-1.1.md +0 -131
- package/.one/stories/story-1.2.md +0 -420
- package/.one/stories/story-1.3.md +0 -177
- package/.one/stories/story-1.4.md +0 -356
- package/.one/stories/story-1.5.md +0 -572
- package/.one/stories/story-1.6.md +0 -481
- package/.one/stories/story-1.7.md +0 -923
- package/.one/stories/story-1.8.md +0 -404
- package/.one/stories/story-2.0.md +0 -132
- package/.one/stories/story-2.1.md +0 -110
- package/.one/stories/story-2.2.md +0 -110
- package/.one/stories/story-2.3.md +0 -112
- package/.one/stories/story-2.4.md +0 -116
- package/.one/stories/story-2.5.md +0 -114
- package/.one/stories/story-3.1.md +0 -298
- package/.one/stories/story-3.10.md +0 -302
- package/.one/stories/story-3.11.md +0 -167
- package/.one/stories/story-3.12.md +0 -235
- package/.one/stories/story-3.13.md +0 -235
- package/.one/stories/story-3.14.md +0 -225
- package/.one/stories/story-3.15.md +0 -238
- package/.one/stories/story-3.16.md +0 -244
- package/.one/stories/story-3.17.md +0 -245
- package/.one/stories/story-3.18.md +0 -248
- package/.one/stories/story-3.2.md +0 -226
- package/.one/stories/story-3.3.md +0 -226
- package/.one/stories/story-3.4.md +0 -226
- package/.one/stories/story-3.5.md +0 -167
- package/.one/stories/story-3.6.md +0 -167
- package/.one/stories/story-3.7.md +0 -181
- package/.one/stories/story-3.8.md +0 -198
- package/.one/stories/story-3.9.md +0 -169
- package/.one/stories/story-4.1.md +0 -245
- package/.one/stories/story-4.2.md +0 -314
- package/.one/stories/story-4.3.md +0 -610
- package/.one/stories/story-4.4.md +0 -931
- package/.one/stories/story-4.5.md +0 -727
- package/.one/stories/story-4.6-consistency.md +0 -175
- package/.one/stories/story-5.1.md +0 -508
- package/.one/stories/story-5.2.md +0 -451
- package/.one/stories/story-5.3.md +0 -405
- package/.one/stories/story-5.4.md +0 -447
- package/.one/stories/story-5.5.md +0 -349
- package/.one/stories/story-5.6.md +0 -445
- package/.one/stories/story-6.1-text-content-engine.md +0 -144
- package/.one/stories/story-6.2-audio-content-engine.md +0 -145
- package/.one/stories/story-6.3-video-content-engine.md +0 -145
- package/.one/stories/story-6.4-visual-content-engine.md +0 -177
- package/.one/stories/story-6.5-cross-platform-distribution.md +0 -188
- package/.one/stories/story-6.6.ai-content-generation-pipeline.md +0 -196
- package/.one/stories/story-6.7-character-consistency-quality-control.md +0 -216
- package/.one/stories/story-6.8-claude-code-content-integration.md +0 -181
- package/.one/stories/story-6.8-content-production-workflows.md +0 -247
- package/.one/stories/story-7.1-implementation.md +0 -128
- package/.one/stories/story-7.1.md +0 -203
- package/.one/stories/story-7.2-implementation.md +0 -147
- package/.one/stories/story-7.2.md +0 -415
- package/.one/stories/story-7.3-implementation.md +0 -159
- package/.one/stories/story-7.3.md +0 -463
- package/.one/stories/story-7.4-implementation.md +0 -154
- package/.one/stories/story-7.4.md +0 -500
- package/.one/stories/story-validation-report.md +0 -169
- package/one/archive-index.json +0 -91
- /package/one/stories/{story-3.1-npx-oneie-turbo-enhancement.md → story-2.1.1-npx-oneie-turbo-enhancement.md} +0 -0
- /package/one/stories/{story-3.2-npx-connection-implementation.md → story-2.21-npx-connection-implementation.md} +0 -0
|
@@ -0,0 +1,854 @@
|
|
|
1
|
+
# Story 3.4: Shared Package System & UI Components
|
|
2
|
+
|
|
3
|
+
**Status:** 📋 READY FOR DEVELOPMENT
|
|
4
|
+
**Quality Gate:** ⭐ 0.0/5.0 stars (Initial) → Target: 4.0+ stars
|
|
5
|
+
**Story Lead:** UI/UX Architect + Design System Specialist
|
|
6
|
+
**Mission:** Mission-3: Production Turbo Monorepo
|
|
7
|
+
**Estimated Effort:** Response Cycles 20-22
|
|
8
|
+
**Dependencies:** Story 3.1 (External Repository), Story 3.3 (Multi-Platform Apps) - Required
|
|
9
|
+
|
|
10
|
+
## 🎯 Story Objective
|
|
11
|
+
|
|
12
|
+
Build a comprehensive shared package ecosystem with modern UI components based on shadcn/ui, TypeScript definitions, configuration packages, and utility libraries that enable consistent design and functionality across all platform applications while maintaining optimal performance and developer experience.
|
|
13
|
+
|
|
14
|
+
## 📖 Story Narrative
|
|
15
|
+
|
|
16
|
+
**As a UI/UX Architect,** I need to create a unified design system and shared package architecture that ensures consistency, reusability, and maintainability across web, desktop, and mobile applications, **so that** development teams can build features rapidly with confidence that the user experience remains cohesive and the codebase remains scalable and maintainable.
|
|
17
|
+
|
|
18
|
+
**The Challenge:** Multiple applications across different platforms need to share components, utilities, and configurations while maintaining platform-specific optimizations and native feel.
|
|
19
|
+
|
|
20
|
+
**The Solution:** Create a sophisticated shared package system with platform-aware components, centralized configurations, and comprehensive utility libraries that enable code reuse without sacrificing platform-specific user experience.
|
|
21
|
+
|
|
22
|
+
## 🏗️ Technical Architecture
|
|
23
|
+
|
|
24
|
+
### Shared Package Ecosystem
|
|
25
|
+
```bash
|
|
26
|
+
/Users/toc/Server/repo/packages/
|
|
27
|
+
├── ui/ # Core UI Component Library
|
|
28
|
+
│ ├── src/
|
|
29
|
+
│ │ ├── components/ # shadcn/ui based components
|
|
30
|
+
│ │ │ ├── forms/ # Form components
|
|
31
|
+
│ │ │ ├── navigation/ # Navigation components
|
|
32
|
+
│ │ │ ├── layout/ # Layout components
|
|
33
|
+
│ │ │ ├── feedback/ # Toast, alerts, modals
|
|
34
|
+
│ │ │ └── data-display/ # Tables, cards, badges
|
|
35
|
+
│ │ ├── hooks/ # Shared React hooks
|
|
36
|
+
│ │ ├── utils/ # UI utility functions
|
|
37
|
+
│ │ ├── themes/ # Theme configurations
|
|
38
|
+
│ │ └── styles/ # CSS and Tailwind styles
|
|
39
|
+
│ ├── package.json # Dependencies and exports
|
|
40
|
+
│ └── tsconfig.json # TypeScript configuration
|
|
41
|
+
├── types/ # TypeScript Definitions
|
|
42
|
+
│ ├── src/
|
|
43
|
+
│ │ ├── api/ # API type definitions
|
|
44
|
+
│ │ ├── entities/ # Business entity types
|
|
45
|
+
│ │ ├── components/ # Component prop types
|
|
46
|
+
│ │ └── utils/ # Utility function types
|
|
47
|
+
│ ├── package.json # Package configuration
|
|
48
|
+
│ └── index.ts # Type exports
|
|
49
|
+
├── config/ # Shared Configurations
|
|
50
|
+
│ ├── typescript/ # @repo/typescript-config
|
|
51
|
+
│ │ ├── base.json # Base TypeScript config
|
|
52
|
+
│ │ ├── react.json # React-specific config
|
|
53
|
+
│ │ ├── node.json # Node.js config
|
|
54
|
+
│ │ └── package.json # Package definition
|
|
55
|
+
│ ├── eslint/ # @repo/eslint-config
|
|
56
|
+
│ │ ├── index.js # Base ESLint config
|
|
57
|
+
│ │ ├── react.js # React ESLint rules
|
|
58
|
+
│ │ ├── typescript.js # TypeScript ESLint rules
|
|
59
|
+
│ │ └── package.json # Package definition
|
|
60
|
+
│ └── tailwind/ # @repo/tailwind-config
|
|
61
|
+
│ ├── index.js # Base Tailwind config
|
|
62
|
+
│ ├── components.js # Component utilities
|
|
63
|
+
│ ├── themes.js # Theme configurations
|
|
64
|
+
│ └── package.json # Package definition
|
|
65
|
+
└── utils/ # Shared Utility Functions
|
|
66
|
+
├── src/
|
|
67
|
+
│ ├── validation/ # Form validation utilities
|
|
68
|
+
│ ├── formatting/ # Data formatting functions
|
|
69
|
+
│ ├── storage/ # Storage abstraction
|
|
70
|
+
│ └── platform/ # Platform detection
|
|
71
|
+
├── package.json # Package configuration
|
|
72
|
+
└── index.ts # Utility exports
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## 🎬 Implementation Tasks
|
|
76
|
+
|
|
77
|
+
### Task 3.4.1: shadcn/ui Component Library Foundation
|
|
78
|
+
**Agent:** UI/UX Designer
|
|
79
|
+
**Estimated Effort:** 3 response cycles
|
|
80
|
+
**Priority:** Critical Foundation
|
|
81
|
+
|
|
82
|
+
**Technical Specifications:**
|
|
83
|
+
- Set up shadcn/ui with Tailwind CSS and TypeScript
|
|
84
|
+
- Create platform-aware component variants (web/desktop/mobile)
|
|
85
|
+
- Implement comprehensive theming system with dark/light modes
|
|
86
|
+
- Build responsive design patterns for all screen sizes
|
|
87
|
+
- Configure proper tree-shaking and bundle optimization
|
|
88
|
+
|
|
89
|
+
**Component Architecture:**
|
|
90
|
+
```typescript
|
|
91
|
+
// packages/ui/src/components/Button/Button.tsx
|
|
92
|
+
import { cva, type VariantProps } from 'class-variance-authority';
|
|
93
|
+
import { cn } from '../../utils/cn';
|
|
94
|
+
|
|
95
|
+
const buttonVariants = cva(
|
|
96
|
+
'inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none ring-offset-background',
|
|
97
|
+
{
|
|
98
|
+
variants: {
|
|
99
|
+
variant: {
|
|
100
|
+
primary: 'bg-primary text-primary-foreground hover:bg-primary/90',
|
|
101
|
+
secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80',
|
|
102
|
+
destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90',
|
|
103
|
+
outline: 'border border-input hover:bg-accent hover:text-accent-foreground',
|
|
104
|
+
ghost: 'hover:bg-accent hover:text-accent-foreground',
|
|
105
|
+
link: 'underline-offset-4 hover:underline text-primary'
|
|
106
|
+
},
|
|
107
|
+
size: {
|
|
108
|
+
sm: 'h-9 px-3',
|
|
109
|
+
md: 'h-10 px-4 py-2',
|
|
110
|
+
lg: 'h-11 px-8',
|
|
111
|
+
icon: 'h-10 w-10'
|
|
112
|
+
},
|
|
113
|
+
platform: {
|
|
114
|
+
web: 'cursor-pointer',
|
|
115
|
+
desktop: 'cursor-pointer select-none',
|
|
116
|
+
mobile: 'active:scale-95'
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
defaultVariants: {
|
|
120
|
+
variant: 'primary',
|
|
121
|
+
size: 'md',
|
|
122
|
+
platform: 'web'
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
);
|
|
126
|
+
|
|
127
|
+
export interface ButtonProps
|
|
128
|
+
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
129
|
+
VariantProps<typeof buttonVariants> {
|
|
130
|
+
asChild?: boolean;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export function Button({
|
|
134
|
+
className,
|
|
135
|
+
variant,
|
|
136
|
+
size,
|
|
137
|
+
platform = 'web',
|
|
138
|
+
asChild = false,
|
|
139
|
+
...props
|
|
140
|
+
}: ButtonProps) {
|
|
141
|
+
return (
|
|
142
|
+
<button
|
|
143
|
+
className={cn(buttonVariants({ variant, size, platform, className }))}
|
|
144
|
+
{...props}
|
|
145
|
+
/>
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// packages/ui/src/components/Form/FormField.tsx
|
|
150
|
+
import { forwardRef } from 'react';
|
|
151
|
+
import { Label } from '../Label';
|
|
152
|
+
import { Input } from '../Input';
|
|
153
|
+
import { cn } from '../../utils/cn';
|
|
154
|
+
|
|
155
|
+
export interface FormFieldProps {
|
|
156
|
+
label: string;
|
|
157
|
+
error?: string;
|
|
158
|
+
hint?: string;
|
|
159
|
+
required?: boolean;
|
|
160
|
+
platform?: 'web' | 'desktop' | 'mobile';
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export const FormField = forwardRef<
|
|
164
|
+
HTMLInputElement,
|
|
165
|
+
FormFieldProps & React.InputHTMLAttributes<HTMLInputElement>
|
|
166
|
+
>(({ label, error, hint, required, platform = 'web', className, ...props }, ref) => {
|
|
167
|
+
return (
|
|
168
|
+
<div className="space-y-2">
|
|
169
|
+
<Label htmlFor={props.id} className={cn(
|
|
170
|
+
'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70',
|
|
171
|
+
required && "after:content-['*'] after:ml-0.5 after:text-destructive"
|
|
172
|
+
)}>
|
|
173
|
+
{label}
|
|
174
|
+
</Label>
|
|
175
|
+
<Input
|
|
176
|
+
ref={ref}
|
|
177
|
+
className={cn(
|
|
178
|
+
error && 'border-destructive focus-visible:ring-destructive',
|
|
179
|
+
platform === 'mobile' && 'text-16 min-h-12', // Prevent zoom on iOS
|
|
180
|
+
className
|
|
181
|
+
)}
|
|
182
|
+
{...props}
|
|
183
|
+
/>
|
|
184
|
+
{hint && !error && (
|
|
185
|
+
<p className="text-sm text-muted-foreground">{hint}</p>
|
|
186
|
+
)}
|
|
187
|
+
{error && (
|
|
188
|
+
<p className="text-sm font-medium text-destructive">{error}</p>
|
|
189
|
+
)}
|
|
190
|
+
</div>
|
|
191
|
+
);
|
|
192
|
+
});
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
**Quality Criteria:**
|
|
196
|
+
- Component library includes 25+ production-ready components
|
|
197
|
+
- Platform variants work properly across web, desktop, mobile
|
|
198
|
+
- Theme switching seamless with proper CSS custom properties
|
|
199
|
+
- Bundle size optimized with proper tree-shaking
|
|
200
|
+
|
|
201
|
+
### Task 3.4.2: TypeScript Definition System
|
|
202
|
+
**Agent:** TypeScript Specialist
|
|
203
|
+
**Estimated Effort:** 2 response cycles
|
|
204
|
+
**Priority:** High Foundation
|
|
205
|
+
|
|
206
|
+
**Technical Specifications:**
|
|
207
|
+
- Create comprehensive type definitions for all shared entities
|
|
208
|
+
- Implement proper type exports and module declarations
|
|
209
|
+
- Build API client types with full request/response typing
|
|
210
|
+
- Configure strict TypeScript with comprehensive coverage
|
|
211
|
+
- Establish type validation and documentation generation
|
|
212
|
+
|
|
213
|
+
**Type System Architecture:**
|
|
214
|
+
```typescript
|
|
215
|
+
// packages/types/src/entities/User.ts
|
|
216
|
+
export interface User {
|
|
217
|
+
id: string;
|
|
218
|
+
email: string;
|
|
219
|
+
name: string;
|
|
220
|
+
avatar?: string;
|
|
221
|
+
role: UserRole;
|
|
222
|
+
preferences: UserPreferences;
|
|
223
|
+
createdAt: Date;
|
|
224
|
+
updatedAt: Date;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export type UserRole = 'admin' | 'user' | 'viewer';
|
|
228
|
+
|
|
229
|
+
export interface UserPreferences {
|
|
230
|
+
theme: 'light' | 'dark' | 'system';
|
|
231
|
+
language: string;
|
|
232
|
+
timezone: string;
|
|
233
|
+
notifications: NotificationSettings;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export interface NotificationSettings {
|
|
237
|
+
email: boolean;
|
|
238
|
+
push: boolean;
|
|
239
|
+
desktop: boolean;
|
|
240
|
+
frequency: 'immediate' | 'daily' | 'weekly';
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
// packages/types/src/api/Repository.ts
|
|
244
|
+
export interface Repository {
|
|
245
|
+
id: string;
|
|
246
|
+
name: string;
|
|
247
|
+
description?: string;
|
|
248
|
+
url: string;
|
|
249
|
+
githubUrl?: string;
|
|
250
|
+
private: boolean;
|
|
251
|
+
language?: string;
|
|
252
|
+
stars: number;
|
|
253
|
+
forks: number;
|
|
254
|
+
owner: User;
|
|
255
|
+
createdAt: Date;
|
|
256
|
+
updatedAt: Date;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export interface CreateRepositoryRequest {
|
|
260
|
+
name: string;
|
|
261
|
+
description?: string;
|
|
262
|
+
githubUrl?: string;
|
|
263
|
+
private: boolean;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
export interface CreateRepositoryResponse {
|
|
267
|
+
repository: Repository;
|
|
268
|
+
cloneUrl: string;
|
|
269
|
+
setupInstructions: string;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
// packages/types/src/components/Props.ts
|
|
273
|
+
export interface BaseComponentProps {
|
|
274
|
+
className?: string;
|
|
275
|
+
children?: React.ReactNode;
|
|
276
|
+
platform?: 'web' | 'desktop' | 'mobile';
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
export interface FormProps extends BaseComponentProps {
|
|
280
|
+
onSubmit: (data: any) => void | Promise<void>;
|
|
281
|
+
validation?: ValidationSchema;
|
|
282
|
+
loading?: boolean;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
export interface TableProps<T = any> extends BaseComponentProps {
|
|
286
|
+
data: T[];
|
|
287
|
+
columns: TableColumn<T>[];
|
|
288
|
+
loading?: boolean;
|
|
289
|
+
pagination?: PaginationConfig;
|
|
290
|
+
sorting?: SortingConfig<T>;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
// packages/types/src/utils/API.ts
|
|
294
|
+
export type APIResponse<T = any> = {
|
|
295
|
+
success: true;
|
|
296
|
+
data: T;
|
|
297
|
+
} | {
|
|
298
|
+
success: false;
|
|
299
|
+
error: APIError;
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
export interface APIError {
|
|
303
|
+
code: string;
|
|
304
|
+
message: string;
|
|
305
|
+
details?: Record<string, any>;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
309
|
+
|
|
310
|
+
export interface APIClientConfig {
|
|
311
|
+
baseURL: string;
|
|
312
|
+
timeout: number;
|
|
313
|
+
headers?: Record<string, string>;
|
|
314
|
+
interceptors?: {
|
|
315
|
+
request?: RequestInterceptor[];
|
|
316
|
+
response?: ResponseInterceptor[];
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
**Quality Criteria:**
|
|
322
|
+
- 100% type coverage for all shared interfaces
|
|
323
|
+
- API types automatically generated from OpenAPI schema
|
|
324
|
+
- Proper type exports without circular dependencies
|
|
325
|
+
- TypeScript compiler validates without any `any` types
|
|
326
|
+
|
|
327
|
+
### Task 3.4.3: Shared Configuration Packages
|
|
328
|
+
**Agent:** DevOps Configuration Specialist
|
|
329
|
+
**Estimated Effort:** 2 response cycles
|
|
330
|
+
**Priority:** High Standardization
|
|
331
|
+
|
|
332
|
+
**Technical Specifications:**
|
|
333
|
+
- Create @repo/typescript-config with base and environment-specific configs
|
|
334
|
+
- Build @repo/eslint-config with comprehensive linting rules
|
|
335
|
+
- Configure @repo/tailwind-config for consistent styling across platforms
|
|
336
|
+
- Implement configuration inheritance and extension patterns
|
|
337
|
+
- Establish proper versioning and dependency management
|
|
338
|
+
|
|
339
|
+
**Configuration Architecture:**
|
|
340
|
+
```json
|
|
341
|
+
// packages/config/typescript/base.json
|
|
342
|
+
{
|
|
343
|
+
"compilerOptions": {
|
|
344
|
+
"target": "ES2022",
|
|
345
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
346
|
+
"allowJs": true,
|
|
347
|
+
"skipLibCheck": true,
|
|
348
|
+
"strict": true,
|
|
349
|
+
"forceConsistentCasingInFileNames": true,
|
|
350
|
+
"noEmit": true,
|
|
351
|
+
"esModuleInterop": true,
|
|
352
|
+
"module": "ESNext",
|
|
353
|
+
"moduleResolution": "bundler",
|
|
354
|
+
"resolveJsonModule": true,
|
|
355
|
+
"isolatedModules": true,
|
|
356
|
+
"jsx": "preserve",
|
|
357
|
+
"incremental": true,
|
|
358
|
+
"plugins": [
|
|
359
|
+
{
|
|
360
|
+
"name": "next"
|
|
361
|
+
}
|
|
362
|
+
],
|
|
363
|
+
"baseUrl": ".",
|
|
364
|
+
"paths": {
|
|
365
|
+
"@/*": ["./src/*"],
|
|
366
|
+
"@repo/ui": ["../../packages/ui/src"],
|
|
367
|
+
"@repo/types": ["../../packages/types/src"],
|
|
368
|
+
"@repo/utils": ["../../packages/utils/src"]
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
"include": [
|
|
372
|
+
"next-env.d.ts",
|
|
373
|
+
"**/*.ts",
|
|
374
|
+
"**/*.tsx",
|
|
375
|
+
".next/types/**/*.ts"
|
|
376
|
+
],
|
|
377
|
+
"exclude": [
|
|
378
|
+
"node_modules"
|
|
379
|
+
]
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
// packages/config/typescript/react.json
|
|
383
|
+
{
|
|
384
|
+
"extends": "./base.json",
|
|
385
|
+
"compilerOptions": {
|
|
386
|
+
"jsx": "react-jsx",
|
|
387
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable"]
|
|
388
|
+
},
|
|
389
|
+
"include": [
|
|
390
|
+
"**/*.ts",
|
|
391
|
+
"**/*.tsx"
|
|
392
|
+
]
|
|
393
|
+
}
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
```javascript
|
|
397
|
+
// packages/config/eslint/index.js
|
|
398
|
+
module.exports = {
|
|
399
|
+
extends: [
|
|
400
|
+
'eslint:recommended',
|
|
401
|
+
'@typescript-eslint/recommended',
|
|
402
|
+
'prettier'
|
|
403
|
+
],
|
|
404
|
+
parser: '@typescript-eslint/parser',
|
|
405
|
+
parserOptions: {
|
|
406
|
+
ecmaVersion: 2022,
|
|
407
|
+
sourceType: 'module'
|
|
408
|
+
},
|
|
409
|
+
plugins: ['@typescript-eslint'],
|
|
410
|
+
rules: {
|
|
411
|
+
'@typescript-eslint/no-unused-vars': 'error',
|
|
412
|
+
'@typescript-eslint/no-explicit-any': 'warn',
|
|
413
|
+
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
414
|
+
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
415
|
+
'prefer-const': 'error',
|
|
416
|
+
'no-var': 'error'
|
|
417
|
+
},
|
|
418
|
+
env: {
|
|
419
|
+
node: true,
|
|
420
|
+
es6: true
|
|
421
|
+
}
|
|
422
|
+
};
|
|
423
|
+
|
|
424
|
+
// packages/config/eslint/react.js
|
|
425
|
+
module.exports = {
|
|
426
|
+
extends: ['./index.js', 'plugin:react/recommended', 'plugin:react-hooks/recommended'],
|
|
427
|
+
plugins: ['react', 'react-hooks'],
|
|
428
|
+
rules: {
|
|
429
|
+
'react/react-in-jsx-scope': 'off',
|
|
430
|
+
'react/prop-types': 'off',
|
|
431
|
+
'react-hooks/rules-of-hooks': 'error',
|
|
432
|
+
'react-hooks/exhaustive-deps': 'warn'
|
|
433
|
+
},
|
|
434
|
+
env: {
|
|
435
|
+
browser: true
|
|
436
|
+
},
|
|
437
|
+
settings: {
|
|
438
|
+
react: {
|
|
439
|
+
version: 'detect'
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
};
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
```javascript
|
|
446
|
+
// packages/config/tailwind/index.js
|
|
447
|
+
const { fontFamily } = require('tailwindcss/defaultTheme');
|
|
448
|
+
|
|
449
|
+
module.exports = {
|
|
450
|
+
darkMode: ['class'],
|
|
451
|
+
content: [
|
|
452
|
+
'./src/**/*.{js,ts,jsx,tsx,mdx}',
|
|
453
|
+
'../../packages/ui/src/**/*.{js,ts,jsx,tsx}',
|
|
454
|
+
],
|
|
455
|
+
theme: {
|
|
456
|
+
extend: {
|
|
457
|
+
colors: {
|
|
458
|
+
border: 'hsl(var(--border))',
|
|
459
|
+
input: 'hsl(var(--input))',
|
|
460
|
+
ring: 'hsl(var(--ring))',
|
|
461
|
+
background: 'hsl(var(--background))',
|
|
462
|
+
foreground: 'hsl(var(--foreground))',
|
|
463
|
+
primary: {
|
|
464
|
+
DEFAULT: 'hsl(var(--primary))',
|
|
465
|
+
foreground: 'hsl(var(--primary-foreground))',
|
|
466
|
+
},
|
|
467
|
+
secondary: {
|
|
468
|
+
DEFAULT: 'hsl(var(--secondary))',
|
|
469
|
+
foreground: 'hsl(var(--secondary-foreground))',
|
|
470
|
+
},
|
|
471
|
+
destructive: {
|
|
472
|
+
DEFAULT: 'hsl(var(--destructive))',
|
|
473
|
+
foreground: 'hsl(var(--destructive-foreground))',
|
|
474
|
+
},
|
|
475
|
+
muted: {
|
|
476
|
+
DEFAULT: 'hsl(var(--muted))',
|
|
477
|
+
foreground: 'hsl(var(--muted-foreground))',
|
|
478
|
+
},
|
|
479
|
+
accent: {
|
|
480
|
+
DEFAULT: 'hsl(var(--accent))',
|
|
481
|
+
foreground: 'hsl(var(--accent-foreground))',
|
|
482
|
+
},
|
|
483
|
+
popover: {
|
|
484
|
+
DEFAULT: 'hsl(var(--popover))',
|
|
485
|
+
foreground: 'hsl(var(--popover-foreground))',
|
|
486
|
+
},
|
|
487
|
+
card: {
|
|
488
|
+
DEFAULT: 'hsl(var(--card))',
|
|
489
|
+
foreground: 'hsl(var(--card-foreground))',
|
|
490
|
+
},
|
|
491
|
+
},
|
|
492
|
+
borderRadius: {
|
|
493
|
+
lg: 'var(--radius)',
|
|
494
|
+
md: 'calc(var(--radius) - 2px)',
|
|
495
|
+
sm: 'calc(var(--radius) - 4px)',
|
|
496
|
+
},
|
|
497
|
+
fontFamily: {
|
|
498
|
+
sans: ['var(--font-sans)', ...fontFamily.sans],
|
|
499
|
+
},
|
|
500
|
+
animation: {
|
|
501
|
+
'accordion-down': 'accordion-down 0.2s ease-out',
|
|
502
|
+
'accordion-up': 'accordion-up 0.2s ease-out',
|
|
503
|
+
},
|
|
504
|
+
},
|
|
505
|
+
},
|
|
506
|
+
plugins: [require('tailwindcss-animate')],
|
|
507
|
+
};
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
**Quality Criteria:**
|
|
511
|
+
- All applications properly inherit shared configurations
|
|
512
|
+
- Zero configuration conflicts across packages
|
|
513
|
+
- Proper version management with semantic versioning
|
|
514
|
+
- Configuration extends properly without duplication
|
|
515
|
+
|
|
516
|
+
### Task 3.4.4: Utility Library Development
|
|
517
|
+
**Agent:** Frontend Utility Developer
|
|
518
|
+
**Estimated Effort:** 2 response cycles
|
|
519
|
+
**Priority:** Medium Foundation
|
|
520
|
+
|
|
521
|
+
**Technical Specifications:**
|
|
522
|
+
- Build comprehensive validation utility functions
|
|
523
|
+
- Create data formatting and transformation utilities
|
|
524
|
+
- Implement storage abstraction layer for different platforms
|
|
525
|
+
- Build API client utilities with proper error handling
|
|
526
|
+
- Configure platform detection and conditional loading
|
|
527
|
+
|
|
528
|
+
**Utility Library Architecture:**
|
|
529
|
+
```typescript
|
|
530
|
+
// packages/utils/src/validation/schemas.ts
|
|
531
|
+
import { z } from 'zod';
|
|
532
|
+
|
|
533
|
+
export const userSchema = z.object({
|
|
534
|
+
name: z.string().min(2, 'Name must be at least 2 characters'),
|
|
535
|
+
email: z.string().email('Invalid email address'),
|
|
536
|
+
password: z.string().min(8, 'Password must be at least 8 characters'),
|
|
537
|
+
confirmPassword: z.string()
|
|
538
|
+
}).refine((data) => data.password === data.confirmPassword, {
|
|
539
|
+
message: "Passwords don't match",
|
|
540
|
+
path: ["confirmPassword"],
|
|
541
|
+
});
|
|
542
|
+
|
|
543
|
+
export const repositorySchema = z.object({
|
|
544
|
+
name: z.string().min(1, 'Repository name is required'),
|
|
545
|
+
description: z.string().optional(),
|
|
546
|
+
githubUrl: z.string().url('Invalid GitHub URL').optional(),
|
|
547
|
+
private: z.boolean().default(false)
|
|
548
|
+
});
|
|
549
|
+
|
|
550
|
+
// packages/utils/src/formatting/date.ts
|
|
551
|
+
export function formatDate(date: Date, format: 'short' | 'long' | 'relative' = 'short'): string {
|
|
552
|
+
const now = new Date();
|
|
553
|
+
const diffInMs = now.getTime() - date.getTime();
|
|
554
|
+
const diffInDays = Math.floor(diffInMs / (1000 * 60 * 60 * 24));
|
|
555
|
+
|
|
556
|
+
switch (format) {
|
|
557
|
+
case 'relative':
|
|
558
|
+
if (diffInDays === 0) return 'Today';
|
|
559
|
+
if (diffInDays === 1) return 'Yesterday';
|
|
560
|
+
if (diffInDays < 7) return `${diffInDays} days ago`;
|
|
561
|
+
return date.toLocaleDateString();
|
|
562
|
+
|
|
563
|
+
case 'long':
|
|
564
|
+
return date.toLocaleDateString('en-US', {
|
|
565
|
+
year: 'numeric',
|
|
566
|
+
month: 'long',
|
|
567
|
+
day: 'numeric'
|
|
568
|
+
});
|
|
569
|
+
|
|
570
|
+
case 'short':
|
|
571
|
+
default:
|
|
572
|
+
return date.toLocaleDateString();
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
// packages/utils/src/storage/storage-adapter.ts
|
|
577
|
+
export interface StorageAdapter {
|
|
578
|
+
getItem(key: string): Promise<string | null>;
|
|
579
|
+
setItem(key: string, value: string): Promise<void>;
|
|
580
|
+
removeItem(key: string): Promise<void>;
|
|
581
|
+
clear(): Promise<void>;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
export class WebStorageAdapter implements StorageAdapter {
|
|
585
|
+
constructor(private storage: Storage = localStorage) {}
|
|
586
|
+
|
|
587
|
+
async getItem(key: string): Promise<string | null> {
|
|
588
|
+
return this.storage.getItem(key);
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
async setItem(key: string, value: string): Promise<void> {
|
|
592
|
+
this.storage.setItem(key, value);
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
async removeItem(key: string): Promise<void> {
|
|
596
|
+
this.storage.removeItem(key);
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
async clear(): Promise<void> {
|
|
600
|
+
this.storage.clear();
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
// packages/utils/src/api/client.ts
|
|
605
|
+
export class APIClient {
|
|
606
|
+
constructor(private config: APIClientConfig) {}
|
|
607
|
+
|
|
608
|
+
async request<T>(
|
|
609
|
+
method: HTTPMethod,
|
|
610
|
+
endpoint: string,
|
|
611
|
+
data?: any
|
|
612
|
+
): Promise<APIResponse<T>> {
|
|
613
|
+
try {
|
|
614
|
+
const url = `${this.config.baseURL}${endpoint}`;
|
|
615
|
+
const response = await fetch(url, {
|
|
616
|
+
method,
|
|
617
|
+
headers: {
|
|
618
|
+
'Content-Type': 'application/json',
|
|
619
|
+
...this.config.headers
|
|
620
|
+
},
|
|
621
|
+
body: data ? JSON.stringify(data) : undefined
|
|
622
|
+
});
|
|
623
|
+
|
|
624
|
+
const result = await response.json();
|
|
625
|
+
|
|
626
|
+
if (!response.ok) {
|
|
627
|
+
return {
|
|
628
|
+
success: false,
|
|
629
|
+
error: {
|
|
630
|
+
code: response.status.toString(),
|
|
631
|
+
message: result.message || 'Request failed',
|
|
632
|
+
details: result.details
|
|
633
|
+
}
|
|
634
|
+
};
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
return {
|
|
638
|
+
success: true,
|
|
639
|
+
data: result
|
|
640
|
+
};
|
|
641
|
+
} catch (error) {
|
|
642
|
+
return {
|
|
643
|
+
success: false,
|
|
644
|
+
error: {
|
|
645
|
+
code: 'NETWORK_ERROR',
|
|
646
|
+
message: 'Failed to connect to server',
|
|
647
|
+
details: { originalError: error }
|
|
648
|
+
}
|
|
649
|
+
};
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
```
|
|
654
|
+
|
|
655
|
+
**Quality Criteria:**
|
|
656
|
+
- Utility functions properly typed with comprehensive test coverage
|
|
657
|
+
- Platform detection works reliably across web, desktop, mobile
|
|
658
|
+
- API client handles all common error scenarios gracefully
|
|
659
|
+
- Storage abstraction works consistently across all platforms
|
|
660
|
+
|
|
661
|
+
### Task 3.4.5: Component Documentation & Testing
|
|
662
|
+
**Agent:** Documentation Specialist
|
|
663
|
+
**Estimated Effort:** 1 response cycle
|
|
664
|
+
**Priority:** Medium Quality
|
|
665
|
+
|
|
666
|
+
**Technical Specifications:**
|
|
667
|
+
- Set up Storybook for component documentation and testing
|
|
668
|
+
- Create comprehensive component examples and use cases
|
|
669
|
+
- Build automated visual regression testing
|
|
670
|
+
- Generate API documentation from TypeScript definitions
|
|
671
|
+
- Establish component testing with React Testing Library
|
|
672
|
+
|
|
673
|
+
**Documentation System:**
|
|
674
|
+
```typescript
|
|
675
|
+
// packages/ui/src/stories/Button.stories.ts
|
|
676
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
677
|
+
import { Button } from '../components/Button';
|
|
678
|
+
|
|
679
|
+
const meta: Meta<typeof Button> = {
|
|
680
|
+
title: 'Components/Button',
|
|
681
|
+
component: Button,
|
|
682
|
+
parameters: {
|
|
683
|
+
layout: 'centered',
|
|
684
|
+
},
|
|
685
|
+
tags: ['autodocs'],
|
|
686
|
+
argTypes: {
|
|
687
|
+
variant: {
|
|
688
|
+
control: { type: 'select' },
|
|
689
|
+
options: ['primary', 'secondary', 'destructive', 'outline', 'ghost', 'link']
|
|
690
|
+
},
|
|
691
|
+
size: {
|
|
692
|
+
control: { type: 'select' },
|
|
693
|
+
options: ['sm', 'md', 'lg', 'icon']
|
|
694
|
+
},
|
|
695
|
+
platform: {
|
|
696
|
+
control: { type: 'select' },
|
|
697
|
+
options: ['web', 'desktop', 'mobile']
|
|
698
|
+
}
|
|
699
|
+
},
|
|
700
|
+
};
|
|
701
|
+
|
|
702
|
+
export default meta;
|
|
703
|
+
type Story = StoryObj<typeof meta>;
|
|
704
|
+
|
|
705
|
+
export const Primary: Story = {
|
|
706
|
+
args: {
|
|
707
|
+
children: 'Primary Button',
|
|
708
|
+
variant: 'primary',
|
|
709
|
+
},
|
|
710
|
+
};
|
|
711
|
+
|
|
712
|
+
export const AllVariants: Story = {
|
|
713
|
+
render: () => (
|
|
714
|
+
<div className="flex gap-4">
|
|
715
|
+
<Button variant="primary">Primary</Button>
|
|
716
|
+
<Button variant="secondary">Secondary</Button>
|
|
717
|
+
<Button variant="destructive">Destructive</Button>
|
|
718
|
+
<Button variant="outline">Outline</Button>
|
|
719
|
+
<Button variant="ghost">Ghost</Button>
|
|
720
|
+
<Button variant="link">Link</Button>
|
|
721
|
+
</div>
|
|
722
|
+
),
|
|
723
|
+
};
|
|
724
|
+
|
|
725
|
+
// packages/ui/src/__tests__/Button.test.tsx
|
|
726
|
+
import { render, screen, fireEvent } from '@testing-library/react';
|
|
727
|
+
import { Button } from '../components/Button';
|
|
728
|
+
|
|
729
|
+
describe('Button', () => {
|
|
730
|
+
test('renders with correct text', () => {
|
|
731
|
+
render(<Button>Click me</Button>);
|
|
732
|
+
expect(screen.getByRole('button', { name: /click me/i })).toBeInTheDocument();
|
|
733
|
+
});
|
|
734
|
+
|
|
735
|
+
test('handles click events', () => {
|
|
736
|
+
const handleClick = jest.fn();
|
|
737
|
+
render(<Button onClick={handleClick}>Click me</Button>);
|
|
738
|
+
|
|
739
|
+
fireEvent.click(screen.getByRole('button'));
|
|
740
|
+
expect(handleClick).toHaveBeenCalledTimes(1);
|
|
741
|
+
});
|
|
742
|
+
|
|
743
|
+
test('applies platform-specific classes', () => {
|
|
744
|
+
const { rerender } = render(<Button platform="web">Web Button</Button>);
|
|
745
|
+
expect(screen.getByRole('button')).toHaveClass('cursor-pointer');
|
|
746
|
+
|
|
747
|
+
rerender(<Button platform="mobile">Mobile Button</Button>);
|
|
748
|
+
expect(screen.getByRole('button')).toHaveClass('active:scale-95');
|
|
749
|
+
});
|
|
750
|
+
});
|
|
751
|
+
```
|
|
752
|
+
|
|
753
|
+
**Quality Criteria:**
|
|
754
|
+
- Storybook documentation covers all component variants
|
|
755
|
+
- Visual regression tests catch UI changes automatically
|
|
756
|
+
- Component test coverage above 90%
|
|
757
|
+
- API documentation automatically generated and up-to-date
|
|
758
|
+
|
|
759
|
+
## ✅ Success Criteria
|
|
760
|
+
|
|
761
|
+
### Primary Package Objectives (Must Achieve)
|
|
762
|
+
1. **Component Library Excellence**: 25+ shadcn/ui based components with platform variants
|
|
763
|
+
2. **Type System Comprehensive**: 100% type coverage for all shared interfaces
|
|
764
|
+
3. **Configuration Standardization**: Shared TypeScript, ESLint, Tailwind configs working
|
|
765
|
+
4. **Utility Library Complete**: Validation, formatting, storage, and API utilities operational
|
|
766
|
+
5. **Documentation & Testing**: Storybook documentation and comprehensive test coverage
|
|
767
|
+
|
|
768
|
+
### Technical Performance Targets
|
|
769
|
+
- **Bundle Size Optimization**: Tree-shaking reduces bundle size by 40%+
|
|
770
|
+
- **Type Safety**: Zero `any` types in production code
|
|
771
|
+
- **Component Load Time**: Components render under 16ms for 60 FPS
|
|
772
|
+
- **Configuration Inheritance**: Zero conflicts across all applications
|
|
773
|
+
|
|
774
|
+
### Quality Assurance Gates
|
|
775
|
+
- **Component Testing**: 90%+ test coverage with visual regression tests
|
|
776
|
+
- **Type Validation**: All packages pass strict TypeScript compilation
|
|
777
|
+
- **Configuration Validation**: All apps properly inherit shared configurations
|
|
778
|
+
- **Performance Testing**: Bundle analysis shows optimal tree-shaking
|
|
779
|
+
|
|
780
|
+
### Developer Experience Validation
|
|
781
|
+
- **Component Discovery**: Storybook documentation complete and searchable
|
|
782
|
+
- **Type IntelliSense**: Full autocomplete support in all IDEs
|
|
783
|
+
- **Configuration Simplicity**: Zero-config setup for new applications
|
|
784
|
+
- **Error Handling**: Clear error messages with actionable guidance
|
|
785
|
+
|
|
786
|
+
## 🎯 Story Acceptance Criteria
|
|
787
|
+
|
|
788
|
+
**This story is COMPLETE when:**
|
|
789
|
+
|
|
790
|
+
✅ **Component Library Production Ready**
|
|
791
|
+
- 25+ shadcn/ui components with platform variants (web/desktop/mobile)
|
|
792
|
+
- Theme system with seamless dark/light mode switching
|
|
793
|
+
- Responsive design patterns work across all screen sizes
|
|
794
|
+
- Bundle optimization with proper tree-shaking implemented
|
|
795
|
+
|
|
796
|
+
✅ **Type System Comprehensive**
|
|
797
|
+
- 100% TypeScript coverage for all shared interfaces
|
|
798
|
+
- API types automatically generated from OpenAPI schema
|
|
799
|
+
- Proper type exports without circular dependencies
|
|
800
|
+
- Zero `any` types in production codebase
|
|
801
|
+
|
|
802
|
+
✅ **Configuration Packages Operational**
|
|
803
|
+
- @repo/typescript-config, @repo/eslint-config, @repo/tailwind-config working
|
|
804
|
+
- All applications properly inherit shared configurations
|
|
805
|
+
- Zero configuration conflicts across packages
|
|
806
|
+
- Proper versioning with semantic versioning implemented
|
|
807
|
+
|
|
808
|
+
✅ **Utility Library Complete**
|
|
809
|
+
- Validation, formatting, storage, and API utilities implemented
|
|
810
|
+
- Platform detection works reliably across all targets
|
|
811
|
+
- Storage abstraction consistent across web/desktop/mobile
|
|
812
|
+
- API client handles all error scenarios gracefully
|
|
813
|
+
|
|
814
|
+
✅ **Documentation & Testing Excellence**
|
|
815
|
+
- Storybook documentation covers all component variants
|
|
816
|
+
- Component test coverage above 90% with visual regression tests
|
|
817
|
+
- API documentation automatically generated and current
|
|
818
|
+
- Clear examples and use cases for all shared packages
|
|
819
|
+
|
|
820
|
+
## 📊 Quality Validation Checklist
|
|
821
|
+
|
|
822
|
+
### Component Library Quality (30%)
|
|
823
|
+
- [ ] 25+ shadcn/ui components with platform variants implemented
|
|
824
|
+
- [ ] Theme system with dark/light modes working seamlessly
|
|
825
|
+
- [ ] Responsive design patterns functional across all screen sizes
|
|
826
|
+
- [ ] Bundle optimization with tree-shaking reducing size by 40%+
|
|
827
|
+
- [ ] Component performance under 16ms render time
|
|
828
|
+
|
|
829
|
+
### Type System Excellence (25%)
|
|
830
|
+
- [ ] 100% TypeScript coverage for all shared interfaces
|
|
831
|
+
- [ ] API types automatically generated from OpenAPI schema
|
|
832
|
+
- [ ] Zero `any` types in production codebase
|
|
833
|
+
- [ ] Proper type exports without circular dependencies
|
|
834
|
+
- [ ] Full IDE autocomplete support working
|
|
835
|
+
|
|
836
|
+
### Configuration Standardization (20%)
|
|
837
|
+
- [ ] Shared configuration packages (@repo/*) working properly
|
|
838
|
+
- [ ] All applications inherit configurations without conflicts
|
|
839
|
+
- [ ] Proper versioning with semantic versioning implemented
|
|
840
|
+
- [ ] Zero-config setup for new applications
|
|
841
|
+
- [ ] Configuration extends properly without duplication
|
|
842
|
+
|
|
843
|
+
### Utility & Testing Quality (25%)
|
|
844
|
+
- [ ] Utility library comprehensive with 90%+ test coverage
|
|
845
|
+
- [ ] Platform detection reliable across web/desktop/mobile
|
|
846
|
+
- [ ] API client handles all error scenarios gracefully
|
|
847
|
+
- [ ] Storybook documentation complete and searchable
|
|
848
|
+
- [ ] Visual regression tests catch UI changes automatically
|
|
849
|
+
|
|
850
|
+
**Minimum Quality Gate: 4.0/5.0 stars (16/20 checklist items) required for story completion**
|
|
851
|
+
|
|
852
|
+
---
|
|
853
|
+
|
|
854
|
+
**Story Foundation Impact:** This story creates the essential shared package ecosystem that enables rapid, consistent development across all platform applications while maintaining optimal performance, type safety, and developer experience throughout the entire monorepo.
|