@ankhorage/templates 1.4.0 → 1.6.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 (25) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +7 -8
  3. package/dist/templates/shared/route.d.ts +1 -0
  4. package/dist/templates/shared/route.d.ts.map +1 -1
  5. package/dist/templates/shared/route.js +1 -0
  6. package/dist/templates/shared/route.js.map +1 -1
  7. package/dist/templates/starter/categories/food-drink/content.nutrition-catalog-scan.d.ts +79 -0
  8. package/dist/templates/starter/categories/food-drink/content.nutrition-catalog-scan.d.ts.map +1 -1
  9. package/dist/templates/starter/categories/food-drink/content.nutrition-catalog-scan.js +172 -49
  10. package/dist/templates/starter/categories/food-drink/content.nutrition-catalog-scan.js.map +1 -1
  11. package/dist/templates/starter/categories/food-drink/data.nutrition-catalog-scan.d.ts +294 -0
  12. package/dist/templates/starter/categories/food-drink/data.nutrition-catalog-scan.d.ts.map +1 -0
  13. package/dist/templates/starter/categories/food-drink/data.nutrition-catalog-scan.js +211 -0
  14. package/dist/templates/starter/categories/food-drink/data.nutrition-catalog-scan.js.map +1 -0
  15. package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan.template.d.ts.map +1 -1
  16. package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan.template.js +48 -1
  17. package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan.template.js.map +1 -1
  18. package/dist/templates/starter/categories/food-drink/routes.nutrition-catalog-scan.d.ts +5 -0
  19. package/dist/templates/starter/categories/food-drink/routes.nutrition-catalog-scan.d.ts.map +1 -1
  20. package/dist/templates/starter/categories/food-drink/routes.nutrition-catalog-scan.js +27 -1
  21. package/dist/templates/starter/categories/food-drink/routes.nutrition-catalog-scan.js.map +1 -1
  22. package/dist/templates/starter/categories/food-drink/screens.nutrition-catalog-scan.d.ts.map +1 -1
  23. package/dist/templates/starter/categories/food-drink/screens.nutrition-catalog-scan.js +65 -15
  24. package/dist/templates/starter/categories/food-drink/screens.nutrition-catalog-scan.js.map +1 -1
  25. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @ankhorage/templates
2
2
 
3
+ ## 1.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 870ebf3: Add generated domain data API declarations to the nutrition catalog scan starter.
8
+
9
+ ## 1.5.0
10
+
11
+ ### Minor Changes
12
+
13
+ - d70345c: Update the nutrition catalog scan starter to model a restricted scanner challenge with global auth, Supabase profile metadata, challenge routes, and leaderboard/profile screens.
14
+
3
15
  ## 1.4.0
4
16
 
5
17
  ### Minor Changes
package/README.md CHANGED
@@ -101,14 +101,13 @@ Additional variants:
101
101
  - `games/chess`: Home · Settings. The Home screen renders a `ChessBoard` node with a static
102
102
  initial FEN and requires generated apps to provide `@ankhorage/zora-chess` through their
103
103
  extension registry.
104
- - `food_drink/nutrition-catalog-scan`: Products · Scan · Capture · Queue · Settings. This
105
- catalog-first Swiss nutrition starter expects API Gateway clients for `GET /v1/nutrition/products`,
106
- `GET /v1/nutrition/products/by-barcode/{barcode}`, and `POST /v1/nutrition/products/capture`.
107
- It intentionally keeps Supabase out of the generated app surface. Native barcode scanning can use
108
- `expo-camera` behind an app adapter, while permission prompts, scan overlays, loading states,
109
- form fields, buttons, notices, and product cards should be composed through ZORA. A reusable
110
- `BarcodeScannerView` / `CameraPermissionView` belongs in ZORA once the scanner API stabilizes,
111
- not in Surface.
104
+ - `food_drink/nutrition-catalog-scan`: Challenge · Products · Scan · Ranking · Profile. This
105
+ restricted Swiss scanner challenge starter uses `infra.auth.scope = "global"`, Supabase auth,
106
+ native RBAC, and an app-facing `profiles` table. The generated app should keep identity in
107
+ Supabase Auth, store leaderboard display fields in `profiles`, and send product, scan, capture,
108
+ challenge, and leaderboard data through the API Gateway. Native barcode scanning can use an app
109
+ camera adapter such as `expo-camera`, while visible scanner and permission UI should use ZORA
110
+ scanner primitives.
112
111
  - `social_community/creator`: Studio · Posts · Audience · Insights · Settings
