create-modoock-app 1.0.0 → 2.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 (75) hide show
  1. package/README.md +68 -0
  2. package/dist/cli.js +112 -43
  3. package/package.json +22 -21
  4. package/template/.cursor/hooks/gate-ui-pack.mjs +108 -0
  5. package/template/.cursor/hooks.json +18 -0
  6. package/template/.cursor/rules/honey.mdc +11 -3
  7. package/template/AGENTS.md +13 -12
  8. package/template/README.md +225 -175
  9. package/template/app/(local)/components/page.tsx +3 -3
  10. package/template/app/(local)/design-system/page.tsx +2 -2
  11. package/template/components/layout/app-layout.tsx +16 -5
  12. package/template/components/layout/header.tsx +19 -1
  13. package/template/components/layout/side-nav.tsx +103 -30
  14. package/template/postcss.config.mjs +7 -7
  15. package/template/public/identity/full_logo_black.svg +26 -26
  16. package/template/public/identity/full_logo_color.svg +37 -37
  17. package/template/public/identity/full_logo_white.svg +33 -33
  18. package/template/public/identity/logo_icon_black.svg +5 -5
  19. package/template/public/identity/logo_icon_color.svg +12 -12
  20. package/template/public/identity/logo_icon_white.svg +12 -12
  21. package/template/components/ui/action-stack.tsx +0 -42
  22. package/template/components/ui/badge.tsx +0 -43
  23. package/template/components/ui/button.tsx +0 -104
  24. package/template/components/ui/icon.tsx +0 -78
  25. package/template/components/ui/index.ts +0 -28
  26. package/template/components/ui/input.tsx +0 -376
  27. package/template/components/ui/loader.tsx +0 -78
  28. package/template/components/ui/metric-bar.tsx +0 -49
  29. package/template/components/ui/modal.tsx +0 -177
  30. package/template/components/ui/select.tsx +0 -458
  31. package/template/components/ui/stepper.tsx +0 -96
  32. package/template/components/ui/tab.tsx +0 -85
  33. package/template/components/ui/user-table.tsx +0 -806
  34. package/template/knowledge-base/design-system/components/action-stack.mdc +0 -17
  35. package/template/knowledge-base/design-system/components/badges.mdc +0 -16
  36. package/template/knowledge-base/design-system/components/buttons.mdc +0 -21
  37. package/template/knowledge-base/design-system/components/detail-header.mdc +0 -17
  38. package/template/knowledge-base/design-system/components/dropdowns.mdc +0 -12
  39. package/template/knowledge-base/design-system/components/info-list.mdc +0 -17
  40. package/template/knowledge-base/design-system/components/inputs.mdc +0 -23
  41. package/template/knowledge-base/design-system/components/menu.mdc +0 -20
  42. package/template/knowledge-base/design-system/components/modals.mdc +0 -24
  43. package/template/knowledge-base/design-system/components/selects.mdc +0 -39
  44. package/template/knowledge-base/design-system/components/stepper.mdc +0 -18
  45. package/template/knowledge-base/design-system/components/tables.mdc +0 -59
  46. package/template/knowledge-base/design-system/components/tabs.mdc +0 -17
  47. package/template/knowledge-base/design-system/components.mdc +0 -91
  48. package/template/knowledge-base/design-system/tokens.mdc +0 -24
  49. package/template/knowledge-base/examples/bad/README.md +0 -8
  50. package/template/knowledge-base/examples/good/README.md +0 -13
  51. package/template/knowledge-base/metadata/catalog.yaml +0 -245
  52. package/template/knowledge-base/patterns/components/reuse-existing.mdc +0 -26
  53. package/template/knowledge-base/patterns/data-fetching/local-data.mdc +0 -20
  54. package/template/knowledge-base/patterns/layouts/app-shell.mdc +0 -20
  55. package/template/knowledge-base/patterns/pages/data-table-page.mdc +0 -31
  56. package/template/knowledge-base/patterns/pages/workflow-page.mdc +0 -27
  57. package/template/knowledge-base/rules/accessibility/responsive.mdc +0 -31
  58. package/template/knowledge-base/rules/architecture/layout.mdc +0 -52
  59. package/template/knowledge-base/rules/architecture/single-screen.mdc +0 -62
  60. package/template/knowledge-base/rules/code-quality/jsx.mdc +0 -19
  61. package/template/knowledge-base/rules/global/naming.mdc +0 -12
  62. package/template/knowledge-base/rules/global/technology.mdc +0 -19
  63. package/template/knowledge-base/rules/global/ui-copy.mdc +0 -20
  64. package/template/knowledge-base/rules/performance/client.mdc +0 -20
  65. package/template/knowledge-base/rules/ui/information-density.mdc +0 -36
  66. package/template/knowledge-base/rules/ui/interaction.mdc +0 -47
  67. package/template/knowledge-base/rules/ui/simple-ui.mdc +0 -58
  68. package/template/knowledge-base/validation/accessibility.mdc +0 -13
  69. package/template/knowledge-base/validation/architecture.mdc +0 -10
  70. package/template/knowledge-base/validation/ast-grep/do-what-brooooooklyn-said.yml +0 -15
  71. package/template/knowledge-base/validation/ast-grep/no-nested-links.yml +0 -12
  72. package/template/knowledge-base/validation/ast-grep/rewrite-svg-attribute.yml +0 -19
  73. package/template/knowledge-base/validation/code-quality.mdc +0 -18
  74. package/template/knowledge-base/validation/performance.mdc +0 -11
  75. package/template/knowledge-base/validation/ui.mdc +0 -26
