create-auto-app 0.1.0 → 0.1.1

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 (187) hide show
  1. package/dist/index.js +182 -85
  2. package/dist/index.js.map +1 -1
  3. package/package.json +1 -1
  4. package/templates/shopping-app/.context/auto-ia-scheme.json +175 -0
  5. package/templates/shopping-app/.context/design-system.md +118 -0
  6. package/templates/shopping-app/.context/figma-variables.json +14448 -0
  7. package/templates/shopping-app/.context/schema.graphql +46 -0
  8. package/templates/shopping-app/.context/schema.json +583 -0
  9. package/templates/shopping-app/.context/shadcn-filter.ts +31 -0
  10. package/templates/shopping-app/.env +8 -0
  11. package/templates/shopping-app/auto.config.ts +21 -0
  12. package/templates/shopping-app/client/auto-configure.ts +107 -0
  13. package/templates/shopping-app/client/codegen.ts +16 -0
  14. package/templates/shopping-app/client/components.json +20 -0
  15. package/templates/shopping-app/client/design-system-principles.md +19 -0
  16. package/templates/shopping-app/client/eslint.config.ts +57 -0
  17. package/templates/shopping-app/client/index.html +26 -0
  18. package/templates/shopping-app/client/package.json +100 -0
  19. package/templates/shopping-app/client/postcss.config.js +6 -0
  20. package/templates/shopping-app/client/public/favicon.ico +0 -0
  21. package/templates/shopping-app/client/schema.graphql +46 -0
  22. package/templates/shopping-app/client/src/App.css +42 -0
  23. package/templates/shopping-app/client/src/App.tsx +20 -0
  24. package/templates/shopping-app/client/src/apolloClient.ts +8 -0
  25. package/templates/shopping-app/client/src/components/atoms/accordion.tsx +51 -0
  26. package/templates/shopping-app/client/src/components/atoms/alert-dialog.tsx +111 -0
  27. package/templates/shopping-app/client/src/components/atoms/alert.tsx +49 -0
  28. package/templates/shopping-app/client/src/components/atoms/aspect-ratio.tsx +7 -0
  29. package/templates/shopping-app/client/src/components/atoms/avatar.tsx +32 -0
  30. package/templates/shopping-app/client/src/components/atoms/badge.tsx +36 -0
  31. package/templates/shopping-app/client/src/components/atoms/breadcrumb.tsx +92 -0
  32. package/templates/shopping-app/client/src/components/atoms/button.tsx +50 -0
  33. package/templates/shopping-app/client/src/components/atoms/calendar.tsx +156 -0
  34. package/templates/shopping-app/client/src/components/atoms/card.tsx +56 -0
  35. package/templates/shopping-app/client/src/components/atoms/carousel.tsx +214 -0
  36. package/templates/shopping-app/client/src/components/atoms/chart.tsx +290 -0
  37. package/templates/shopping-app/client/src/components/atoms/checkbox.tsx +27 -0
  38. package/templates/shopping-app/client/src/components/atoms/collapsible.tsx +15 -0
  39. package/templates/shopping-app/client/src/components/atoms/command.tsx +135 -0
  40. package/templates/shopping-app/client/src/components/atoms/context-menu.tsx +209 -0
  41. package/templates/shopping-app/client/src/components/atoms/dialog.tsx +123 -0
  42. package/templates/shopping-app/client/src/components/atoms/drawer.tsx +106 -0
  43. package/templates/shopping-app/client/src/components/atoms/dropdown-menu.tsx +217 -0
  44. package/templates/shopping-app/client/src/components/atoms/hover-card.tsx +36 -0
  45. package/templates/shopping-app/client/src/components/atoms/input-otp.tsx +66 -0
  46. package/templates/shopping-app/client/src/components/atoms/input.tsx +21 -0
  47. package/templates/shopping-app/client/src/components/atoms/label.tsx +19 -0
  48. package/templates/shopping-app/client/src/components/atoms/logo.tsx +33 -0
  49. package/templates/shopping-app/client/src/components/atoms/menubar.tsx +234 -0
  50. package/templates/shopping-app/client/src/components/atoms/navigation-menu.tsx +142 -0
  51. package/templates/shopping-app/client/src/components/atoms/pagination.tsx +100 -0
  52. package/templates/shopping-app/client/src/components/atoms/popover.tsx +40 -0
  53. package/templates/shopping-app/client/src/components/atoms/progress.tsx +22 -0
  54. package/templates/shopping-app/client/src/components/atoms/radio-group.tsx +31 -0
  55. package/templates/shopping-app/client/src/components/atoms/resizable.tsx +46 -0
  56. package/templates/shopping-app/client/src/components/atoms/scroll-area.tsx +46 -0
  57. package/templates/shopping-app/client/src/components/atoms/select.tsx +158 -0
  58. package/templates/shopping-app/client/src/components/atoms/separator.tsx +26 -0
  59. package/templates/shopping-app/client/src/components/atoms/sheet.tsx +101 -0
  60. package/templates/shopping-app/client/src/components/atoms/sidebar.tsx +675 -0
  61. package/templates/shopping-app/client/src/components/atoms/skeleton.tsx +7 -0
  62. package/templates/shopping-app/client/src/components/atoms/slider.tsx +54 -0
  63. package/templates/shopping-app/client/src/components/atoms/sonner.tsx +23 -0
  64. package/templates/shopping-app/client/src/components/atoms/switch.tsx +26 -0
  65. package/templates/shopping-app/client/src/components/atoms/table.tsx +73 -0
  66. package/templates/shopping-app/client/src/components/atoms/tabs.tsx +40 -0
  67. package/templates/shopping-app/client/src/components/atoms/textarea.tsx +18 -0
  68. package/templates/shopping-app/client/src/components/atoms/toggle-group.tsx +65 -0
  69. package/templates/shopping-app/client/src/components/atoms/toggle.tsx +39 -0
  70. package/templates/shopping-app/client/src/components/atoms/tooltip.tsx +48 -0
  71. package/templates/shopping-app/client/src/components/molecules/QuantitySelector.tsx +8 -0
  72. package/templates/shopping-app/client/src/components/molecules/ShoppingCriteriaForm.tsx +8 -0
  73. package/templates/shopping-app/client/src/components/molecules/SuggestedItemCard.tsx +10 -0
  74. package/templates/shopping-app/client/src/components/organisms/AssistantChatInterface.tsx +14 -0
  75. package/templates/shopping-app/client/src/components/organisms/PageHeader.tsx +6 -0
  76. package/templates/shopping-app/client/src/components/organisms/SuggestedItemsList.tsx +15 -0
  77. package/templates/shopping-app/client/src/gql/fragment-masking.ts +48 -0
  78. package/templates/shopping-app/client/src/gql/gql.ts +47 -0
  79. package/templates/shopping-app/client/src/gql/graphql.ts +106 -0
  80. package/templates/shopping-app/client/src/gql/index.ts +2 -0
  81. package/templates/shopping-app/client/src/graphql/mutations.ts +13 -0
  82. package/templates/shopping-app/client/src/graphql/queries.ts +14 -0
  83. package/templates/shopping-app/client/src/hooks/use-mobile.tsx +19 -0
  84. package/templates/shopping-app/client/src/hooks/use-toast.ts +186 -0
  85. package/templates/shopping-app/client/src/index.css +153 -0
  86. package/templates/shopping-app/client/src/lib/utils.ts +6 -0
  87. package/templates/shopping-app/client/src/main.tsx +5 -0
  88. package/templates/shopping-app/client/src/mockApolloClient.ts +93 -0
  89. package/templates/shopping-app/client/src/pages/AssistantChatPage.tsx +8 -0
  90. package/templates/shopping-app/client/src/pages/Index.tsx +10 -0
  91. package/templates/shopping-app/client/src/pages/NotFound.tsx +22 -0
  92. package/templates/shopping-app/client/src/pages/SuggestedItemsPage.tsx +8 -0
  93. package/templates/shopping-app/client/tailwind.config.ts +92 -0
  94. package/templates/shopping-app/client/tsconfig.json +49 -0
  95. package/templates/shopping-app/client/vite.config.ts +17 -0
  96. package/templates/shopping-app/flows/shopping-assistant.flow.ts +369 -0
  97. package/templates/shopping-app/package.json +25 -0
  98. package/templates/shopping-app/pnpm-workspace.yaml +2 -0
  99. package/templates/shopping-app/server/package.json +25 -0
  100. package/templates/shopping-app/server/scripts/generate-schema.ts +31 -0
  101. package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/accepts-items-and-adds-to-their-cart/commands.ts +8 -0
  102. package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/accepts-items-and-adds-to-their-cart/decide.specs.ts +46 -0
  103. package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/accepts-items-and-adds-to-their-cart/decide.ts +36 -0
  104. package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/accepts-items-and-adds-to-their-cart/events.ts +10 -0
  105. package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/accepts-items-and-adds-to-their-cart/evolve.ts +28 -0
  106. package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/accepts-items-and-adds-to-their-cart/handle.ts +31 -0
  107. package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/accepts-items-and-adds-to-their-cart/mutation.resolver.ts +29 -0
  108. package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/accepts-items-and-adds-to-their-cart/register.ts +10 -0
  109. package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/accepts-items-and-adds-to-their-cart/state.ts +47 -0
  110. package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/creates-a-chat-session-/react.specs.ts +63 -0
  111. package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/creates-a-chat-session-/react.ts +49 -0
  112. package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/creates-a-chat-session-/register.ts +31 -0
  113. package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant/commands.ts +8 -0
  114. package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant/decide.specs.ts +38 -0
  115. package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant/decide.ts +36 -0
  116. package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant/events.ts +10 -0
  117. package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant/evolve.ts +28 -0
  118. package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant/handle.ts +31 -0
  119. package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant/mutation.resolver.ts +30 -0
  120. package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant/register.ts +10 -0
  121. package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant/state.ts +47 -0
  122. package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/selects-items-relevant-to-the-shopping-criteria-/commands.ts +8 -0
  123. package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/selects-items-relevant-to-the-shopping-criteria-/decide.specs.ts +61 -0
  124. package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/selects-items-relevant-to-the-shopping-criteria-/decide.ts +45 -0
  125. package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/selects-items-relevant-to-the-shopping-criteria-/events.ts +14 -0
  126. package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/selects-items-relevant-to-the-shopping-criteria-/evolve.ts +28 -0
  127. package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/selects-items-relevant-to-the-shopping-criteria-/handle.ts +59 -0
  128. package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/selects-items-relevant-to-the-shopping-criteria-/mutation.resolver.ts +30 -0
  129. package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/selects-items-relevant-to-the-shopping-criteria-/register.ts +10 -0
  130. package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/selects-items-relevant-to-the-shopping-criteria-/state.ts +47 -0
  131. package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/views-suggested-items/projection.specs.ts +94 -0
  132. package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/views-suggested-items/projection.ts +40 -0
  133. package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/views-suggested-items/query.resolver.ts +59 -0
  134. package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/views-suggested-items/state.ts +9 -0
  135. package/templates/shopping-app/server/src/domain/shared/ReadModel.d.ts +10 -0
  136. package/templates/shopping-app/server/src/domain/shared/ReadModel.d.ts.map +1 -0
  137. package/templates/shopping-app/server/src/domain/shared/ReadModel.js +19 -0
  138. package/templates/shopping-app/server/src/domain/shared/ReadModel.js.map +1 -0
  139. package/templates/shopping-app/server/src/domain/shared/ReadModel.ts +26 -0
  140. package/templates/shopping-app/server/src/domain/shared/index.d.ts +5 -0
  141. package/templates/shopping-app/server/src/domain/shared/index.d.ts.map +1 -0
  142. package/templates/shopping-app/server/src/domain/shared/index.js +5 -0
  143. package/templates/shopping-app/server/src/domain/shared/index.js.map +1 -0
  144. package/templates/shopping-app/server/src/domain/shared/index.ts +4 -0
  145. package/templates/shopping-app/server/src/domain/shared/reactorSpecification.d.ts +35 -0
  146. package/templates/shopping-app/server/src/domain/shared/reactorSpecification.d.ts.map +1 -0
  147. package/templates/shopping-app/server/src/domain/shared/reactorSpecification.js +155 -0
  148. package/templates/shopping-app/server/src/domain/shared/reactorSpecification.js.map +1 -0
  149. package/templates/shopping-app/server/src/domain/shared/reactorSpecification.ts +257 -0
  150. package/templates/shopping-app/server/src/domain/shared/sendCommand.d.ts +4 -0
  151. package/templates/shopping-app/server/src/domain/shared/sendCommand.d.ts.map +1 -0
  152. package/templates/shopping-app/server/src/domain/shared/sendCommand.js +17 -0
  153. package/templates/shopping-app/server/src/domain/shared/sendCommand.js.map +1 -0
  154. package/templates/shopping-app/server/src/domain/shared/sendCommand.ts +21 -0
  155. package/templates/shopping-app/server/src/domain/shared/types.d.ts +19 -0
  156. package/templates/shopping-app/server/src/domain/shared/types.d.ts.map +1 -0
  157. package/templates/shopping-app/server/src/domain/shared/types.js +39 -0
  158. package/templates/shopping-app/server/src/domain/shared/types.js.map +1 -0
  159. package/templates/shopping-app/server/src/domain/shared/types.ts +31 -0
  160. package/templates/shopping-app/server/src/integrations/ai-integration.ts +76 -0
  161. package/templates/shopping-app/server/src/integrations/cart-integration.ts +178 -0
  162. package/templates/shopping-app/server/src/integrations/index.ts +3 -0
  163. package/templates/shopping-app/server/src/integrations/product-catalogue-integration.ts +363 -0
  164. package/templates/shopping-app/server/src/server.ts +43 -0
  165. package/templates/shopping-app/server/src/utils/index.d.ts +4 -0
  166. package/templates/shopping-app/server/src/utils/index.d.ts.map +1 -0
  167. package/templates/shopping-app/server/src/utils/index.js +4 -0
  168. package/templates/shopping-app/server/src/utils/index.js.map +1 -0
  169. package/templates/shopping-app/server/src/utils/index.ts +3 -0
  170. package/templates/shopping-app/server/src/utils/loadProjections.d.ts +3 -0
  171. package/templates/shopping-app/server/src/utils/loadProjections.d.ts.map +1 -0
  172. package/templates/shopping-app/server/src/utils/loadProjections.js +23 -0
  173. package/templates/shopping-app/server/src/utils/loadProjections.js.map +1 -0
  174. package/templates/shopping-app/server/src/utils/loadProjections.ts +30 -0
  175. package/templates/shopping-app/server/src/utils/loadRegisterFiles.d.ts +6 -0
  176. package/templates/shopping-app/server/src/utils/loadRegisterFiles.d.ts.map +1 -0
  177. package/templates/shopping-app/server/src/utils/loadRegisterFiles.js +28 -0
  178. package/templates/shopping-app/server/src/utils/loadRegisterFiles.js.map +1 -0
  179. package/templates/shopping-app/server/src/utils/loadRegisterFiles.ts +41 -0
  180. package/templates/shopping-app/server/src/utils/loadResolvers.d.ts +5 -0
  181. package/templates/shopping-app/server/src/utils/loadResolvers.d.ts.map +1 -0
  182. package/templates/shopping-app/server/src/utils/loadResolvers.js +27 -0
  183. package/templates/shopping-app/server/src/utils/loadResolvers.js.map +1 -0
  184. package/templates/shopping-app/server/src/utils/loadResolvers.ts +36 -0
  185. package/templates/shopping-app/server/tsconfig.json +19 -0
  186. package/templates/shopping-app/server/vitest.config.ts +7 -0
  187. package/templates/shopping-app/tsconfig.json +21 -0
