@cimplify/sdk 0.41.0 → 0.42.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 (148) hide show
  1. package/dist/cli/commands/deploy.mjs +561 -0
  2. package/dist/cli/commands/dev.mjs +434 -0
  3. package/dist/cli/commands/domains.mjs +479 -0
  4. package/dist/cli/commands/env.mjs +610 -0
  5. package/dist/cli/commands/link.mjs +325 -0
  6. package/dist/cli/commands/login.mjs +515 -0
  7. package/dist/cli/commands/logout.mjs +54 -0
  8. package/dist/cli/commands/logs.mjs +358 -0
  9. package/dist/cli/commands/projects.mjs +327 -0
  10. package/dist/cli/commands/rollback.mjs +477 -0
  11. package/dist/cli/commands/status.mjs +380 -0
  12. package/dist/cli/commands/unlink.mjs +58 -0
  13. package/dist/cli/commands/whoami.mjs +234 -0
  14. package/dist/dispatcher.mjs +91 -0
  15. package/dist/styles.css +1 -1
  16. package/package.json +1 -1
  17. package/templates/storefront-bakery/AGENTS.md +61 -10
  18. package/templates/storefront-bakery/app/accessibility/page.tsx +11 -0
  19. package/templates/storefront-bakery/app/account/addresses/page.tsx +21 -0
  20. package/templates/storefront-bakery/app/account/orders/page.tsx +21 -0
  21. package/templates/storefront-bakery/app/account/page.tsx +22 -0
  22. package/templates/storefront-bakery/app/account/settings/page.tsx +21 -0
  23. package/templates/storefront-bakery/app/contact/contact-form.tsx +109 -0
  24. package/templates/storefront-bakery/app/contact/page.tsx +54 -0
  25. package/templates/storefront-bakery/app/login/page.tsx +17 -0
  26. package/templates/storefront-bakery/app/opensearch.xml/route.ts +37 -0
  27. package/templates/storefront-bakery/app/returns/page.tsx +11 -0
  28. package/templates/storefront-bakery/app/search/page.tsx +38 -0
  29. package/templates/storefront-bakery/app/search/search-client.tsx +7 -0
  30. package/templates/storefront-bakery/app/shipping/page.tsx +16 -0
  31. package/templates/storefront-bakery/app/signup/page.tsx +17 -0
  32. package/templates/storefront-bakery/app/sitemap-page/page.tsx +167 -0
  33. package/templates/storefront-bakery/app/track-order/page.tsx +24 -0
  34. package/templates/storefront-bakery/app/track-order/track-order-form.tsx +69 -0
  35. package/templates/storefront-bakery/components/account-iframe.tsx +13 -0
  36. package/templates/storefront-bakery/components/policy-page.tsx +49 -0
  37. package/templates/storefront-bakery/lib/brand.ts +119 -4
  38. package/templates/storefront-fashion/AGENTS.md +80 -26
  39. package/templates/storefront-fashion/app/accessibility/page.tsx +11 -0
  40. package/templates/storefront-fashion/app/account/addresses/page.tsx +21 -0
  41. package/templates/storefront-fashion/app/account/orders/page.tsx +21 -0
  42. package/templates/storefront-fashion/app/account/page.tsx +22 -0
  43. package/templates/storefront-fashion/app/account/settings/page.tsx +21 -0
  44. package/templates/storefront-fashion/app/contact/contact-form.tsx +109 -0
  45. package/templates/storefront-fashion/app/contact/page.tsx +54 -0
  46. package/templates/storefront-fashion/app/login/page.tsx +17 -0
  47. package/templates/storefront-fashion/app/lookbook/page.tsx +132 -0
  48. package/templates/storefront-fashion/app/opensearch.xml/route.ts +37 -0
  49. package/templates/storefront-fashion/app/returns/page.tsx +11 -0
  50. package/templates/storefront-fashion/app/search/page.tsx +38 -0
  51. package/templates/storefront-fashion/app/search/search-client.tsx +7 -0
  52. package/templates/storefront-fashion/app/shipping/page.tsx +16 -0
  53. package/templates/storefront-fashion/app/signup/page.tsx +17 -0
  54. package/templates/storefront-fashion/app/sitemap-page/page.tsx +167 -0
  55. package/templates/storefront-fashion/app/size-guide/page.tsx +155 -0
  56. package/templates/storefront-fashion/app/track-order/page.tsx +24 -0
  57. package/templates/storefront-fashion/app/track-order/track-order-form.tsx +69 -0
  58. package/templates/storefront-fashion/components/account-iframe.tsx +13 -0
  59. package/templates/storefront-fashion/components/policy-page.tsx +49 -0
  60. package/templates/storefront-fashion/lib/brand.ts +99 -4
  61. package/templates/storefront-grocery/AGENTS.md +56 -11
  62. package/templates/storefront-grocery/app/accessibility/page.tsx +11 -0
  63. package/templates/storefront-grocery/app/account/addresses/page.tsx +21 -0
  64. package/templates/storefront-grocery/app/account/orders/page.tsx +21 -0
  65. package/templates/storefront-grocery/app/account/page.tsx +22 -0
  66. package/templates/storefront-grocery/app/account/settings/page.tsx +21 -0
  67. package/templates/storefront-grocery/app/contact/contact-form.tsx +109 -0
  68. package/templates/storefront-grocery/app/contact/page.tsx +54 -0
  69. package/templates/storefront-grocery/app/login/page.tsx +17 -0
  70. package/templates/storefront-grocery/app/opensearch.xml/route.ts +37 -0
  71. package/templates/storefront-grocery/app/returns/page.tsx +11 -0
  72. package/templates/storefront-grocery/app/search/page.tsx +38 -0
  73. package/templates/storefront-grocery/app/search/search-client.tsx +7 -0
  74. package/templates/storefront-grocery/app/shipping/page.tsx +16 -0
  75. package/templates/storefront-grocery/app/signup/page.tsx +17 -0
  76. package/templates/storefront-grocery/app/sitemap-page/page.tsx +167 -0
  77. package/templates/storefront-grocery/app/track-order/page.tsx +24 -0
  78. package/templates/storefront-grocery/app/track-order/track-order-form.tsx +69 -0
  79. package/templates/storefront-grocery/components/account-iframe.tsx +13 -0
  80. package/templates/storefront-grocery/components/policy-page.tsx +49 -0
  81. package/templates/storefront-grocery/lib/brand.ts +92 -3
  82. package/templates/storefront-restaurant/AGENTS.md +64 -13
  83. package/templates/storefront-restaurant/app/accessibility/page.tsx +11 -0
  84. package/templates/storefront-restaurant/app/account/addresses/page.tsx +21 -0
  85. package/templates/storefront-restaurant/app/account/orders/page.tsx +21 -0
  86. package/templates/storefront-restaurant/app/account/page.tsx +22 -0
  87. package/templates/storefront-restaurant/app/account/settings/page.tsx +21 -0
  88. package/templates/storefront-restaurant/app/contact/contact-form.tsx +109 -0
  89. package/templates/storefront-restaurant/app/contact/page.tsx +54 -0
  90. package/templates/storefront-restaurant/app/login/page.tsx +17 -0
  91. package/templates/storefront-restaurant/app/opensearch.xml/route.ts +37 -0
  92. package/templates/storefront-restaurant/app/reservations/page.tsx +66 -0
  93. package/templates/storefront-restaurant/app/reservations/reservations-client.tsx +234 -0
  94. package/templates/storefront-restaurant/app/returns/page.tsx +11 -0
  95. package/templates/storefront-restaurant/app/search/page.tsx +38 -0
  96. package/templates/storefront-restaurant/app/search/search-client.tsx +7 -0
  97. package/templates/storefront-restaurant/app/shipping/page.tsx +16 -0
  98. package/templates/storefront-restaurant/app/signup/page.tsx +17 -0
  99. package/templates/storefront-restaurant/app/sitemap-page/page.tsx +167 -0
  100. package/templates/storefront-restaurant/app/track-order/page.tsx +24 -0
  101. package/templates/storefront-restaurant/app/track-order/track-order-form.tsx +69 -0
  102. package/templates/storefront-restaurant/components/account-iframe.tsx +13 -0
  103. package/templates/storefront-restaurant/components/policy-page.tsx +49 -0
  104. package/templates/storefront-restaurant/lib/brand.ts +91 -3
  105. package/templates/storefront-retail/AGENTS.md +65 -24
  106. package/templates/storefront-retail/app/accessibility/page.tsx +11 -0
  107. package/templates/storefront-retail/app/account/addresses/page.tsx +21 -0
  108. package/templates/storefront-retail/app/account/orders/page.tsx +21 -0
  109. package/templates/storefront-retail/app/account/page.tsx +22 -0
  110. package/templates/storefront-retail/app/account/settings/page.tsx +21 -0
  111. package/templates/storefront-retail/app/contact/contact-form.tsx +109 -0
  112. package/templates/storefront-retail/app/contact/page.tsx +54 -0
  113. package/templates/storefront-retail/app/login/page.tsx +17 -0
  114. package/templates/storefront-retail/app/opensearch.xml/route.ts +37 -0
  115. package/templates/storefront-retail/app/returns/page.tsx +11 -0
  116. package/templates/storefront-retail/app/search/page.tsx +38 -0
  117. package/templates/storefront-retail/app/search/search-client.tsx +7 -0
  118. package/templates/storefront-retail/app/shipping/page.tsx +16 -0
  119. package/templates/storefront-retail/app/signup/page.tsx +17 -0
  120. package/templates/storefront-retail/app/sitemap-page/page.tsx +167 -0
  121. package/templates/storefront-retail/app/track-order/page.tsx +24 -0
  122. package/templates/storefront-retail/app/track-order/track-order-form.tsx +69 -0
  123. package/templates/storefront-retail/components/account-iframe.tsx +13 -0
  124. package/templates/storefront-retail/components/policy-page.tsx +49 -0
  125. package/templates/storefront-retail/lib/brand.ts +105 -9
  126. package/templates/storefront-services/AGENTS.md +64 -16
  127. package/templates/storefront-services/app/accessibility/page.tsx +11 -0
  128. package/templates/storefront-services/app/account/addresses/page.tsx +21 -0
  129. package/templates/storefront-services/app/account/orders/page.tsx +21 -0
  130. package/templates/storefront-services/app/account/page.tsx +22 -0
  131. package/templates/storefront-services/app/account/settings/page.tsx +21 -0
  132. package/templates/storefront-services/app/book/book-client.tsx +195 -0
  133. package/templates/storefront-services/app/book/page.tsx +65 -0
  134. package/templates/storefront-services/app/contact/contact-form.tsx +109 -0
  135. package/templates/storefront-services/app/contact/page.tsx +54 -0
  136. package/templates/storefront-services/app/login/page.tsx +17 -0
  137. package/templates/storefront-services/app/opensearch.xml/route.ts +37 -0
  138. package/templates/storefront-services/app/returns/page.tsx +11 -0
  139. package/templates/storefront-services/app/search/page.tsx +38 -0
  140. package/templates/storefront-services/app/search/search-client.tsx +7 -0
  141. package/templates/storefront-services/app/shipping/page.tsx +16 -0
  142. package/templates/storefront-services/app/signup/page.tsx +17 -0
  143. package/templates/storefront-services/app/sitemap-page/page.tsx +167 -0
  144. package/templates/storefront-services/app/track-order/page.tsx +24 -0
  145. package/templates/storefront-services/app/track-order/track-order-form.tsx +69 -0
  146. package/templates/storefront-services/components/account-iframe.tsx +13 -0
  147. package/templates/storefront-services/components/policy-page.tsx +49 -0
  148. package/templates/storefront-services/lib/brand.ts +93 -2
