AI store generator for ecommerce, Malaysia first. Laravel 13 + React + TypeScript.
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

SamplePlan.php 8.1KB

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