@pylonsync/create-pylon 0.22.75 → 0.22.76

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 (594) hide show
  1. package/bin/create-pylon.js +24 -74
  2. package/package.json +1 -1
  3. package/skill/SKILL.md +7 -11
  4. package/templates/_root/README.md +2 -8
  5. package/templates/agency/AGENTS.md +17 -0
  6. package/templates/agency/app/globals.css +5 -1
  7. package/templates/agency/app/internal/components/page.tsx +248 -0
  8. package/templates/agency/app/internal/design/page.tsx +169 -0
  9. package/templates/agency/app/internal/layout.tsx +89 -0
  10. package/templates/agency/app/internal/sections.ts +26 -0
  11. package/templates/agency/app/internal/showcase.tsx +43 -0
  12. package/templates/agency/app/robots.ts +1 -1
  13. package/templates/agency/components/ui/button.tsx +22 -20
  14. package/templates/agency/components/ui/dialog.tsx +77 -64
  15. package/templates/agency/components/ui/input.tsx +5 -5
  16. package/templates/agency/components/ui/label.tsx +5 -3
  17. package/templates/agency/components/ui/select.tsx +81 -19
  18. package/templates/agency/components/ui/textarea.tsx +5 -3
  19. package/templates/agency/lib/utils.ts +4 -4
  20. package/templates/agency/package.json +3 -3
  21. package/templates/ai-chat/AGENTS.md +17 -0
  22. package/templates/ai-chat/app/globals.css +5 -1
  23. package/templates/ai-chat/app/internal/components/page.tsx +248 -0
  24. package/templates/ai-chat/app/internal/design/page.tsx +173 -0
  25. package/templates/ai-chat/app/internal/layout.tsx +89 -0
  26. package/templates/ai-chat/app/internal/sections.ts +26 -0
  27. package/templates/ai-chat/app/internal/showcase.tsx +43 -0
  28. package/templates/ai-chat/app/robots.ts +1 -1
  29. package/templates/ai-chat/components/ui/button.tsx +22 -20
  30. package/templates/ai-chat/components/ui/dialog.tsx +77 -64
  31. package/templates/ai-chat/components/ui/input.tsx +5 -5
  32. package/templates/ai-chat/components/ui/label.tsx +5 -3
  33. package/templates/ai-chat/components/ui/select.tsx +81 -19
  34. package/templates/ai-chat/components/ui/textarea.tsx +5 -3
  35. package/templates/ai-chat/lib/utils.ts +4 -4
  36. package/templates/ai-chat/package.json +4 -4
  37. package/templates/ai-studio/AGENTS.md +17 -0
  38. package/templates/ai-studio/app/globals.css +5 -1
  39. package/templates/ai-studio/app/internal/components/page.tsx +248 -0
  40. package/templates/ai-studio/app/internal/design/page.tsx +168 -0
  41. package/templates/ai-studio/app/internal/layout.tsx +89 -0
  42. package/templates/ai-studio/app/internal/sections.ts +26 -0
  43. package/templates/ai-studio/app/internal/showcase.tsx +43 -0
  44. package/templates/ai-studio/app/robots.ts +1 -1
  45. package/templates/ai-studio/components/ui/button.tsx +22 -20
  46. package/templates/ai-studio/components/ui/dialog.tsx +77 -64
  47. package/templates/ai-studio/components/ui/input.tsx +5 -5
  48. package/templates/ai-studio/components/ui/label.tsx +5 -3
  49. package/templates/ai-studio/components/ui/select.tsx +81 -19
  50. package/templates/ai-studio/components/ui/textarea.tsx +5 -3
  51. package/templates/ai-studio/lib/utils.ts +4 -4
  52. package/templates/ai-studio/package.json +4 -4
  53. package/templates/barebones/AGENTS.md +17 -0
  54. package/templates/barebones/README.md +6 -3
  55. package/templates/barebones/app/(app)/layout.tsx +16 -0
  56. package/templates/barebones/app/{page.tsx → (app)/page.tsx} +2 -2
  57. package/templates/barebones/app/error.tsx +1 -1
  58. package/templates/barebones/app/globals.css +9 -7
  59. package/templates/barebones/app/internal/components/page.tsx +248 -0
  60. package/templates/barebones/app/internal/design/page.tsx +165 -0
  61. package/templates/barebones/app/internal/layout.tsx +89 -0
  62. package/templates/barebones/app/internal/sections.ts +26 -0
  63. package/templates/barebones/app/internal/showcase.tsx +43 -0
  64. package/templates/barebones/app/layout.tsx +4 -6
  65. package/templates/barebones/app/not-found.tsx +2 -4
  66. package/templates/barebones/app/robots.ts +1 -1
  67. package/templates/barebones/components/ui/button.tsx +22 -20
  68. package/templates/barebones/components/ui/dialog.tsx +77 -64
  69. package/templates/barebones/components/ui/input.tsx +5 -5
  70. package/templates/barebones/components/ui/label.tsx +5 -3
  71. package/templates/barebones/components/ui/select.tsx +81 -19
  72. package/templates/barebones/components/ui/textarea.tsx +5 -3
  73. package/templates/barebones/lib/utils.ts +4 -4
  74. package/templates/barebones/package.json +3 -3
  75. package/templates/chat/AGENTS.md +17 -0
  76. package/templates/chat/app/globals.css +7 -5
  77. package/templates/chat/app/internal/components/page.tsx +248 -0
  78. package/templates/chat/app/internal/design/page.tsx +170 -0
  79. package/templates/chat/app/internal/layout.tsx +89 -0
  80. package/templates/chat/app/internal/sections.ts +26 -0
  81. package/templates/chat/app/internal/showcase.tsx +43 -0
  82. package/templates/chat/app/not-found.tsx +1 -3
  83. package/templates/chat/app/robots.ts +1 -1
  84. package/templates/chat/components/ui/button.tsx +22 -20
  85. package/templates/chat/components/ui/dialog.tsx +77 -64
  86. package/templates/chat/components/ui/input.tsx +5 -5
  87. package/templates/chat/components/ui/label.tsx +5 -3
  88. package/templates/chat/components/ui/select.tsx +81 -19
  89. package/templates/chat/components/ui/textarea.tsx +5 -3
  90. package/templates/chat/lib/utils.ts +4 -4
  91. package/templates/chat/package.json +4 -4
  92. package/templates/consumer/AGENTS.md +17 -0
  93. package/templates/consumer/app/globals.css +9 -7
  94. package/templates/consumer/app/internal/components/page.tsx +248 -0
  95. package/templates/consumer/app/internal/design/page.tsx +167 -0
  96. package/templates/consumer/app/internal/layout.tsx +89 -0
  97. package/templates/consumer/app/internal/sections.ts +26 -0
  98. package/templates/consumer/app/internal/showcase.tsx +43 -0
  99. package/templates/consumer/app/robots.ts +1 -1
  100. package/templates/consumer/components/ui/button.tsx +22 -20
  101. package/templates/consumer/components/ui/dialog.tsx +77 -64
  102. package/templates/consumer/components/ui/input.tsx +5 -5
  103. package/templates/consumer/components/ui/label.tsx +5 -3
  104. package/templates/consumer/components/ui/select.tsx +81 -19
  105. package/templates/consumer/components/ui/textarea.tsx +5 -3
  106. package/templates/consumer/lib/utils.ts +4 -4
  107. package/templates/consumer/package.json +4 -4
  108. package/templates/creator/AGENTS.md +17 -0
  109. package/templates/creator/app/globals.css +5 -1
  110. package/templates/creator/app/internal/components/page.tsx +248 -0
  111. package/templates/creator/app/internal/design/page.tsx +171 -0
  112. package/templates/creator/app/internal/layout.tsx +89 -0
  113. package/templates/creator/app/internal/sections.ts +26 -0
  114. package/templates/creator/app/internal/showcase.tsx +43 -0
  115. package/templates/creator/app/robots.ts +1 -1
  116. package/templates/creator/components/ui/button.tsx +22 -20
  117. package/templates/creator/components/ui/dialog.tsx +77 -64
  118. package/templates/creator/components/ui/input.tsx +5 -5
  119. package/templates/creator/components/ui/label.tsx +5 -3
  120. package/templates/creator/components/ui/select.tsx +81 -19
  121. package/templates/creator/components/ui/textarea.tsx +5 -3
  122. package/templates/creator/lib/utils.ts +4 -4
  123. package/templates/creator/package.json +4 -4
  124. package/templates/crm/AGENTS.md +17 -0
  125. package/templates/crm/README.md +3 -4
  126. package/templates/crm/app/deals/[id]/deal-view.tsx +9 -14
  127. package/templates/crm/app/globals.css +5 -2
  128. package/templates/crm/app/internal/components/page.tsx +282 -0
  129. package/templates/crm/app/internal/design/page.tsx +163 -0
  130. package/templates/crm/app/internal/layout.tsx +89 -0
  131. package/templates/crm/app/internal/sections.ts +27 -0
  132. package/templates/crm/app/internal/showcase.tsx +43 -0
  133. package/templates/crm/app/not-found.tsx +1 -3
  134. package/templates/crm/app/robots.ts +1 -1
  135. package/templates/crm/components/activity-timeline.tsx +6 -8
  136. package/templates/crm/components/app-shell.tsx +25 -26
  137. package/templates/crm/components/deal-dialog.tsx +15 -17
  138. package/templates/crm/components/record-dialog.tsx +10 -11
  139. package/templates/crm/components/ui/button.tsx +22 -20
  140. package/templates/crm/components/ui/dialog.tsx +77 -64
  141. package/templates/crm/components/ui/input.tsx +5 -5
  142. package/templates/crm/components/ui/label.tsx +5 -3
  143. package/templates/crm/components/ui/select.tsx +81 -19
  144. package/templates/crm/components/ui/sheet.tsx +64 -0
  145. package/templates/crm/components/ui/textarea.tsx +5 -3
  146. package/templates/crm/lib/utils.ts +4 -4
  147. package/templates/crm/package.json +4 -4
  148. package/templates/directory/AGENTS.md +17 -0
  149. package/templates/directory/app/globals.css +5 -1
  150. package/templates/directory/app/internal/components/page.tsx +248 -0
  151. package/templates/directory/app/internal/design/page.tsx +168 -0
  152. package/templates/directory/app/internal/layout.tsx +89 -0
  153. package/templates/directory/app/internal/sections.ts +26 -0
  154. package/templates/directory/app/internal/showcase.tsx +43 -0
  155. package/templates/directory/app/robots.ts +1 -1
  156. package/templates/directory/components/ui/button.tsx +22 -20
  157. package/templates/directory/components/ui/dialog.tsx +77 -64
  158. package/templates/directory/components/ui/input.tsx +5 -5
  159. package/templates/directory/components/ui/label.tsx +5 -3
  160. package/templates/directory/components/ui/select.tsx +81 -19
  161. package/templates/directory/components/ui/textarea.tsx +5 -3
  162. package/templates/directory/lib/utils.ts +4 -4
  163. package/templates/directory/package.json +4 -4
  164. package/templates/helpdesk/AGENTS.md +17 -0
  165. package/templates/helpdesk/README.md +1 -1
  166. package/templates/helpdesk/app/globals.css +5 -2
  167. package/templates/helpdesk/app/internal/components/page.tsx +282 -0
  168. package/templates/helpdesk/app/internal/design/page.tsx +163 -0
  169. package/templates/helpdesk/app/internal/layout.tsx +89 -0
  170. package/templates/helpdesk/app/internal/sections.ts +27 -0
  171. package/templates/helpdesk/app/internal/showcase.tsx +43 -0
  172. package/templates/helpdesk/app/not-found.tsx +1 -3
  173. package/templates/helpdesk/app/robots.ts +1 -1
  174. package/templates/helpdesk/app/tickets/[id]/ticket-view.tsx +22 -29
  175. package/templates/helpdesk/components/app-shell.tsx +25 -26
  176. package/templates/helpdesk/components/new-ticket-dialog.tsx +15 -17
  177. package/templates/helpdesk/components/record-dialog.tsx +10 -11
  178. package/templates/helpdesk/components/ui/button.tsx +22 -20
  179. package/templates/helpdesk/components/ui/dialog.tsx +77 -64
  180. package/templates/helpdesk/components/ui/input.tsx +5 -5
  181. package/templates/helpdesk/components/ui/label.tsx +5 -3
  182. package/templates/helpdesk/components/ui/select.tsx +81 -19
  183. package/templates/helpdesk/components/ui/sheet.tsx +64 -0
  184. package/templates/helpdesk/components/ui/textarea.tsx +5 -3
  185. package/templates/helpdesk/lib/utils.ts +4 -4
  186. package/templates/helpdesk/package.json +4 -4
  187. package/templates/imessage/AGENTS.md +17 -0
  188. package/templates/imessage/app/globals.css +4 -0
  189. package/templates/imessage/app/internal/components/page.tsx +248 -0
  190. package/templates/imessage/app/internal/design/page.tsx +163 -0
  191. package/templates/imessage/app/internal/layout.tsx +89 -0
  192. package/templates/imessage/app/internal/sections.ts +26 -0
  193. package/templates/imessage/app/internal/showcase.tsx +43 -0
  194. package/templates/imessage/components/ui/button.tsx +22 -20
  195. package/templates/imessage/components/ui/dialog.tsx +77 -64
  196. package/templates/imessage/components/ui/input.tsx +5 -5
  197. package/templates/imessage/components/ui/label.tsx +5 -3
  198. package/templates/imessage/components/ui/select.tsx +81 -19
  199. package/templates/imessage/components/ui/textarea.tsx +5 -3
  200. package/templates/imessage/lib/utils.ts +4 -4
  201. package/templates/imessage/package.json +4 -4
  202. package/templates/inventory/AGENTS.md +17 -0
  203. package/templates/inventory/README.md +1 -1
  204. package/templates/inventory/app/globals.css +5 -2
  205. package/templates/inventory/app/internal/components/page.tsx +282 -0
  206. package/templates/inventory/app/internal/design/page.tsx +163 -0
  207. package/templates/inventory/app/internal/layout.tsx +89 -0
  208. package/templates/inventory/app/internal/sections.ts +27 -0
  209. package/templates/inventory/app/internal/showcase.tsx +43 -0
  210. package/templates/inventory/app/not-found.tsx +1 -3
  211. package/templates/inventory/app/products/[id]/product-view.tsx +1 -3
  212. package/templates/inventory/app/robots.ts +1 -1
  213. package/templates/inventory/components/app-shell.tsx +25 -26
  214. package/templates/inventory/components/movement-dialog.tsx +15 -17
  215. package/templates/inventory/components/record-dialog.tsx +10 -11
  216. package/templates/inventory/components/ui/button.tsx +22 -20
  217. package/templates/inventory/components/ui/dialog.tsx +77 -64
  218. package/templates/inventory/components/ui/input.tsx +5 -5
  219. package/templates/inventory/components/ui/label.tsx +5 -3
  220. package/templates/inventory/components/ui/select.tsx +81 -19
  221. package/templates/inventory/components/ui/sheet.tsx +64 -0
  222. package/templates/inventory/components/ui/textarea.tsx +5 -3
  223. package/templates/inventory/lib/utils.ts +4 -4
  224. package/templates/inventory/package.json +4 -4
  225. package/templates/inventory/tests/components.test.tsx +27 -14
  226. package/templates/invoices/AGENTS.md +17 -0
  227. package/templates/invoices/README.md +1 -1
  228. package/templates/invoices/app/globals.css +5 -2
  229. package/templates/invoices/app/internal/components/page.tsx +282 -0
  230. package/templates/invoices/app/internal/design/page.tsx +163 -0
  231. package/templates/invoices/app/internal/layout.tsx +89 -0
  232. package/templates/invoices/app/internal/sections.ts +27 -0
  233. package/templates/invoices/app/internal/showcase.tsx +43 -0
  234. package/templates/invoices/app/invoices/[id]/invoice-view.tsx +20 -26
  235. package/templates/invoices/app/not-found.tsx +1 -3
  236. package/templates/invoices/app/robots.ts +1 -1
  237. package/templates/invoices/components/app-shell.tsx +25 -26
  238. package/templates/invoices/components/payment-dialog.tsx +6 -8
  239. package/templates/invoices/components/record-dialog.tsx +10 -11
  240. package/templates/invoices/components/ui/button.tsx +22 -20
  241. package/templates/invoices/components/ui/dialog.tsx +77 -64
  242. package/templates/invoices/components/ui/input.tsx +5 -5
  243. package/templates/invoices/components/ui/label.tsx +5 -3
  244. package/templates/invoices/components/ui/select.tsx +81 -19
  245. package/templates/invoices/components/ui/sheet.tsx +64 -0
  246. package/templates/invoices/components/ui/textarea.tsx +5 -3
  247. package/templates/invoices/lib/utils.ts +4 -4
  248. package/templates/invoices/package.json +4 -4
  249. package/templates/local-service/AGENTS.md +17 -0
  250. package/templates/local-service/app/globals.css +5 -1
  251. package/templates/local-service/app/internal/components/page.tsx +248 -0
  252. package/templates/local-service/app/internal/design/page.tsx +170 -0
  253. package/templates/local-service/app/internal/layout.tsx +89 -0
  254. package/templates/local-service/app/internal/sections.ts +26 -0
  255. package/templates/local-service/app/internal/showcase.tsx +43 -0
  256. package/templates/local-service/app/robots.ts +1 -1
  257. package/templates/local-service/components/ui/button.tsx +22 -20
  258. package/templates/local-service/components/ui/dialog.tsx +77 -64
  259. package/templates/local-service/components/ui/input.tsx +5 -5
  260. package/templates/local-service/components/ui/label.tsx +5 -3
  261. package/templates/local-service/components/ui/select.tsx +81 -19
  262. package/templates/local-service/components/ui/textarea.tsx +5 -3
  263. package/templates/local-service/lib/utils.ts +4 -4
  264. package/templates/local-service/package.json +4 -4
  265. package/templates/marketplace/AGENTS.md +17 -0
  266. package/templates/marketplace/README.md +8 -5
  267. package/templates/marketplace/app/(market)/layout.tsx +113 -0
  268. package/templates/marketplace/app/{listing → (market)/listing}/[id]/page.tsx +7 -7
  269. package/templates/marketplace/app/{me → (market)/me}/page.tsx +1 -1
  270. package/templates/marketplace/app/{not-found.tsx → (market)/not-found.tsx} +1 -3
  271. package/templates/marketplace/app/{page.tsx → (market)/page.tsx} +5 -5
  272. package/templates/marketplace/app/{sell → (market)/sell}/page.tsx +1 -1
  273. package/templates/marketplace/app/error.tsx +1 -3
  274. package/templates/marketplace/app/globals.css +4 -0
  275. package/templates/marketplace/app/internal/components/page.tsx +335 -0
  276. package/templates/marketplace/app/internal/design/page.tsx +158 -0
  277. package/templates/marketplace/app/internal/layout.tsx +89 -0
  278. package/templates/marketplace/app/internal/sections.ts +30 -0
  279. package/templates/marketplace/app/internal/showcase.tsx +43 -0
  280. package/templates/marketplace/app/layout.tsx +4 -100
  281. package/templates/marketplace/app/robots.ts +1 -1
  282. package/templates/marketplace/client/ListingCard.tsx +1 -1
  283. package/templates/marketplace/components/ui/button.tsx +22 -21
  284. package/templates/marketplace/components/ui/dialog.tsx +77 -64
  285. package/templates/marketplace/components/ui/input.tsx +5 -5
  286. package/templates/marketplace/components/ui/label.tsx +5 -4
  287. package/templates/marketplace/components/ui/select.tsx +101 -0
  288. package/templates/marketplace/components/ui/separator.tsx +5 -8
  289. package/templates/marketplace/components/ui/textarea.tsx +5 -3
  290. package/templates/marketplace/lib/utils.ts +4 -4
  291. package/templates/marketplace/package.json +3 -5
  292. package/templates/projects/AGENTS.md +17 -0
  293. package/templates/projects/README.md +1 -1
  294. package/templates/projects/app/globals.css +5 -2
  295. package/templates/projects/app/internal/components/page.tsx +282 -0
  296. package/templates/projects/app/internal/design/page.tsx +163 -0
  297. package/templates/projects/app/internal/layout.tsx +89 -0
  298. package/templates/projects/app/internal/sections.ts +27 -0
  299. package/templates/projects/app/internal/showcase.tsx +43 -0
  300. package/templates/projects/app/not-found.tsx +1 -3
  301. package/templates/projects/app/projects/[id]/project-view.tsx +9 -14
  302. package/templates/projects/app/robots.ts +1 -1
  303. package/templates/projects/components/app-shell.tsx +25 -26
  304. package/templates/projects/components/record-dialog.tsx +10 -11
  305. package/templates/projects/components/time-dialog.tsx +6 -8
  306. package/templates/projects/components/ui/button.tsx +22 -20
  307. package/templates/projects/components/ui/dialog.tsx +77 -64
  308. package/templates/projects/components/ui/input.tsx +5 -5
  309. package/templates/projects/components/ui/label.tsx +5 -3
  310. package/templates/projects/components/ui/select.tsx +81 -19
  311. package/templates/projects/components/ui/sheet.tsx +64 -0
  312. package/templates/projects/components/ui/textarea.tsx +5 -3
  313. package/templates/projects/lib/utils.ts +4 -4
  314. package/templates/projects/package.json +4 -4
  315. package/templates/restaurant/AGENTS.md +17 -0
  316. package/templates/restaurant/app/globals.css +5 -1
  317. package/templates/restaurant/app/internal/components/page.tsx +248 -0
  318. package/templates/restaurant/app/internal/design/page.tsx +168 -0
  319. package/templates/restaurant/app/internal/layout.tsx +89 -0
  320. package/templates/restaurant/app/internal/sections.ts +26 -0
  321. package/templates/restaurant/app/internal/showcase.tsx +43 -0
  322. package/templates/restaurant/app/robots.ts +1 -1
  323. package/templates/restaurant/components/ui/button.tsx +22 -20
  324. package/templates/restaurant/components/ui/dialog.tsx +77 -64
  325. package/templates/restaurant/components/ui/input.tsx +5 -5
  326. package/templates/restaurant/components/ui/label.tsx +5 -3
  327. package/templates/restaurant/components/ui/select.tsx +81 -19
  328. package/templates/restaurant/components/ui/textarea.tsx +5 -3
  329. package/templates/restaurant/lib/utils.ts +4 -4
  330. package/templates/restaurant/package.json +4 -4
  331. package/templates/saas/AGENTS.md +17 -0
  332. package/templates/saas/README.md +1 -1
  333. package/templates/saas/app/(marketing)/not-found.tsx +1 -3
  334. package/templates/saas/app/dashboard/board-client.tsx +32 -42
  335. package/templates/saas/app/globals.css +9 -7
  336. package/templates/saas/app/internal/components/page.tsx +282 -0
  337. package/templates/saas/app/internal/design/page.tsx +168 -0
  338. package/templates/saas/app/internal/layout.tsx +89 -0
  339. package/templates/saas/app/internal/sections.ts +27 -0
  340. package/templates/saas/app/internal/showcase.tsx +43 -0
  341. package/templates/saas/app/robots.ts +1 -1
  342. package/templates/saas/components/dashboard-shell.tsx +28 -21
  343. package/templates/saas/components/ui/button.tsx +22 -20
  344. package/templates/saas/components/ui/dialog.tsx +77 -64
  345. package/templates/saas/components/ui/input.tsx +5 -5
  346. package/templates/saas/components/ui/label.tsx +5 -3
  347. package/templates/saas/components/ui/select.tsx +81 -19
  348. package/templates/saas/components/ui/sheet.tsx +64 -0
  349. package/templates/saas/components/ui/textarea.tsx +5 -3
  350. package/templates/saas/lib/utils.ts +4 -4
  351. package/templates/saas/package.json +4 -4
  352. package/templates/shop/AGENTS.md +17 -0
  353. package/templates/shop/app/globals.css +5 -1
  354. package/templates/shop/app/internal/components/page.tsx +248 -0
  355. package/templates/shop/app/internal/design/page.tsx +173 -0
  356. package/templates/shop/app/internal/layout.tsx +89 -0
  357. package/templates/shop/app/internal/sections.ts +26 -0
  358. package/templates/shop/app/internal/showcase.tsx +43 -0
  359. package/templates/shop/app/robots.ts +1 -1
  360. package/templates/shop/components/ui/button.tsx +22 -20
  361. package/templates/shop/components/ui/dialog.tsx +77 -64
  362. package/templates/shop/components/ui/input.tsx +5 -5
  363. package/templates/shop/components/ui/label.tsx +5 -3
  364. package/templates/shop/components/ui/select.tsx +81 -19
  365. package/templates/shop/components/ui/textarea.tsx +5 -3
  366. package/templates/shop/lib/utils.ts +4 -4
  367. package/templates/shop/package.json +4 -4
  368. package/templates/todo/AGENTS.md +17 -0
  369. package/templates/todo/README.md +7 -4
  370. package/templates/todo/app/(app)/layout.tsx +16 -0
  371. package/templates/todo/app/{page.tsx → (app)/page.tsx} +2 -2
  372. package/templates/todo/app/error.tsx +1 -1
  373. package/templates/todo/app/globals.css +9 -7
  374. package/templates/todo/app/internal/components/page.tsx +248 -0
  375. package/templates/todo/app/internal/design/page.tsx +165 -0
  376. package/templates/todo/app/internal/layout.tsx +89 -0
  377. package/templates/todo/app/internal/sections.ts +26 -0
  378. package/templates/todo/app/internal/showcase.tsx +43 -0
  379. package/templates/todo/app/layout.tsx +5 -7
  380. package/templates/todo/app/not-found.tsx +2 -4
  381. package/templates/todo/app/robots.ts +1 -1
  382. package/templates/todo/components/ui/button.tsx +22 -20
  383. package/templates/todo/components/ui/dialog.tsx +77 -64
  384. package/templates/todo/components/ui/input.tsx +5 -5
  385. package/templates/todo/components/ui/label.tsx +5 -3
  386. package/templates/todo/components/ui/select.tsx +81 -19
  387. package/templates/todo/components/ui/textarea.tsx +5 -3
  388. package/templates/todo/lib/utils.ts +4 -4
  389. package/templates/todo/package.json +4 -4
  390. package/templates/waitlist/AGENTS.md +17 -0
  391. package/templates/waitlist/app/globals.css +5 -1
  392. package/templates/waitlist/app/internal/components/page.tsx +248 -0
  393. package/templates/waitlist/app/internal/design/page.tsx +173 -0
  394. package/templates/waitlist/app/internal/layout.tsx +89 -0
  395. package/templates/waitlist/app/internal/sections.ts +26 -0
  396. package/templates/waitlist/app/internal/showcase.tsx +43 -0
  397. package/templates/waitlist/app/robots.ts +1 -1
  398. package/templates/waitlist/components/ui/button.tsx +22 -20
  399. package/templates/waitlist/components/ui/dialog.tsx +77 -64
  400. package/templates/waitlist/components/ui/input.tsx +5 -5
  401. package/templates/waitlist/components/ui/label.tsx +5 -3
  402. package/templates/waitlist/components/ui/select.tsx +81 -19
  403. package/templates/waitlist/components/ui/textarea.tsx +5 -3
  404. package/templates/waitlist/lib/utils.ts +4 -4
  405. package/templates/waitlist/package.json +4 -4
  406. package/templates/agency/components.json +0 -20
  407. package/templates/ai-chat/components.json +0 -20
  408. package/templates/ai-studio/components.json +0 -20
  409. package/templates/backend/b2b/apps/api/functions/archiveProject.ts +0 -13
  410. package/templates/backend/b2b/apps/api/functions/createOrg.ts +0 -44
  411. package/templates/backend/b2b/apps/api/functions/createProject.ts +0 -22
  412. package/templates/backend/b2b/apps/api/functions/inviteMember.ts +0 -41
  413. package/templates/backend/b2b/apps/api/functions/myOrgs.ts +0 -37
  414. package/templates/backend/b2b/apps/api/functions/orgMembers.ts +0 -13
  415. package/templates/backend/b2b/apps/api/functions/orgProjects.ts +0 -15
  416. package/templates/backend/b2b/apps/api/functions/removeMember.ts +0 -25
  417. package/templates/backend/b2b/apps/api/functions/setMemberRole.ts +0 -33
  418. package/templates/backend/b2b/apps/api/package.json +0 -20
  419. package/templates/backend/b2b/apps/api/schema.ts +0 -182
  420. package/templates/backend/b2b/apps/api/tsconfig.json +0 -13
  421. package/templates/backend/barebones/apps/api/functions/createWidget.ts +0 -26
  422. package/templates/backend/barebones/apps/api/functions/listWidgets.ts +0 -19
  423. package/templates/backend/barebones/apps/api/package.json +0 -20
  424. package/templates/backend/barebones/apps/api/schema.ts +0 -64
  425. package/templates/backend/barebones/apps/api/tsconfig.json +0 -13
  426. package/templates/backend/chat/apps/api/functions/createRoom.ts +0 -32
  427. package/templates/backend/chat/apps/api/functions/listRooms.ts +0 -15
  428. package/templates/backend/chat/apps/api/functions/roomMessages.ts +0 -20
  429. package/templates/backend/chat/apps/api/functions/sendMessage.ts +0 -37
  430. package/templates/backend/chat/apps/api/package.json +0 -20
  431. package/templates/backend/chat/apps/api/schema.ts +0 -99
  432. package/templates/backend/chat/apps/api/tsconfig.json +0 -13
  433. package/templates/backend/todo/apps/api/functions/addTodo.ts +0 -31
  434. package/templates/backend/todo/apps/api/functions/deleteTodo.ts +0 -15
  435. package/templates/backend/todo/apps/api/functions/editTodo.ts +0 -17
  436. package/templates/backend/todo/apps/api/functions/listTodos.ts +0 -25
  437. package/templates/backend/todo/apps/api/functions/reorderTodo.ts +0 -15
  438. package/templates/backend/todo/apps/api/functions/toggleTodo.ts +0 -14
  439. package/templates/backend/todo/apps/api/package.json +0 -20
  440. package/templates/backend/todo/apps/api/schema.ts +0 -88
  441. package/templates/backend/todo/apps/api/tsconfig.json +0 -13
  442. package/templates/barebones/components.json +0 -20
  443. package/templates/chat/components.json +0 -20
  444. package/templates/consumer/components.json +0 -20
  445. package/templates/creator/components.json +0 -20
  446. package/templates/crm/components.json +0 -20
  447. package/templates/directory/components.json +0 -20
  448. package/templates/expo/barebones/apps/expo/App.tsx +0 -166
  449. package/templates/expo/barebones/apps/expo/app.json +0 -31
  450. package/templates/expo/barebones/apps/expo/babel.config.js +0 -6
  451. package/templates/expo/barebones/apps/expo/package.json +0 -31
  452. package/templates/expo/barebones/apps/expo/tsconfig.json +0 -16
  453. package/templates/expo/chat/apps/expo/App.tsx +0 -391
  454. package/templates/expo/chat/apps/expo/app.json +0 -25
  455. package/templates/expo/chat/apps/expo/babel.config.js +0 -6
  456. package/templates/expo/chat/apps/expo/package.json +0 -32
  457. package/templates/expo/chat/apps/expo/tsconfig.json +0 -16
  458. package/templates/expo/todo/apps/expo/App.tsx +0 -287
  459. package/templates/expo/todo/apps/expo/app.json +0 -25
  460. package/templates/expo/todo/apps/expo/babel.config.js +0 -6
  461. package/templates/expo/todo/apps/expo/package.json +0 -31
  462. package/templates/expo/todo/apps/expo/tsconfig.json +0 -16
  463. package/templates/helpdesk/components.json +0 -20
  464. package/templates/imessage/components.json +0 -20
  465. package/templates/inventory/components.json +0 -20
  466. package/templates/invoices/components.json +0 -20
  467. package/templates/ios/barebones/apps/ios/Package.swift +0 -34
  468. package/templates/ios/barebones/apps/ios/Sources/__APP_NAME_PASCAL__/ContentView.swift +0 -98
  469. package/templates/ios/barebones/apps/ios/Sources/__APP_NAME_PASCAL__/Models.swift +0 -17
  470. package/templates/ios/barebones/apps/ios/Sources/__APP_NAME_PASCAL__/__APP_NAME_PASCAL__App.swift +0 -34
  471. package/templates/ios/barebones/apps/ios/project.yml +0 -42
  472. package/templates/ios/chat/apps/ios/Package.swift +0 -24
  473. package/templates/ios/chat/apps/ios/Sources/__APP_NAME_PASCAL__/ChatRootView.swift +0 -116
  474. package/templates/ios/chat/apps/ios/Sources/__APP_NAME_PASCAL__/Models.swift +0 -26
  475. package/templates/ios/chat/apps/ios/Sources/__APP_NAME_PASCAL__/RoomView.swift +0 -136
  476. package/templates/ios/chat/apps/ios/Sources/__APP_NAME_PASCAL__/__APP_NAME_PASCAL__App.swift +0 -58
  477. package/templates/ios/chat/apps/ios/project.yml +0 -44
  478. package/templates/ios/todo/apps/ios/Package.swift +0 -23
  479. package/templates/ios/todo/apps/ios/Sources/__APP_NAME_PASCAL__/Models.swift +0 -18
  480. package/templates/ios/todo/apps/ios/Sources/__APP_NAME_PASCAL__/TodoListView.swift +0 -230
  481. package/templates/ios/todo/apps/ios/Sources/__APP_NAME_PASCAL__/__APP_NAME_PASCAL__App.swift +0 -28
  482. package/templates/ios/todo/apps/ios/project.yml +0 -32
  483. package/templates/local-service/components.json +0 -20
  484. package/templates/mac/b2b/apps/mac/Package.swift +0 -22
  485. package/templates/mac/b2b/apps/mac/Sources/__APP_NAME_PASCAL__/Models.swift +0 -15
  486. package/templates/mac/b2b/apps/mac/Sources/__APP_NAME_PASCAL__/OrgPickerView.swift +0 -178
  487. package/templates/mac/b2b/apps/mac/Sources/__APP_NAME_PASCAL__/__APP_NAME_PASCAL__App.swift +0 -30
  488. package/templates/mac/b2b/apps/mac/__APP_NAME_PASCAL__.entitlements +0 -13
  489. package/templates/mac/b2b/apps/mac/project.yml +0 -34
  490. package/templates/mac/barebones/apps/mac/Package.swift +0 -33
  491. package/templates/mac/barebones/apps/mac/Sources/__APP_NAME_PASCAL__/ContentView.swift +0 -104
  492. package/templates/mac/barebones/apps/mac/Sources/__APP_NAME_PASCAL__/Models.swift +0 -17
  493. package/templates/mac/barebones/apps/mac/Sources/__APP_NAME_PASCAL__/__APP_NAME_PASCAL__App.swift +0 -30
  494. package/templates/mac/barebones/apps/mac/__APP_NAME_PASCAL__.entitlements +0 -13
  495. package/templates/mac/barebones/apps/mac/project.yml +0 -34
  496. package/templates/mac/chat/apps/mac/Package.swift +0 -34
  497. package/templates/mac/chat/apps/mac/Sources/__APP_NAME_PASCAL__/ChatRootView.swift +0 -143
  498. package/templates/mac/chat/apps/mac/Sources/__APP_NAME_PASCAL__/Models.swift +0 -26
  499. package/templates/mac/chat/apps/mac/Sources/__APP_NAME_PASCAL__/RoomView.swift +0 -136
  500. package/templates/mac/chat/apps/mac/Sources/__APP_NAME_PASCAL__/__APP_NAME_PASCAL__App.swift +0 -58
  501. package/templates/mac/chat/apps/mac/__APP_NAME_PASCAL__.entitlements +0 -13
  502. package/templates/mac/chat/apps/mac/project.yml +0 -36
  503. package/templates/mac/consumer/apps/mac/Package.swift +0 -34
  504. package/templates/mac/consumer/apps/mac/Sources/__APP_NAME_PASCAL__/FeedView.swift +0 -199
  505. package/templates/mac/consumer/apps/mac/Sources/__APP_NAME_PASCAL__/Models.swift +0 -34
  506. package/templates/mac/consumer/apps/mac/Sources/__APP_NAME_PASCAL__/ProfileSetupView.swift +0 -68
  507. package/templates/mac/consumer/apps/mac/Sources/__APP_NAME_PASCAL__/RootView.swift +0 -40
  508. package/templates/mac/consumer/apps/mac/Sources/__APP_NAME_PASCAL__/__APP_NAME_PASCAL__App.swift +0 -59
  509. package/templates/mac/consumer/apps/mac/__APP_NAME_PASCAL__.entitlements +0 -13
  510. package/templates/mac/consumer/apps/mac/project.yml +0 -36
  511. package/templates/mac/todo/apps/mac/Package.swift +0 -33
  512. package/templates/mac/todo/apps/mac/Sources/__APP_NAME_PASCAL__/Models.swift +0 -19
  513. package/templates/mac/todo/apps/mac/Sources/__APP_NAME_PASCAL__/TodoListView.swift +0 -244
  514. package/templates/mac/todo/apps/mac/Sources/__APP_NAME_PASCAL__/__APP_NAME_PASCAL__App.swift +0 -30
  515. package/templates/mac/todo/apps/mac/__APP_NAME_PASCAL__.entitlements +0 -13
  516. package/templates/mac/todo/apps/mac/project.yml +0 -34
  517. package/templates/marketplace/components/ui/native-select.tsx +0 -62
  518. package/templates/marketplace/components.json +0 -20
  519. package/templates/projects/components.json +0 -20
  520. package/templates/restaurant/components.json +0 -20
  521. package/templates/saas/components.json +0 -20
  522. package/templates/shop/components.json +0 -20
  523. package/templates/todo/components.json +0 -20
  524. package/templates/ui/packages/ui/package.json +0 -26
  525. package/templates/ui/packages/ui/src/button.tsx +0 -44
  526. package/templates/ui/packages/ui/src/card.tsx +0 -39
  527. package/templates/ui/packages/ui/src/cn.ts +0 -12
  528. package/templates/ui/packages/ui/src/index.ts +0 -4
  529. package/templates/ui/packages/ui/src/input.tsx +0 -19
  530. package/templates/ui/packages/ui/tsconfig.json +0 -15
  531. package/templates/vite/todo/apps/web/index.html +0 -12
  532. package/templates/vite/todo/apps/web/package.json +0 -31
  533. package/templates/vite/todo/apps/web/src/App.tsx +0 -16
  534. package/templates/vite/todo/apps/web/src/components/TodoList.tsx +0 -281
  535. package/templates/vite/todo/apps/web/src/index.css +0 -14
  536. package/templates/vite/todo/apps/web/src/main.tsx +0 -20
  537. package/templates/vite/todo/apps/web/tsconfig.json +0 -24
  538. package/templates/vite/todo/apps/web/vite.config.ts +0 -41
  539. package/templates/waitlist/components.json +0 -20
  540. package/templates/web/b2b/apps/web/next-env.d.ts +0 -2
  541. package/templates/web/b2b/apps/web/next.config.ts +0 -24
  542. package/templates/web/b2b/apps/web/package.json +0 -27
  543. package/templates/web/b2b/apps/web/postcss.config.mjs +0 -3
  544. package/templates/web/b2b/apps/web/src/app/components/OrgPicker.tsx +0 -171
  545. package/templates/web/b2b/apps/web/src/app/globals.css +0 -6
  546. package/templates/web/b2b/apps/web/src/app/layout.tsx +0 -21
  547. package/templates/web/b2b/apps/web/src/app/page.tsx +0 -39
  548. package/templates/web/b2b/apps/web/src/lib/pylon.ts +0 -5
  549. package/templates/web/b2b/apps/web/tsconfig.json +0 -26
  550. package/templates/web/barebones/apps/web/next-env.d.ts +0 -2
  551. package/templates/web/barebones/apps/web/next.config.ts +0 -40
  552. package/templates/web/barebones/apps/web/package.json +0 -27
  553. package/templates/web/barebones/apps/web/postcss.config.mjs +0 -3
  554. package/templates/web/barebones/apps/web/src/app/components/WidgetList.tsx +0 -81
  555. package/templates/web/barebones/apps/web/src/app/globals.css +0 -6
  556. package/templates/web/barebones/apps/web/src/app/layout.tsx +0 -21
  557. package/templates/web/barebones/apps/web/src/app/page.tsx +0 -43
  558. package/templates/web/barebones/apps/web/src/lib/pylon.ts +0 -14
  559. package/templates/web/barebones/apps/web/tsconfig.json +0 -26
  560. package/templates/web/chat/apps/web/next-env.d.ts +0 -2
  561. package/templates/web/chat/apps/web/next.config.ts +0 -24
  562. package/templates/web/chat/apps/web/package.json +0 -27
  563. package/templates/web/chat/apps/web/postcss.config.mjs +0 -3
  564. package/templates/web/chat/apps/web/src/app/components/ChatRoom.tsx +0 -231
  565. package/templates/web/chat/apps/web/src/app/globals.css +0 -6
  566. package/templates/web/chat/apps/web/src/app/layout.tsx +0 -22
  567. package/templates/web/chat/apps/web/src/app/page.tsx +0 -12
  568. package/templates/web/chat/apps/web/src/app/providers.tsx +0 -25
  569. package/templates/web/chat/apps/web/src/lib/pylon.ts +0 -5
  570. package/templates/web/chat/apps/web/tsconfig.json +0 -26
  571. package/templates/web/consumer/apps/web/next-env.d.ts +0 -2
  572. package/templates/web/consumer/apps/web/next.config.ts +0 -24
  573. package/templates/web/consumer/apps/web/package.json +0 -27
  574. package/templates/web/consumer/apps/web/postcss.config.mjs +0 -3
  575. package/templates/web/consumer/apps/web/src/app/components/Feed.tsx +0 -315
  576. package/templates/web/consumer/apps/web/src/app/globals.css +0 -6
  577. package/templates/web/consumer/apps/web/src/app/layout.tsx +0 -22
  578. package/templates/web/consumer/apps/web/src/app/page.tsx +0 -21
  579. package/templates/web/consumer/apps/web/src/app/providers.tsx +0 -25
  580. package/templates/web/consumer/apps/web/src/lib/pylon.ts +0 -5
  581. package/templates/web/consumer/apps/web/tsconfig.json +0 -26
  582. package/templates/web/todo/apps/web/next-env.d.ts +0 -2
  583. package/templates/web/todo/apps/web/next.config.ts +0 -26
  584. package/templates/web/todo/apps/web/package.json +0 -30
  585. package/templates/web/todo/apps/web/postcss.config.mjs +0 -3
  586. package/templates/web/todo/apps/web/src/app/components/TodoList.tsx +0 -310
  587. package/templates/web/todo/apps/web/src/app/globals.css +0 -6
  588. package/templates/web/todo/apps/web/src/app/layout.tsx +0 -21
  589. package/templates/web/todo/apps/web/src/app/page.tsx +0 -36
  590. package/templates/web/todo/apps/web/src/lib/pylon.ts +0 -5
  591. package/templates/web/todo/apps/web/tsconfig.json +0 -26
  592. /package/templates/barebones/app/{items-client.tsx → (app)/items-client.tsx} +0 -0
  593. /package/templates/marketplace/{app/_components → components}/CategoryIcon.tsx +0 -0
  594. /package/templates/todo/app/{todo-app.tsx → (app)/todo-app.tsx} +0 -0