@@ -0,0 +1,69 @@
1
+ "use client";
2
+
3
+ import { useState } from "react";
4
+ import { useRouter } from "next/navigation";
5
+
6
+ /**
7
+ * Guest order tracker. Routes /orders/<id> with the entered id; the
8
+ * post-checkout confirmation page already lives at /orders/[id] so this
9
+ * just sends the visitor there. Replace the redirect with a real lookup
10
+ * (e.g. Cimplify orders API + email-match guard) for production.
11
+ */
12
+ export function TrackOrderForm() {
13
+ const router = useRouter();
14
+ const [orderId, setOrderId] = useState("");
15
+ const [email, setEmail] = useState("");
16
+
17
+ return (
18
+ <form
19
+ onSubmit={(e) => {
20
+ e.preventDefault();
21
+ if (!orderId.trim()) return;
22
+ router.push(`/orders/${encodeURIComponent(orderId.trim())}`);
23
+ }}
24
+ className="space-y-4 rounded-2xl border border-border bg-card p-6"
25
+ >
26
+ <div>
27
+ <label
28
+ htmlFor="orderId"
29
+ className="text-xs font-semibold uppercase tracking-wider text-muted-foreground block mb-1.5"
30
+ >
31
+ Order number
32
+ </label>
33
+ <input
34
+ id="orderId"
35
+ name="orderId"
36
+ required
37
+ value={orderId}
38
+ onChange={(e) => setOrderId(e.target.value)}
39
+ placeholder="ord_abc123…"
40
+ className="w-full px-4 py-3 rounded-md bg-background border border-border focus:border-primary focus:ring-2 focus:ring-primary/20 outline-none text-sm"
41
+ />
42
+ </div>
43
+ <div>
44
+ <label
45
+ htmlFor="email"
46
+ className="text-xs font-semibold uppercase tracking-wider text-muted-foreground block mb-1.5"
47
+ >
48
+ Order email
49
+ </label>
50
+ <input
51
+ id="email"
52
+ name="email"
53
+ type="email"
54
+ required
55
+ value={email}
56
+ onChange={(e) => setEmail(e.target.value)}
57
+ placeholder="you@email.com"
58
+ className="w-full px-4 py-3 rounded-md bg-background border border-border focus:border-primary focus:ring-2 focus:ring-primary/20 outline-none text-sm"
59
+ />
60
+ </div>
61
+ <button
62
+ type="submit"
63
+ className="w-full inline-flex items-center justify-center px-5 py-3 rounded-md bg-primary text-primary-foreground font-semibold text-sm hover:bg-primary/90 transition-colors"
64
+ >
65
+ Track order
66
+ </button>
67
+ </form>
68
+ );
69
+ }
@@ -0,0 +1,13 @@
1
+ "use client";
2
+
3
+ import { CimplifyAccount } from "@cimplify/sdk/react";
4
+
5
+ /**
6
+ * Cimplify Account portal — iframe-mounted UI hosted by Cimplify Link.
7
+ * Handles sign-in, sign-up, OTP, addresses, payment methods, sessions,
8
+ * and order history. The iframe owns auth state; we just choose which
9
+ * `section` to land on.
10
+ */
11
+ export function AccountIframe({ section }: { section?: string }) {
12
+ return <CimplifyAccount section={section} />;
13
+ }
@@ -0,0 +1,49 @@
1
+ import type { BrandPolicySection } from "@/lib/brand";
2
+
3
+ interface PolicyShape {
4
+ eyebrow: string;
5
+ title: string;
6
+ lastUpdated?: string;
7
+ sections: BrandPolicySection[];
8
+ }
9
+
10
+ /**
11
+ * Shared layout for shipping / returns / accessibility / terms / privacy.
12
+ * Reads a `{ eyebrow, title, lastUpdated, sections[] }` block from brand.
13
+ */
14
+ export function PolicyPage({ policy }: { policy: PolicyShape }) {
15
+ return (
16
+ <article className="max-w-3xl mx-auto px-8 py-16 prose prose-lg max-w-none">
17
+ <p className="text-[11px] font-semibold uppercase tracking-[0.16em] text-primary mb-2 not-prose">
18
+ {policy.eyebrow}
19
+ </p>
20
+ <h1 className="text-[clamp(2.25rem,5vw,3.5rem)] font-semibold mb-2 -tracking-[0.02em]">
21
+ {policy.title}
22
+ </h1>
23
+ {policy.lastUpdated && (
24
+ <p className="text-sm text-muted-foreground not-prose mb-10">
25
+ Last updated: {policy.lastUpdated}
26
+ </p>
27
+ )}
28
+ <section className="space-y-5 leading-relaxed text-foreground/90">
29
+ {policy.sections.map((s) => (
30
+ <div key={s.heading}>
31
+ <h2 className="text-2xl font-semibold mt-0">{s.heading}</h2>
32
+ {typeof s.body === "string" ? (
33
+ <p>{s.body}</p>
34
+ ) : (
35
+ <>
36
+ <p>{s.body.intro}</p>
37
+ <ul className="list-disc pl-6 space-y-2">
38
+ {s.body.bullets.map((b) => (
39
+ <li key={b}>{b}</li>
40
+ ))}
41
+ </ul>
42
+ </>
43
+ )}
44
+ </div>
45
+ ))}
46
+ </section>
47
+ </article>
48
+ );
49
+ }
@@ -62,6 +62,20 @@ export interface Brand {
62
62
  };