113
112
 
114
113
  Only categories that exist in `AppCategory` are registered. New category literals should be added
@@ -5,6 +5,7 @@ export declare function createRoute(args: {
5
5
  screenId: string;
6
6
  label: string;
7
7
  icon?: IconSpec;
8
+ hideInTabBar?: boolean;
8
9
  }): ManifestRoute;
9
10
  export {};
10
11
  //# sourceMappingURL=route.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../src/templates/shared/route.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEtE,KAAK,aAAa,GAAG,eAAe,CAAC;AAErC,wBAAgB,WAAW,CAAC,IAAI,EAAE;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB,GAAG,aAAa,CAOhB"}
1
+ {"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../src/templates/shared/route.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEtE,KAAK,aAAa,GAAG,eAAe,CAAC;AAErC,wBAAgB,WAAW,CAAC,IAAI,EAAE;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,GAAG,aAAa,CAQhB"}
@@ -4,6 +4,7 @@ export function createRoute(args) {
4
4
  screenId: args.screenId,
5
5
  label: args.label,
6
6
  ...(args.icon ? { icon: args.icon } : {}),
7
+ ...(args.hideInTabBar ? { hideInTabBar: args.hideInTabBar } : {}),
7
8
  };
8
9
  }
9
10
  //# sourceMappingURL=route.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"route.js","sourceRoot":"","sources":["../../../src/templates/shared/route.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,WAAW,CAAC,IAK3B;IACC,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC1C,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"route.js","sourceRoot":"","sources":["../../../src/templates/shared/route.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,WAAW,CAAC,IAM3B;IACC,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACzC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAClE,CAAC;AACJ,CAAC"}
@@ -55,6 +55,48 @@ export declare const nutritionCatalogScanContent: {
55
55
  }[];
56
56
  }[];
57
57
  };
58
+ challenge: {
59
+ eyebrow: string;
60
+ title: string;
61
+ description: string;
62
+ sections: {
63
+ title: string;
64
+ description: string;
65
+ cards: {
66
+ eyebrow: string;
67
+ title: string;
68
+ description: string;
69
+ }[];
70
+ }[];
71
+ };
72
+ leaderboard: {
73
+ eyebrow: string;
74
+ title: string;
75
+ description: string;
76
+ sections: {
77
+ title: string;
78
+ description: string;
79
+ cards: {
80
+ eyebrow: string;
81
+ title: string;
82
+ description: string;
83
+ }[];
84
+ }[];
85
+ };
86
+ profile: {
87
+ eyebrow: string;
88
+ title: string;
89
+ description: string;
90
+ sections: {
91
+ title: string;
92
+ description: string;
93
+ cards: {
94
+ eyebrow: string;
95
+ title: string;
96
+ description: string;
97
+ }[];
98
+ }[];
99
+ };
58
100
  success: {
59
101
  eyebrow: string;
60
102
  title: string;
@@ -83,10 +125,47 @@ export declare const nutritionCatalogScanContent: {
83
125
  }[];
84
126
  }[];
85
127
  };
128
+ signIn: {
129
+ eyebrow: string;
130
+ title: string;
131
+ description: string;
132
+ sections: {
133
+ title: string;
134
+ description: string;
135
+ cards: {
136
+ eyebrow: string;
137
+ title: string;
138
+ description: string;
139
+ }[];
140
+ }[];
141
+ };
142
+ signUp: {
143
+ eyebrow: string;
144
+ title: string;
145
+ description: string;
146
+ sections: {
147
+ title: string;
148
+ description: string;
149
+ cards: {
150
+ eyebrow: string;
151
+ title: string;
152
+ description: string;
153
+ }[];
154
+ }[];
155
+ };
86
156
  settings: {
87
157
  eyebrow: string;
88
158
  title: string;
89
159
  description: string;
160
+ sections: {
161
+ title: string;
162
+ description: string;
163
+ cards: {
164
+ eyebrow: string;
165
+ title: string;
166
+ description: string;
167
+ }[];
168
+ }[];
90
169
  };