@@ -0,0 +1,46 @@
1
+ type Query {
2
+ suggestedItems(sessionId: ID): [SuggestedItems!]!
3
+ }
4
+
5
+ type SuggestedItems {
6
+ sessionId: String!
7
+ items: [SuggestedItemsItems!]!
8
+ }
9
+
10
+ type SuggestedItemsItems {
11
+ productId: String!
12
+ name: String!
13
+ quantity: Float!
14
+ reason: String!
15
+ }
16
+
17
+ type Mutation {
18
+ suggestShoppingItems(input: SuggestShoppingItemsInput!): MutationResponse!
19
+ enterShoppingCriteria(input: EnterShoppingCriteriaInput!): MutationResponse!
20
+ addItemsToCart(input: AddItemsToCartInput!): MutationResponse!
21
+ }
22
+
23
+ type MutationResponse {
24
+ success: Boolean!
25
+ error: MutationError
26
+ }
27
+
28
+ type MutationError {
29
+ type: String!
30
+ message: String
31
+ }
32
+
33
+ input SuggestShoppingItemsInput {
34
+ sessionId: String!
35
+ prompt: String!
36
+ }
37
+
38
+ input EnterShoppingCriteriaInput {
39
+ sessionId: String!
40
+ criteria: String!
41
+ }
42
+
43
+ input AddItemsToCartInput {
44
+ sessionId: String!
45
+ items: String!
46
+ }
@@ -0,0 +1,583 @@
1
+ {
2
+ "variant": "specs",
3
+ "flows": [
4
+ {
5
+ "name": "Seasonal Assistant",
6
+ "slices": [
7
+ {
8
+ "name": "enters shopping criteria into assistant",
9
+ "type": "command",
10
+ "client": {
11
+ "description": "",
12
+ "specs": [
13
+ "Assistant Chat Interface",
14
+ "allow shopper to describe their shopping needs in natural language",
15
+ "provide a text input for entering criteria",
16
+ "show examples of what to include (age, interests, budget)",
17
+ "show a button to submit the criteria",
18
+ "generate a persisted session id for a visit",
19
+ "show the header on top of the page"
20
+ ]
21
+ },
22
+ "request": "mutation EnterShoppingCriteria($input: EnterShoppingCriteriaInput!) {\n enterShoppingCriteria(input: $input) {\n success\n error {\n type\n message\n }\n }\n}",
23
+ "server": {
24
+ "description": "",
25
+ "data": [
26
+ {
27
+ "target": {
28
+ "type": "Event",
29
+ "name": "ShoppingCriteriaEntered"
30
+ },
31
+ "destination": {
32
+ "type": "stream",
33
+ "pattern": "shopping-session-${sessionId}"
34
+ }
35
+ }
36
+ ],
37
+ "gwt": [
38
+ {
39
+ "when": {
40
+ "commandRef": "EnterShoppingCriteria",
41
+ "exampleData": {
42
+ "sessionId": "shopper-123",
43
+ "criteria": "I need back-to-school items for my 7-year-old daughter who loves soccer and crafts, and my 12-year-old son who is into computers and Magic the Gathering."
44
+ }
45
+ },
46
+ "then": [
47
+ {
48
+ "eventRef": "ShoppingCriteriaEntered",
49
+ "exampleData": {
50
+ "sessionId": "shopper-123",
51
+ "criteria": "I need back-to-school items for my 7-year-old daughter who loves soccer and crafts, and my 12-year-old son who is into computers and Magic the Gathering.",
52
+ "timestamp": "2025-08-28T04:56:47.408Z"
53
+ }
54
+ }
55
+ ]
56
+ }
57
+ ]
58
+ }
59
+ },
60
+ {
61
+ "name": "creates a chat session ",
62
+ "type": "react",
63
+ "server": {
64
+ "gwt": [
65
+ {
66
+ "when": [
67
+ {
68
+ "eventRef": "ShoppingCriteriaEntered",
69
+ "exampleData": {
70
+ "sessionId": "session-abc",
71
+ "criteria": "I need back-to-school items for my 7-year-old daughter who loves soccer and crafts, and my 12-year-old son who is into computers and Magic the Gathering.",
72
+ "timestamp": "2025-08-28T04:56:47.408Z"
73
+ }
74
+ }
75
+ ],
76
+ "then": [
77
+ {
78
+ "commandRef": "SuggestShoppingItems",
79
+ "exampleData": {
80
+ "sessionId": "session-abc",
81
+ "prompt": "I need back-to-school items for my 7-year-old daughter who loves soccer and crafts, and my 12-year-old son who is into computers and Magic the Gathering."
82
+ }
83
+ }
84
+ ]
85
+ }
86
+ ]
87
+ }
88
+ },
89
+ {
90
+ "name": "selects items relevant to the shopping criteria ",
91
+ "type": "command",
92
+ "client": {
93
+ "description": "",
94
+ "specs": []
95
+ },
96
+ "server": {
97
+ "description": "",
98
+ "data": [
99
+ {
100
+ "target": {
101
+ "type": "Command",
102
+ "name": "SuggestShoppingItems"
103
+ },
104
+ "destination": {
105
+ "type": "integration",
106
+ "systems": [
107
+ "AI"
108
+ ],
109
+ "message": {
110
+ "name": "DoChat",
111
+ "type": "command"
112
+ }
113
+ },
114
+ "_additionalInstructions": "add the following to the DoChat: schemaName: Products, systemPrompt: use the PRODUCT_CATALOGUE_PRODUCTS MCP tool to get product data",
115
+ "_withState": {
116
+ "target": {
117
+ "type": "State",
118
+ "name": "Products"
119
+ },
120
+ "origin": {
121
+ "type": "integration",
122
+ "systems": [
123
+ "product-catalog"
124
+ ]
125
+ }
126
+ }
127
+ },
128
+ {
129
+ "target": {
130
+ "type": "Event",
131
+ "name": "ShoppingItemsSuggested"
132
+ },
133
+ "destination": {
134
+ "type": "stream",
135
+ "pattern": "shopping-session-${sessionId}"
136
+ }
137
+ }
138
+ ],
139
+ "gwt": [
140
+ {
141
+ "when": {
142
+ "commandRef": "SuggestShoppingItems",
143
+ "exampleData": {
144
+ "sessionId": "session-abc",
145
+ "prompt": "I need back-to-school items for my 7-year-old daughter who loves soccer and crafts, and my 12-year-old son who is into computers and Magic the Gathering."
146
+ }
147
+ },
148
+ "then": [
149
+ {
150
+ "eventRef": "ShoppingItemsSuggested",
151
+ "exampleData": {
152
+ "sessionId": "session-abc",
153
+ "suggestedItems": [
154
+ {
155
+ "productId": "prod-soccer-ball",
156
+ "name": "Super Soccer Ball",
157
+ "quantity": 1,
158
+ "reason": "Perfect for your daughter who loves soccer"
159
+ },
160
+ {
161
+ "productId": "prod-craft-kit",
162
+ "name": "Deluxe Craft Kit",
163
+ "quantity": 1,
164
+ "reason": "Great for creative activities and crafts"
165
+ },
166
+ {
167
+ "productId": "prod-laptop-bag",
168
+ "name": "Tech Laptop Backpack",
169
+ "quantity": 1,
170
+ "reason": "Essential for your son's school computer needs"
171
+ },
172
+ {
173
+ "productId": "prod-mtg-starter",
174
+ "name": "Magic the Gathering Starter Set",
175
+ "quantity": 1,
176
+ "reason": "Ideal starter set for Magic the Gathering enthusiasts"
177
+ }
178
+ ]
179
+ }
180
+ }
181
+ ]
182
+ }
183
+ ]
184
+ }
185
+ },
186
+ {
187
+ "name": "views suggested items",
188
+ "type": "query",
189
+ "client": {
190
+ "description": "",
191
+ "specs": [
192
+ "Suggested Items Screen",
193
+ "display all suggested items with names and reasons",
194
+ "show quantity selectors for each item",
195
+ "have an \"Add to Cart\" button for selected items",
196
+ "allow removing items from the suggestions"
197
+ ]
198
+ },
199
+ "request": "query GetSuggestedItems($sessionId: ID!) {\n suggestedItems(sessionId: $sessionId) {\n items {\n productId\n name\n quantity\n reason\n }\n }\n}",
200
+ "server": {
201
+ "description": "",
202
+ "data": [
203
+ {
204
+ "target": {
205
+ "type": "State",
206
+ "name": "SuggestedItems"
207
+ },
208
+ "origin": {
209
+ "type": "projection",
210
+ "name": "SuggestedItemsProjection",
211
+ "idField": "sessionId"
212
+ }
213
+ }
214
+ ],
215
+ "gwt": [
216
+ {
217
+ "given": [
218
+ {
219
+ "eventRef": "ShoppingItemsSuggested",
220
+ "exampleData": {
221
+ "sessionId": "session-abc",
222
+ "suggestedItems": [
223
+ {
224
+ "productId": "prod-soccer-ball",
225
+ "name": "Super Soccer Ball",
226
+ "quantity": 1,
227
+ "reason": "Perfect for your daughter who loves soccer"
228
+ },
229
+ {
230
+ "productId": "prod-craft-kit",
231
+ "name": "Deluxe Craft Kit",
232
+ "quantity": 1,
233
+ "reason": "Great for creative activities and crafts"
234
+ },
235
+ {
236
+ "productId": "prod-laptop-bag",
237
+ "name": "Tech Laptop Backpack",
238
+ "quantity": 1,
239
+ "reason": "Essential for your son's school computer needs"
240
+ },
241
+ {
242
+ "productId": "prod-mtg-starter",
243
+ "name": "Magic the Gathering Starter Set",
244
+ "quantity": 1,
245
+ "reason": "Ideal starter set for Magic the Gathering enthusiasts"
246
+ }
247
+ ]
248
+ }
249
+ }
250
+ ],
251
+ "then": [
252
+ {
253
+ "stateRef": "SuggestedItems",
254
+ "exampleData": {
255
+ "sessionId": "session-abc",
256
+ "items": [
257
+ {
258
+ "productId": "prod-soccer-ball",
259
+ "name": "Super Soccer Ball",
260
+ "quantity": 1,
261
+ "reason": "Perfect for your daughter who loves soccer"
262
+ },
263
+ {
264
+ "productId": "prod-craft-kit",
265
+ "name": "Deluxe Craft Kit",
266
+ "quantity": 1,
267
+ "reason": "Great for creative activities and crafts"
268
+ },
269
+ {
270
+ "productId": "prod-laptop-bag",
271
+ "name": "Tech Laptop Backpack",
272
+ "quantity": 1,
273
+ "reason": "Essential for your son's school computer needs"
274
+ },
275
+ {
276
+ "productId": "prod-mtg-starter",
277
+ "name": "Magic the Gathering Starter Set",
278
+ "quantity": 1,
279
+ "reason": "Ideal starter set for Magic the Gathering enthusiasts"
280
+ }
281
+ ]
282
+ }
283
+ }
284
+ ]
285
+ }
286
+ ]
287
+ }
288
+ },
289
+ {
290
+ "name": "accepts items and adds to their cart",
291
+ "type": "command",
292
+ "client": {
293
+ "description": "",
294
+ "specs": [
295
+ "Suggested Items Screen",
296
+ "allow selecting specific items to add",
297
+ "update quantities before adding to cart",
298
+ "provide feedback when items are added"
299
+ ]
300
+ },
301
+ "server": {
302
+ "description": "",
303
+ "data": [
304
+ {
305
+ "target": {
306
+ "type": "Event",
307
+ "name": "ItemsAddedToCart"
308
+ },
309
+ "destination": {
310
+ "type": "stream",
311
+ "pattern": "shopping-session-${sessionId}"
312
+ }
313
+ }
314
+ ],
315
+ "gwt": [
316
+ {
317
+ "when": {
318
+ "commandRef": "AddItemsToCart",
319
+ "exampleData": {
320
+ "sessionId": "session-abc",
321
+ "items": [
322
+ {
323
+ "productId": "prod-soccer-ball",
324
+ "quantity": 1
325
+ },
326
+ {
327
+ "productId": "prod-craft-kit",
328
+ "quantity": 1
329
+ },
330
+ {
331
+ "productId": "prod-laptop-bag",
332
+ "quantity": 1
333
+ },
334
+ {
335
+ "productId": "prod-mtg-starter",
336
+ "quantity": 1
337
+ }
338
+ ]
339
+ }
340
+ },
341
+ "then": [
342
+ {
343
+ "eventRef": "ItemsAddedToCart",
344
+ "exampleData": {
345
+ "sessionId": "session-abc",
346
+ "items": [
347
+ {
348
+ "productId": "prod-soccer-ball",
349
+ "quantity": 1
350
+ },
351
+ {
352
+ "productId": "prod-craft-kit",
353
+ "quantity": 1
354
+ },
355
+ {
356
+ "productId": "prod-laptop-bag",
357
+ "quantity": 1
358
+ },
359
+ {
360
+ "productId": "prod-mtg-starter",
361
+ "quantity": 1
362
+ }
363
+ ],
364
+ "timestamp": "2025-08-28T04:56:47.409Z"
365
+ }
366
+ }
367
+ ]
368
+ }
369
+ ]
370
+ }
371
+ }
372
+ ]
373
+ }
374
+ ],
375
+ "messages": [
376
+ {
377
+ "type": "state",
378
+ "name": "Products",
379
+ "fields": [
380
+ {
381
+ "name": "type",
382
+ "type": "unknown",
383
+ "required": true
384
+ },
385
+ {
386
+ "name": "data",
387
+ "type": "{products: Array<{productId: string, name: string, category: string, price: number, tags: Array<string>, imageUrl: string}>}",
388
+ "required": true
389
+ }
390
+ ],
391
+ "metadata": {
392
+ "version": 1
393
+ }
394
+ },
395
+ {
396
+ "type": "command",
397
+ "name": "DoChat",
398
+ "fields": [
399
+ {
400
+ "name": "sessionId",
401
+ "type": "string",
402
+ "required": true
403
+ },
404
+ {
405
+ "name": "prompt",
406
+ "type": "string",
407
+ "required": true
408
+ },
409
+ {
410
+ "name": "systemPrompt",
411
+ "type": "string",
412
+ "required": false
413
+ },
414
+ {
415
+ "name": "schemaName",
416
+ "type": "string",
417
+ "required": true
418
+ }
419
+ ],
420
+ "metadata": {
421
+ "version": 1
422
+ }
423
+ },
424
+ {
425
+ "type": "command",
426
+ "name": "EnterShoppingCriteria",
427
+ "fields": [
428
+ {
429
+ "name": "sessionId",
430
+ "type": "string",
431
+ "required": true
432
+ },
433
+ {
434
+ "name": "criteria",
435
+ "type": "string",
436
+ "required": true
437
+ }
438
+ ],
439
+ "metadata": {
440
+ "version": 1
441
+ }
442
+ },
443
+ {
444
+ "type": "event",
445
+ "name": "ShoppingCriteriaEntered",
446
+ "fields": [
447
+ {
448
+ "name": "sessionId",
449
+ "type": "string",
450
+ "required": true
451
+ },
452
+ {
453
+ "name": "criteria",
454
+ "type": "string",
455
+ "required": true
456
+ },
457
+ {
458
+ "name": "timestamp",
459
+ "type": "Date",
460
+ "required": true
461
+ }
462
+ ],
463
+ "source": "internal",
464
+ "metadata": {
465
+ "version": 1
466
+ }
467
+ },
468
+ {
469
+ "type": "command",
470
+ "name": "SuggestShoppingItems",
471
+ "fields": [
472
+ {
473
+ "name": "sessionId",
474
+ "type": "string",
475
+ "required": true
476
+ },
477
+ {
478
+ "name": "prompt",
479
+ "type": "string",
480
+ "required": true
481
+ }
482
+ ],
483
+ "metadata": {
484
+ "version": 1
485
+ }
486
+ },
487
+ {
488
+ "type": "event",
489
+ "name": "ShoppingItemsSuggested",
490
+ "fields": [
491
+ {
492
+ "name": "sessionId",
493
+ "type": "string",
494
+ "required": true
495
+ },
496
+ {
497
+ "name": "suggestedItems",
498
+ "type": "Array<{productId: string, name: string, quantity: number, reason: string}>",
499
+ "required": true
500
+ }
501
+ ],
502
+ "source": "internal",
503
+ "metadata": {
504
+ "version": 1
505
+ }
506
+ },
507
+ {
508
+ "type": "state",
509
+ "name": "SuggestedItems",
510
+ "fields": [
511
+ {
512
+ "name": "sessionId",
513
+ "type": "string",
514
+ "required": true
515
+ },
516
+ {
517
+ "name": "items",
518
+ "type": "Array<{productId: string, name: string, quantity: number, reason: string}>",
519
+ "required": true
520
+ }
521
+ ],
522
+ "metadata": {
523
+ "version": 1
524
+ }
525
+ },
526
+ {
527
+ "type": "command",
528
+ "name": "AddItemsToCart",
529
+ "fields": [
530
+ {
531
+ "name": "sessionId",
532
+ "type": "string",
533
+ "required": true
534
+ },
535
+ {
536
+ "name": "items",
537
+ "type": "Array<{productId: string, quantity: number}>",
538
+ "required": true
539
+ }
540
+ ],
541
+ "metadata": {
542
+ "version": 1
543
+ }
544
+ },
545
+ {
546
+ "type": "event",
547
+ "name": "ItemsAddedToCart",
548
+ "fields": [
549
+ {
550
+ "name": "sessionId",
551
+ "type": "string",
552
+ "required": true
553
+ },
554
+ {
555
+ "name": "items",
556
+ "type": "Array<{productId: string, quantity: number}>",
557
+ "required": true
558
+ },
559
+ {
560
+ "name": "timestamp",
561
+ "type": "Date",
562
+ "required": true
563
+ }
564
+ ],
565
+ "source": "internal",
566
+ "metadata": {
567
+ "version": 1
568
+ }
569
+ }
570
+ ],
571
+ "integrations": [
572
+ {
573
+ "name": "AI",
574
+ "description": "AI integration",
575
+ "source": "@auto-engineer/ai-integration"
576
+ },
577
+ {
578
+ "name": "product-catalog",
579
+ "description": "product-catalog integration",
580
+ "source": "@auto-engineer/product-catalog-integration"
581
+ }
582
+ ]
583
+ }
@@ -0,0 +1,31 @@
1
+ export function filter(components) {
2
+ const seen = new Set<string>();
3
+
4
+ return components
5
+ .map((comp) => {
6
+ if (!comp?.name) return null;
7
+
8
+ let str = comp.name.trim();
9
+
10
+ // Normalize the name
11
+ str = str.includes("/")
12
+ ? str.split("/")[0].trim()
13
+ : str.split(" ")[0].trim();
14
+
15
+ if (!str) return null;
16
+
17
+ // Capitalize first letter
18
+ str = str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
19
+
20
+ return {
21
+ ...comp,
22
+ name: str.toLowerCase(),
23
+ };
24
+ })
25
+ .filter((c) => {
26
+ if (!c) return false;
27
+ if (seen.has(c.name)) return false;
28
+ seen.add(c.name);
29
+ return true;
30
+ });
31
+ }
@@ -0,0 +1,8 @@
1
+ # Auto-Engineer Environment Variables
2
+ ANTHROPIC_API_KEY=
3
+ OPENAI_API_KEY=
4
+ XAI_API_KEY=
5
+ GEMINI_API_KEY=
6
+
7
+ FIGMA_PERSONAL_TOKEN=
8
+ FIGMA_FILE_ID=
@@ -0,0 +1,21 @@
1
+ // Import specific command handlers to resolve conflicts or create aliases
2
+ // import { checkTypesCommandHandler } from '@auto-engineer/backend-checks';
3
+
4
+ export default {
5
+ plugins: [
6
+ '@auto-engineer/backend-checks',
7
+ '@auto-engineer/design-system-importer',
8
+ '@auto-engineer/emmett-generator',
9
+ '@auto-engineer/flowlang',
10
+ '@auto-engineer/frontend-checks',
11
+ '@auto-engineer/frontend-implementation',
12
+ '@auto-engineer/information-architect',
13
+ '@auto-engineer/react-graphql-generator',
14
+ '@auto-engineer/server-implementer',
15
+ ],
16
+
17
+ aliases: {
18
+ // If multiple packages tried to register 'check:types', you'd resolve it:
19
+ // 'test:types': checkTypesCommandHandler, // auto test → runs check:types via specific handler
20
+ }
21
+ };