63
63
  terms: { eyebrow: string; title: string; lastUpdated: string; sections: BrandPolicySection[] };
64
64
  privacy: { eyebrow: string; title: string; lastUpdated: string; sections: BrandPolicySection[] };
65
+ shipping: { eyebrow: string; title: string; lastUpdated: string; sections: BrandPolicySection[] };
66
+ returns: { eyebrow: string; title: string; lastUpdated: string; sections: BrandPolicySection[] };
67
+ accessibility: { eyebrow: string; title: string; lastUpdated: string; sections: BrandPolicySection[] };
68
+ account: {
69
+ loginEyebrow: string; loginTitle: string; loginSubtitle: string;
70
+ signupEyebrow: string; signupTitle: string; signupSubtitle: string;
71
+ accountEyebrow: string; accountTitle: string;
72
+ };
73
+ contactPage: {
74
+ eyebrow: string; title: string; body: string;
75
+ reasons: string[];
76
+ directLines: { label: string; value: string; href: string }[];
77
+ };
78
+ trackOrder: { eyebrow: string; title: string; body: string };
65
79
  footer: {
66
80
  blurb: string; sitemap: BrandSitemapSection[];
67
81
  poweredBy?: { label: string; href: string };
@@ -365,6 +379,74 @@ export const brand: Brand = {
365
379
  ],
366
380
  },
