AI store generator for ecommerce, Malaysia first. Laravel 13 + React + TypeScript.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. <?php
  2. namespace App\StorePlan;
  3. use App\Models\Store;
  4. /**
  5. * A hand-written plan. Used as the format example in AI prompts, by the fake AI provider, and in tests.
  6. * It uses every section type once.
  7. */
  8. final class SamplePlan
  9. {
  10. /**
  11. * @return array<string, mixed>
  12. */
  13. public static function for(Store $store): array
  14. {
  15. return self::forName($store->name);
  16. }
  17. /**
  18. * @return array<string, mixed>
  19. */
  20. public static function forName(string $name): array
  21. {
  22. return [
  23. 'version' => PlanSchema::VERSION,
  24. 'theme' => [
  25. 'colors' => [
  26. 'background' => '#FBF7F0',
  27. 'surface' => '#F3EADB',
  28. 'foreground' => '#2A1A12',
  29. 'muted' => '#7A6557',
  30. 'primary' => '#B4411F',
  31. 'primaryForeground' => '#FFF8F0',
  32. 'accent' => '#E2A93B',
  33. 'border' => '#E3D5C0',
  34. ],
  35. 'fonts' => ['heading' => 'fraunces', 'body' => 'dm-sans'],
  36. 'radius' => 'medium',
  37. ],
  38. 'sections' => [
  39. [
  40. 'id' => 'header',
  41. 'type' => 'header',
  42. 'variant' => 'simple',
  43. 'content' => [
  44. 'logoText' => $name,
  45. 'links' => [
  46. ['label' => 'Shop', 'href' => '#products'],
  47. ['label' => 'Our story', 'href' => '#about'],
  48. ['label' => 'FAQ', 'href' => '#faq'],
  49. ['label' => 'Contact', 'href' => '#contact'],
  50. ],
  51. 'cta' => ['label' => 'Shop now', 'href' => '#products'],
  52. ],
  53. ],
  54. [
  55. 'id' => 'hero',
  56. 'type' => 'hero',
  57. 'variant' => 'split',
  58. 'content' => [
  59. 'eyebrow' => 'Small batch · Made in Malaysia',
  60. 'headline' => 'Sambal the way grandma made it',
  61. 'subheadline' => 'Slow-cooked for six hours with fresh chillies and no preservatives. One spoon turns plain rice into a meal.',
  62. 'primaryCta' => ['label' => 'Shop the range', 'href' => '#products'],
  63. 'secondaryCta' => ['label' => 'Our story', 'href' => '#about'],
  64. ],
  65. ],
  66. [
  67. 'id' => 'products',
  68. 'type' => 'product_grid',
  69. 'variant' => 'grid',
  70. 'content' => [
  71. 'heading' => 'Best sellers',
  72. 'subheading' => 'Cooked fresh every week and delivered across Malaysia.',
  73. 'items' => [
  74. ['name' => 'Sambal Ikan Bilis', 'price' => 18.90, 'badge' => 'Best seller'],
  75. ['name' => 'Sambal Hijau', 'price' => 16.90, 'badge' => null],
  76. ['name' => 'Sambal Petai', 'price' => 21.90, 'badge' => 'New'],
  77. ['name' => 'Sambal Belacan', 'price' => 15.90, 'badge' => null],
  78. ],
  79. ],
  80. ],
  81. [
  82. 'id' => 'featured',
  83. 'type' => 'featured_product',
  84. 'variant' => 'image-right',
  85. 'content' => [
  86. 'eyebrow' => 'Gift set',
  87. 'name' => 'The Family Trio',
  88. 'description' => 'Three of our most loved sambals in one box. A good first order, and an easy gift for anyone who misses home cooking.',
  89. 'price' => 49.90,
  90. 'bullets' => [
  91. 'Three 180g jars',
  92. 'Keeps for 3 months unopened',
  93. 'Free delivery in Peninsular Malaysia',
  94. ],
  95. 'cta' => ['label' => 'Add to cart', 'href' => '#products'],
  96. ],
  97. ],
  98. [
  99. 'id' => 'about',
  100. 'type' => 'about',
  101. 'variant' => 'with-stats',
  102. 'content' => [
  103. 'heading' => 'A family recipe, three generations old',
  104. 'body' => "$name began in a home kitchen, with a recipe passed from grandmother to mother to daughter. We still cook in small batches, taste every pot, and use chillies bought from the same farms each week.",
  105. 'stats' => [
  106. ['value' => '6 hrs', 'label' => 'Slow-cooked per batch'],
  107. ['value' => '0', 'label' => 'Preservatives'],
  108. ['value' => '12k+', 'label' => 'Jars delivered'],
  109. ],
  110. ],
  111. ],
  112. [
  113. 'id' => 'testimonials',
  114. 'type' => 'testimonials',
  115. 'variant' => 'cards',
  116. 'content' => [
  117. 'heading' => 'What customers say',
  118. 'items' => [
  119. ['quote' => 'Tastes exactly like my late mother\'s sambal. I order four jars every month.', 'name' => 'Aishah R.', 'role' => 'Shah Alam'],
  120. ['quote' => 'Spicy, but balanced. My kids now ask for it with every meal.', 'name' => 'Daniel L.', 'role' => 'Penang'],
  121. ['quote' => 'Arrived well packed and fresh. The petai one is dangerous.', 'name' => 'Farah N.', 'role' => 'Johor Bahru'],
  122. ],
  123. ],
  124. ],
  125. [
  126. 'id' => 'faq',
  127. 'type' => 'faq',
  128. 'variant' => 'list',
  129. 'content' => [
  130. 'heading' => 'Common questions',
  131. 'items' => [
  132. ['question' => 'How long does it keep?', 'answer' => 'Three months unopened. After opening, keep it in the fridge and finish within four weeks.'],
  133. ['question' => 'How spicy is it?', 'answer' => 'Most of our sambals are medium. Sambal Hijau is the mildest and Sambal Belacan is the hottest.'],
  134. ['question' => 'Do you deliver to East Malaysia?', 'answer' => 'Yes. Delivery to Sabah and Sarawak takes three to five working days.'],
  135. ],
  136. ],
  137. ],
  138. [
  139. 'id' => 'newsletter',
  140. 'type' => 'newsletter',
  141. 'variant' => 'banner',
  142. 'content' => [
  143. 'heading' => 'Get 10% off your first order',
  144. 'body' => 'Join our list for new flavours and recipes. No spam.',
  145. 'placeholder' => 'Your email address',
  146. 'buttonLabel' => 'Sign up',
  147. ],
  148. ],
  149. [
  150. 'id' => 'contact',
  151. 'type' => 'contact',
  152. 'variant' => 'simple',
  153. 'content' => [
  154. 'heading' => 'Talk to us',
  155. 'body' => 'Questions about an order, or want to stock our sambal? We reply within a day.',
  156. 'email' => 'hello@example.com',
  157. 'phone' => '+60 12-345 6789',
  158. 'whatsapp' => '60123456789',
  159. 'address' => 'Shah Alam, Selangor',
  160. ],
  161. ],
  162. [
  163. 'id' => 'footer',
  164. 'type' => 'footer',
  165. 'variant' => 'simple',
  166. 'content' => [
  167. 'text' => "© $name. All rights reserved.",
  168. 'links' => [
  169. ['label' => 'Shop', 'href' => '#products'],
  170. ['label' => 'FAQ', 'href' => '#faq'],
  171. ['label' => 'Contact', 'href' => '#contact'],
  172. ],
  173. ],
  174. ],
  175. ],
  176. ];
  177. }
  178. }