astro-tractstack 2.0.0-rc.2 → 2.0.0-rc.21

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 (428) hide show
  1. package/LICENSE +0 -0
  2. package/README.md +227 -98
  3. package/astro.d.ts +0 -0
  4. package/bin/create-tractstack.js +103 -45
  5. package/dist/index.js +17 -1
  6. package/package.json +8 -3
  7. package/templates/artpacks/kCz/captainBreakfast_1080px.webp +0 -0
  8. package/templates/artpacks/kCz/captainBreakfast_1920px.webp +0 -0
  9. package/templates/artpacks/kCz/captainBreakfast_600px.webp +0 -0
  10. package/templates/artpacks/kCz/cleanDrips_1080px.webp +0 -0
  11. package/templates/artpacks/kCz/cleanDrips_1920px.webp +0 -0
  12. package/templates/artpacks/kCz/cleanDrips_600px.webp +0 -0
  13. package/templates/artpacks/kCz/crispwaves_1080px.webp +0 -0
  14. package/templates/artpacks/kCz/crispwaves_1920px.webp +0 -0
  15. package/templates/artpacks/kCz/crispwaves_600px.webp +0 -0
  16. package/templates/artpacks/kCz/dragonSkin_1080px.webp +0 -0
  17. package/templates/artpacks/kCz/dragonSkin_1920px.webp +0 -0
  18. package/templates/artpacks/kCz/dragonSkin_600px.webp +0 -0
  19. package/templates/artpacks/kCz/dragon_1080px.webp +0 -0
  20. package/templates/artpacks/kCz/dragon_1920px.webp +0 -0
  21. package/templates/artpacks/kCz/dragon_600px.webp +0 -0
  22. package/templates/artpacks/kCz/nightcity_1080px.webp +0 -0
  23. package/templates/artpacks/kCz/nightcity_1920px.webp +0 -0
  24. package/templates/artpacks/kCz/nightcity_600px.webp +0 -0
  25. package/templates/artpacks/kCz/pattern1_1080px.webp +0 -0
  26. package/templates/artpacks/kCz/pattern1_1920px.webp +0 -0
  27. package/templates/artpacks/kCz/pattern1_600px.webp +0 -0
  28. package/templates/artpacks/kCz/pattern2_1080px.webp +0 -0
  29. package/templates/artpacks/kCz/pattern2_1920px.webp +0 -0
  30. package/templates/artpacks/kCz/pattern2_600px.webp +0 -0
  31. package/templates/artpacks/kCz/skindrips_1080px.webp +0 -0
  32. package/templates/artpacks/kCz/skindrips_1920px.webp +0 -0
  33. package/templates/artpacks/kCz/skindrips_600px.webp +0 -0
  34. package/templates/artpacks/kCz/slimetime_1080px.webp +0 -0
  35. package/templates/artpacks/kCz/slimetime_1920px.webp +0 -0
  36. package/templates/artpacks/kCz/slimetime_600px.webp +0 -0
  37. package/templates/artpacks/kCz/snake_1080px.webp +0 -0
  38. package/templates/artpacks/kCz/snake_1920px.webp +0 -0
  39. package/templates/artpacks/kCz/snake_600px.webp +0 -0
  40. package/templates/artpacks/kCz/toxicshock_1080px.webp +0 -0
  41. package/templates/artpacks/kCz/toxicshock_1920px.webp +0 -0
  42. package/templates/artpacks/kCz/toxicshock_600px.webp +0 -0
  43. package/templates/artpacks/kCz/tractstack_1080px.webp +0 -0
  44. package/templates/artpacks/kCz/tractstack_1920px.webp +0 -0
  45. package/templates/artpacks/kCz/tractstack_600px.webp +0 -0
  46. package/templates/artpacks/kCz/tripdrips_1080px.webp +0 -0
  47. package/templates/artpacks/kCz/tripdrips_1920px.webp +0 -0
  48. package/templates/artpacks/kCz/tripdrips_600px.webp +0 -0
  49. package/templates/artpacks/kCz/wavedrips_1080px.webp +0 -0
  50. package/templates/artpacks/kCz/wavedrips_1920px.webp +0 -0
  51. package/templates/artpacks/kCz/wavedrips_600px.webp +0 -0
  52. package/templates/artpacks/t8k/beach_1080px.webp +0 -0
  53. package/templates/artpacks/t8k/beach_1920px.webp +0 -0
  54. package/templates/artpacks/t8k/beach_600px.webp +0 -0
  55. package/templates/artpacks/t8k/blast_1080px.webp +0 -0
  56. package/templates/artpacks/t8k/blast_1920px.webp +0 -0
  57. package/templates/artpacks/t8k/blast_600px.webp +0 -0
  58. package/templates/artpacks/t8k/bokeh_1080px.webp +0 -0
  59. package/templates/artpacks/t8k/bokeh_1920px.webp +0 -0
  60. package/templates/artpacks/t8k/bokeh_600px.webp +0 -0
  61. package/templates/artpacks/t8k/cartoon_1080px.webp +0 -0
  62. package/templates/artpacks/t8k/cartoon_1920px.webp +0 -0
  63. package/templates/artpacks/t8k/cartoon_600px.webp +0 -0
  64. package/templates/artpacks/t8k/darkeggshell_1080px.webp +0 -0
  65. package/templates/artpacks/t8k/darkeggshell_1920px.webp +0 -0
  66. package/templates/artpacks/t8k/darkeggshell_600px.webp +0 -0
  67. package/templates/artpacks/t8k/explosion_1080px.webp +0 -0
  68. package/templates/artpacks/t8k/explosion_1920px.webp +0 -0
  69. package/templates/artpacks/t8k/explosion_600px.webp +0 -0
  70. package/templates/artpacks/t8k/floral_1080px.webp +0 -0
  71. package/templates/artpacks/t8k/floral_1920px.webp +0 -0
  72. package/templates/artpacks/t8k/floral_600px.webp +0 -0
  73. package/templates/artpacks/t8k/flower_1080px.webp +0 -0
  74. package/templates/artpacks/t8k/flower_1920px.webp +0 -0
  75. package/templates/artpacks/t8k/flower_600px.webp +0 -0
  76. package/templates/artpacks/t8k/foliage_1080px.webp +0 -0
  77. package/templates/artpacks/t8k/foliage_1920px.webp +0 -0
  78. package/templates/artpacks/t8k/foliage_600px.webp +0 -0
  79. package/templates/artpacks/t8k/mist_1080px.webp +0 -0
  80. package/templates/artpacks/t8k/mist_1920px.webp +0 -0
  81. package/templates/artpacks/t8k/mist_600px.webp +0 -0
  82. package/templates/artpacks/t8k/portal_1080px.webp +0 -0
  83. package/templates/artpacks/t8k/portal_1920px.webp +0 -0
  84. package/templates/artpacks/t8k/portal_600px.webp +0 -0
  85. package/templates/artpacks/t8k/storytime_1080px.webp +0 -0
  86. package/templates/artpacks/t8k/storytime_1920px.webp +0 -0
  87. package/templates/artpacks/t8k/storytime_600px.webp +0 -0
  88. package/templates/artpacks/t8k/tacky_1080px.webp +0 -0
  89. package/templates/artpacks/t8k/tacky_1920px.webp +0 -0
  90. package/templates/artpacks/t8k/tacky_600px.webp +0 -0
  91. package/templates/artpacks/t8k/wallpaper_1080px.webp +0 -0
  92. package/templates/artpacks/t8k/wallpaper_1920px.webp +0 -0
  93. package/templates/artpacks/t8k/wallpaper_600px.webp +0 -0
  94. package/templates/brand/favicon.ico +0 -0
  95. package/templates/brand/logo.svg +0 -0
  96. package/templates/brand/og.png +0 -0
  97. package/templates/brand/oglogo.png +0 -0
  98. package/templates/brand/static.jpg +0 -0
  99. package/templates/brand/wordmark.svg +0 -0
  100. package/templates/css/custom.css +0 -0
  101. package/templates/css/frontend.css +1 -3519
  102. package/templates/css/storykeep.css +0 -0
  103. package/templates/custom/minimal/CodeHook.astro +3 -4
  104. package/templates/custom/minimal/CustomRoutes.astro +25 -31
  105. package/templates/custom/with-examples/CodeHook.astro +3 -4
  106. package/templates/custom/with-examples/CustomHero.astro +0 -0
  107. package/templates/custom/with-examples/CustomRoutes.astro +4 -8
  108. package/templates/custom/with-examples/pages/Collections.astro +58 -98
  109. package/templates/env.example +0 -0
  110. package/templates/fonts/Inter-Black.woff2 +0 -0
  111. package/templates/fonts/Inter-Bold.woff2 +0 -0
  112. package/templates/fonts/Inter-Regular.woff2 +0 -0
  113. package/templates/gitignore +42 -0
  114. package/templates/icons/h2.svg +0 -0
  115. package/templates/icons/h3.svg +0 -0
  116. package/templates/icons/h4.svg +0 -0
  117. package/templates/icons/h5.svg +0 -0
  118. package/templates/icons/image.svg +0 -0
  119. package/templates/icons/text.svg +0 -0
  120. package/templates/prettierignore +5 -0
  121. package/templates/prettierrc +19 -0
  122. package/templates/socials/codepen.svg +0 -0
  123. package/templates/socials/discord.svg +0 -0
  124. package/templates/socials/facebook.svg +0 -0
  125. package/templates/socials/github.svg +0 -0
  126. package/templates/socials/instagram.svg +0 -0
  127. package/templates/socials/linkedin.svg +0 -0
  128. package/templates/socials/mail.svg +0 -0
  129. package/templates/socials/rumble.svg +0 -0
  130. package/templates/socials/tiktok.svg +0 -0
  131. package/templates/socials/twitch.svg +0 -0
  132. package/templates/socials/twitter.svg +0 -0
  133. package/templates/socials/x.svg +0 -0
  134. package/templates/socials/youtube.svg +0 -0
  135. package/templates/src/components/Footer.astro +1 -1
  136. package/templates/src/components/Fragment.astro +0 -0
  137. package/templates/src/components/Header.astro +55 -52
  138. package/templates/src/components/Menu.tsx +0 -0
  139. package/templates/src/components/codehooks/BunnyVideoSetup.tsx +0 -0
  140. package/templates/src/components/codehooks/BunnyVideoWrapper.astro +0 -0
  141. package/templates/src/components/codehooks/EpinetDurationSelector.tsx +6 -3
  142. package/templates/src/components/codehooks/EpinetTableView.tsx +0 -0
  143. package/templates/src/components/codehooks/EpinetWrapper.tsx +0 -0
  144. package/templates/src/components/codehooks/FeaturedContent.astro +0 -0
  145. package/templates/src/components/codehooks/FeaturedContentSetup.tsx +0 -0
  146. package/templates/src/components/codehooks/ListContent.astro +0 -0
  147. package/templates/src/components/codehooks/ListContentSetup.tsx +0 -0
  148. package/templates/src/components/codehooks/SankeyDiagram.tsx +4 -3
  149. package/templates/src/components/compositor/Compositor.tsx +0 -0
  150. package/templates/src/components/compositor/Node.tsx +0 -0
  151. package/templates/src/components/compositor/NodeWithGuid.tsx +0 -0
  152. package/templates/src/components/compositor/PanelVisibilityWrapper.tsx +25 -11
  153. package/templates/src/components/compositor/elements/Belief.tsx +0 -0
  154. package/templates/src/components/compositor/elements/BgImage.tsx +0 -0
  155. package/templates/src/components/compositor/elements/BgVisualBreak.tsx +0 -0
  156. package/templates/src/components/compositor/elements/BunnyVideo.tsx +0 -0
  157. package/templates/src/components/compositor/elements/IdentifyAs.tsx +0 -0
  158. package/templates/src/components/compositor/elements/PlayButton.tsx +0 -0
  159. package/templates/src/components/compositor/elements/SignUp.tsx +0 -0
  160. package/templates/src/components/compositor/elements/Svg.tsx +0 -0
  161. package/templates/src/components/compositor/elements/ToggleBelief.tsx +0 -0
  162. package/templates/src/components/compositor/elements/YouTubeWrapper.tsx +0 -0
  163. package/templates/src/components/compositor/nodes/BgPaneWrapper.tsx +0 -0
  164. package/templates/src/components/compositor/nodes/GhostInsertBlock.tsx +0 -0
  165. package/templates/src/components/compositor/nodes/Markdown.tsx +0 -0
  166. package/templates/src/components/compositor/nodes/Pane.tsx +12 -5
  167. package/templates/src/components/compositor/nodes/Pane_eraser.tsx +0 -0
  168. package/templates/src/components/compositor/nodes/Pane_layout.tsx +0 -0
  169. package/templates/src/components/compositor/nodes/RenderChildren.tsx +0 -0
  170. package/templates/src/components/compositor/nodes/StoryFragment.tsx +0 -0
  171. package/templates/src/components/compositor/nodes/TagElement.tsx +0 -0
  172. package/templates/src/components/compositor/nodes/Widget.tsx +0 -0
  173. package/templates/src/components/compositor/nodes/tagElements/NodeA.tsx +0 -0
  174. package/templates/src/components/compositor/nodes/tagElements/NodeA_eraser.tsx +0 -0
  175. package/templates/src/components/compositor/nodes/tagElements/NodeAnchorComponent.tsx +0 -0
  176. package/templates/src/components/compositor/nodes/tagElements/NodeBasicTag.tsx +0 -0
  177. package/templates/src/components/compositor/nodes/tagElements/NodeBasicTag_eraser.tsx +0 -0
  178. package/templates/src/components/compositor/nodes/tagElements/NodeBasicTag_insert.tsx +0 -0
  179. package/templates/src/components/compositor/nodes/tagElements/NodeBasicTag_settings.tsx +0 -0
  180. package/templates/src/components/compositor/nodes/tagElements/NodeButton.tsx +0 -0
  181. package/templates/src/components/compositor/nodes/tagElements/NodeButton_eraser.tsx +0 -0
  182. package/templates/src/components/compositor/nodes/tagElements/NodeImg.tsx +0 -0
  183. package/templates/src/components/compositor/nodes/tagElements/NodeText.tsx +0 -0
  184. package/templates/src/components/compositor/nodes/tagElements/TabIndicator.tsx +0 -0
  185. package/templates/src/components/compositor/preview/FeaturedContentPreview.tsx +0 -0
  186. package/templates/src/components/compositor/preview/ListContentPreview.tsx +0 -0
  187. package/templates/src/components/compositor/preview/OgImagePreview.tsx +0 -0
  188. package/templates/src/components/compositor/preview/PaneSnapshotGenerator.tsx +0 -0
  189. package/templates/src/components/compositor/preview/PanesPreviewGenerator.tsx +0 -0
  190. package/templates/src/components/compositor/preview/VisualBreakPreview.tsx +0 -0
  191. package/templates/src/components/edit/Header.tsx +0 -0
  192. package/templates/src/components/edit/PanelSwitch.tsx +4 -8
  193. package/templates/src/components/edit/SettingsPanel.tsx +4 -1
  194. package/templates/src/components/edit/ToolBar.tsx +0 -0
  195. package/templates/src/components/edit/ToolMode.tsx +0 -0
  196. package/templates/src/components/edit/context/ContextPaneConfig.tsx +0 -0
  197. package/templates/src/components/edit/context/ContextPaneConfig_slug.tsx +0 -0
  198. package/templates/src/components/edit/context/ContextPaneConfig_title.tsx +0 -0
  199. package/templates/src/components/edit/pane/AddPanePanel.tsx +0 -0
  200. package/templates/src/components/edit/pane/AddPanePanel_break.tsx +0 -0
  201. package/templates/src/components/edit/pane/AddPanePanel_codehook.tsx +2 -1
  202. package/templates/src/components/edit/pane/AddPanePanel_new.tsx +1 -1
  203. package/templates/src/components/edit/pane/AddPanePanel_newAICopy.tsx +0 -0
  204. package/templates/src/components/edit/pane/AddPanePanel_newAICopy_modal.tsx +1 -1
  205. package/templates/src/components/edit/pane/AddPanePanel_newCopyMode.tsx +0 -0
  206. package/templates/src/components/edit/pane/AddPanePanel_newCustomCopy.tsx +0 -0
  207. package/templates/src/components/edit/pane/AddPanePanel_reuse.tsx +0 -0
  208. package/templates/src/components/edit/pane/ConfigPanePanel.tsx +1 -0
  209. package/templates/src/components/edit/pane/PageGen.tsx +0 -0
  210. package/templates/src/components/edit/pane/PageGenSelector.tsx +0 -0
  211. package/templates/src/components/edit/pane/PageGenSpecial.tsx +0 -0
  212. package/templates/src/components/edit/pane/PageGen_preview.tsx +0 -0
  213. package/templates/src/components/edit/pane/PanePanel_impression.tsx +0 -0
  214. package/templates/src/components/edit/pane/PanePanel_path.tsx +2 -2
  215. package/templates/src/components/edit/pane/PanePanel_slug.tsx +0 -0
  216. package/templates/src/components/edit/pane/PanePanel_title.tsx +0 -0
  217. package/templates/src/components/edit/panels/StyleBreakPanel.tsx +0 -0
  218. package/templates/src/components/edit/panels/StyleCodeHookPanel.tsx +0 -0
  219. package/templates/src/components/edit/panels/StyleElementPanel.tsx +0 -0
  220. package/templates/src/components/edit/panels/StyleElementPanel_add.tsx +1 -1
  221. package/templates/src/components/edit/panels/StyleElementPanel_remove.tsx +0 -0
  222. package/templates/src/components/edit/panels/StyleElementPanel_update.tsx +0 -0
  223. package/templates/src/components/edit/panels/StyleImagePanel.tsx +0 -0
  224. package/templates/src/components/edit/panels/StyleImagePanel_add.tsx +1 -1
  225. package/templates/src/components/edit/panels/StyleImagePanel_remove.tsx +0 -0
  226. package/templates/src/components/edit/panels/StyleImagePanel_update.tsx +0 -0
  227. package/templates/src/components/edit/panels/StyleLiElementPanel.tsx +0 -0
  228. package/templates/src/components/edit/panels/StyleLiElementPanel_add.tsx +1 -1
  229. package/templates/src/components/edit/panels/StyleLiElementPanel_remove.tsx +0 -0
  230. package/templates/src/components/edit/panels/StyleLiElementPanel_update.tsx +0 -0
  231. package/templates/src/components/edit/panels/StyleLinkPanel.tsx +0 -0
  232. package/templates/src/components/edit/panels/StyleLinkPanel_add.tsx +1 -1
  233. package/templates/src/components/edit/panels/StyleLinkPanel_config.tsx +1 -1
  234. package/templates/src/components/edit/panels/StyleLinkPanel_remove.tsx +0 -0
  235. package/templates/src/components/edit/panels/StyleLinkPanel_update.tsx +0 -0
  236. package/templates/src/components/edit/panels/StyleParentPanel.tsx +0 -0
  237. package/templates/src/components/edit/panels/StyleParentPanel_add.tsx +1 -1
  238. package/templates/src/components/edit/panels/StyleParentPanel_deleteLayer.tsx +0 -0
  239. package/templates/src/components/edit/panels/StyleParentPanel_remove.tsx +0 -0
  240. package/templates/src/components/edit/panels/StyleParentPanel_update.tsx +0 -0
  241. package/templates/src/components/edit/panels/StyleWidgetPanel.tsx +2 -0
  242. package/templates/src/components/edit/panels/StyleWidgetPanel_add.tsx +1 -1
  243. package/templates/src/components/edit/panels/StyleWidgetPanel_config.tsx +0 -0
  244. package/templates/src/components/edit/panels/StyleWidgetPanel_remove.tsx +0 -0
  245. package/templates/src/components/edit/panels/StyleWidgetPanel_update.tsx +0 -0
  246. package/templates/src/components/edit/state/SaveModal.tsx +43 -49
  247. package/templates/src/components/edit/state/StylesMemory.tsx +0 -0
  248. package/templates/src/components/edit/storyfragment/StoryFragmentConfigPanel.tsx +0 -0
  249. package/templates/src/components/edit/storyfragment/StoryFragmentPanel_menu.tsx +0 -0
  250. package/templates/src/components/edit/storyfragment/StoryFragmentPanel_og.tsx +0 -0
  251. package/templates/src/components/edit/storyfragment/StoryFragmentPanel_slug.tsx +0 -0
  252. package/templates/src/components/edit/storyfragment/StoryFragmentPanel_title.tsx +0 -0
  253. package/templates/src/components/edit/widgets/BeliefWidget.tsx +0 -0
  254. package/templates/src/components/edit/widgets/BunnyWidget.tsx +0 -0
  255. package/templates/src/components/edit/widgets/IdentifyAsWidget.tsx +0 -0
  256. package/templates/src/components/edit/widgets/SignupWidget.tsx +0 -0
  257. package/templates/src/components/edit/widgets/ToggleWidget.tsx +0 -0
  258. package/templates/src/components/edit/widgets/YouTubeWidget.tsx +0 -0
  259. package/templates/src/components/fields/ActionBuilderTimeSelector.tsx +0 -0
  260. package/templates/src/components/fields/ArtpackImage.tsx +0 -0
  261. package/templates/src/components/fields/BackgroundImage.tsx +0 -0
  262. package/templates/src/components/fields/BackgroundImageWrapper.tsx +1 -1
  263. package/templates/src/components/fields/BooleanParam.tsx +0 -0
  264. package/templates/src/components/fields/BunnyMomentSelector.tsx +0 -0
  265. package/templates/src/components/fields/ColorPickerCombo.tsx +0 -0
  266. package/templates/src/components/fields/ImageUpload.tsx +0 -0
  267. package/templates/src/components/fields/MultiParam.tsx +0 -0
  268. package/templates/src/components/fields/PaneBreakCollectionSelector.tsx +0 -0
  269. package/templates/src/components/fields/PaneBreakShapeSelector.tsx +0 -0
  270. package/templates/src/components/fields/SelectedTailwindClass.tsx +0 -0
  271. package/templates/src/components/fields/SingleParam.tsx +0 -0
  272. package/templates/src/components/fields/ViewportComboBox.tsx +10 -3
  273. package/templates/src/components/form/ActionBuilderField.tsx +0 -0
  274. package/templates/src/components/form/ActionBuilderSlugSelector.tsx +0 -0
  275. package/templates/src/components/form/BooleanToggle.tsx +0 -0
  276. package/templates/src/components/form/ColorPicker.tsx +0 -0
  277. package/templates/src/components/form/DateTimeInput.tsx +0 -0
  278. package/templates/src/components/form/EnumSelect.tsx +0 -0
  279. package/templates/src/components/form/FileUpload.tsx +0 -0
  280. package/templates/src/components/form/MagicPathBuilder.tsx +0 -0
  281. package/templates/src/components/form/NumberInput.tsx +0 -0
  282. package/templates/src/components/form/ParagraphArrayInput.tsx +0 -0
  283. package/templates/src/components/form/StringArrayInput.tsx +0 -0
  284. package/templates/src/components/form/StringInput.tsx +0 -0
  285. package/templates/src/components/form/UnsavedChangesBar.tsx +0 -0
  286. package/templates/src/components/form/advanced/APIConfigSection.tsx +0 -0
  287. package/templates/src/components/form/advanced/AuthConfigSection.tsx +0 -0
  288. package/templates/src/components/form/brand/BrandAssetsSection.tsx +0 -0
  289. package/templates/src/components/form/brand/BrandColorsSection.tsx +0 -0
  290. package/templates/src/components/form/brand/SEOSection.tsx +0 -0
  291. package/templates/src/components/form/brand/SiteConfigSection.tsx +0 -0
  292. package/templates/src/components/form/brand/SocialLinksSection.tsx +0 -0
  293. package/templates/src/components/profile/ProfileConsent.tsx +0 -0
  294. package/templates/src/components/profile/ProfileCreate.tsx +0 -0
  295. package/templates/src/components/profile/ProfileEdit.tsx +0 -0
  296. package/templates/src/components/profile/ProfileSwitch.tsx +0 -0
  297. package/templates/src/components/profile/ProfileUnlock.tsx +0 -0
  298. package/templates/src/components/storykeep/Dashboard.tsx +0 -0
  299. package/templates/src/components/storykeep/Dashboard_Activity.tsx +0 -0
  300. package/templates/src/components/storykeep/Dashboard_Advanced.tsx +1 -1
  301. package/templates/src/components/storykeep/Dashboard_Analytics.tsx +30 -7
  302. package/templates/src/components/storykeep/Dashboard_Branding.tsx +0 -0
  303. package/templates/src/components/storykeep/Dashboard_Content.tsx +6 -0
  304. package/templates/src/components/storykeep/controls/UsageCell.tsx +0 -0
  305. package/templates/src/components/storykeep/controls/content/BeliefForm.tsx +0 -0
  306. package/templates/src/components/storykeep/controls/content/BeliefTable.tsx +0 -0
  307. package/templates/src/components/storykeep/controls/content/ContentBrowser.tsx +0 -0
  308. package/templates/src/components/storykeep/controls/content/ContentSummary.tsx +0 -0
  309. package/templates/src/components/storykeep/controls/content/KnownResourceForm.tsx +0 -0
  310. package/templates/src/components/storykeep/controls/content/KnownResourceTable.tsx +0 -0
  311. package/templates/src/components/storykeep/controls/content/ManageContent.tsx +0 -0
  312. package/templates/src/components/storykeep/controls/content/MenuForm.tsx +0 -0
  313. package/templates/src/components/storykeep/controls/content/MenuTable.tsx +0 -0
  314. package/templates/src/components/storykeep/controls/content/ResourceBulkIngest.tsx +0 -0
  315. package/templates/src/components/storykeep/controls/content/ResourceForm.tsx +0 -0
  316. package/templates/src/components/storykeep/controls/content/ResourceTable.tsx +0 -0
  317. package/templates/src/components/storykeep/controls/content/StoryFragmentTable.tsx +0 -0
  318. package/templates/src/components/storykeep/state/BrandingWrapper.tsx +0 -0
  319. package/templates/src/components/storykeep/state/FetchAnalytics.tsx +0 -0
  320. package/templates/src/components/storykeep/widgets/ResponsiveLine.tsx +0 -0
  321. package/templates/src/components/storykeep/widgets/Wizard.tsx +13 -6
  322. package/templates/src/components/tenant/RegistrationForm.tsx +5 -3
  323. package/templates/src/components/widgets/BunnyVideoHero.astro +0 -0
  324. package/templates/src/components/widgets/Impression.tsx +0 -0
  325. package/templates/src/components/widgets/ImpressionWrapper.tsx +0 -0
  326. package/templates/src/constants/beliefs.ts +0 -0
  327. package/templates/src/constants/brandThemes.ts +0 -0
  328. package/templates/src/constants/prompts.json +0 -0
  329. package/templates/src/constants/shapes.ts +0 -0
  330. package/templates/src/constants/stopWords.ts +0 -0
  331. package/templates/src/constants/tailwindColors.json +0 -0
  332. package/templates/src/constants.ts +0 -0
  333. package/templates/src/hooks/useFormState.ts +0 -0
  334. package/templates/src/layouts/Layout.astro +120 -11
  335. package/templates/src/lib/session.ts +0 -0
  336. package/templates/src/lib/storyData.ts +2 -1
  337. package/templates/src/middleware.ts +0 -0
  338. package/templates/src/pages/404.astro +0 -0
  339. package/templates/src/pages/[...slug]/edit.astro +9 -3
  340. package/templates/src/pages/[...slug].astro +3 -1
  341. package/templates/src/pages/api/auth/decode.ts +0 -0
  342. package/templates/src/pages/api/auth/login.ts +0 -0
  343. package/templates/src/pages/api/auth/logout.ts +0 -0
  344. package/templates/src/pages/api/auth/profile.ts +0 -0
  345. package/templates/src/pages/api/orphan-analysis.ts +0 -0
  346. package/templates/src/pages/api/tailwind.ts +10 -1
  347. package/templates/src/pages/collections/[param1].astro +0 -0
  348. package/templates/src/pages/context/[...contextSlug]/edit.astro +8 -2
  349. package/templates/src/pages/context/[...contextSlug].astro +7 -2
  350. package/templates/src/pages/llms.txt.ts +0 -0
  351. package/templates/src/pages/maint.astro +0 -0
  352. package/templates/src/pages/media/[...slug].astro +0 -0
  353. package/templates/src/pages/robots.txt.ts +0 -0
  354. package/templates/src/pages/sandbox/activate.astro +0 -0
  355. package/templates/src/pages/sandbox/register.astro +0 -0
  356. package/templates/src/pages/sandbox/success.astro +0 -0
  357. package/templates/src/pages/sitemap.xml.ts +0 -0
  358. package/templates/src/pages/storykeep/advanced.astro +1 -1
  359. package/templates/src/pages/storykeep/branding.astro +1 -1
  360. package/templates/src/pages/storykeep/content.astro +1 -1
  361. package/templates/src/pages/storykeep/init.astro +40 -1
  362. package/templates/src/pages/storykeep/login.astro +0 -0
  363. package/templates/src/pages/storykeep/logout.astro +0 -0
  364. package/templates/src/pages/storykeep/profile.astro +0 -0
  365. package/templates/src/pages/storykeep.astro +1 -1
  366. package/templates/src/stores/analytics.ts +0 -0
  367. package/templates/src/stores/backend.ts +0 -0
  368. package/templates/src/stores/navigation.ts +0 -0
  369. package/templates/src/stores/nodes.ts +32 -1
  370. package/templates/src/stores/nodesHistory.ts +0 -0
  371. package/templates/src/stores/notificationSystem.ts +0 -0
  372. package/templates/src/stores/orphanAnalysis.ts +0 -0
  373. package/templates/src/stores/storykeep.ts +5 -0
  374. package/templates/src/types/astro.ts +0 -0
  375. package/templates/src/types/compositorTypes.ts +0 -0
  376. package/templates/src/types/formTypes.ts +0 -0
  377. package/templates/src/types/multiTenant.ts +0 -0
  378. package/templates/src/types/nodeProps.ts +0 -0
  379. package/templates/src/types/tractstack.ts +0 -0
  380. package/templates/src/utils/aai/getTitleSlug.ts +0 -0
  381. package/templates/src/utils/actions/actionButton.ts +0 -0
  382. package/templates/src/utils/actions/lispLexer.ts +0 -0
  383. package/templates/src/utils/actions/preParse_Action.ts +0 -0
  384. package/templates/src/utils/actions/preParse_Bunny.ts +0 -0
  385. package/templates/src/utils/actions/preParse_Clicked.ts +0 -0
  386. package/templates/src/utils/actions/preParse_Impression.ts +0 -0
  387. package/templates/src/utils/api/advancedConfig.ts +0 -0
  388. package/templates/src/utils/api/advancedHelpers.ts +0 -0
  389. package/templates/src/utils/api/beliefConfig.ts +0 -0
  390. package/templates/src/utils/api/beliefHelpers.ts +0 -0
  391. package/templates/src/utils/api/brandConfig.ts +0 -0
  392. package/templates/src/utils/api/brandHelpers.ts +0 -0
  393. package/templates/src/utils/api/fileHelpers.ts +0 -0
  394. package/templates/src/utils/api/menuConfig.ts +0 -0
  395. package/templates/src/utils/api/menuHelpers.ts +0 -0
  396. package/templates/src/utils/api/resourceConfig.ts +0 -0
  397. package/templates/src/utils/api/resourceHelpers.ts +0 -0
  398. package/templates/src/utils/api/tenantConfig.ts +0 -0
  399. package/templates/src/utils/api/tenantHelpers.ts +0 -0
  400. package/templates/src/utils/api.ts +0 -0
  401. package/templates/src/utils/auth.ts +0 -0
  402. package/templates/src/utils/backend.ts +0 -0
  403. package/templates/src/utils/compositor/TemplateMarkdowns.ts +0 -0
  404. package/templates/src/utils/compositor/TemplateNodes.ts +0 -0
  405. package/templates/src/utils/compositor/TemplatePanes.ts +0 -0
  406. package/templates/src/utils/compositor/allowInsert.ts +0 -0
  407. package/templates/src/utils/compositor/domHelpers.ts +0 -0
  408. package/templates/src/utils/compositor/handleClickEvent.ts +0 -0
  409. package/templates/src/utils/compositor/nodesHelper.ts +0 -0
  410. package/templates/src/utils/compositor/nodesMarkdownGenerator.ts +0 -0
  411. package/templates/src/utils/compositor/processMarkdown.ts +0 -0
  412. package/templates/src/utils/compositor/reduceNodesClassNames.ts +0 -0
  413. package/templates/src/utils/compositor/tailwindClasses.ts +0 -0
  414. package/templates/src/utils/compositor/tailwindColors.ts +0 -0
  415. package/templates/src/utils/compositor/templateMarkdownStyles.ts +8 -0
  416. package/templates/src/utils/compositor/typeGuards.ts +0 -0
  417. package/templates/src/utils/etl/extractor.ts +0 -0
  418. package/templates/src/utils/etl/index.ts +0 -0
  419. package/templates/src/utils/etl/loader.ts +0 -0
  420. package/templates/src/utils/etl/transformer.ts +0 -0
  421. package/templates/src/utils/helpers.ts +1 -0
  422. package/templates/src/utils/layout.ts +6 -6
  423. package/templates/src/utils/profileStorage.ts +0 -0
  424. package/templates/src/utils/useInterval.ts +0 -0
  425. package/templates/tailwind.config.cjs +0 -0
  426. package/utils/create-resolver.ts +0 -0
  427. package/utils/inject-files.ts +17 -1
  428. package/utils/validate-config.ts +0 -0