367
381
 
382
+ shipping: {
383
+ eyebrow: "Shipping",
384
+ title: "Shipping",
385
+ lastUpdated: "1 May 2026",
386
+ sections: [
387
+ { heading: "Worldwide via DHL Express", body: "2–4 business days from order. Free over $80 (or local equivalent)." },
388
+ { heading: "Customs & duties", body: "Charged on delivery in some countries — DHL contacts you. Prepay for orders over $300; email help@studiofrx.test before placing the order." },
389
+ { heading: "Studio pickup", body: "Free, ready in 30 minutes. Tue–Sat 11am–8pm at Osu Oxford Street, Accra." },
390
+ { heading: "Tracking", body: "DHL tracking link sent by email and SMS within an hour of dispatch." },
391
+ ],
392
+ },
393
+
394
+ returns: {
395
+ eyebrow: "Returns",
396
+ title: "Returns & Exchanges",
397
+ lastUpdated: "1 May 2026",
398
+ sections: [
399
+ { heading: "30 days, on us (US/UK/EU)", body: "Free return labels prepaid by us. Item must be unworn with original tags." },
400
+ { heading: "Worldwide", body: "Return shipping is on you, but we'll refund or exchange immediately on receipt." },
401
+ { heading: "Final sale", body: "Underwear, swim, custom pieces, and anything marked final-sale on the product page is non-returnable." },
402
+ { heading: "How to start", body: "Email help@studiofrx.test with your order number. We'll send a label or instructions within 24 hours." },
403
+ ],
404
+ },
405
+
406
+ accessibility: {
407
+ eyebrow: "Accessibility",
408
+ title: "Accessibility Statement",
409
+ lastUpdated: "1 May 2026",
410
+ sections: [
411
+ { heading: "Our commitment", body: "We aim for WCAG 2.1 AA on this site, tested on each release." },
412
+ { heading: "What we've done", body: { intro: "Specifically, we've:", bullets: [
413
+ "Maintained a minimum 4.5:1 contrast on body text.",
414
+ "Ensured every interactive element is keyboard-reachable.",
415
+ "Provided alt text on every image, including lookbook editorials.",
416
+ "Respected `prefers-reduced-motion` for the homepage editorial transitions.",
417
+ ] } },
418
+ { heading: "Reporting issues", body: "Email accessibility@studiofrx.test. We respond within 5 business days." },
419
+ ],
420
+ },
421
+
422
+ account: {
423
+ loginEyebrow: "Welcome back",
424
+ loginTitle: "Sign in to FRX",
425
+ loginSubtitle: "Track orders, manage your collective access, and view past drops.",
426
+ signupEyebrow: "Welcome",
427
+ signupTitle: "Create your account",
428
+ signupSubtitle: "First-look at the next drop, faster checkout, and your size remembered.",
429
+ accountEyebrow: "Your account",
430
+ accountTitle: "Welcome back",
431
+ },
432
+
433
+ contactPage: {
434
+ eyebrow: "Contact",
435
+ title: "Talk to the studio.",
436
+ body: "Order question, sizing help, collab pitch — message us and we'll reply within a business day.",
437
+ reasons: ["General question", "An order issue", "Sizing help", "Returns / exchanges", "Press / collabs", "Wholesale"],
438
+ directLines: [
439
+ { label: "Email", value: "help@studiofrx.test", href: "mailto:help@studiofrx.test" },
440
+ { label: "Phone", value: "+233 244 000 000", href: "tel:+233244000000" },
441
+ ],
442
+ },
443
+
444
+ trackOrder: {
445
+ eyebrow: "Track an order",
446
+ title: "Where's my drop?",
447
+ body: "Enter your order number and the email used at checkout. We'll show DHL's latest scan and the live ETA.",
448
+ },
449
+
368
450
  footer: {
369
451
  blurb:
370
452
  "Limited-run streetwear from Accra. Heavyweight cotton, hand-screened, numbered. Each drop is a closed run.",
@@ -392,10 +474,21 @@ export const brand: Brand = {
392
474
  {
393
475
  title: "Help",
394
476
  links: [
395
- { label: "Contact", href: "mailto:help@studiofrx.test" },
396
- { label: "Sizing", href: "/faq" },
397
- { label: "Shipping", href: "/faq" },
398
- { label: "Returns", href: "/faq" },
477
+ { label: "Contact", href: "/contact" },
478
+ { label: "Track an order", href: "/track-order" },
479
+ { label: "Size guide", href: "/size-guide" },
480
+ { label: "Shipping", href: "/shipping" },
481
+ { label: "Returns", href: "/returns" },
482
+ { label: "FAQ", href: "/faq" },
483
+ ],
484
+ },
485
+ {
486
+ title: "Account",
487
+ links: [
488
+ { label: "Sign in", href: "/login" },
489
+ { label: "Create account", href: "/signup" },
490
+ { label: "Your orders", href: "/account/orders" },
491
+ { label: "Settings", href: "/account/settings" },
399
492
  ],
400
493
  },
401
494
  {
@@ -403,6 +496,8 @@ export const brand: Brand = {
403
496
  links: [
404
497
  { label: "Terms of Service", href: "/terms" },
405
498
  { label: "Privacy Policy", href: "/privacy" },
499
+ { label: "Accessibility", href: "/accessibility" },
500
+ { label: "Sitemap", href: "/sitemap-page" },
406
501
  ],
407
502
  },
408
503
  ],
@@ -10,24 +10,69 @@ If you are an AI agent (Claude, Cursor, Aider, devin, …) working on this store
10
10
 
11
11
  ## Aesthetic
12
12
 
13
- Approachable grocer — Trader Joe's / Whole Foods / abundant-feel:
14
-
15
13
  - **Inter sans only** (no serif) — friendly, readable for dense product grids.
16
- - **Fresh green + cream**: vibrant green primary, warm cream background.
14
+ - **Fresh green + cream** — vibrant green primary, warm cream background.
17
15
  - **Generous radius**: `0.875rem` — softer than retail.
18
16
  - **Bold, slightly heavy** headings.
17
+ - Schema.org `@type` is `GroceryStore`.
18
+
19
+ ## Page surface
20
+
21
+ ```
22
+ app/
23
+ page.tsx Home — hero ("Free delivery over GH₵150"),
24
+ collection strips, category grid, newsletter
25
+ shop/page.tsx Aisle (SDK <CataloguePage/>)
26
+ search/page.tsx Search
27
+ collections/[slug]/page.tsx Collection landing (e.g. weekly box, deals)
28
+ categories/[slug]/page.tsx Category landing
29
+
30
+ cart/page.tsx, checkout/page.tsx, orders/[id]/page.tsx
31
+
32
+ account/page.tsx <CimplifyAccount /> (iframe)
33
+ account/orders/page.tsx <CimplifyAccount section="orders" />
34
+ account/addresses/page.tsx <CimplifyAccount section="addresses" />
35
+ account/settings/page.tsx <CimplifyAccount section="settings" />
36
+ login/page.tsx, signup/page.tsx redirects → /account
37
+
38
+ contact/page.tsx, track-order/page.tsx
39
+
40
+ about/page.tsx, faq/page.tsx
41
+ shipping/page.tsx (delivery + slots), returns/page.tsx (quality guarantee),
42
+ accessibility/page.tsx, terms/page.tsx, privacy/page.tsx
43
+
44
+ sitemap-page/page.tsx, sitemap.ts, robots.ts, llms.txt/route.ts, opensearch.xml/route.ts
45
+ error.tsx, not-found.tsx
46
+ ```
47
+
48
+ ## File ↔ brand-field map
49
+
50
+ | File | Reads from `brand` |
51
+ |---|---|
52
+ | `app/layout.tsx` | identity, contact, socials, GroceryStore JSON-LD |
53
+ | `app/page.tsx` | `brand.hero` (free-delivery badge) |
54
+ | `app/about/page.tsx` | `brand.about` |
55
+ | `app/faq/page.tsx` | `brand.faq` (delivery slots, sourcing, subscription boxes) |
56
+ | `app/shipping/page.tsx` | `brand.shipping` (delivery slots + free-over threshold) |
57
+ | `app/returns/page.tsx` | `brand.returns` (quality guarantee) |
58
+ | `app/accessibility/page.tsx` | `brand.accessibility` |
59
+ | `app/terms/page.tsx`, `app/privacy/page.tsx` | `brand.terms`, `brand.privacy` |
60
+ | `app/contact/page.tsx` | `brand.contactPage`, `brand.contact` |
61
+ | `app/track-order/page.tsx` | `brand.trackOrder` |
62
+ | `app/account/*/page.tsx` | `brand.account` (iframe owns UI) |
63
+ | `app/llms.txt/route.ts` | `brand.llms`, contact, currency |
64
+ | `components/header.tsx`, `footer.tsx` | `brand.header`, `brand.footer`, `brand.contact`, `brand.socials` |
19
65
 
20
- ## Industry-specific copy patterns
66
+ ## Grocery-specific notes
21
67
 
22
- - `brand.hero.badge` is `"Free delivery over GH₵150"` — pricing-led trust signal.
23
- - `brand.hero.primaryCtaLabel` is `"Shop the aisle"`.
24
- - `brand.tradeIn` is omitted.
25
- - `brand.faq` covers delivery slots, sourcing/quality, subscription boxes.
26
- - Schema.org type is `GroceryStore`.
68
+ - **Subscription boxes** are modelled as products with `billing_plans` (renders the SubscriptionCard variant). The basket-box landing lives at `/categories/baskets`.
69
+ - **Weight-based pricing**: SDK supports `quantity_pricing` tiers per product, but most grocery products are sold by unit/kg. Real weight-at-pack pricing happens on the backend pricing rule.
70
+ - Mock seed: `--seed grocery` (FreshMart).
27
71
 
28
- ## Mock seed
72
+ ## Known TODOs
29
73
 
30
- Wired to `--seed grocery` (FreshMart).
74
+ - Contact + newsletter fake submits.
75
+ - Hero / category / product imagery is Unsplash placeholder — replace with merchant photography.
31
76
 
32
77
  ## Quick start
33
78
 
@@ -0,0 +1,11 @@
1
+ import type { Metadata } from "next";
2
+ import { brand } from "@/lib/brand";
3
+ import { PolicyPage } from "@/components/policy-page";
4
+
5
+ export const metadata: Metadata = {
6
+ title: `${brand.accessibility.title} — ${brand.name}`,
7
+ };
8
+
9
+ export default function AccessibilityPage() {
10
+ return <PolicyPage policy={brand.accessibility} />;
11
+ }
@@ -0,0 +1,21 @@
1
+ import type { Metadata } from "next";
2
+ import { AccountIframe } from "@/components/account-iframe";
3
+ import { brand } from "@/lib/brand";
4
+
5
+ export const metadata: Metadata = {
6
+ title: `Addresses — ${brand.name}`,
7
+ };
8
+
9
+ export default function AddressesPage() {
10
+ return (
11
+ <article className="max-w-5xl mx-auto px-6 sm:px-8 py-12">
12
+ <p className="text-[11px] font-semibold uppercase tracking-[0.16em] text-primary mb-2">
13
+ Account
14
+ </p>
15
+ <h1 className="font-serif text-[clamp(2rem,4vw,2.75rem)] font-semibold mb-8 -tracking-[0.02em]">
16
+ Your addresses
17
+ </h1>
18
+ <AccountIframe section="addresses" />
19
+ </article>
20
+ );
21
+ }
@@ -0,0 +1,21 @@
1
+ import type { Metadata } from "next";
2
+ import { AccountIframe } from "@/components/account-iframe";
3
+ import { brand } from "@/lib/brand";
4
+
5
+ export const metadata: Metadata = {
6
+ title: `Orders — ${brand.name}`,
7
+ };
8
+
9
+ export default function OrdersPage() {
10
+ return (
11
+ <article className="max-w-5xl mx-auto px-6 sm:px-8 py-12">
12
+ <p className="text-[11px] font-semibold uppercase tracking-[0.16em] text-primary mb-2">
13
+ Account
14
+ </p>
15
+ <h1 className="font-serif text-[clamp(2rem,4vw,2.75rem)] font-semibold mb-8 -tracking-[0.02em]">
16
+ Your orders
17
+ </h1>
18
+ <AccountIframe section="orders" />
19
+ </article>
20
+ );
21
+ }
@@ -0,0 +1,22 @@
1
+ import type { Metadata } from "next";
2
+ import { AccountIframe } from "@/components/account-iframe";
3
+ import { brand } from "@/lib/brand";
4
+
5
+ export const metadata: Metadata = {
6
+ title: `Account — ${brand.name}`,
7
+ description: brand.account.signupSubtitle,
8
+ };
9
+
10
+ export default function AccountPage() {
11
+ return (
12
+ <article className="max-w-5xl mx-auto px-6 sm:px-8 py-12">
13
+ <p className="text-[11px] font-semibold uppercase tracking-[0.16em] text-primary mb-2">
14
+ {brand.account.accountEyebrow}
15
+ </p>
16
+ <h1 className="font-serif text-[clamp(2rem,4vw,2.75rem)] font-semibold mb-8 -tracking-[0.02em]">
17
+ {brand.account.accountTitle}
18
+ </h1>
19
+ <AccountIframe />
20
+ </article>
21
+ );
22
+ }
@@ -0,0 +1,21 @@
1
+ import type { Metadata } from "next";
2
+ import { AccountIframe } from "@/components/account-iframe";
3
+ import { brand } from "@/lib/brand";
4
+
5
+ export const metadata: Metadata = {
6
+ title: `Settings — ${brand.name}`,
7
+ };
8
+
9
+ export default function SettingsPage() {
10
+ return (
11
+ <article className="max-w-5xl mx-auto px-6 sm:px-8 py-12">
12
+ <p className="text-[11px] font-semibold uppercase tracking-[0.16em] text-primary mb-2">
13
+ Account
14
+ </p>
15
+ <h1 className="font-serif text-[clamp(2rem,4vw,2.75rem)] font-semibold mb-8 -tracking-[0.02em]">
16
+ Settings
17
+ </h1>
18
+ <AccountIframe section="settings" />
19
+ </article>
20
+ );
21
+ }
@@ -0,0 +1,109 @@
1
+ "use client";
2
+
3
+ import { useState } from "react";
4
+
5
+ /**
6
+ * Local-only contact form. On submit, fakes a successful response so the
7
+ * template ships a usable interaction. Wire to a real handler (Server
8
+ * Action posting to your CRM, support inbox, or Cimplify Support API)
9
+ * before going to production.
10
+ */
11
+ export function ContactForm({ reasons }: { reasons: string[] }) {
12
+ const [submitted, setSubmitted] = useState(false);
13
+ const [reason, setReason] = useState(reasons[0] ?? "");
14
+
15
+ if (submitted) {
16
+ return (
17
+ <div className="rounded-2xl border border-border bg-card p-8">
18
+ <p className="text-[11px] font-semibold uppercase tracking-[0.16em] text-primary mb-2">
19
+ ✓ Sent
20
+ </p>
21
+ <h2 className="font-serif text-2xl font-semibold mb-2">Thanks — we'll be in touch.</h2>
22
+ <p className="text-muted-foreground">
23
+ We respond within one business day. Check your spam folder if you don't see a
24
+ reply by tomorrow.
25
+ </p>
26
+ </div>
27
+ );
28
+ }
29
+
30
+ return (
31
+ <form
32
+ onSubmit={(e) => {
33
+ e.preventDefault();
34
+ setSubmitted(true);
35
+ }}
36
+ className="space-y-5"
37
+ >
38
+ <div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
39
+ <Field label="Your name" name="name" required />
40
+ <Field label="Email" name="email" type="email" required />
41
+ </div>
42
+ <div>
43
+ <label className="text-xs font-semibold uppercase tracking-wider text-muted-foreground block mb-1.5">
44
+ What's it about?
45
+ </label>
46
+ <select
47
+ name="reason"
48
+ value={reason}
49
+ onChange={(e) => setReason(e.target.value)}
50
+ className="w-full px-4 py-2.5 rounded-md bg-background border border-border focus:border-primary focus:ring-2 focus:ring-primary/20 outline-none text-sm"
51
+ >
52
+ {reasons.map((r) => (
53
+ <option key={r} value={r}>
54
+ {r}
55
+ </option>
56
+ ))}
57
+ </select>
58
+ </div>
59
+ <Field label="Order number (optional)" name="order" />
60
+ <div>
61
+ <label className="text-xs font-semibold uppercase tracking-wider text-muted-foreground block mb-1.5">
62
+ Message
63
+ </label>
64
+ <textarea
65
+ name="message"
66
+ required
67
+ rows={6}
68
+ className="w-full px-4 py-2.5 rounded-md bg-background border border-border focus:border-primary focus:ring-2 focus:ring-primary/20 outline-none text-sm resize-y"
69
+ />
70
+ </div>
71
+ <button
72
+ type="submit"
73
+ className="inline-flex items-center justify-center px-5 py-3 rounded-md bg-primary text-primary-foreground font-semibold text-sm hover:bg-primary/90 transition-colors"
74
+ >
75
+ Send message
76
+ </button>
77
+ </form>
78
+ );
79
+ }
80
+
81
+ function Field({
82
+ label,
83
+ name,
84
+ type = "text",
85
+ required,
86
+ }: {
87
+ label: string;
88
+ name: string;
89
+ type?: string;
90
+ required?: boolean;
91
+ }) {
92
+ return (
93
+ <div>
94
+ <label
95
+ htmlFor={name}
96
+ className="text-xs font-semibold uppercase tracking-wider text-muted-foreground block mb-1.5"
97
+ >
98
+ {label}
99
+ </label>
100
+ <input
101
+ id={name}
102
+ name={name}
103
+ type={type}
104
+ required={required}
105
+ className="w-full px-4 py-2.5 rounded-md bg-background border border-border focus:border-primary focus:ring-2 focus:ring-primary/20 outline-none text-sm"
106
+ />
107
+ </div>
108
+ );
109
+ }
@@ -0,0 +1,54 @@
1
+ import type { Metadata } from "next";
2
+ import { ContactForm } from "./contact-form";
3
+ import { brand } from "@/lib/brand";
4
+
5
+ export const metadata: Metadata = {
6
+ title: `Contact — ${brand.name}`,
7
+ description: brand.contactPage.body,
8
+ };
9
+
10
+ export default function ContactPage() {
11
+ const c = brand.contactPage;
12
+ return (
13
+ <article className="max-w-5xl mx-auto px-6 sm:px-8 py-16">
14
+ <p className="text-[11px] font-semibold uppercase tracking-[0.16em] text-primary mb-2">
15
+ {c.eyebrow}
16
+ </p>
17
+ <h1 className="font-serif text-[clamp(2.25rem,5vw,3.5rem)] font-semibold mb-4 -tracking-[0.02em]">
18
+ {c.title}
19
+ </h1>
20
+ <p className="text-lg text-muted-foreground max-w-2xl mb-12 leading-relaxed">{c.body}</p>
21
+
22
+ <div className="grid grid-cols-1 lg:grid-cols-[1.5fr_1fr] gap-10 items-start">
23
+ <ContactForm reasons={c.reasons} />
24
+ <aside className="space-y-5 lg:pl-10 lg:border-l border-border">
25
+ <div>
26
+ <p className="text-[11px] font-semibold uppercase tracking-[0.16em] text-muted-foreground mb-3">
27
+ Direct lines
28
+ </p>
29
+ <ul className="space-y-3 list-none p-0 m-0">
30
+ {c.directLines.map((line) => (
31
+ <li key={line.label}>
32
+ <p className="text-xs text-muted-foreground m-0">{line.label}</p>
33
+ <a
34
+ href={line.href}
35
+ className="text-foreground hover:text-primary transition-colors"
36
+ >
37
+ {line.value}
38
+ </a>
39
+ </li>
40
+ ))}
41
+ </ul>
42
+ </div>
43
+ <div>
44
+ <p className="text-[11px] font-semibold uppercase tracking-[0.16em] text-muted-foreground mb-3">
45
+ Visit
46
+ </p>
47
+ <p className="text-foreground m-0">{brand.contact.address}</p>
48
+ <p className="text-xs text-muted-foreground mt-1">{brand.contact.hours}</p>
49
+ </div>
50
+ </aside>
51
+ </div>
52
+ </article>
53
+ );
54
+ }
@@ -0,0 +1,17 @@
1
+ import type { Metadata } from "next";
2
+ import { redirect } from "next/navigation";
3
+ import { brand } from "@/lib/brand";
4
+
5
+ export const metadata: Metadata = {
6
+ title: `Sign in — ${brand.name}`,
7
+ description: brand.account.loginSubtitle,
8
+ };
9
+
10
+ /**
11
+ * Cimplify Link (the iframe in `<CimplifyAccount>`) handles sign-in
12
+ * automatically when no session exists. We just bounce /login to /account
13
+ * so consumers landing here get the right UI without a duplicate form.
14
+ */
15
+ export default function LoginPage(): never {
16
+ redirect("/account");
17
+ }
@@ -0,0 +1,37 @@
1
+ import { brand } from "@/lib/brand";
2
+
3
+ const SITE_URL =
4
+ process.env.NEXT_PUBLIC_SITE_URL?.trim() || "https://example.com";
5
+
6
+ /**
7
+ * OpenSearch description document — lets browsers add this site to the
8
+ * address bar's search engine list. When users press Tab after typing the
9
+ * domain, they get an inline search box that hits /search?q=...
10
+ */
11
+ export async function GET(): Promise<Response> {
12
+ const xml = `<?xml version="1.0" encoding="UTF-8"?>
13
+ <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
14
+ <ShortName>${escapeXml(brand.shortName)}</ShortName>
15
+ <Description>Search ${escapeXml(brand.name)}</Description>
16
+ <InputEncoding>UTF-8</InputEncoding>
17
+ <Url type="text/html" method="get" template="${SITE_URL}/search?q={searchTerms}" />
18
+ <Url type="application/opensearchdescription+xml" rel="self" template="${SITE_URL}/opensearch.xml" />
19
+ <moz:SearchForm>${SITE_URL}/search</moz:SearchForm>
20
+ </OpenSearchDescription>
21
+ `;
22
+ return new Response(xml, {
23
+ headers: {
24
+ "Content-Type": "application/opensearchdescription+xml; charset=utf-8",
25
+ "Cache-Control": "public, max-age=86400",
26
+ },
27
+ });
28
+ }
29
+
30
+ function escapeXml(s: string): string {
31
+ return s
32
+ .replace(/&/g, "&amp;")
33
+ .replace(/</g, "&lt;")
34
+ .replace(/>/g, "&gt;")
35
+ .replace(/"/g, "&quot;")
36
+ .replace(/'/g, "&apos;");
37
+ }