enterprise-ui-architect-cli 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 (37) hide show
  1. package/assets/SKILL.md +590 -0
  2. package/assets/claude-skills/enterprise-ui-architect/SKILL.md +600 -0
  3. package/assets/data/accessibility-checks.csv +31 -0
  4. package/assets/data/anti-patterns.csv +55 -0
  5. package/assets/data/api-integration-patterns.csv +16 -0
  6. package/assets/data/charts.csv +26 -0
  7. package/assets/data/color-palettes.csv +21 -0
  8. package/assets/data/component-standards.csv +17 -0
  9. package/assets/data/data-source-strategies.csv +11 -0
  10. package/assets/data/industries.csv +16 -0
  11. package/assets/data/page-patterns.csv +9 -0
  12. package/assets/data/pre-delivery-checklist.csv +36 -0
  13. package/assets/data/review-rubric.csv +11 -0
  14. package/assets/data/styles.csv +16 -0
  15. package/assets/data/tokens.csv +89 -0
  16. package/assets/data/typography.csv +16 -0
  17. package/assets/scripts/search.py +241 -0
  18. package/assets/templates/base/quick-reference.md +123 -0
  19. package/assets/templates/base/skill-content.md +184 -0
  20. package/assets/templates/platforms/claude.json +19 -0
  21. package/assets/templates/platforms/codex.json +19 -0
  22. package/assets/templates/platforms/copilot.json +18 -0
  23. package/assets/templates/platforms/cursor.json +36 -0
  24. package/assets/templates/platforms/windsurf.json +26 -0
  25. package/dist/commands/init.d.ts +5 -0
  26. package/dist/commands/init.d.ts.map +1 -0
  27. package/dist/commands/init.js +182 -0
  28. package/dist/commands/init.js.map +1 -0
  29. package/dist/index.d.ts +3 -0
  30. package/dist/index.d.ts.map +1 -0
  31. package/dist/index.js +72 -0
  32. package/dist/index.js.map +1 -0
  33. package/dist/utils/template.d.ts +6 -0
  34. package/dist/utils/template.d.ts.map +1 -0
  35. package/dist/utils/template.js +9 -0
  36. package/dist/utils/template.js.map +1 -0
  37. package/package.json +36 -0