91
170
  };
92
171
  //# sourceMappingURL=content.nutrition-catalog-scan.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"content.nutrition-catalog-scan.d.ts","sourceRoot":"","sources":["../../../../../src/templates/starter/categories/food-drink/content.nutrition-catalog-scan.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmNvC,CAAC"}
1
+ {"version":3,"file":"content.nutrition-catalog-scan.d.ts","sourceRoot":"","sources":["../../../../../src/templates/starter/categories/food-drink/content.nutrition-catalog-scan.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8UiB,CAAC"}
@@ -1,43 +1,43 @@
1
1
  export const nutritionCatalogScanContent = {
2
2
  catalog: {
3
- eyebrow: 'Swiss product catalog',
4
- title: 'Available products',
5
- description: 'Browse published products from the API Gateway and use the primary scan action to add more products from Swiss stores.',
3
+ eyebrow: 'Friends-only scanner challenge',
4
+ title: 'Challenge products',
5
+ description: 'Signed-in scanners browse the shared Swiss product catalog, scan new products, and collect points for the active challenge.',
6
6
  sections: [
7
7
  {
8
- title: 'Catalog feed',
9
- description: 'Backed by the planned GET /v1/nutrition/products endpoint with search, pagination, and store-chain filters.',
8
+ title: 'Restricted catalog',
9
+ description: 'The whole app is protected by global auth. Product browsing happens after sign-in inside the challenge app.',
10
10
  cards: [
11
11
  {
12
- eyebrow: 'Migros · published',
12
+ eyebrow: 'Known product',
13
13
  title: 'Bio Greek Yogurt 250 g',
14
- description: 'Example published product card with brand, quantity, barcode, and confidence metadata.',
14
+ description: 'Example product card with brand, quantity, barcode, and confidence metadata.',
15
15
  },
16
16
  {
17
- eyebrow: 'Coop · published',
17
+ eyebrow: 'Known product',
18
18
  title: 'Haferdrink Barista 1 l',
19
- description: 'Catalog items should render with ZORA cards and never read directly from Supabase.',
19
+ description: 'Products are read through the API Gateway, not directly from Supabase.',
20
20
  },
21
21
  {
22
- eyebrow: 'Denner · candidate',
23
- title: 'Protein Quark Vanilla',
24
- description: 'The template reserves room for recent captures once review and publish flows are available.',
22
+ eyebrow: 'Contribution target',
23
+ title: 'Missing supermarket products',
24
+ description: 'Scanners earn more points when a missing barcode becomes a queued capture submission.',
25
25
  },
26
26
  ],
27
27
  },
28
28
  {
29
- title: 'Primary contribution action',
30
- description: 'The scan CTA is the main way to grow the database while keeping browsing useful for users who do not scan yet.',
29
+ title: 'Challenge loop',
30
+ description: 'Friends sign in, scan products, submit missing products, and climb the leaderboard.',
31
31
  cards: [
32
32
  {
33
- eyebrow: 'Main CTA',
33
+ eyebrow: 'Action',
34
34
  title: 'Scan barcode',
35
- description: 'Open the scanner, normalize barcode digits, then lookup or create a queued capture submission.',
35
+ description: 'Open the scanner, normalize barcode digits, then record a scan event for the signed-in user.',
36
36
  },
37
37
  {
38
- eyebrow: 'Fallback',
39
- title: 'Enter barcode manually',
40
- description: 'Useful on web, simulator, denied camera permission, or damaged retail labels.',
38
+ eyebrow: 'Ranking',
39
+ title: 'Points and leaderboard',
40
+ description: 'Known product scans, missing product captures, and accepted captures can use different point values.',
41
41
  },
42
42
  ],
43
43
  },
@@ -46,7 +46,7 @@ export const nutritionCatalogScanContent = {
46
46
  detail: {
47
47
  eyebrow: 'Published product',
48
48
  title: 'Product detail',
49
- description: 'Show barcode, brand, quantity, confidence, store observations, and nutrition facts from the public lookup model.',
49
+ description: 'Show barcode, brand, quantity, confidence, store observations, and nutrition facts from the API Gateway.',
50
50
  sections: [
51
51
  {
52
52
  title: 'Product summary',
@@ -58,32 +58,32 @@ export const nutritionCatalogScanContent = {
58
58
  description: 'Barcode values are normalized by removing non-digits before lookup.',
59
59
  },
60
60
  {
61
- eyebrow: 'Nutrition facts',
62
- title: 'Per 100 g values',
63
- description: 'Energy, protein, carbohydrates, sugars, fat, saturated fat, fiber, salt, and sodium can appear once published.',
61
+ eyebrow: 'Challenge value',
62
+ title: 'Known scan: 1 point',
63
+ description: 'The backend should avoid duplicate point farming with per-user barcode limits.',
64
64
  },
65
65
  ],
66
66
  },
67
67
  ],
68
68
  },
69
69
  scan: {
70
- eyebrow: 'Scan to add',
70
+ eyebrow: 'Authenticated scan',
71
71
  title: 'Scan barcode',
72
- description: 'Use expo-camera under a local adapter now and migrate the visible scanner and permission states into ZORA later.',
72
+ description: 'Use the ZORA BarcodeScannerView with an app-level camera adapter. Successful scans create signed-in scan events.',
73
73
  sections: [
74
74
  {
75
- title: 'Camera permission',
76
- description: 'Permission prompts, denied states, retry actions, and manual entry fallback should be composed from ZORA UI.',
75
+ title: 'Scanner adapter',
76
+ description: 'Native camera dependencies such as expo-camera stay in the generated app adapter; ZORA owns visible scanner UI.',
77
77
  cards: [
78
78
  {
79
- eyebrow: 'Native capability',
80
- title: 'expo-camera barcode scanner',
81
- description: 'The native camera dependency should stay isolated behind a small scanner adapter, not leak into generic templates.',
79
+ eyebrow: 'Camera shell',
80
+ title: 'BarcodeScannerView',
81
+ description: 'Use ZORA scanner, permission, and overlay primitives for the visible scanner surface.',
82
82
  },
83
83
  {
84
- eyebrow: 'Future ZORA component',
85
- title: 'BarcodeScannerView',
86
- description: 'A reusable ZORA scanner wrapper can own permission UI, scan overlay, loading, and error states.',
84
+ eyebrow: 'Fallback',
85
+ title: 'Manual barcode entry',
86
+ description: 'Useful on web, simulator, denied camera permission, or damaged retail labels.',
87
87
  },
88
88
  ],
89
89
  },
@@ -93,26 +93,26 @@ export const nutritionCatalogScanContent = {
93
93
  cards: [
94
94
  {
95
95
  eyebrow: 'Found',
96
- title: 'Open product detail',
97
- description: 'A 200 response opens the product detail screen for the published product.',
96
+ title: 'Record known scan',
97
+ description: 'A known barcode creates a scan event and can open the product detail screen.',
98
98
  },
99
99
  {
100
100
  eyebrow: 'Unknown',
101
101
  title: 'Create capture',
102
- description: 'A 404 response is expected for unknown barcodes and opens the capture form.',
102
+ description: 'A missing barcode opens the capture form and can earn more challenge points.',
103
103
  },
104
104
  ],
105
105
  },
106
106
  ],
107
107
  },
108
108
  capture: {
109
- eyebrow: 'Queued contribution',
109
+ eyebrow: 'Challenge contribution',
110
110
  title: 'Capture missing product',
111
- description: 'Collect the minimal data needed to create a queued capture submission through the API Gateway.',
111
+ description: 'Collect the minimal data needed to create a queued capture submission for the signed-in scanner.',
112
112
  sections: [
113
113
  {
114
114
  title: 'Required fields',
115
- description: 'Keep the first PR fast and field-friendly.',
115
+ description: 'Keep in-store entry fast and reward useful missing-product captures.',
116
116
  cards: [
117
117
  {
118
118
  eyebrow: 'Product identity',
@@ -127,7 +127,81 @@ export const nutritionCatalogScanContent = {
127
127
  {
128
128
  eyebrow: 'Photos placeholder',
129
129
  title: 'Front, nutrition, ingredients, barcode',
130
- description: 'Real image upload is intentionally deferred; capture image paths stay API-shaped.',
130
+ description: 'Real image upload can be added after the first challenge flow works.',
131
+ },
132
+ ],
133
+ },
134
+ ],
135
+ },
136
+ challenge: {
137
+ eyebrow: 'Active challenge',
138
+ title: 'Scanner challenge',
139
+ description: 'Show challenge rules, dates, invite status, scoring, and the signed-in scanner progress.',
140
+ sections: [
141
+ {
142
+ title: 'Scoring rules',
143
+ description: 'Point rules should reward useful scans and discourage duplicate barcode farming.',
144
+ cards: [
145
+ {
146
+ eyebrow: 'Known scan',
147
+ title: '1 point',
148
+ description: 'Awarded for a valid known product scan within the duplicate limits.',
149
+ },
150
+ {
151
+ eyebrow: 'Missing product',
152
+ title: '5 points',
153
+ description: 'Awarded when a signed-in scanner submits a new missing product capture.',
154
+ },
155
+ {
156
+ eyebrow: 'Accepted capture',
157
+ title: '20 points',
158
+ description: 'Awarded later when review tooling publishes or accepts the captured product.',
159
+ },
160
+ ],
161
+ },
162
+ ],
163
+ },
164
+ leaderboard: {
165
+ eyebrow: 'Friends ranking',
166
+ title: 'Leaderboard',
167
+ description: 'Rank signed-in scanners by challenge points, then scan count as a tie breaker.',
168
+ sections: [
169
+ {
170
+ title: 'Top scanners',
171
+ description: 'The API Gateway should expose leaderboard rows for the active challenge.',
172
+ cards: [
173
+ {
174
+ eyebrow: '#1',
175
+ title: 'Scanner with most points',
176
+ description: 'Show display name, points, scan count, accepted captures, and current rank.',
177
+ },
178
+ {
179
+ eyebrow: 'Anti-spam',
180
+ title: 'Backend ranking rules',
181
+ description: 'Duplicate and rejected captures should not increase score.',
182
+ },
183
+ ],
184
+ },
185
+ ],
186
+ },
187
+ profile: {
188
+ eyebrow: 'Scanner profile',
189
+ title: 'Profile',
190
+ description: 'Show signed-in scanner profile, stats, invite status, and sign-out action.',
191
+ sections: [
192
+ {
193
+ title: 'Profile data',
194
+ description: 'Profile data comes from the app-facing profiles table linked to Supabase Auth.',
195
+ cards: [
196
+ {
197
+ eyebrow: 'Identity',
198
+ title: 'Display name and avatar',
199
+ description: 'Stored in public.profiles; auth.users remains provider-owned identity data.',
200
+ },
201
+ {
202
+ eyebrow: 'Stats',
203
+ title: 'Scans, captures, points',
204
+ description: 'Aggregate challenge stats from scan events and capture submissions.',
131
205
  },
132
206
  ],
133
207
  },
@@ -136,7 +210,7 @@ export const nutritionCatalogScanContent = {
136
210
  success: {
137
211
  eyebrow: 'Submission queued',
138
212
  title: 'Thanks — product queued',
139
- description: 'The API returns a submission id and queued status. Publishing happens later through review/merge tooling.',
213
+ description: 'The API returns a submission id and queued status. Points can be updated immediately or after review.',
140
214
  sections: [
141
215
  {
142
216
  title: 'Next actions',
@@ -148,9 +222,9 @@ export const nutritionCatalogScanContent = {
148
222
  description: 'Return to the scan screen for fast in-store collection.',
149
223
  },
150
224
  {
151
- eyebrow: 'Review',
152
- title: 'Open local queue',
153
- description: 'Inspect pending or failed submissions once offline retry is wired.',
225
+ eyebrow: 'Ranking',
226
+ title: 'Open leaderboard',
227
+ description: 'Show the scanner how the capture affected their challenge ranking.',
154
228
  },
155
229
  ],
156
230
  },
@@ -159,7 +233,7 @@ export const nutritionCatalogScanContent = {
159
233
  queue: {
160
234
  eyebrow: 'Offline-ready shell',
161
235
  title: 'Capture queue',
162
- description: 'A simple local queue abstraction prepares the template for offline retry without overbuilding the first PR.',
236
+ description: 'A simple local queue abstraction prepares the signed-in app for offline retry without losing field data.',
163
237
  sections: [
164
238
  {
165
239
  title: 'Queue states',
@@ -168,21 +242,70 @@ export const nutritionCatalogScanContent = {
168
242
  {
169
243
  eyebrow: 'Pending',
170
244
  title: 'Waiting for connection',
171
- description: 'Submissions can be stored locally with anonymousDeviceId and clientCapturedAt.',
245
+ description: 'Submissions can be stored locally with user id and clientCapturedAt.',
172
246
  },
173
247
  {
174
248
  eyebrow: 'Failed',
175
249
  title: 'Retry required',
176
- description: 'Keep failures visible instead of silently dropping field data.',
250
+ description: 'Keep failures visible instead of silently dropping scanner data.',
251
+ },
252
+ ],
253
+ },
254
+ ],
255
+ },
256
+ signIn: {
257
+ eyebrow: 'Restricted access',
258
+ title: 'Sign in',
259
+ description: 'Friends sign in before entering the scanner challenge app.',
260
+ sections: [
261
+ {
262
+ title: 'Challenge access',
263
+ description: 'This template uses global auth, so app entry is protected.',
264
+ cards: [
265
+ {
266
+ eyebrow: 'Auth provider',
267
+ title: 'Supabase Auth',
268
+ description: 'Email sign-in is the default identity flow for generated challenge apps.',
269
+ },
270
+ ],
271
+ },
272
+ ],
273
+ },
274
+ signUp: {
275
+ eyebrow: 'Join challenge',
276
+ title: 'Create scanner account',
277
+ description: 'Create an account with display name and optional invite code before scanning.',
278
+ sections: [
279
+ {
280
+ title: 'Profile creation',
281
+ description: 'Generated infra should create a profiles row linked to the auth user.',
282
+ cards: [
283
+ {
284
+ eyebrow: 'Required fields',
285
+ title: 'Email, password, display name',
286
+ description: 'The profile table stores display name and avatar for leaderboard rows.',
177
287
  },
178
288
  ],
179
289
  },
180
290
  ],
181
291
  },
182
292
  settings: {
183
- eyebrow: 'Field scanner settings',
293
+ eyebrow: 'Challenge app settings',
184
294
  title: 'Settings',
185
- description: 'Configuration for API Gateway base URL, locale, app version, and anonymous device id.',
295
+ description: 'Configuration for API Gateway base URL, locale, profile table, and challenge auth.',
296
+ sections: [
297
+ {
298
+ title: 'Runtime configuration',
299
+ description: 'Settings screen sections are assembled by the screen factory.',
300
+ cards: [
301
+ {
302
+ eyebrow: 'Auth',
303
+ title: 'Global Supabase auth',
304
+ description: 'Friends sign in before entering the scanner challenge app.',
305
+ },
306
+ ],
307
+ },
308
+ ],
186
309
  },
187
310
  };
188
311
  //# sourceMappingURL=content.nutrition-catalog-scan.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"content.nutrition-catalog-scan.js","sourceRoot":"","sources":["../../../../../src/templates/starter/categories/food-drink/content.nutrition-catalog-scan.ts"],"names":[],"mappings":"AAmBA,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,OAAO,EAAE;QACP,OAAO,EAAE,uBAAuB;QAChC,KAAK,EAAE,oBAAoB;QAC3B,WAAW,EACT,wHAAwH;QAC1H,QAAQ,EAAE;YACR;gBACE,KAAK,EAAE,cAAc;gBACrB,WAAW,EACT,6GAA6G;gBAC/G,KAAK,EAAE;oBACL;wBACE,OAAO,EAAE,oBAAoB;wBAC7B,KAAK,EAAE,wBAAwB;wBAC/B,WAAW,EACT,wFAAwF;qBAC3F;oBACD;wBACE,OAAO,EAAE,kBAAkB;wBAC3B,KAAK,EAAE,wBAAwB;wBAC/B,WAAW,EACT,oFAAoF;qBACvF;oBACD;wBACE,OAAO,EAAE,oBAAoB;wBAC7B,KAAK,EAAE,uBAAuB;wBAC9B,WAAW,EACT,6FAA6F;qBAChG;iBACF;aACF;YACD;gBACE,KAAK,EAAE,6BAA6B;gBACpC,WAAW,EACT,gHAAgH;gBAClH,KAAK,EAAE;oBACL;wBACE,OAAO,EAAE,UAAU;wBACnB,KAAK,EAAE,cAAc;wBACrB,WAAW,EACT,gGAAgG;qBACnG;oBACD;wBACE,OAAO,EAAE,UAAU;wBACnB,KAAK,EAAE,wBAAwB;wBAC/B,WAAW,EACT,+EAA+E;qBAClF;iBACF;aACF;SACF;KACF;IACD,MAAM,EAAE;QACN,OAAO,EAAE,mBAAmB;QAC5B,KAAK,EAAE,gBAAgB;QACvB,WAAW,EACT,kHAAkH;QACpH,QAAQ,EAAE;YACR;gBACE,KAAK,EAAE,iBAAiB;gBACxB,WAAW,EAAE,+DAA+D;gBAC5E,KAAK,EAAE;oBACL;wBACE,OAAO,EAAE,iBAAiB;wBAC1B,KAAK,EAAE,wBAAwB;wBAC/B,WAAW,EAAE,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AK,EAAE,wCAAwC;wBAC/C,WAAW,EACT,mFAAmF;qBACtF;iBACF;aACF;SACF;KACF;IACD,OAAO,EAAE;QACP,OAAO,EAAE,mBAAmB;QAC5B,KAAK,EAAE,yBAAyB;QAChC,WAAW,EACT,2GAA2G;QAC7G,QAAQ,EAAE;YACR;gBACE,KAAK,EAAE,cAAc;gBACrB,WAAW,EAAE,qCAAqC;gBAClD,KAAK,EAAE;oBACL;wBACE,OAAO,EAAE,UAAU;wBACnB,KAAK,EAAE,sBAAsB;wBAC7B,WAAW,EAAE,yDAAyD;qBACvE;oBACD;wBACE,OAAO,EAAE,QAAQ;wBACjB,KAAK,EAAE,kBAAkB;wBACzB,WAAW,EAAE,oEAAoE;qBAClF;iBACF;aACF;SACF;KACF;IACD,KAAK,EAAE;QACL,OAAO,EAAE,qBAAqB;QAC9B,KAAK,EAAE,eAAe;QACtB,WAAW,EACT,6GAA6G;QAC/G,QAAQ,EAAE;YACR;gBACE,KAAK,EAAE,cAAc;gBACrB,WAAW,EAAE,sEAAsE;gBACnF,KAAK,EAAE;oBACL;wBACE,OAAO,EAAE,SAAS;wBAClB,KAAK,EAAE,wBAAwB;wBAC/B,WAAW,EACT,gFAAgF;qBACnF;oBACD;wBACE,OAAO,EAAE,QAAQ;wBACjB,KAAK,EAAE,gBAAgB;wBACvB,WAAW,EAAE,gEAAgE;qBAC9E;iBACF;aACF;SACF;KACF;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,wBAAwB;QACjC,KAAK,EAAE,UAAU;QACjB,WAAW,EACT,uFAAuF;KAC1F;CAIF,CAAC"}
1
+ {"version":3,"file":"content.nutrition-catalog-scan.js","sourceRoot":"","sources":["../../../../../src/templates/starter/categories/food-drink/content.nutrition-catalog-scan.ts"],"names":[],"mappings":"AAmBA,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,OAAO,EAAE;QACP,OAAO,EAAE,gCAAgC;QACzC,KAAK,EAAE,oBAAoB;QAC3B,WAAW,EACT,6HAA6H;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