package/LICENSE CHANGED
File without changes
package/README.md CHANGED
@@ -1,53 +1,51 @@
1
- # Tract Stack
1
+ # TractStack v2
2
2
 
3
- websites that adapt to the visitor
3
+ **Redeeming the web from boring experiences**
4
4
 
5
- by [At Risk Media](https://atriskmedia.com)
5
+ Free web press by [At Risk Media](https://atriskmedia.com)
6
6
 
7
- ## epistemic hypermedia server
7
+ ## Epistemic Hypermedia Server
8
8
 
9
- ...a new species of web 2.0: an outcome of hybrid speciation.
9
+ TractStack is a new species of web platform that makes it possible for millions of websites to adapt to each visitor instead of showing everyone the same thing. It's an **adaptive website builder** that creates fast, beautiful, SEO-ready, and accessible websites that respond intelligently to user behavior.
10
10
 
11
- The `tractstack-go` package provides a backend server for the `astro-tractstack` integration
11
+ Built on [Astro](https://astro.build/) with [HTMX](https://htmx.org/) and a [Golang](https://go.dev/) backend, TractStack uses SQLite by default with optional [Turso](https://app.turso.tech/) cloud database support.
12
12
 
13
- Tract Stack makes it easy for non-technical people to build and grow adaptive websites that are fast, beautiful, SEO-ready, and accessible.
13
+ ## Key Features
14
14
 
15
- Tract Stack is built on [Astro](https://astro.build/) with [HTMX](https://htmx.org/) and a [Golang](https://go.dev/) backend -- uses SQLite by default with optional [Turso](https://app.turso.tech/) cloud database
16
-
17
- ## Documentation
18
-
19
- Please visit [our docs](https://tractstack.org)
20
-
21
- For production deployment you'll need to prepare your server.
15
+ - **Adaptive Content**: Websites that dynamically respond to visitor behavior
16
+ - **Multi-tenant Architecture**: Host multiple sites from a single installation
17
+ - **Built-in CMS**: StoryKeep content management system
18
+ - **Real-time Updates**: Server-sent events and HTMX for dynamic interactions
19
+ - **Production Ready**: SSL certificates, nginx integration, systemd services
20
+ - **Zero Config Database**: Works out of the box with SQLite3
22
21
 
23
22
  ## Quick Install
24
23
 
25
- **One-line installer (recommended for Linux):**
24
+ ### One-Line Installer
26
25
 
27
26
  ```bash
28
- curl -fsSL https://install.tractstack.org | sh
27
+ curl -fsSL https://get.tractstack.com | bash
29
28
  ```
30
29
 
31
- This will automatically install both the Go backend and create a new Astro project with TractStack.
30
+ This automatically installs both the Go backend and creates a new Astro project with TractStack integration.
31
+
32
+ ### Installation Options
33
+
34
+ - `--quick` - Development setup in user directory (no sudo required)
35
+ - `--prod --domain=yourdomain.com` - Production single-tenant
36
+ - `--multi --domain=yourdomain.com` - Production multi-tenant hosting
37
+ - `--dedicated SITE_ID --domain=yourdomain.com` - Isolated dedicated instance
32
38
 
33
39
  ## Manual Installation
34
40
 
35
41
  **Prerequisites:**
36
42
 
37
- - Node.js 18
38
- - pnpm 9+ (recommended) or npm/yarn
39
- - Go 1.21+
43
+ - Node.js 20+
44
+ - pnpm (recommended) or npm
45
+ - Go 1.22+
40
46
  - Git
41
47
 
42
- ### Platform Support
43
-
44
- **Linux:** Full native support - follow the steps below exactly as written.
45
-
46
- **macOS:** Full native support - follow the steps below exactly as written. The installation works the same as Linux.
47
-
48
- ### Step 1: Install and run the Go backend
49
-
50
- **Linux/macOS:**
48
+ ### Step 1: Install Go Backend
51
49
 
52
50
  ```bash
53
51
  mkdir -p ~/t8k/src
@@ -57,14 +55,9 @@ cd tractstack-go
57
55
  echo "GO_BACKEND_PATH=$HOME/t8k/t8k-go-server/" > .env
58
56
  echo "GIN_MODE=release" >> .env
59
57
  go build -o tractstack-go ./cmd/tractstack-go
60
- ./tractstack-go
61
58
  ```
62
59
 
63
- The backend runs on port 8080 by default.
64
-
65
- ### Step 2: Create your Astro frontend
66
-
67
- **Linux/macOS:**
60
+ ### Step 2: Create Astro Frontend
68
61
 
69
62
  ```bash
70
63
  cd ~/t8k
@@ -73,104 +66,240 @@ cd my-tractstack
73
66
  pnpm add astro-tractstack@latest
74
67
  echo "PRIVATE_GO_BACKEND_PATH=$HOME/t8k/t8k-go-server/" > .env
75
68
  npx create-tractstack
69
+ ```
70
+
71
+ ### Step 3: Start Development
72
+
73
+ ```bash
74
+ # Terminal 1: Go backend
75
+ cd ~/t8k/src/tractstack-go
76
+ ./tractstack-go
77
+
78
+ # Terminal 2: Astro frontend
79
+ cd ~/t8k/src/my-tractstack
76
80
  pnpm dev
77
81
  ```
78
82
 
79
- ### Step 3: Activate your Story Keep
83
+ Visit https://127.0.0.1:4321 to access your site and activate your Story Keep (CMS).
80
84
 
81
- Visit https://127.0.0.1:4321 in your browser.
85
+ ## Installation Types
82
86
 
83
- TractStack works out of the box with local SQLite3 - no database setup required.
87
+ ### Development (Quick Install)
84
88
 
85
- **Optional:** You can choose to use [Turso](https://app.turso.tech/) cloud database:
89
+ - Local setup in `~/t8k/`
90
+ - No sudo required
91
+ - Perfect for development and testing
92
+ - SQLite database included
86
93
 
87
- 1. Create a database at [turso.tech](https://app.turso.tech/)
88
- 2. Get your database URL and auth token
89
- 3. Activate your database during site init
94
+ ### Production Single-Tenant
90
95
 
91
- ## Development Workflow
96
+ - System-wide installation at `/home/t8k/`
97
+ - SSL certificates via Let's Encrypt
98
+ - nginx reverse proxy
99
+ - systemd services for automatic startup
100
+ - PM2 process management
92
101
 
93
- 1. **Start the Go backend:**
102
+ ### Production Multi-Tenant
94
103
 
95
- ```bash
96
- cd ~/t8k/src/tractstack-go
97
- ./tractstack-go
98
- ```
104
+ - Same as single-tenant plus:
105
+ - Wildcard domain support (`*.yourdomain.com`)
106
+ - Tenant management at `/sandbox/register`
107
+ - Multiple isolated websites from one installation
99
108
 
100
- 2. **Start the Astro dev server:**
109
+ ### Dedicated Instance
101
110
 
102
- ```bash
103
- cd ~/t8k/src/my-tractstack
104
- pnpm dev
105
- ```
111
+ - Completely separate installation per site
112
+ - Own source code, binaries, and data
113
+ - Maximum isolation and customization
114
+ - Perfect for agencies managing multiple clients
106
115
 
107
- 3. **Access your site:**
108
- - Frontend: http://localhost:4321
109
- - StoryKeep (CMS): http://localhost:4321/storykeep
116
+ ## Project Structure
110
117
 
111
- ## Production Deployment
118
+ ```
119
+ ~/t8k/ # Development install
120
+ ├── src/
121
+ │ ├── tractstack-go/ # Go backend source
122
+ │ │ └── tractstack-go # Compiled binary
123
+ │ └── my-tractstack/ # Astro frontend
124
+ │ ├── src/
125
+ │ │ ├── components/ # Custom components
126
+ │ │ ├── pages/ # Astro pages
127
+ │ │ └── custom/ # Your customizations
128
+ │ └── astro.config.mjs
129
+ └── t8k-go-server/ # Backend data storage
130
+ ├── config/
131
+ │ ├── t8k/
132
+ │ │ └── tenants.json # Tenant registry
133
+ │ └── default/ # Default tenant config
134
+ │ ├── env.json # Core configuration
135
+ │ ├── brand.json # Site branding
136
+ │ ├── knownResources.json # Resource tracking
137
+ │ ├── tailwindWhitelist.json # CSS optimization
138
+ │ └── media/ # Media files
139
+ │ ├── images/
140
+ │ └── css/
141
+ ├── db/
142
+ │ └── default/
143
+ │ └── tractstack.db # SQLite database
144
+ └── log/
145
+ ├── system.log
146
+ ├── tenant.log
147
+ └── database.log
148
+ ```
112
149
 
113
- For production, you'll need:
150
+ ### Production Structure
114
151
 
115
- 1. **Deploy the Go backend** with proper environment variables
116
- 2. **Build and deploy the Astro frontend** with `pnpm build`
117
- 3. **Configure your database** connection
118
- 4. **Set up SSL/TLS** for your domain
152
+ Production installations live at `/home/t8k/` with the same structure plus:
119
153
 
120
- See our [deployment guide](https://tractstack.org/docs/deployment) for detailed instructions.
154
+ ```
155
+ /home/t8k/
156
+ ├── bin/
157
+ │ └── tractstack-go # Production binary
158
+ ├── etc/
159
+ │ ├── letsencrypt/ # SSL certificates
160
+ │ ├── pm2/ # PM2 configs
161
+ │ └── t8k-ports.conf # Port allocations
162
+ ├── scripts/
163
+ │ └── t8k-concierge.sh # Build automation
164
+ └── state/ # Build queue
165
+ ```
121
166
 
122
167
  ## Multi-Tenant Features
123
168
 
124
- TractStack supports multi-tenancy!
169
+ TractStack v2 includes powerful multi-tenant capabilities:
125
170
 
126
- ## Project Structure
171
+ - **Tenant Registration**: Self-service tenant creation at `/sandbox/register`
172
+ - **Domain Routing**: Automatic subdomain routing (`tenant.yourdomain.com`)
173
+ - **Isolated Data**: Each tenant has separate databases and media
174
+ - **Capacity Management**: Configurable tenant limits
175
+ - **Email Activation**: Automated tenant activation emails
176
+
177
+ ## SSL Certificate Management
178
+
179
+ ### Cloudflare DNS (Automated)
180
+
181
+ Create `/root/.secrets/certbot/cloudflare.ini`:
127
182
 
183
+ ```ini
184
+ dns_cloudflare_api_token = YOUR_API_TOKEN_HERE
128
185
  ```
129
- ## Project Structure
130
186
 
131
- Installs in ~/t8k and scopes to tenantId=`default` when ENABLE_MULTI_TENANT=false
187
+ Certificates are obtained automatically during installation.
188
+
189
+ ### Manual DNS Verification
190
+
191
+ Without Cloudflare, the installer guides you through manual DNS TXT record verification.
192
+
193
+ ## Service Management
132
194
 
133
- For multiple Tract Stack sites on a single server see our production install recipes.
195
+ ### Main Installation
134
196
 
197
+ ```bash
198
+ # Status
199
+ sudo systemctl status tractstack-go
200
+ sudo -u t8k pm2 status astro-main
201
+
202
+ # Restart
203
+ sudo systemctl restart tractstack-go
204
+ sudo -u t8k pm2 restart astro-main
205
+
206
+ # Logs
207
+ sudo journalctl -u tractstack-go -f
208
+ sudo -u t8k pm2 logs astro-main
135
209
  ```
136
210
 
137
- ~/t8k/
138
- ├── src/
139
- │ ├── tractstack-go/ # Go backend source
140
- ├── tractstack-go # Compiled binary
141
- └── ...
142
- └── my-tractstack/ # Astro frontend
143
- │ ├── src/
144
- │ │ ├── custom/ # Your custom components
145
- ├── pages/
146
- │ │ └── ...
147
- └── t8k-go-server/ # Backend data storage
148
- ├── config/
149
- │ ├── t8k/
150
- │ │ └── tenants.json # Source of truth
151
- │ └── default/ # Default tenant config
152
- │ └── env.json # Critical config
153
- │ └── brand.json # Personalization
154
- │ └── media/ # Tenant media files
155
- ├── db/
156
- │ └── default/
157
- │ └── tractstack.db # SQLite database
158
- └── log/
159
- ├── system.log
160
- ├── tenant.log
161
- ├── database.log
162
- └── ...
211
+ ### Dedicated Instances
212
+
213
+ ```bash
214
+ # Replace SITE_ID with your site identifier
215
+ sudo systemctl status tractstack-go@SITE_ID
216
+ sudo -u t8k pm2 status astro-SITE_ID
217
+ ```
218
+
219
+ ## Build System
163
220
 
221
+ The build concierge processes automated builds via CSV files in `/home/t8k/state/`:
222
+
223
+ ```csv
224
+ type=main,tenant=default,command=build
225
+ type=dedicated,site=SITE_ID,command=build
164
226
  ```
165
227
 
228
+ The system automatically:
229
+
230
+ 1. Pulls latest code from Git
231
+ 2. Builds Go backend and Astro frontend
232
+ 3. Extracts Tailwind CSS optimizations
233
+ 4. Restarts services
234
+ 5. Cleans up processed files
235
+
236
+ ## Database Options
237
+
238
+ ### SQLite (Default)
239
+
240
+ - Zero configuration required
241
+ - Perfect for most websites
242
+ - Automatic backups and maintenance
243
+ - Scales to hundreds of thousands of visitors
244
+
245
+ ### Turso Cloud Database
246
+
247
+ - Distributed SQLite with global replication
248
+ - Configure during site initialization
249
+ - Seamless scaling for high-traffic sites
250
+ - Built-in analytics and monitoring
251
+
252
+ ## Development Workflow
253
+
254
+ 1. **Edit Content**: Use StoryKeep CMS at `/storykeep`
255
+ 2. **Customize Design**: Modify components in `src/custom/`
256
+ 3. **Add Features**: Create CodeHooks for dynamic functionality
257
+ 4. **Test Changes**: Hot reloading with `pnpm dev`
258
+ 5. **Deploy**: Automated builds handle production updates
259
+
260
+ ## API Integration
261
+
262
+ TractStack provides RESTful APIs for:
263
+
264
+ - Content management
265
+ - User analytics
266
+ - Belief tracking (visitor preferences)
267
+ - Multi-tenant operations
268
+ - Media handling
269
+
270
+ ## Uninstalling
271
+
272
+ **For Production installations**, the uninstall script is located at `/home/t8k/scripts/`:
273
+
274
+ ```bash
275
+ sudo /home/t8k/scripts/t8k-uninstall.sh
166
276
  ```
167
277
 
168
- The Go backend stores data in `~/t8k/t8k-go-server/` by default (quick install).
278
+ **For Quick install (development)**, the script is in:
279
+
280
+ ```bash
281
+ sudo ~/t8k/src/tractstack-go/pkg/scripts/t8k-uninstall.sh
282
+ ```
169
283
 
170
- ## Queries?
284
+ ## Support & Documentation
171
285
 
172
- Reach out at hello -at- tractstack -dot- com
286
+ - **Documentation**: https://tractstack.org
287
+ - **GitHub Issues**: https://github.com/AtRiskMedia/tractstack-go/issues
288
+ - **Email Support**: hello@tractstack.com
289
+ - **Community**: Join discussions about adaptive web experiences
173
290
 
174
291
  ## License
175
292
 
176
- Functional Source License, Version 1.1, MIT Future License
293
+ **Functional Source License (FSL)** - Commercial use encouraged!
294
+
295
+ The only restriction is no re-selling TractStack as-a-service. Perfect for:
296
+
297
+ - Agency client projects
298
+ - Corporate websites
299
+ - Personal projects
300
+ - Open source contributions
301
+
302
+ ---
303
+
304
+ _TractStack v2 - Making the web adaptive, one site at a time_
305
+ _Made with ❤️ by [At Risk Media](https://atriskmedia.com)_
package/astro.d.ts CHANGED
File without changes
@@ -29,7 +29,7 @@ function detectPackageManager() {
29
29
  }
30
30
 
31
31
  // Parse existing .env file
32
- function parseExistingEnv() {
32
+ function getEnvState() {
33
33
  const defaults = {
34
34
  goBackend: 'http://localhost:8080',
35
35
  tenantId: 'default',
@@ -37,8 +37,15 @@ function parseExistingEnv() {
37
37
  enableMultiTenant: false,
38
38
  };
39
39
 
40
+ const found = {
41
+ goBackend: false,
42
+ tenantId: false,
43
+ goBackendPath: false,
44
+ enableMultiTenant: false,
45
+ };
46
+
40
47
  if (!existsSync('.env')) {
41
- return defaults;
48
+ return { envDefaults: defaults, envState: found };
42
49
  }
43
50
 
44
51
  try {
@@ -50,7 +57,6 @@ function parseExistingEnv() {
50
57
  if (line && !line.startsWith('#')) {
51
58
  const [key, ...valueParts] = line.split('=');
52
59
  if (key && valueParts.length > 0) {
53
- // Remove surrounding quotes and trim
54
60
  let value = valueParts.join('=').trim();
55
61
  if (
56
62
  (value.startsWith('"') && value.endsWith('"')) ||
@@ -64,17 +70,27 @@ function parseExistingEnv() {
64
70
  });
65
71
 
66
72
  return {
67
- goBackend: envVars.PUBLIC_GO_BACKEND || defaults.goBackend,
68
- tenantId: envVars.PUBLIC_TENANTID || defaults.tenantId,
69
- goBackendPath: envVars.PRIVATE_GO_BACKEND_PATH || defaults.goBackendPath,
70
- enableMultiTenant:
71
- envVars.ENABLE_MULTI_TENANT === 'true' || defaults.enableMultiTenant,
73
+ envDefaults: {
74
+ goBackend: envVars.PUBLIC_GO_BACKEND || defaults.goBackend,
75
+ tenantId: envVars.PUBLIC_TENANTID || defaults.tenantId,
76
+ goBackendPath:
77
+ envVars.PRIVATE_GO_BACKEND_PATH || defaults.goBackendPath,
78
+ enableMultiTenant:
79
+ envVars.PUBLIC_ENABLE_MULTI_TENANT === 'true' ||
80
+ defaults.enableMultiTenant,
81
+ },
82
+ envState: {
83
+ goBackend: !!envVars.PUBLIC_GO_BACKEND,
84
+ tenantId: !!envVars.PUBLIC_TENANTID,
85
+ goBackendPath: !!envVars.PRIVATE_GO_BACKEND_PATH,
86
+ enableMultiTenant: envVars.PUBLIC_ENABLE_MULTI_TENANT !== undefined,
87
+ },
72
88
  };
73
89
  } catch (error) {
74
90
  console.log(
75
91
  kleur.yellow('⚠️ Found .env file but could not parse it, using defaults')
76
92
  );
77
- return defaults;
93
+ return { envDefaults: defaults, envState: found };
78
94
  }
79
95
  }
80
96
 
@@ -140,7 +156,7 @@ ${kleur.bold('Examples:')}
140
156
  }
141
157
 
142
158
  // Parse existing .env values
143
- const envDefaults = parseExistingEnv();
159
+ const { envDefaults, envState } = getEnvState();
144
160
  const hasExistingEnv = existsSync('.env');
145
161
 
146
162
  if (hasExistingEnv) {
@@ -151,9 +167,11 @@ ${kleur.bold('Examples:')}
151
167
  );
152
168
  }
153
169
 
154
- // Prompt for configuration with existing values as defaults
155
- const responses = await prompts([
156
- {
170
+ // Build prompts array conditionally - only prompt for values not in .env
171
+ const promptQuestions = [];
172
+
173
+ if (!envState.goBackend) {
174
+ promptQuestions.push({
157
175
  type: 'text',
158
176
  name: 'goBackend',
159
177
  message: 'TractStack Go backend URL:',
@@ -166,21 +184,46 @@ ${kleur.bold('Examples:')}
166
184
  return 'Please enter a valid URL';
167
185
  }
168
186
  },
169
- },
170
- {
187
+ });
188
+ } else {
189
+ console.log(
190
+ kleur.green(`✓ Using Go backend URL: ${envDefaults.goBackend}`)
191
+ );
192
+ }
193
+
194
+ if (!envState.enableMultiTenant && !enableMultiTenant) {
195
+ promptQuestions.push({
171
196
  type: 'confirm',
172
197
  name: 'enableMultiTenant',
173
198
  message: 'Enable multi-tenant functionality?',
174
199
  initial: enableMultiTenant || envDefaults.enableMultiTenant,
175
- },
176
- {
177
- type: (prev, values) => (values.enableMultiTenant ? 'text' : null),
200
+ });
201
+ } else {
202
+ const willEnable = enableMultiTenant || envDefaults.enableMultiTenant;
203
+ console.log(
204
+ kleur.green(
205
+ `✓ Multi-tenant functionality: ${willEnable ? 'enabled' : 'disabled'}`
206
+ )
207
+ );
208
+ }
209
+
210
+ // Only prompt for tenantId if multi-tenant will be enabled and tenantId not in .env
211
+ const willEnableMultiTenant =
212
+ enableMultiTenant || envDefaults.enableMultiTenant;
213
+ if (willEnableMultiTenant && !envState.tenantId) {
214
+ promptQuestions.push({
215
+ type: 'text',
178
216
  name: 'tenantId',
179
217
  message: 'Tenant ID:',
180
218
  initial: envDefaults.tenantId,
181
219
  validate: (value) => value.length > 0 || 'Tenant ID is required',
182
- },
183
- {
220
+ });
221
+ } else if (willEnableMultiTenant) {
222
+ console.log(kleur.green(`✓ Using Tenant ID: ${envDefaults.tenantId}`));
223
+ }
224
+
225
+ if (!envState.goBackendPath) {
226
+ promptQuestions.push({
184
227
  type: 'text',
185
228
  name: 'goBackendPath',
186
229
  message: 'TractStack Go backend path:',
@@ -191,37 +234,59 @@ ${kleur.bold('Examples:')}
191
234
  }
192
235
  return true;
193
236
  },
194
- },
195
- {
196
- type: 'confirm',
197
- name: 'includeExamples',
198
- message:
199
- 'Include CodeHook examples? (custom components, collections route)',
200
- initial: includeExamples,
201
- },
202
- ]);
237
+ });
238
+ } else {
239
+ console.log(
240
+ kleur.green(`✓ Using Go backend path: ${envDefaults.goBackendPath}`)
241
+ );
242
+ }
203
243
 
204
- if (!responses.goBackend) {
205
- console.log(kleur.red('\n❌ Setup cancelled.'));
244
+ // Always ask about examples (not stored in .env)
245
+ promptQuestions.push({
246
+ type: 'confirm',
247
+ name: 'includeExamples',
248
+ message:
249
+ 'Include CodeHook examples? (custom components, collections route)',
250
+ initial: includeExamples,
251
+ });
252
+
253
+ // Run prompts only if there are questions
254
+ const responses =
255
+ promptQuestions.length > 0 ? await prompts(promptQuestions) : {};
256
+
257
+ // Merge responses with env defaults for final values
258
+ const finalResponses = {
259
+ goBackend: responses.goBackend || envDefaults.goBackend,
260
+ enableMultiTenant:
261
+ responses.enableMultiTenant === true || // explicit true from prompt
262
+ enableMultiTenant || // CLI flag --multi-tenant
263
+ envDefaults.enableMultiTenant === true, // existing .env value was "true"
264
+ tenantId: responses.tenantId || envDefaults.tenantId,
265
+ goBackendPath: responses.goBackendPath || envDefaults.goBackendPath,
266
+ includeExamples: responses.includeExamples ?? includeExamples,
267
+ };
268
+
269
+ if (!finalResponses.goBackend) {
270
+ console.log(kleur.red('\n✗ Setup cancelled.'));
206
271
  process.exit(1);
207
272
  }
208
273
 
209
274
  // Use existing tenantId if multi-tenant is disabled
210
- const finalTenantId = responses.enableMultiTenant
211
- ? responses.tenantId
275
+ const finalTenantId = finalResponses.enableMultiTenant
276
+ ? finalResponses.tenantId
212
277
  : envDefaults.tenantId;
213
278
 
214
279
  if (!finalTenantId) {
215
- console.log(kleur.red('\n Setup cancelled - Tenant ID is required.'));
280
+ console.log(kleur.red('\n Setup cancelled - Tenant ID is required.'));
216
281
  process.exit(1);
217
282
  }
218
283
 
219
284
  // Create .env file
220
285
  const envContent = `# TractStack Configuration
221
- PUBLIC_GO_BACKEND="${responses.goBackend}"
286
+ PUBLIC_GO_BACKEND="${finalResponses.goBackend}"
222
287
  PUBLIC_TENANTID="${finalTenantId}"
223
- PRIVATE_GO_BACKEND_PATH="${responses.goBackendPath.endsWith('/') ? responses.goBackendPath : responses.goBackendPath + '/'}"
224
- ${responses.enableMultiTenant ? 'ENABLE_MULTI_TENANT="true"' : ''}
288
+ PRIVATE_GO_BACKEND_PATH="${finalResponses.goBackendPath.endsWith('/') ? finalResponses.goBackendPath : finalResponses.goBackendPath + '/'}"
289
+ PUBLIC_ENABLE_MULTI_TENANT="${finalResponses.enableMultiTenant ? 'true' : 'false'}"
225
290
  `;
226
291
 
227
292
  try {
@@ -529,17 +594,10 @@ export default defineConfig({
529
594
  const runCommand =
530
595
  packageManager === 'pnpm' ? 'pnpm run' : `${packageManager} run`;
531
596
 
532
- console.log('\nNext steps:');
533
- console.log(kleur.cyan('1. Start your Go backend:'));
534
- console.log(' tractstack-go');
535
- console.log(kleur.cyan('2. Start your Astro development server:'));
536
- console.log(` ${runCommand} dev`);
537
-
538
597
  if (responses.enableMultiTenant) {
539
598
  console.log('\n' + kleur.bold('Multi-tenant features enabled:'));
540
599
  console.log(` • Tenant registration: ${kleur.cyan('/sandbox/register')}`);
541
600
  console.log(` • Subdomain routing middleware added`);
542
- console.log(` • Admin-only tenant management`);
543
601
  console.log(
544
602
  `\n${kleur.yellow('Note:')} Make sure your Go backend has ENABLE_MULTI_TENANT=true`
545
603
  );
@@ -553,7 +611,7 @@ export default defineConfig({
553
611
  console.log(` • Custom components and CodeHooks`);
554
612
  }
555
613
 
556
- console.log('\n📚 Documentation: https://tractstack.org/docs');
614
+ console.log('\n📚 Documentation: https://tractstack.org');
557
615
  }
558
616
 
559
617
  main().catch(console.error);
package/dist/index.js CHANGED
@@ -30,7 +30,15 @@ async function w(t, e, c) {
30
30
  dest: "env.example"
31
31
  },
32
32
  {
33
- src: t("../templates/.gitignore"),
33
+ src: t("../templates/prettierrc"),
34
+ dest: ".prettierrc"
35
+ },
36
+ {
37
+ src: t("../templates/prettierignore"),
38
+ dest: ".prettierignore"
39
+ },
40
+ {
41
+ src: t("../templates/gitignore"),
34
42
  dest: ".gitignore"
35
43
  },
36
44
  {
@@ -1499,6 +1507,14 @@ async function w(t, e, c) {
1499
1507
  src: t("../templates/brand/static.jpg"),
1500
1508
  dest: "public/static.jpg"
1501
1509
  },
1510
+ {
1511
+ src: t("../templates/brand/og.png"),
1512
+ dest: "public/brand/og.png"
1513
+ },
1514
+ {
1515
+ src: t("../templates/brand/oglogo.png"),
1516
+ dest: "public/brand/oglogo.png"
1517
+ },
1502
1518
  {
1503
1519
  src: t("../templates/brand/favicon.ico"),
1504
1520
  dest: "public/brand/favicon.ico"