@@ -0,0 +1,600 @@
1
+ ---
2
+ name: enterprise-ui-architect
3
+ description: >
4
+ AI skill for building premium enterprise admin dashboards with MUI v7,
5
+ design system intelligence, and backend integration patterns.
6
+ Combines enterprise-inspired visual composition with MUI v7 component
7
+ implementation, Ant Design-level engineering discipline, TypeScript-first
8
+ patterns, token-based styling, accessibility, and production-ready state handling.
9
+ ---
10
+
11
+ # Enterprise UI Architect
12
+
13
+ ## Description
14
+ This skill provides expert UI/UX and frontend architecture guidance for premium enterprise admin panels. It combines enterprise-inspired visual composition with MUI v7 component implementation, Ant Design-level engineering discipline, and design system intelligence.
15
+
16
+ ## When to Apply
17
+ Use this skill when:
18
+ - building admin dashboards with MUI
19
+ - building CRUD list pages with MUI + TanStack Table
20
+ - building complex forms with MUI + react-hook-form
21
+ - building detail pages with MUI
22
+ - building settings pages with MUI
23
+ - building wizard/multi-step forms with MUI
24
+ - building auth pages with MUI
25
+ - generating a complete design system for an admin product
26
+ - reviewing UI implementation quality
27
+ - refactoring tables, forms, cards, drawers, dialogs, sidebars, navbars
28
+ - improving visual polish
29
+ - improving MUI architecture
30
+ - enforcing design tokens
31
+ - checking accessibility and responsiveness
32
+
33
+ ## Core Philosophy
34
+ Premium enterprise admin panels are the visual reference.
35
+ MUI v7 is the implementation engine.
36
+ Ant Design principles guide the architecture.
37
+ Design system intelligence drives consistency.
38
+
39
+ Premium enterprise admin panels provide:
40
+ - premium admin dashboard feeling
41
+ - card composition
42
+ - sidebar/navbar inspiration
43
+ - layout hierarchy
44
+ - dashboard page rhythm
45
+ - polished status chips
46
+ - spacing inspiration
47
+ - visual hierarchy
48
+
49
+ MUI v7 provides:
50
+ - production-grade React components
51
+ - theme system with CSS variables
52
+ - emotion/styled styling
53
+ - accessibility baseline
54
+ - rtl support
55
+ - dense admin-friendly sizing
56
+
57
+ Ant Design principles provide:
58
+ - component API discipline
59
+ - TypeScript-first props
60
+ - predictable Form/Table patterns
61
+ - Drawer/Dialog usage rules
62
+ - design token thinking
63
+ - enterprise interaction quality
64
+ - reusable abstractions
65
+ - accessibility and state discipline
66
+
67
+ ## Design System Generation
68
+ When starting a new admin dashboard project, generate a design system first:
69
+
70
+ ```bash
71
+ python src/enterprise-ui-architect/scripts/search.py \
72
+ --query "fintech" \
73
+ --design-system \
74
+ --product "MyBank Admin" \
75
+ --format markdown
76
+ ```
77
+
78
+ The design system generator analyzes the industry and outputs:
79
+ - **Recommended Pattern** — page structure and CTA placement
80
+ - **Style Priority** — best matching UI styles for the industry
81
+ - **Color Palette** — primary, secondary, accent, semantic colors
82
+ - **Typography** — heading and body font pairings with Google Fonts imports
83
+ - **Key Effects** — animations, transitions, interactions
84
+ - **Anti-Patterns** — what NOT to do for this industry
85
+ - **Pre-Delivery Checklist** — validation before shipping
86
+
87
+ ### Persist Design System (Master + Overrides)
88
+
89
+ Save the generated design system for hierarchical retrieval across sessions:
90
+
91
+ ```bash
92
+ python src/enterprise-ui-architect/scripts/search.py \
93
+ --query "saas" \
94
+ --design-system \
95
+ --persist \
96
+ --product "MyApp"
97
+ ```
98
+
99
+ This creates:
100
+ ```
101
+ design-system/
102
+ ├── MASTER.md # Global Source of Truth
103
+ └── pages/
104
+ └── dashboard.md # Page-specific overrides
105
+ ```
106
+
107
+ When building a specific page, check for page overrides first, then fall back to MASTER.
108
+
109
+ ## Component Stack
110
+ - **UI Components**: `@mui/material` v7
111
+ - **Forms**: `react-hook-form` + `Controller`
112
+ - **Tables**: `@tanstack/react-table`
113
+ - **Styling**: MUI theme tokens + Tailwind utilities (secondary)
114
+ - **Icons**: Tabler Icons (`tabler-*` classes)
115
+ - **Validation**: `valibot` / `zod` via `@hookform/resolvers`
116
+ - **Charts**: Recharts / ApexCharts / MUI X-Charts
117
+ - **Data Fetching**: TanStack Query (preferred) or SWR
118
+ - **Real-Time**: WebSocket / STOMP / Socket.io / SSE
119
+ - **API Mocking**: MSW (Mock Service Worker) for development
120
+
121
+ ## Layout Architecture
122
+ Enterprise admin panels support configurable layout modes:
123
+
124
+ ### Skin Variants
125
+ - `default`: shadow-based cards and surfaces
126
+ - `bordered`: outlined cards with no shadow, border-driven aesthetics
127
+ - Set via `data-skin` attribute on layout wrapper
128
+ - Affects Card, Dialog, Drawer, Menu, Popover, Snackbar styling
129
+
130
+ ### Navbar Modes
131
+ - `fixed`: sticky header at top
132
+ - `floating`: rounded, shadowed, inset from edges
133
+ - `detached`: rounded bottom corners, scroll shadow
134
+ - `attached`: full-width, border-bottom
135
+ - `blur`: backdrop-filter blur on scroll
136
+ - Navbar content width: `compact` (1440px) or `wide` (full-bleed)
137
+
138
+ ### Sidebar
139
+ - Width: 260px expanded, 71px collapsed
140
+ - `semiDark`: dark sidebar in light mode via `data-dark` attribute
141
+ - Collapse behavior: hover to expand, toggle lock, breakpoint auto-collapse
142
+ - Scroll shadow overlay at top when scrolled
143
+
144
+ ### Content & Footer
145
+ - Content padding: 24px (`theme.spacing(6)`)
146
+ - Content max-width: 1440px in compact mode
147
+ - Footer: `detached` (rounded top, separate) or `attached` (full-width)
148
+ - Footer content width independent of main content width
149
+
150
+ ## Theme Augmentation
151
+ MUI v7 requires module augmentation for custom variants and theme properties:
152
+
153
+ ```typescript
154
+ // types.ts
155
+ import '@mui/material/Button';
156
+ import '@mui/material/Chip';
157
+ import '@mui/material/Pagination';
158
+
159
+ declare module '@mui/material/Button' {
160
+ interface ButtonPropsVariantOverrides {
161
+ tonal: true;
162
+ }
163
+ }
164
+ declare module '@mui/material/Chip' {
165
+ interface ChipPropsVariantOverrides {
166
+ tonal: true;
167
+ }
168
+ }
169
+ declare module '@mui/material/Pagination' {
170
+ interface PaginationPropsVariantOverrides {
171
+ tonal: true;
172
+ }
173
+ }
174
+ ```
175
+
176
+ Custom theme properties:
177
+ ```typescript
178
+ declare module '@mui/material/styles' {
179
+ interface Theme {
180
+ customShadows: {
181
+ xs: string; sm: string; md: string; lg: string; xl: string;
182
+ primarySm: string; primaryMd: string; primaryLg: string;
183
+ successSm: string; errorSm: string; warningSm: string; infoSm: string;
184
+ };
185
+ mainColorChannels: {
186
+ light: string; dark: string; lightShadow: string; darkShadow: string;
187
+ };
188
+ }
189
+ interface Shape {
190
+ customBorderRadius: { xs: number; sm: number; md: number; lg: number; xl: number };
191
+ }
192
+ }
193
+ ```
194
+
195
+ ## Next.js Setup
196
+ For Next.js App Router with MUI v7:
197
+
198
+ ```tsx
199
+ import { AppRouterCacheProvider } from '@mui/material-nextjs/v14-appRouter';
200
+ import { ThemeProvider } from '@mui/material/styles';
201
+ import CssBaseline from '@mui/material/CssBaseline';
202
+ import { createTheme } from '@mui/material/styles';
203
+
204
+ const theme = createTheme({
205
+ cssVariables: { colorSchemeSelector: 'data' },
206
+ colorSchemes: { light: { palette: { ... } }, dark: { palette: { ... } } },
207
+ // ...other config
208
+ });
209
+
210
+ export default function RootLayout({ children }) {
211
+ return (
212
+ <AppRouterCacheProvider>
213
+ <ThemeProvider theme={theme}>
214
+ <CssBaseline />
215
+ {children}
216
+ </ThemeProvider>
217
+ </AppRouterCacheProvider>
218
+ );
219
+ }
220
+ ```
221
+
222
+ Key setup points:
223
+ - Always use `AppRouterCacheProvider` from `@mui/material-nextjs`
224
+ - Always render `CssBaseline` inside `ThemeProvider`
225
+ - Use `cssVariables: { colorSchemeSelector: 'data' }` for data-attribute theming
226
+ - Build theme config first, then pass to `createTheme()`
227
+ - Use `slotProps` instead of legacy `InputProps` / `InputLabelProps`
228
+
229
+ ## Industry-Specific Reasoning
230
+ The skill includes reasoning rules for 15 admin panel industries:
231
+
232
+ | Industry | Pattern | Style Priority | Color Mood |
233
+ |---|---|---|---|
234
+ | SaaS / B2B | Feature-Rich Dashboard + Onboarding | Bento Grid, Minimalism, Soft UI | Corporate blue + white + accent |
235
+ | Fintech / Banking | Data-Dense Dashboard + Transaction Table | Minimalism, Dark Mode, Glassmorphism | Deep navy + emerald + gold |
236
+ | Healthcare | Patient List + Appointment Calendar | Minimalism, Accessible, Soft UI | Soft teal + white + warm gray |
237
+ | E-commerce Admin | Order Management + Inventory Grid | Bento Grid, Data-Dense | Orange accent + white + dark sidebar |
238
+ | Logistics | Map + Shipment Tracker + Fleet Table | Real-Time Monitoring, Glassmorphism | Deep blue + bright cyan + amber |
239
+ | HR / People | Employee Directory + Org Chart | Minimalism, Soft UI, Bento Grid | Warm purple + soft gray + white |
240
+ | CRM / Sales | Pipeline Board + Contact List | Bento Grid, Soft UI | Electric blue + white + warm gray |
241
+ | ERP / Manufacturing | Production Dashboard + Inventory | Data-Dense, Executive | Industrial gray + safety orange |
242
+ | Education | Course List + Student Progress | Minimalism, Accessible, Soft UI | Academic blue + warm white |
243
+ | Government | Case Management + Document List | Minimalism, Accessible, Flat | Official blue + white + gray |
244
+ | Cybersecurity | Alert Feed + Threat Map | Dark Mode, HUD Sci-Fi | Deep black + alert red + cyber cyan |
245
+ | Real Estate | Property Grid + Map + Lead Pipeline | Bento Grid, Soft UI | Premium navy + gold accent |
246
+ | Energy | Grid Monitor + Meter Readings | Real-Time Monitoring, Data-Dense | Power blue + grid yellow + outage red |
247
+ | Media | Asset Library + Editorial Calendar | Minimalism, Bento Grid | Dark charcoal + vibrant accent |
248
+ | Nonprofit | Donor CRM + Campaign Tracker | Soft UI, Accessible, Minimalism | Hope blue + growth green + warm white |
249
+
250
+ Generate industry-specific guidance with:
251
+ ```bash
252
+ python scripts/search.py --query "fintech" --domain industries -n 1
253
+ ```
254
+
255
+ ## UI Styles for Admin Dashboards
256
+ The skill includes 15 admin-appropriate UI styles:
257
+
258
+ | Style | Best For | Suitability |
259
+ |---|---|---|
260
+ | Minimalism & Swiss Style | Enterprise dashboards, documentation | 10/10 |
261
+ | Bento Box Grid | Admin dashboards, analytics, widgets | 10/10 |
262
+ | Dark Mode (OLED) | DevOps, cybersecurity, night operations | 9/10 |
263
+ | Soft UI Evolution | HR, healthcare, wellness, support | 9/10 |
264
+ | Glassmorphism | Financial dashboards, premium SaaS | 7/10 |
265
+ | Data-Dense Dashboard | Trading, ERP, manufacturing, power users | 10/10 |
266
+ | Executive Dashboard | C-suite, board meetings, high-level KPIs | 8/10 |
267
+ | Real-Time Monitoring | DevOps, IoT, logistics, network ops | 9/10 |
268
+ | Accessible & Inclusive | Government, healthcare, education | 10/10 |
269
+ | AI-Native UI | AI platforms, chatbots, copilot admin | 7/10 |
270
+
271
+ Search styles with:
272
+ ```bash
273
+ python scripts/search.py --query "minimal" --domain styles -n 3
274
+ ```
275
+
276
+ ## Color Palette Selection
277
+ 20 admin-specific color palettes are included, matched to industries:
278
+
279
+ ```bash
280
+ python scripts/search.py --query "fintech" --domain color-palettes -n 3
281
+ ```
282
+
283
+ Each palette includes: primary, secondary, accent, success, warning, error, info, background, text colors.
284
+
285
+ ## Typography Pairing
286
+ 15 curated font pairings for admin UIs:
287
+
288
+ ```bash
289
+ python scripts/search.py --query "clean" --domain typography -n 3
290
+ ```
291
+
292
+ Each pairing includes: heading font, body font, Google Fonts imports, mood description, best-for industries.
293
+
294
+ ## Chart Selection for Dashboards
295
+ 25 chart types mapped to admin use cases:
296
+
297
+ ```bash
298
+ python scripts/search.py --query "revenue" --domain charts -n 5
299
+ ```
300
+
301
+ Common admin chart patterns:
302
+ - **Revenue/Growth**: Line Chart, Area Chart, Sparkline
303
+ - **Comparisons**: Bar Chart, Grouped Bar, Horizontal Bar
304
+ - **Proportions**: Donut Chart, Pie Chart, Treemap
305
+ - **Real-time**: Gauge Chart, Metric Cards, Live Counter
306
+ - **Project/Timeline**: Gantt Chart, Timeline
307
+ - **Geographic**: Map, Choropleth
308
+ - **Correlation**: Scatter Plot, Heatmap
309
+
310
+ ## Pre-Delivery Checklist
311
+ Every page must pass these checks before shipping:
312
+
313
+ ### Universal Checks (All Pages)
314
+ - [ ] All interactive elements have hover states and cursor-pointer
315
+ - [ ] Focus states are visible and consistent
316
+ - [ ] No emojis as icons — only SVG or icon font
317
+ - [ ] Text contrast meets 4.5:1 minimum
318
+ - [ ] prefers-reduced-motion respected
319
+ - [ ] Responsive at 375px, 768px, 1024px, 1440px
320
+ - [ ] Loading states for all async operations
321
+ - [ ] Empty states for every list/table/grid
322
+ - [ ] Error states with helpful messages
323
+ - [ ] Browser back button works for filter/sort/page state
324
+
325
+ ### Page-Specific Checks
326
+ - **CRUD List**: Table row actions keyboard accessible, pagination updates URL, search debounced 300-500ms
327
+ - **Complex Form**: Dirty form confirmation, submit disabled while invalid, sections collapse on mobile
328
+ - **Dashboard**: Skeleton screens not spinners, charts have loading/empty states, auto-refresh reasonable
329
+ - **Detail**: Back navigation returns to correct list state, related data lazy-loaded
330
+ - **Settings**: Sections save independently or explicit global save, toggles have immediate feedback
331
+ - **Wizard**: Step validation prevents forward, progress indicator visible, summary review before submit
332
+ - **Auth**: Password visibility toggle, first input focused on load
333
+
334
+ Run checklist validation:
335
+ ```bash
336
+ python scripts/search.py --query "crud-list" --domain pre-delivery-checklist -n 10
337
+ ```
338
+
339
+ ## Expert Panel
340
+ The assistant must internally review decisions from these expert roles:
341
+ 1. UI/UX Architect
342
+ 2. Design System Architect
343
+ 3. MUI Component Reviewer
344
+ 4. Frontend Implementation Reviewer
345
+ 5. Accessibility Reviewer
346
+ 6. Cursor Codebase Reviewer
347
+
348
+ Do not output fake panel discussion unless requested.
349
+ Use the panel to improve the final answer.
350
+
351
+ ## Required Codebase Inspection
352
+ Before editing code:
353
+ 1. Detect stack: React, Next.js, Vite, Vue, Nuxt, TypeScript, JavaScript.
354
+ 2. Detect styling: CSS Modules, SCSS, Tailwind, Emotion, styled-components, CSS variables, tokens.
355
+ 3. Detect MUI version if present.
356
+ 4. Search for existing:
357
+ - PageLayout
358
+ - Card wrapper
359
+ - Table abstraction
360
+ - Form abstraction
361
+ - Drawer/Dialog helpers
362
+ - StatusChip/Badge
363
+ - theme tokens
364
+ - sidebar/navbar components
365
+ 5. Reuse existing conventions.
366
+ 6. Do not introduce unnecessary abstractions.
367
+
368
+ ## Backend Data Detection & Integration
369
+ Before building any chart table or form the assistant must detect the data source:
370
+
371
+ ### Detection Rules
372
+ 1. **Check for backend presence**: Look for `package.json` proxy, `vite.config.ts` proxy, `.env` API URLs, `openapi.yaml`, Swagger docs, Spring Boot repo, NestJS repo, or existing API calls in the codebase.
373
+ 2. **Check for real-time endpoints**: Look for WebSocket, STOMP, Socket.io, SSE, or GraphQL subscription configurations.
374
+ 3. **Check for existing API layer**: Look for `api/`, `services/`, `hooks/` directories with fetch/axios/TanStack Query usage.
375
+
376
+ ### Decision Matrix
377
+ | Scenario | Frontend Approach | Mock Strategy | Real-Time |
378
+ |---|---|---|---|
379
+ | Backend exists + API documented | Connect real API immediately | None — use real data | WebSocket/STOMP/SSE or polling |
380
+ | Backend exists + API not documented | Explore endpoints reverse engineer | MSW with discovered endpoints | Polling fallback |
381
+ | Backend in development not ready | MSW or json-server with agreed contract | MSW browser + server worker | Simulated polling |
382
+ | No backend frontend-first | json-server or localStorage mock | json-server db.json | Simulated polling |
383
+ | Backend unstable | Retry logic + circuit breaker | MSW fallback mode | Cached data + stale indicator |
384
+
385
+ ### Chart + Backend Integration
386
+ When building charts with backend data:
387
+ - Always use TanStack Query `useQuery` to fetch chart data
388
+ - Map API response to chart format in `select` option or adapter function
389
+ - Use `staleTime` and `refetchInterval` for real-time dashboards
390
+ - Show loading skeletons (not spinners) while chart data loads
391
+ - Show error state with retry button on API failure
392
+ - Use `placeholderData` to show previous data while refetching
393
+
394
+ ### Mock Data Strategy
395
+ When backend is not available:
396
+ - **MSW (preferred)**: Mock REST/GraphQL endpoints at network level. Share mock contract with backend team.
397
+ - **json-server**: Full fake REST API for rapid prototyping.
398
+ - **localStorage**: Simple persistence for demo data.
399
+ - **Never**: Hardcode mock data inside chart components or pages.
400
+
401
+ ### Real-Time Data Patterns
402
+ | Backend Stack | Frontend Pattern |
403
+ |---|---|
404
+ | Spring Boot + STOMP | SockJS + STOMP.js + Zustand/TanStack Query |
405
+ | Node.js + Socket.io | Socket.io-client + event-driven store |
406
+ | Any + SSE | EventSource with reconnect polyfill |
407
+ | Any + polling | TanStack Query `refetchInterval` |
408
+ | GraphQL + subscriptions | Apollo Client subscriptions or TanStack Query polling |
409
+
410
+ ## Operating Modes
411
+ Support these modes:
412
+ - Implementation
413
+ - Review
414
+ - Refactor
415
+ - Planning / Architecture
416
+ - Design System Generation
417
+ - Data Source Integration
418
+ - Cursor Prompt Generation
419
+
420
+ ## Page Pattern Mapping
421
+ Include detailed guidance for:
422
+ - CRUD List Page
423
+ - Complex Form Page
424
+ - Dashboard Page
425
+ - Detail Page
426
+ - Settings Page
427
+ - Wizard Page
428
+ - Auth Page
429
+ - Blank Layout
430
+
431
+ For each page type, include:
432
+ - Visual pattern
433
+ - MUI architectural equivalent
434
+ - reusable components
435
+ - required states
436
+ - accessibility requirements
437
+ - responsive behavior
438
+ - anti-patterns
439
+
440
+ ## Drawer vs Dialog vs Page Rules
441
+ Use Dialog for:
442
+ - delete confirmation
443
+ - simple yes/no confirmation
444
+ - small focused form
445
+
446
+ Use Drawer for:
447
+ - quick create
448
+ - quick edit
449
+ - advanced filters
450
+ - record preview
451
+ - side details
452
+
453
+ Use full page for:
454
+ - complex forms
455
+ - multi-section edit
456
+ - workflows
457
+ - heavy validation
458
+ - wizard-like creation
459
+
460
+ Never put complex multi-section forms inside a small dialog.
461
+
462
+ ## Table Standard
463
+ Every production table should use `@tanstack/react-table` and support:
464
+ - typed column config via `createColumnHelper`
465
+ - stable row keys
466
+ - sorting
467
+ - filtering (faceted + global)
468
+ - search (debounced 500ms)
469
+ - pagination via MUI `Pagination` (`shape='rounded'` `variant='tonal'`)
470
+ - server-side pagination when needed
471
+ - loading state
472
+ - empty state
473
+ - error state
474
+ - row actions via `OptionMenu`
475
+ - optional bulk actions via `rowSelection`
476
+ - status chips via MUI `Chip` (`variant='tonal'`)
477
+ - formatted date/number values
478
+ - responsive behavior (horizontal scroll)
479
+ - accessible headers
480
+ - controlled filter/sort/page state
481
+ - header height 56px, body row height 50px
482
+ - horizontal borders only, no vertical borders
483
+ - first/last column padding 24px, internal columns 16px
484
+
485
+ ## Form Standard
486
+ Every production form should use `react-hook-form` and support:
487
+ - typed values via `defaultValues` generic
488
+ - validation rules (inline or schema via resolver)
489
+ - field-level errors via `formState.errors`
490
+ - helper text under fields
491
+ - required indicators
492
+ - submit loading via `CircularProgress` in button
493
+ - disabled state
494
+ - cancel/reset via `reset()`
495
+ - dirty state protection
496
+ - responsive field grid via MUI `Grid` (`spacing={6}`)
497
+ - logical sections separated by `Divider` + `Typography` headers
498
+ - accessible labels (`htmlFor` on label)
499
+ - success/error feedback
500
+ - MUI `TextField` with label-above-input pattern (`slotProps={{ inputLabel: { shrink: true, style: { transform: 'none' } } }}`)
501
+ - focus state: 2px border + `primary-sm` shadow
502
+ - start adornments for icons via `InputAdornment` in `slotProps={{ input: { startAdornment: ... } }}`
503
+
504
+ ## Theme and Styling Standard
505
+ Prefer:
506
+ - MUI theme tokens (`theme.palette`, `theme.spacing`, `theme.shape`)
507
+ - CSS variables via MUI `cssVariables`
508
+ - shared spacing scale (`theme.spacing(factor)`)
509
+ - shared typography scale (`theme.typography`)
510
+ - semantic color roles (`primary`, `success`, `warning`, `error`, `info`)
511
+ - reusable variants (`contained`, `tonal`, `outlined`)
512
+ - Tailwind utilities for layout/flex/grid only
513
+ - `slotProps` over legacy `InputProps` / `InputLabelProps`
514
+
515
+ Avoid:
516
+ - random hex colors
517
+ - random margins
518
+ - random font sizes
519
+ - inconsistent border radius
520
+ - one-off shadows
521
+ - heavy inline `sx` props on generic primitives
522
+ - business-specific styling inside generic UI primitives
523
+ - using `item` prop on MUI v7 `Grid`
524
+
525
+ ## Keyboard Navigation
526
+ MUI components require specific keyboard patterns:
527
+
528
+ | Component | Keyboard Pattern |
529
+ |---|---|
530
+ | Autocomplete | Arrow keys navigate, Enter selects, Escape clears, Home/End in popup |
531
+ | Select | Space opens, arrows navigate, Enter selects, typeahead supported |
532
+ | Tabs | Left/Right arrows change tabs (not Tab key); Tab enters panel content |
533
+ | Accordion | Enter/Space toggles; arrows move between headers |
534
+ | Slider | Arrow keys adjust by step; Home/End to min/max; PageUp/PageDown |
535
+ | Switch | Space toggles (not Enter) |
536
+ | RadioGroup | Arrow keys change selection; Tab enters group |
537
+ | DatePicker | Arrow keys navigate calendar; PageUp/PageDown for months |
538
+ | Menu | Arrow keys navigate items; Escape closes; Enter activates |
539
+ | Dialog | Escape closes; Tab traps focus; Return focus to trigger on close |
540
+
541
+ ## Review Output Format
542
+ When reviewing implementation, always output:
543
+
544
+ ### 1. Verdict
545
+ Choose:
546
+ - Excellent
547
+ - Good but needs refinement
548
+ - Visually acceptable but structurally weak
549
+ - Not production-ready
550
+ - Needs redesign
551
+
552
+ ### 2. Premium Admin Visual Alignment
553
+ Evaluate:
554
+ - layout
555
+ - cards
556
+ - spacing
557
+ - dashboard feel
558
+ - sidebar/navbar consistency
559
+ - hierarchy
560
+ - table/form presentation
561
+
562
+ ### 3. MUI Architecture Alignment
563
+ Evaluate:
564
+ - component API
565
+ - reusable abstractions
566
+ - typed props
567
+ - form architecture (RHF + Controller)
568
+ - table architecture (TanStack + MUI Pagination)
569
+ - drawer/dialog usage
570
+ - theme/token usage
571
+ - predictable states
572
+
573
+ ### 4. Main Problems
574
+ For each:
575
+ - what is wrong
576
+ - why it matters
577
+ - how to fix it
578
+
579
+ ### 5. Production Readiness Score
580
+ Score 1-10:
581
+ - Premium Admin Visual Quality
582
+ - MUI Architecture Quality
583
+ - Component Reusability
584
+ - Form Quality
585
+ - Table Quality
586
+ - State Handling
587
+ - Responsiveness
588
+ - Accessibility
589
+ - Maintainability
590
+ - Production Readiness
591
+
592
+ ### 6. Exact Fix Plan
593
+ Step-by-step practical fixes.
594
+
595
+ ### 7. Final Decision
596
+ Choose:
597
+ - approve
598
+ - approve with minor changes
599
+ - request changes
600
+ - reject and redesign
@@ -0,0 +1,31 @@
1
+ id,area,check,why_it_matters,fix
2
+ 1,Forms,Every input has an associated label,Screen readers announce purpose cognitive accessibility,Use MUI FormControlLabel or TextField label prop with htmlFor
3
+ 2,Forms,Error messages are linked to inputs via aria-describedby,Screen readers announce errors when focusing input,Use TextField helperText prop which binds via aria-describedby automatically
4
+ 3,Forms,Required fields are indicated visually and via aria-required,Users know what must be filled before submission,Use TextField required prop and visual indicator
5
+ 4,Focus,Dialog and Drawer trap focus while open,Keyboard users cannot tab behind open overlays,MUI Dialog and Drawer handle this automatically verify custom implementations
6
+ 5,Focus,Focus returns to trigger after Dialog Drawer closes,Maintains navigation context for keyboard users,MUI built-in behavior test with keyboard
7
+ 6,Color,Status is not communicated by color alone,Colorblind users need icons or text to understand state,Add icon + text in MUI Chip do not use color-only
8
+ 7,Tables,Table headers are marked with proper th scope,Screen readers can navigate and announce column relationships,Use native table th elements or MUI TableCell component prop
9
+ 8,Tables,Row actions are keyboard accessible and focusable,All users can trigger actions without a mouse,Use MUI Button or IconButton for row actions
10
+ 9,Navigation,Breadcrumbs reflect current location and are navigable,Wayfinding for all users screen reader context,Implement with nav aria-label current page marked
11
+ 10,Buttons,Buttons have descriptive text or aria-label,Screen reader users understand what action will happen,Avoid icon-only IconButton without aria-label
12
+ 11,Loading,Loading states are announced to assistive technology,Users know content is being fetched,Use MUI Skeleton with aria-hidden or aria-live regions for dynamic updates
13
+ 12,Headings,Page has exactly one h1 and logical heading hierarchy,Screen reader users navigate by headings efficiently,Use Typography variant h1 for page title h2 for sections
14
+ 13,Touch,Interactive elements have minimum 44x44px touch target,Mobile users can tap accurately without mis-taps,Ensure MUI Button and IconButton meet target size
15
+ 14,Contrast,Text has minimum 4.5:1 contrast ratio against background,Low-vision users can read content,Verify with theme token values do not use light gray on white
16
+ 15,Language,HTML lang attribute matches page language,Screen readers use correct pronunciation,Set lang in app root or layout
17
+ 16,Navigation,Skip links bypass blocks,Keyboard users need to skip repetitive nav,Add skip-to-content link as first focusable element
18
+ 17,Focus,Focus visible indicators are clearly visible,Keyboard users need to see where focus is,Ensure focus-visible outline is visible never disable globally
19
+ 18,Navigation,Document page title updates on route change,SPA route changes must update title,Use Next.js metadata or react-helmet for title updates
20
+ 19,Images,Alt text for images icons,Decorative vs informative images must be distinguished,Use img alt or aria-label on informative icons hide decorative ones
21
+ 20,Landmarks,Page has proper landmark regions,Screen reader users navigate by landmarks,Use main nav aside search landmarks in PageLayout
22
+ 21,Status,Status messages announced via aria-live,Toast snackbar announcements not missed by screen readers,Add role status or alert to MUI Snackbar
23
+ 22,Forms,Input autocomplete attributes provided,Users with cognitive disabilities benefit from autocomplete,Use TextField inputProps autoComplete for passwords emails names
24
+ 23,Contrast,Non-text contrast UI components focus rings borders 3:1,Low-vision users need to see UI boundaries,Ensure focus rings toggle borders slider thumbs meet 3:1 contrast
25
+ 24,Responsive,Text reflows at 400 percent zoom,Users who zoom need content to reflow not scroll horizontally,Test at 320px viewport ensure no horizontal scroll except tables
26
+ 25,Hover,Content on hover focus is dismissible,Tooltips dropdowns must be dismissible via Escape,Ensure MUI Tooltip Popover dismissible via Escape
27
+ 26,Forms,Error prevention for destructive actions,Users need confirmation before irreversible actions,Add Dialog confirmation for delete bulk actions
28
+ 27,Navigation,Consistent identification labels across pages,Link purpose and accessible name must match visible label,Ensure Link component text matches aria-label
29
+ 28,Language,Language of parts for mixed-language content,Mixed-language content needs correct pronunciation,Use lang attribute on foreign text elements
30
+ 29,Motion,Respect prefers-reduced-motion,Animations can cause vestibular issues for some users,Wrap transitions in prefers-reduced-motion media query
31
+ 30,Input,Pointer gesture alternatives,Drag-to-reorder swipeable drawers need keyboard alternatives,Provide keyboard alternatives for drag gestures