@@ -1,315 +0,0 @@
1
- "use client";
2
-
3
- import { useMemo, useState } from "react";
4
- import { db, callFn } from "@pylonsync/react";
5
- import { Button, Input, Card, CardHeader, CardContent } from "@__APP_NAME_KEBAB__/ui";
6
-
7
- type Post = {
8
- id: string;
9
- authorId: string;
10
- body: string;
11
- createdAt: string;
12
- };
13
-
14
- type Profile = {
15
- id: string;
16
- userId: string;
17
- handle: string;
18
- displayName: string;
19
- bio?: string | null;
20
- createdAt: string;
21
- };
22
-
23
- type Like = {
24
- id: string;
25
- postId: string;
26
- profileId: string;
27
- createdAt: string;
28
- };
29
-
30
- export function Feed() {
31
- // Three live subscriptions. The sync engine pushes diffs over
32
- // WebSocket so a new Post / Like from any other client renders
33
- // here within ~ms. Joining client-side keeps the schema simple
34
- // — for very large feeds, a server-side aggregated query is
35
- // cheaper, but the live story is more important to demonstrate.
36
- const { data: posts = [] } = db.useQuery<Post>("Post", {
37
- orderBy: { createdAt: "desc" },
38
- limit: 100,
39
- });
40
- const { data: profiles = [] } = db.useQuery<Profile>("Profile", {});
41
- const { data: likes = [] } = db.useQuery<Like>("Like", {});
42
- const { data: myProfileRows = [] } = db.useQuery<Profile>("Profile", {});
43
-
44
- const profilesById = useMemo(() => {
45
- const map = new Map<string, Profile>();
46
- for (const p of profiles) map.set(p.id, p);
47
- return map;
48
- }, [profiles]);
49
-
50
- const myProfile = useMemo(() => {
51
- // `myProfile` server-side filters by auth.userId; from the
52
- // client we don't have userId here without a separate auth
53
- // fetch, so we lean on the Profile policy: every Profile
54
- // row in the local store IS visible (public reads). To find
55
- // "ours" we'd want auth.userId; the scaffold uses a
56
- // localStorage-cached selection instead.
57
- if (typeof window === "undefined") return null;
58
- const id = window.localStorage.getItem("__APP_NAME_SNAKE___profile_id");
59
- if (!id) return null;
60
- return myProfileRows.find((p) => p.id === id) ?? null;
61
- }, [myProfileRows]);
62
-
63
- if (!myProfile) {
64
- return (
65
- <ProfileSetup
66
- existingHandles={profiles.map((p) => p.handle)}
67
- onSaved={(p) => {
68
- window.localStorage.setItem("__APP_NAME_SNAKE___profile_id", p.id);
69
- // Force re-render by reading from the live profiles array.
70
- }}
71
- />
72
- );
73
- }
74
-
75
- const items = posts.map((post) => {
76
- const author = profilesById.get(post.authorId) ?? null;
77
- const postLikes = likes.filter((l) => l.postId === post.id);
78
- const likedByMe = postLikes.some((l) => l.profileId === myProfile.id);
79
- return { post, author, likeCount: postLikes.length, likedByMe };
80
- });
81
-
82
- return <FeedView me={myProfile} items={items} />;
83
- }
84
-
85
- function FeedView({
86
- me,
87
- items,
88
- }: {
89
- me: Profile;
90
- items: Array<{
91
- post: Post;
92
- author: Profile | null;
93
- likeCount: number;
94
- likedByMe: boolean;
95
- }>;
96
- }) {
97
- const [body, setBody] = useState("");
98
- const [posting, setPosting] = useState(false);
99
-
100
- async function post() {
101
- const trimmed = body.trim();
102
- if (!trimmed) return;
103
- setBody("");
104
- setPosting(true);
105
- try {
106
- await callFn("createPost", { body: trimmed });
107
- } finally {
108
- setPosting(false);
109
- }
110
- }
111
-
112
- async function toggleLike(postId: string) {
113
- try {
114
- await callFn("toggleLike", { postId });
115
- } catch (e) {
116
- window.alert(`Like failed: ${String(e)}`);
117
- }
118
- }
119
-
120
- async function remove(postId: string) {
121
- try {
122
- await callFn("deletePost", { id: postId });
123
- } catch (e) {
124
- window.alert(`Delete failed: ${String(e)}`);
125
- }
126
- }
127
-
128
- return (
129
- <div className="space-y-6">
130
- <Card>
131
- <CardHeader>
132
- <div className="flex items-center justify-between">
133
- <div>
134
- <div className="text-sm font-medium">{me.displayName}</div>
135
- <div className="text-xs text-neutral-400 font-mono">
136
- @{me.handle}
137
- </div>
138
- </div>
139
- </div>
140
- </CardHeader>
141
- <CardContent>
142
- <form
143
- onSubmit={(e) => {
144
- e.preventDefault();
145
- post();
146
- }}
147
- className="space-y-2"
148
- >
149
- <textarea
150
- value={body}
151
- onChange={(e) => setBody(e.target.value)}
152
- placeholder={`What's on your mind, ${me.displayName.split(" ")[0]}?`}
153
- rows={3}
154
- maxLength={1000}
155
- disabled={posting}
156
- className="w-full rounded-md border border-neutral-300 dark:border-neutral-700 bg-white dark:bg-neutral-900 px-3 py-2 text-sm placeholder:text-neutral-400 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 resize-none"
157
- />
158
- <div className="flex items-center justify-between">
159
- <span className="text-xs text-neutral-400">
160
- {body.length}/1000
161
- </span>
162
- <Button
163
- type="submit"
164
- variant="primary"
165
- disabled={posting || !body.trim()}
166
- size="sm"
167
- >
168
- Post
169
- </Button>
170
- </div>
171
- </form>
172
- </CardContent>
173
- </Card>
174
-
175
- {items.length === 0 ? (
176
- <p className="text-sm text-neutral-500 text-center py-8">
177
- No posts yet. Be the first.
178
- </p>
179
- ) : (
180
- <ul className="space-y-3">
181
- {items.map(({ post, author, likeCount, likedByMe }) => (
182
- <li key={post.id}>
183
- <Card>
184
- <CardContent className="space-y-3">
185
- <div className="flex items-baseline justify-between">
186
- <div className="text-sm">
187
- <span className="font-medium">
188
- {author?.displayName ?? "Unknown"}
189
- </span>{" "}
190
- <span className="text-neutral-400 font-mono text-xs">
191
- @{author?.handle ?? "?"}
192
- </span>
193
- </div>
194
- <span className="text-xs text-neutral-400">
195
- {new Date(post.createdAt).toLocaleString(undefined, {
196
- month: "short",
197
- day: "numeric",
198
- hour: "numeric",
199
- minute: "2-digit",
200
- })}
201
- </span>
202
- </div>
203
- <p className="text-sm whitespace-pre-wrap break-words">
204
- {post.body}
205
- </p>
206
- <div className="flex items-center gap-2">
207
- <button
208
- onClick={() => toggleLike(post.id)}
209
- className={`text-xs font-mono px-2 py-1 rounded border transition-colors ${
210
- likedByMe
211
- ? "border-pink-300 dark:border-pink-700 text-pink-600 dark:text-pink-300 bg-pink-50 dark:bg-pink-950"
212
- : "border-neutral-200 dark:border-neutral-800 text-neutral-500 hover:bg-neutral-50 dark:hover:bg-neutral-900"
213
- }`}
214
- >
215
- {likedByMe ? "♥" : "♡"} {likeCount}
216
- </button>
217
- {author?.id === me.id && (
218
- <button
219
- onClick={() => remove(post.id)}
220
- className="text-xs text-neutral-400 hover:text-red-500"
221
- >
222
- Delete
223
- </button>
224
- )}
225
- </div>
226
- </CardContent>
227
- </Card>
228
- </li>
229
- ))}
230
- </ul>
231
- )}
232
- </div>
233
- );
234
- }
235
-
236
- function ProfileSetup({
237
- existingHandles,
238
- onSaved,
239
- }: {
240
- existingHandles: string[];
241
- onSaved: (p: Profile) => void;
242
- }) {
243
- const [handle, setHandle] = useState("");
244
- const [displayName, setDisplayName] = useState("");
245
- const [bio, setBio] = useState("");
246
- const [saving, setSaving] = useState(false);
247
- const [error, setError] = useState<string | null>(null);
248
-
249
- async function save(e: React.FormEvent) {
250
- e.preventDefault();
251
- setError(null);
252
- const lower = handle.toLowerCase();
253
- if (existingHandles.includes(lower)) {
254
- setError(`@${lower} is taken`);
255
- return;
256
- }
257
- setSaving(true);
258
- try {
259
- const profile = (await callFn("upsertProfile", {
260
- handle: lower,
261
- displayName,
262
- bio,
263
- })) as Profile;
264
- onSaved(profile);
265
- } catch (e) {
266
- setError(String(e));
267
- } finally {
268
- setSaving(false);
269
- }
270
- }
271
-
272
- return (
273
- <Card>
274
- <CardHeader>
275
- <h2 className="text-sm font-medium">Set up your profile</h2>
276
- </CardHeader>
277
- <CardContent>
278
- <form onSubmit={save} className="space-y-3">
279
- <div>
280
- <label className="text-xs text-neutral-500 block mb-1">Handle</label>
281
- <Input
282
- value={handle}
283
- onChange={(e) => setHandle(e.target.value.toLowerCase())}
284
- placeholder="lowercase letters, digits, underscore"
285
- pattern="[a-z0-9_]{2,20}"
286
- required
287
- />
288
- </div>
289
- <div>
290
- <label className="text-xs text-neutral-500 block mb-1">
291
- Display name
292
- </label>
293
- <Input
294
- value={displayName}
295
- onChange={(e) => setDisplayName(e.target.value)}
296
- required
297
- />
298
- </div>
299
- <div>
300
- <label className="text-xs text-neutral-500 block mb-1">Bio</label>
301
- <Input
302
- value={bio}
303
- onChange={(e) => setBio(e.target.value)}
304
- placeholder="(optional)"
305
- />
306
- </div>
307
- {error && <p className="text-xs text-red-500">{error}</p>}
308
- <Button type="submit" variant="primary" disabled={saving}>
309
- {saving ? "Saving…" : "Save"}
310
- </Button>
311
- </form>
312
- </CardContent>
313
- </Card>
314
- );
315
- }
@@ -1,6 +0,0 @@
1
- @import "tailwindcss";
2
- @source "../../../../packages/ui/src/**/*.{ts,tsx}";
3
-
4
- :root { color-scheme: light dark; }
5
- html, body { height: 100%; }
6
- body { font-family: ui-sans-serif, system-ui, -apple-system, sans-serif; }
@@ -1,22 +0,0 @@
1
- import type { Metadata } from "next";
2
- import "./globals.css";
3
- import { Providers } from "./providers";
4
-
5
- export const metadata: Metadata = {
6
- title: "__APP_NAME__",
7
- description: "Realtime social feed powered by Pylon",
8
- };
9
-
10
- export default function RootLayout({
11
- children,
12
- }: {
13
- children: React.ReactNode;
14
- }) {
15
- return (
16
- <html lang="en">
17
- <body className="antialiased min-h-screen bg-white dark:bg-neutral-950 text-neutral-900 dark:text-neutral-100">
18
- <Providers>{children}</Providers>
19
- </body>
20
- </html>
21
- );
22
- }
@@ -1,21 +0,0 @@
1
- import { Feed } from "./components/Feed";
2
-
3
- // Feed subscribes to Post / Profile / Like via db.useQuery — every
4
- // new post + every like from any other client re-renders without
5
- // a fetch. No server-side initial data; the sync engine hydrates
6
- // on first connect.
7
- export default function HomePage() {
8
- return (
9
- <main className="mx-auto max-w-2xl px-6 py-12 space-y-8">
10
- <header className="space-y-2">
11
- <h1 className="text-3xl font-semibold tracking-tight">__APP_NAME__</h1>
12
- <p className="text-sm text-neutral-500 dark:text-neutral-400">
13
- Public feed. Profile / Post / Like — wide-open reads, owner-only
14
- writes. Live updates via Pylon&apos;s sync engine.
15
- </p>
16
- </header>
17
-
18
- <Feed />
19
- </main>
20
- );
21
- }
@@ -1,25 +0,0 @@
1
- "use client";
2
-
3
- import { useEffect, useState } from "react";
4
- import { init } from "@pylonsync/react";
5
-
6
- /**
7
- * Boots the Pylon sync engine on first mount. Every `db.useQuery`
8
- * downstream renders against the same engine instance, so a single
9
- * top-level Providers wrapper is enough — no need to thread a client
10
- * through context.
11
- *
12
- * `baseUrl` is the same-origin Next path because next.config.ts
13
- * proxies /api/* to the Pylon binary on PYLON_TARGET. Browser →
14
- * same-origin → Next server → Pylon: no CORS, no extra DNS, the
15
- * cookie travels naturally.
16
- */
17
- export function Providers({ children }: { children: React.ReactNode }) {
18
- const [ready, setReady] = useState(false);
19
- useEffect(() => {
20
- init({ baseUrl: "", appName: "__APP_NAME_SNAKE__" });
21
- setReady(true);
22
- }, []);
23
- if (!ready) return null;
24
- return <>{children}</>;
25
- }
@@ -1,5 +0,0 @@
1
- import { createPylonServer } from "@pylonsync/next/server";
2
-
3
- export const pylon = createPylonServer({
4
- cookieName: "__APP_NAME_SNAKE___session",
5
- });
@@ -1,26 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2022",
4
- "lib": ["dom", "dom.iterable", "esnext"],
5
- "allowJs": true,
6
- "skipLibCheck": true,
7
- "strict": true,
8
- "noEmit": true,
9
- "esModuleInterop": true,
10
- "module": "esnext",
11
- "moduleResolution": "bundler",
12
- "resolveJsonModule": true,
13
- "isolatedModules": true,
14
- "jsx": "preserve",
15
- "incremental": true,
16
- "plugins": [{ "name": "next" }],
17
- "paths": { "@/*": ["./src/*"] }
18
- },
19
- "include": [
20
- "next-env.d.ts",
21
- "src/**/*.ts",
22
- "src/**/*.tsx",
23
- ".next/types/**/*.ts"
24
- ],
25
- "exclude": ["node_modules"]
26
- }
@@ -1,2 +0,0 @@
1
- /// <reference types="next" />
2
- /// <reference types="next/image-types/global" />
@@ -1,26 +0,0 @@
1
- import type { NextConfig } from "next";
2
-
3
- // Backend origin. In dev defaults to the `pylon dev` default port.
4
- // In production (Vercel etc.), set PYLON_TARGET on your project's env.
5
- // Matches the env var @pylonsync/next reads on the server side — keeping
6
- // them aligned means one env var sets the URL for both the rewrite and
7
- // the server-side fetch helpers.
8
- const PYLON_TARGET = process.env.PYLON_TARGET ?? "http://localhost:4321";
9
-
10
- const config: NextConfig = {
11
- transpilePackages: [
12
- "@__APP_NAME_KEBAB__/ui",
13
- "@pylonsync/sdk",
14
- "@pylonsync/react",
15
- "@pylonsync/next",
16
- "@pylonsync/functions",
17
- "@pylonsync/sync",
18
- ],
19
- async rewrites() {
20
- // /api/* → ${PYLON_TARGET}/api/* keeps the browser same-origin
21
- // (no CORS preflight, session cookie rides natively).
22
- return [{ source: "/api/:path*", destination: `${PYLON_TARGET}/api/:path*` }];
23
- },
24
- };
25
-
26
- export default config;
@@ -1,30 +0,0 @@
1
- {
2
- "name": "@__APP_NAME_KEBAB__/web",
3
- "version": "0.0.1",
4
- "private": true,
5
- "type": "module",
6
- "scripts": {
7
- "dev": "next dev --port 3000",
8
- "build": "next build",
9
- "start": "next start",
10
- "lint": "next lint"
11
- },
12
- "dependencies": {
13
- "@__APP_NAME_KEBAB__/ui": "__WORKSPACE_DEP__",
14
- "@pylonsync/next": "^__PYLON_VERSION__",
15
- "@dnd-kit/core": "^6.3.1",
16
- "@dnd-kit/sortable": "^10.0.0",
17
- "@dnd-kit/utilities": "^3.2.2",
18
- "next": "^16.0.0",
19
- "react": "^19.0.0",
20
- "react-dom": "^19.0.0"
21
- },
22
- "devDependencies": {
23
- "@types/node": "^20.0.0",
24
- "@types/react": "^19.0.0",
25
- "@types/react-dom": "^19.0.0",
26
- "@tailwindcss/postcss": "^4.0.0",
27
- "tailwindcss": "^4.0.0",
28
- "typescript": "^5.5.0"
29
- }
30
- }
@@ -1,3 +0,0 @@
1
- export default {
2
- plugins: { "@tailwindcss/postcss": {} },
3
- };