@@ -1,47 +0,0 @@
1
- ---
2
- description: Keyboard, focus, forms and status cues for non-expert users
3
- globs: app/**/*.tsx, components/**/*.tsx
4
- alwaysApply: false
5
- priority: high
6
- tags: [ux, interaction, keyboard, focus, form, a11y]
7
- ---
8
-
9
- # Interaction
10
-
11
- How to detect violations: `knowledge-base/validation/ui.mdc` and `knowledge-base/validation/accessibility.mdc`.
12
-
13
- ## Keyboard and focus
14
-
15
- - Every flow is operable with the keyboard.
16
- - Every focusable element has a visible focus ring. Header, footer and overlays never cover it. Prefer `:focus-visible`.
17
- - A modal traps focus and returns it to the control that opened it when it closes.
18
- - Do not disable browser zoom (`maximum-scale=1`, `user-scalable=no`).
19
-
20
- ## Navigation and semantics
21
-
22
- - Navigation uses `<a>` or `next/link`, never `<button>` or `<div>`.
23
- - Prefer a native `button`, `a`, `label` or `table` before adding `aria-*` on a `<div>`.
24
- - If a control looks interactive, the whole visible control is interactive. No dead zones.
25
-
26
- ## Forms
27
-
28
- - Every control has an associated `<label>`.
29
- - Do not block typing or paste to force a format. Show validation feedback instead.
30
- - Keep submit enabled until submission starts.
31
- - Show field errors next to the field. On submit, move focus to the first error.
32
- - Search and other non-auth fields must not use password-like `name` or `autocomplete` values.
33
-
34
- ## Feedback
35
-
36
- - An icon-only button has a descriptive accessible name (`aria-label` or equivalent).
37
- - Status is never color alone: include a text label.
38
- - Prefer inline help. Use a tooltip only as a last resort.
39
- - A loading button keeps its original label and may add a spinner.
40
- - A destructive action requires confirmation.
41
- - Follow-up and loading labels in French end with an ellipsis: `Renommer…`, `Chargement…`.
42
-
43
- ## Motion
44
-
45
- - Honor `prefers-reduced-motion`.
46
- - Do not use `transition: all`. List only the properties you animate.
47
- - A modal or drawer contains overscroll (`overscroll-behavior: contain`).
@@ -1,58 +0,0 @@
1
- ---
2
- description: Simple, uncluttered UI for non-expert users
3
- globs: app/**/*.tsx, components/**/*.tsx
4
- alwaysApply: false
5
- priority: high
6
- tags: [ux, simplicity, clarity, layout, non-expert, overlap]
7
- ---
8
-
9
- # Simple and readable interface
10
-
11
- Applies to every page: one objective, no overlap, vocabulary for non-experts.
12
-
13
- The "summary then one table" shape applies to **dashboard and list** pages only.
14
- A **workflow / dossier** page (one record to process) uses identity → progression
15
- → details → contextual actions. Pattern: `knowledge-base/patterns/pages/workflow-page.mdc`.
16
-
17
- ## Clarity before density
18
-
19
- - Clarity comes before density: a page must be understandable at a glance,
20
- without the user having to search for information.
21
- - A page has ONE main objective, a single focus area, and one domain of data.
22
- Do not mix unrelated datasets on the same screen to show more cases.
23
- Secondary information goes behind a tab (`Tabs`) or into a detail sheet.
24
- - Limit the number of areas visible at the same time. On dashboard and list
25
- pages: a summary (a few key figures), then a single main list/table. The
26
- other sections move to secondary access.
27
- - Natural reading order: header → summary → detail. Each area has a
28
- distinct role and a clear title.
29
-
30
- ## Zero overlap
31
-
32
- - Areas must never overlap or superimpose on the screen.
33
- - Reserve space with grid/flex and the Design System spacing tokens; never
34
- compress blocks to make everything fit.
35
- - When space is missing, blocks wrap to the next line (clean vertical
36
- stacking) rather than shrinking until they touch.
37
- - Check every intermediate screen width: no collision between cards,
38
- headers, filters and tables.
39
-
40
- ## For non-expert users
41
-
42
- - A single main content column, at most one optional secondary column.
43
- - Simple labels, readable figures, direct vocabulary (see
44
- `knowledge-base/rules/global/ui-copy.mdc`).
45
- - Table limited to the columns useful for the task; the full detail goes
46
- to the detail sheet.
47
- - Avoid accumulating cards, tables and filters side by side: this is the
48
- typical pattern of an unreadable page.
49
-
50
- ## References
51
-
52
- See:
53
- - `knowledge-base/rules/architecture/single-screen.mdc`
54
- - `knowledge-base/rules/ui/information-density.mdc`
55
- - `knowledge-base/rules/global/ui-copy.mdc`
56
- - `components/ui/user-table.tsx` (list pages)
57
- - `app/change-request/page.tsx` (workflow / dossier)
58
- - `components/ui/tab.tsx`
@@ -1,13 +0,0 @@
1
- # Validation: accessibility
2
-
3
- How to detect that an implementation violates small-screen, keyboard, and readability constraints. The constraints themselves live in `knowledge-base/rules/accessibility/` and `knowledge-base/rules/ui/`.
4
-
5
- - Below `md`, a table keeps a horizontal scroll or drops columns → fail (`responsive.mdc`, `components/tables.mdc`).
6
- - Below `md`, content is clipped or unreachable by page scroll → fail (`responsive.mdc`, `layout.mdc`).
7
- - Blocks overlap or are compressed until they collide → fail (`rules/ui/simple-ui.mdc`).
8
- - A page has several competing focus areas at once → fail (`rules/ui/simple-ui.mdc`).
9
- - A flow cannot be completed with the keyboard → fail (`rules/ui/interaction.mdc`).
10
- - A focusable element has no visible focus, or the header / overlay hides it → fail (`rules/ui/interaction.mdc`).
11
- - A modal does not trap focus or does not return it on close → fail (`rules/ui/interaction.mdc`).
12
- - `aria-*` is added on a `<div>` while a native `button`, `a`, `label` or `table` fits → fail (`rules/ui/interaction.mdc`).
13
- - Viewport disables zoom (`maximum-scale=1` or `user-scalable=no`) → fail (`rules/ui/interaction.mdc`).
@@ -1,10 +0,0 @@
1
- # Validation: architecture
2
-
3
- How to detect that an implementation violates architecture constraints. The constraints themselves live in `knowledge-base/rules/architecture/`.
4
-
5
- - Dashboard, list or compact-detail page at `md+` introduces page-level vertical scroll → fail (`layout.mdc`).
6
- - Workflow / dossier page (`/change-request` and the same shape) is forced into the dashboard no-page-scroll / "summary + table" shape → fail (`layout.mdc`, `patterns/pages/workflow-page.mdc`).
7
- - Below `md`, a dashboard, list or compact-detail page relies on inner component scroll and clips content → fail (`layout.mdc`).
8
- - A page with a table also scrolls at page level → fail (`layout.mdc`, `design-system/components/tables.mdc`).
9
- - Layout size is measured in JavaScript instead of flex / grid / CSS → fail (`layout.mdc`).
10
- - A modal or drawer lets scroll chain to the page behind it (no `overscroll-behavior: contain`) → fail (`rules/ui/interaction.mdc`).
@@ -1,15 +0,0 @@
1
- # Copied from the official ast-grep TSX catalog.
2
- # https://ast-grep.github.io/catalog/tsx/#avoid--short-circuit-in-jsx
3
- id: do-what-brooooooklyn-said
4
- language: Tsx
5
- severity: warning
6
- message: Avoid && short-circuit in JSX. A left-hand number like 0 will render.
7
- url: https://ast-grep.github.io/catalog/tsx/#avoid--short-circuit-in-jsx
8
- rule:
9
- kind: jsx_expression
10
- has:
11
- pattern: $A && $B
12
- not:
13
- inside:
14
- kind: jsx_attribute
15
- fix: "{$A ? $B : null}"
@@ -1,12 +0,0 @@
1
- # Copied from the official ast-grep TSX catalog.
2
- # https://ast-grep.github.io/catalog/tsx/#avoid-nested-links
3
- id: no-nested-links
4
- language: tsx
5
- severity: error
6
- message: React warns when an <a> is nested inside another <a>.
7
- url: https://ast-grep.github.io/catalog/tsx/#avoid-nested-links
8
- rule:
9
- pattern: <a $$$>$$$A</a>
10
- has:
11
- pattern: <a $$$>$$$</a>
12
- stopBy: end
@@ -1,19 +0,0 @@
1
- # Copied from the official ast-grep TSX catalog.
2
- # https://ast-grep.github.io/catalog/tsx/#rename-svg-attribute
3
- id: rewrite-svg-attribute
4
- language: tsx
5
- severity: warning
6
- message: Hyphenated SVG attributes must be camelCase in JSX (stroke-linecap → strokeLinecap).
7
- url: https://ast-grep.github.io/catalog/tsx/#rename-svg-attribute
8
- rule:
9
- pattern: $PROP
10
- regex: ([a-z]+)-([a-z])
11
- kind: property_identifier
12
- inside:
13
- kind: jsx_attribute
14
- transform:
15
- NEW_PROP:
16
- convert:
17
- source: $PROP
18
- toCase: camelCase
19
- fix: $NEW_PROP
@@ -1,18 +0,0 @@
1
- # Validation: code quality
2
-
3
- How to detect that an implementation violates code-quality constraints. The constraints themselves live in `knowledge-base/rules/code-quality/jsx.mdc`, `knowledge-base/rules/global/` and `knowledge-base/design-system/components.mdc`. JSX catalog: https://ast-grep.github.io/catalog/tsx/
4
-
5
- - Planning vocabulary in a file name, export, route or UI copy → fail (`naming.mdc`).
6
- - A new dependency is added → fail until validated (`technology.mdc`).
7
- - A new reusable component was added to `components/` without asking the developer → fail (`components.mdc`).
8
- - A Design System primitive was kept as page-local JSX to avoid asking → fail (`components.mdc`).
9
- - A new Design System token was added without approval → fail (`tokens.mdc`).
10
- - `npm run lint` reports an error → fail.
11
- - A JSX prop that is not on the component's public type → fail. Proof: `npm run typecheck` (`tsc --noEmit`).
12
- - `npm run typecheck` reports an error → fail.
13
- - `{list.length && <div/>}` (or any `$A && $B` inside a JSX expression, except in a `className` / attribute) → fail. Use `{$A ? $B : null}`. Official catalog: Avoid `&&` short-circuit in JSX.
14
- - An `<a>` nested inside another `<a>` → fail. Official catalog: Avoid nested links.
15
- - A hyphenated SVG attribute in JSX (`stroke-linecap`) → fail. Use camelCase (`strokeLinecap`). Official catalog: Rename SVG attribute. Do not rewrite valid React `aria-*` / `data-*` to silence the scanner.
16
- - `npm run sg:scan` reports a severity `error` (non-zero exit) → fail. Scanner files: `knowledge-base/validation/ast-grep/`. Catalog warnings on boolean `&&` and `aria-*` / `data-*` are expected; do not apply catalog `fix:` or `ast-grep scan -U` on existing app JSX.
17
- - The same cell or block of JSX copied across tabs or sections → fail (`components.mdc`).
18
- - Empty no-op props, or a page-level reimplementation of a behavior an existing component already exposes → fail (`components.mdc`).
@@ -1,11 +0,0 @@
1
- # Validation: performance
2
-
3
- How to detect avoidable weight. Constraints: `knowledge-base/rules/performance/client.mdc`.
4
-
5
- - A second icon library is added → fail (`client.mdc` ← `technology.mdc`).
6
- - An animation library or custom keyframes is added without validation → fail (`client.mdc` ← `technology.mdc`).
7
- - A new wrapper exists for a one-off that cannot be reused → fail (`client.mdc` ← `components.mdc`). A Design System primitive in `components/` after the developer said yes is not a single-use abstraction.
8
- - A page-local component duplicates an existing `index.ts` export → fail (`components.mdc`).
9
- - `useMemo` or `useCallback` wraps a value with no reactive dependency → fail (`client.mdc` ← `components.mdc`).
10
- - `transition: all` is used → fail (`client.mdc` ← `interaction.mdc`).
11
- - A new animation ignores `prefers-reduced-motion` → fail (`client.mdc` ← `interaction.mdc`).
@@ -1,26 +0,0 @@
1
- # Validation: UI
2
-
3
- How to detect that an implementation violates UI constraints. The constraints themselves live in `knowledge-base/design-system/` and `knowledge-base/rules/ui/`.
4
-
5
- - Raw `<button>`, `<input>`, `<select>`, `<table>` or badge markup while a matching component exists in `components/*/index.ts` → fail (`components.mdc`).
6
- - A wrapping `<div>` around a single component with no layout or spacing role → fail (`components.mdc`).
7
- - Orange or yellow used as decoration, or reused on the same page after an alert → fail (`tokens.mdc`).
8
- - Hard-coded color, spacing, radius or text size that already exists as a token → fail (`tokens.mdc`).
9
- - More than one table visible at the same time → fail (`components/tables.mdc`).
10
- - The same fact shown twice on one screen → fail (`rules/ui/information-density.mdc`).
11
- - User-facing text in English → fail (`rules/global/ui-copy.mdc`).
12
- - Empty or error screen with no next step or recovery action → fail (`rules/global/ui-copy.mdc`).
13
- - A pedagogical paragraph that explains how to read the screen → fail (`rules/global/ui-copy.mdc`).
14
- - Navigation uses `<button>` or `<div>` instead of `<a>` or `next/link` → fail (`rules/ui/interaction.mdc`).
15
- - An icon-only button has no accessible name → fail (`rules/ui/interaction.mdc`).
16
- - A status is shown by color only, with no text label → fail (`rules/ui/interaction.mdc`).
17
- - A tooltip is the only explanation → fail (`rules/ui/interaction.mdc`).
18
- - A loading button drops its original label → fail (`rules/ui/interaction.mdc`).
19
- - A destructive action has no confirmation → fail (`rules/ui/interaction.mdc`).
20
- - A control looks clickable but part of it is not → fail (`rules/ui/interaction.mdc`).
21
- - Follow-up or loading copy omits the ellipsis (`Renommer…`, `Chargement…`) → fail (`rules/ui/interaction.mdc`).
22
- - Submit is disabled before the user tries to submit → fail (`rules/ui/interaction.mdc`).
23
- - Typing or paste is blocked on a field → fail (`rules/ui/interaction.mdc`).
24
- - A field error is not next to the field, or submit does not move focus to the first error → fail (`rules/ui/interaction.mdc`).
25
- - A search or non-auth field uses a password-like `name` / `autocomplete` → fail (`rules/ui/interaction.mdc`).
26
- - A form control has no associated `<label>` → fail (`rules/ui/interaction.mdc`).