mesa-ai-cto 0.0.1 → 0.2.0

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 (961) hide show
  1. package/LICENSE +155 -155
  2. package/README.md +114 -34
  3. package/bin/mesa-ai-cto.mjs +9 -50
  4. package/dist/checks/cloud.js +73 -0
  5. package/dist/checks/editor.js +45 -0
  6. package/dist/checks/git.js +70 -0
  7. package/dist/checks/node.js +58 -0
  8. package/dist/checks/registry.js +23 -0
  9. package/dist/checks/types.js +43 -0
  10. package/dist/cli.js +91 -0
  11. package/dist/commands/doctor.js +27 -0
  12. package/dist/commands/init.js +268 -0
  13. package/dist/lib/args.js +37 -0
  14. package/dist/lib/exec.js +127 -0
  15. package/dist/lib/plan.js +123 -0
  16. package/dist/lib/progress.js +70 -0
  17. package/dist/lib/report.js +89 -0
  18. package/dist/lib/templates.js +54 -0
  19. package/dist/templates/tier-1-nextjs-mongodb/.env.example +70 -0
  20. package/dist/templates/tier-1-nextjs-mongodb/AGENTS.md +212 -0
  21. package/dist/templates/tier-1-nextjs-mongodb/CLAUDE.md +1 -0
  22. package/dist/templates/tier-1-nextjs-mongodb/INITIALIZE.md +217 -0
  23. package/dist/templates/tier-1-nextjs-mongodb/README.md +320 -0
  24. package/dist/templates/tier-1-nextjs-mongodb/components.json +25 -0
  25. package/dist/templates/tier-1-nextjs-mongodb/docs/ARCHITECTURE.md +102 -0
  26. package/dist/templates/tier-1-nextjs-mongodb/docs/CONVENTIONS.md +74 -0
  27. package/dist/templates/tier-1-nextjs-mongodb/docs/DATABASE.md +72 -0
  28. package/dist/templates/tier-1-nextjs-mongodb/docs/ENVIRONMENT.md +90 -0
  29. package/dist/templates/tier-1-nextjs-mongodb/docs/README.md +39 -0
  30. package/dist/templates/tier-1-nextjs-mongodb/docs/checklists/pre-build.md +151 -0
  31. package/dist/templates/tier-1-nextjs-mongodb/docs/checklists/pre-launch.md +227 -0
  32. package/dist/templates/tier-1-nextjs-mongodb/docs/checklists/security.md +279 -0
  33. package/dist/templates/tier-1-nextjs-mongodb/docs/guides/01-frontend.md +338 -0
  34. package/dist/templates/tier-1-nextjs-mongodb/docs/guides/02-ui.md +267 -0
  35. package/dist/templates/tier-1-nextjs-mongodb/docs/guides/03-database.md +360 -0
  36. package/dist/templates/tier-1-nextjs-mongodb/docs/guides/04-auth.md +415 -0
  37. package/dist/templates/tier-1-nextjs-mongodb/docs/guides/05-api.md +333 -0
  38. package/dist/templates/tier-1-nextjs-mongodb/docs/guides/06-files.md +331 -0
  39. package/dist/templates/tier-1-nextjs-mongodb/docs/guides/07-email.md +336 -0
  40. package/dist/templates/tier-1-nextjs-mongodb/docs/guides/12-observability.md +308 -0
  41. package/dist/templates/tier-1-nextjs-mongodb/docs/guides/13-integrations.md +324 -0
  42. package/dist/templates/tier-1-nextjs-mongodb/docs/guides/14-deployment.md +311 -0
  43. package/dist/templates/tier-1-nextjs-mongodb/eslint.config.mjs +68 -0
  44. package/dist/templates/tier-1-nextjs-mongodb/mesa.kit.json +34 -0
  45. package/dist/templates/tier-1-nextjs-mongodb/next.config.ts +24 -0
  46. package/dist/templates/tier-1-nextjs-mongodb/package.json +53 -0
  47. package/dist/templates/tier-1-nextjs-mongodb/postcss.config.mjs +7 -0
  48. package/dist/templates/tier-1-nextjs-mongodb/public/file.svg +1 -0
  49. package/dist/templates/tier-1-nextjs-mongodb/public/globe.svg +1 -0
  50. package/dist/templates/tier-1-nextjs-mongodb/public/next.svg +1 -0
  51. package/dist/templates/tier-1-nextjs-mongodb/public/vercel.svg +1 -0
  52. package/dist/templates/tier-1-nextjs-mongodb/public/window.svg +1 -0
  53. package/dist/templates/tier-1-nextjs-mongodb/src/app/(app)/admin/activity/page.tsx +28 -0
  54. package/dist/templates/tier-1-nextjs-mongodb/src/app/(app)/admin/analytics/page.tsx +28 -0
  55. package/dist/templates/tier-1-nextjs-mongodb/src/app/(app)/admin/dashboard/page.tsx +44 -0
  56. package/dist/templates/tier-1-nextjs-mongodb/src/app/(app)/admin/layout.tsx +18 -0
  57. package/dist/templates/tier-1-nextjs-mongodb/src/app/(app)/admin/reports/page.tsx +28 -0
  58. package/dist/templates/tier-1-nextjs-mongodb/src/app/(app)/admin/settings/page.tsx +16 -0
  59. package/dist/templates/tier-1-nextjs-mongodb/src/app/(app)/admin/users/page.tsx +40 -0
  60. package/dist/templates/tier-1-nextjs-mongodb/src/app/(app)/layout.tsx +20 -0
  61. package/dist/templates/tier-1-nextjs-mongodb/src/app/(app)/loading.tsx +10 -0
  62. package/dist/templates/tier-1-nextjs-mongodb/src/app/(auth)/admin/login/page.tsx +44 -0
  63. package/dist/templates/tier-1-nextjs-mongodb/src/app/(auth)/layout.tsx +33 -0
  64. package/dist/templates/tier-1-nextjs-mongodb/src/app/api/README.md +93 -0
  65. package/dist/templates/tier-1-nextjs-mongodb/src/app/api/_lib/api-response.ts +46 -0
  66. package/dist/templates/tier-1-nextjs-mongodb/src/app/api/_lib/backend.ts +86 -0
  67. package/dist/templates/tier-1-nextjs-mongodb/src/app/api/auth/session/route.ts +124 -0
  68. package/dist/templates/tier-1-nextjs-mongodb/src/app/api/health/route.ts +42 -0
  69. package/dist/templates/tier-1-nextjs-mongodb/src/app/api/proxy/[...path]/route.ts +80 -0
  70. package/dist/templates/tier-1-nextjs-mongodb/src/app/error.tsx +53 -0
  71. package/dist/templates/tier-1-nextjs-mongodb/src/app/favicon.ico +0 -0
  72. package/dist/templates/tier-1-nextjs-mongodb/src/app/globals.css +186 -0
  73. package/dist/templates/tier-1-nextjs-mongodb/src/app/layout.tsx +77 -0
  74. package/dist/templates/tier-1-nextjs-mongodb/src/app/not-found.tsx +27 -0
  75. package/dist/templates/tier-1-nextjs-mongodb/src/app/page.tsx +116 -0
  76. package/dist/templates/tier-1-nextjs-mongodb/src/components/layout/app-shell.tsx +50 -0
  77. package/dist/templates/tier-1-nextjs-mongodb/src/components/layout/app-sidebar.tsx +104 -0
  78. package/dist/templates/tier-1-nextjs-mongodb/src/components/layout/app-topbar.tsx +74 -0
  79. package/dist/templates/tier-1-nextjs-mongodb/src/components/layout/brand.tsx +91 -0
  80. package/dist/templates/tier-1-nextjs-mongodb/src/components/layout/nav-user.tsx +102 -0
  81. package/dist/templates/tier-1-nextjs-mongodb/src/components/layout/theme-toggle.tsx +54 -0
  82. package/dist/templates/tier-1-nextjs-mongodb/src/components/shared/auth-gate.tsx +55 -0
  83. package/dist/templates/tier-1-nextjs-mongodb/src/components/shared/backend-status.tsx +72 -0
  84. package/dist/templates/tier-1-nextjs-mongodb/src/components/shared/confirm-dialog.tsx +87 -0
  85. package/dist/templates/tier-1-nextjs-mongodb/src/components/shared/page-header.tsx +42 -0
  86. package/dist/templates/tier-1-nextjs-mongodb/src/components/shared/placeholder-panel.tsx +63 -0
  87. package/dist/templates/tier-1-nextjs-mongodb/src/components/shared/role-guard.tsx +41 -0
  88. package/dist/templates/tier-1-nextjs-mongodb/src/components/shared/section.tsx +47 -0
  89. package/dist/templates/tier-1-nextjs-mongodb/src/components/shared/stat-card.tsx +82 -0
  90. package/dist/templates/tier-1-nextjs-mongodb/src/components/shared/state-views.tsx +133 -0
  91. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/accordion.tsx +72 -0
  92. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/alert-dialog.tsx +187 -0
  93. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/alert.tsx +76 -0
  94. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/aspect-ratio.tsx +22 -0
  95. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/attachment.tsx +207 -0
  96. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/avatar.tsx +109 -0
  97. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/badge.tsx +52 -0
  98. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/breadcrumb.tsx +125 -0
  99. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/bubble.tsx +128 -0
  100. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/button-group.tsx +87 -0
  101. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/button.tsx +58 -0
  102. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/calendar.tsx +221 -0
  103. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/card.tsx +103 -0
  104. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/carousel.tsx +242 -0
  105. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/chart.tsx +373 -0
  106. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/checkbox.tsx +29 -0
  107. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/collapsible.tsx +21 -0
  108. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/combobox.tsx +297 -0
  109. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/command.tsx +196 -0
  110. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/context-menu.tsx +271 -0
  111. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/dialog.tsx +160 -0
  112. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/direction.tsx +6 -0
  113. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/drawer.tsx +228 -0
  114. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/dropdown-menu.tsx +268 -0
  115. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/empty.tsx +104 -0
  116. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/field.tsx +238 -0
  117. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/hover-card.tsx +51 -0
  118. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/input-group.tsx +158 -0
  119. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/input-otp.tsx +87 -0
  120. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/input.tsx +20 -0
  121. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/item.tsx +201 -0
  122. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/kbd.tsx +26 -0
  123. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/label.tsx +20 -0
  124. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/marker.tsx +71 -0
  125. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/menubar.tsx +280 -0
  126. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/message-scroller.tsx +131 -0
  127. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/message.tsx +92 -0
  128. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/native-select.tsx +61 -0
  129. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/navigation-menu.tsx +168 -0
  130. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/pagination.tsx +130 -0
  131. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/popover.tsx +90 -0
  132. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/progress.tsx +83 -0
  133. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/questionnaire.tsx +324 -0
  134. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/radio-group.tsx +38 -0
  135. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/resizable.tsx +50 -0
  136. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/scroll-area.tsx +55 -0
  137. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/select.tsx +201 -0
  138. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/separator.tsx +25 -0
  139. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/sheet.tsx +138 -0
  140. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/sidebar.tsx +723 -0
  141. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/skeleton.tsx +13 -0
  142. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/slider.tsx +52 -0
  143. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/spinner.tsx +10 -0
  144. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/switch.tsx +32 -0
  145. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/table.tsx +116 -0
  146. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/tabs.tsx +82 -0
  147. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/textarea.tsx +18 -0
  148. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/toast.tsx +234 -0
  149. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/toggle-group.tsx +89 -0
  150. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/toggle.tsx +45 -0
  151. package/dist/templates/tier-1-nextjs-mongodb/src/components/ui/tooltip.tsx +66 -0
  152. package/dist/templates/tier-1-nextjs-mongodb/src/features/auth/components/login-form.tsx +93 -0
  153. package/dist/templates/tier-1-nextjs-mongodb/src/features/auth/hooks/use-login.ts +68 -0
  154. package/dist/templates/tier-1-nextjs-mongodb/src/features/auth/index.ts +18 -0
  155. package/dist/templates/tier-1-nextjs-mongodb/src/features/auth/schemas.ts +37 -0
  156. package/dist/templates/tier-1-nextjs-mongodb/src/features/auth/services/auth.service.ts +26 -0
  157. package/dist/templates/tier-1-nextjs-mongodb/src/features/auth/types.ts +16 -0
  158. package/dist/templates/tier-1-nextjs-mongodb/src/features/dashboard/components/activity-feed.tsx +66 -0
  159. package/dist/templates/tier-1-nextjs-mongodb/src/features/dashboard/components/dashboard-stats.tsx +62 -0
  160. package/dist/templates/tier-1-nextjs-mongodb/src/features/dashboard/components/throughput-chart.tsx +88 -0
  161. package/dist/templates/tier-1-nextjs-mongodb/src/features/dashboard/index.ts +15 -0
  162. package/dist/templates/tier-1-nextjs-mongodb/src/features/settings/components/settings-tabs.tsx +97 -0
  163. package/dist/templates/tier-1-nextjs-mongodb/src/features/settings/index.ts +7 -0
  164. package/dist/templates/tier-1-nextjs-mongodb/src/features/users/components/users-table.tsx +190 -0
  165. package/dist/templates/tier-1-nextjs-mongodb/src/features/users/hooks/use-users.ts +133 -0
  166. package/dist/templates/tier-1-nextjs-mongodb/src/features/users/index.ts +22 -0
  167. package/dist/templates/tier-1-nextjs-mongodb/src/features/users/schemas.ts +23 -0
  168. package/dist/templates/tier-1-nextjs-mongodb/src/features/users/services/users.service.ts +37 -0
  169. package/dist/templates/tier-1-nextjs-mongodb/src/features/users/types.ts +19 -0
  170. package/dist/templates/tier-1-nextjs-mongodb/src/hooks/index.ts +20 -0
  171. package/dist/templates/tier-1-nextjs-mongodb/src/hooks/use-auth.ts +17 -0
  172. package/dist/templates/tier-1-nextjs-mongodb/src/hooks/use-copy-to-clipboard.ts +40 -0
  173. package/dist/templates/tier-1-nextjs-mongodb/src/hooks/use-debounce.ts +53 -0
  174. package/dist/templates/tier-1-nextjs-mongodb/src/hooks/use-disclosure.ts +24 -0
  175. package/dist/templates/tier-1-nextjs-mongodb/src/hooks/use-local-storage.ts +115 -0
  176. package/dist/templates/tier-1-nextjs-mongodb/src/hooks/use-media-query.ts +31 -0
  177. package/dist/templates/tier-1-nextjs-mongodb/src/hooks/use-mobile.ts +17 -0
  178. package/dist/templates/tier-1-nextjs-mongodb/src/hooks/use-mounted.ts +29 -0
  179. package/dist/templates/tier-1-nextjs-mongodb/src/hooks/use-table-params.ts +96 -0
  180. package/dist/templates/tier-1-nextjs-mongodb/src/lib/api/client.ts +210 -0
  181. package/dist/templates/tier-1-nextjs-mongodb/src/lib/api/endpoints.ts +45 -0
  182. package/dist/templates/tier-1-nextjs-mongodb/src/lib/api/http-error.ts +92 -0
  183. package/dist/templates/tier-1-nextjs-mongodb/src/lib/api/query-keys.ts +42 -0
  184. package/dist/templates/tier-1-nextjs-mongodb/src/lib/auth/auth-context.tsx +135 -0
  185. package/dist/templates/tier-1-nextjs-mongodb/src/lib/auth/preview-user.ts +24 -0
  186. package/dist/templates/tier-1-nextjs-mongodb/src/lib/auth/roles.ts +35 -0
  187. package/dist/templates/tier-1-nextjs-mongodb/src/lib/auth/token-store.ts +52 -0
  188. package/dist/templates/tier-1-nextjs-mongodb/src/lib/config/env.ts +143 -0
  189. package/dist/templates/tier-1-nextjs-mongodb/src/lib/config/navigation.ts +138 -0
  190. package/dist/templates/tier-1-nextjs-mongodb/src/lib/config/site.ts +24 -0
  191. package/dist/templates/tier-1-nextjs-mongodb/src/lib/constants.ts +71 -0
  192. package/dist/templates/tier-1-nextjs-mongodb/src/lib/db/README.md +72 -0
  193. package/dist/templates/tier-1-nextjs-mongodb/src/lib/db/mongodb/README.md +108 -0
  194. package/dist/templates/tier-1-nextjs-mongodb/src/lib/db/mongodb/connect.ts +63 -0
  195. package/dist/templates/tier-1-nextjs-mongodb/src/lib/db/mongodb/ids.ts +42 -0
  196. package/dist/templates/tier-1-nextjs-mongodb/src/lib/db/mongodb/repository.example.ts +164 -0
  197. package/dist/templates/tier-1-nextjs-mongodb/src/lib/format.ts +161 -0
  198. package/dist/templates/tier-1-nextjs-mongodb/src/lib/logger.ts +32 -0
  199. package/dist/templates/tier-1-nextjs-mongodb/src/lib/toast.ts +54 -0
  200. package/dist/templates/tier-1-nextjs-mongodb/src/lib/utils.ts +6 -0
  201. package/dist/templates/tier-1-nextjs-mongodb/src/providers/index.tsx +35 -0
  202. package/dist/templates/tier-1-nextjs-mongodb/src/providers/query-provider.tsx +66 -0
  203. package/dist/templates/tier-1-nextjs-mongodb/src/providers/theme-provider.tsx +33 -0
  204. package/dist/templates/tier-1-nextjs-mongodb/src/proxy.ts +61 -0
  205. package/dist/templates/tier-1-nextjs-mongodb/src/types/api.ts +73 -0
  206. package/dist/templates/tier-1-nextjs-mongodb/src/types/enums.ts +38 -0
  207. package/dist/templates/tier-1-nextjs-mongodb/src/types/index.ts +24 -0
  208. package/dist/templates/tier-1-nextjs-mongodb/src/types/models.ts +39 -0
  209. package/dist/templates/tier-1-nextjs-mongodb/tsconfig.json +49 -0
  210. package/dist/templates/tier-1-nextjs-supabase/.env.example +70 -0
  211. package/dist/templates/tier-1-nextjs-supabase/AGENTS.md +228 -0
  212. package/dist/templates/tier-1-nextjs-supabase/CLAUDE.md +1 -0
  213. package/dist/templates/tier-1-nextjs-supabase/INITIALIZE.md +221 -0
  214. package/dist/templates/tier-1-nextjs-supabase/README.md +320 -0
  215. package/dist/templates/tier-1-nextjs-supabase/components.json +25 -0
  216. package/dist/templates/tier-1-nextjs-supabase/docs/ARCHITECTURE.md +102 -0
  217. package/dist/templates/tier-1-nextjs-supabase/docs/CONVENTIONS.md +74 -0
  218. package/dist/templates/tier-1-nextjs-supabase/docs/DATABASE.md +72 -0
  219. package/dist/templates/tier-1-nextjs-supabase/docs/ENVIRONMENT.md +90 -0
  220. package/dist/templates/tier-1-nextjs-supabase/docs/README.md +39 -0
  221. package/dist/templates/tier-1-nextjs-supabase/docs/checklists/pre-build.md +146 -0
  222. package/dist/templates/tier-1-nextjs-supabase/docs/checklists/pre-launch.md +222 -0
  223. package/dist/templates/tier-1-nextjs-supabase/docs/checklists/security.md +249 -0
  224. package/dist/templates/tier-1-nextjs-supabase/docs/guides/01-frontend.md +321 -0
  225. package/dist/templates/tier-1-nextjs-supabase/docs/guides/02-ui.md +267 -0
  226. package/dist/templates/tier-1-nextjs-supabase/docs/guides/03-database.md +362 -0
  227. package/dist/templates/tier-1-nextjs-supabase/docs/guides/04-auth.md +365 -0
  228. package/dist/templates/tier-1-nextjs-supabase/docs/guides/05-api.md +329 -0
  229. package/dist/templates/tier-1-nextjs-supabase/docs/guides/06-files.md +314 -0
  230. package/dist/templates/tier-1-nextjs-supabase/docs/guides/07-email.md +320 -0
  231. package/dist/templates/tier-1-nextjs-supabase/docs/guides/12-observability.md +285 -0
  232. package/dist/templates/tier-1-nextjs-supabase/docs/guides/13-integrations.md +315 -0
  233. package/dist/templates/tier-1-nextjs-supabase/docs/guides/14-deployment.md +308 -0
  234. package/dist/templates/tier-1-nextjs-supabase/eslint.config.mjs +68 -0
  235. package/dist/templates/tier-1-nextjs-supabase/mesa.kit.json +37 -0
  236. package/dist/templates/tier-1-nextjs-supabase/next.config.ts +24 -0
  237. package/dist/templates/tier-1-nextjs-supabase/package.json +55 -0
  238. package/dist/templates/tier-1-nextjs-supabase/postcss.config.mjs +7 -0
  239. package/dist/templates/tier-1-nextjs-supabase/public/file.svg +1 -0
  240. package/dist/templates/tier-1-nextjs-supabase/public/globe.svg +1 -0
  241. package/dist/templates/tier-1-nextjs-supabase/public/next.svg +1 -0
  242. package/dist/templates/tier-1-nextjs-supabase/public/vercel.svg +1 -0
  243. package/dist/templates/tier-1-nextjs-supabase/public/window.svg +1 -0
  244. package/dist/templates/tier-1-nextjs-supabase/src/app/(app)/admin/activity/page.tsx +28 -0
  245. package/dist/templates/tier-1-nextjs-supabase/src/app/(app)/admin/analytics/page.tsx +28 -0
  246. package/dist/templates/tier-1-nextjs-supabase/src/app/(app)/admin/dashboard/page.tsx +44 -0
  247. package/dist/templates/tier-1-nextjs-supabase/src/app/(app)/admin/layout.tsx +18 -0
  248. package/dist/templates/tier-1-nextjs-supabase/src/app/(app)/admin/reports/page.tsx +28 -0
  249. package/dist/templates/tier-1-nextjs-supabase/src/app/(app)/admin/settings/page.tsx +16 -0
  250. package/dist/templates/tier-1-nextjs-supabase/src/app/(app)/admin/users/page.tsx +40 -0
  251. package/dist/templates/tier-1-nextjs-supabase/src/app/(app)/layout.tsx +20 -0
  252. package/dist/templates/tier-1-nextjs-supabase/src/app/(app)/loading.tsx +10 -0
  253. package/dist/templates/tier-1-nextjs-supabase/src/app/(auth)/admin/login/page.tsx +44 -0
  254. package/dist/templates/tier-1-nextjs-supabase/src/app/(auth)/layout.tsx +33 -0
  255. package/dist/templates/tier-1-nextjs-supabase/src/app/api/README.md +93 -0
  256. package/dist/templates/tier-1-nextjs-supabase/src/app/api/_lib/api-response.ts +46 -0
  257. package/dist/templates/tier-1-nextjs-supabase/src/app/api/_lib/backend.ts +86 -0
  258. package/dist/templates/tier-1-nextjs-supabase/src/app/api/auth/session/route.ts +124 -0
  259. package/dist/templates/tier-1-nextjs-supabase/src/app/api/health/route.ts +42 -0
  260. package/dist/templates/tier-1-nextjs-supabase/src/app/api/proxy/[...path]/route.ts +80 -0
  261. package/dist/templates/tier-1-nextjs-supabase/src/app/error.tsx +53 -0
  262. package/dist/templates/tier-1-nextjs-supabase/src/app/favicon.ico +0 -0
  263. package/dist/templates/tier-1-nextjs-supabase/src/app/globals.css +186 -0
  264. package/dist/templates/tier-1-nextjs-supabase/src/app/layout.tsx +77 -0
  265. package/dist/templates/tier-1-nextjs-supabase/src/app/not-found.tsx +27 -0
  266. package/dist/templates/tier-1-nextjs-supabase/src/app/page.tsx +116 -0
  267. package/dist/templates/tier-1-nextjs-supabase/src/components/layout/app-shell.tsx +50 -0
  268. package/dist/templates/tier-1-nextjs-supabase/src/components/layout/app-sidebar.tsx +104 -0
  269. package/dist/templates/tier-1-nextjs-supabase/src/components/layout/app-topbar.tsx +74 -0
  270. package/dist/templates/tier-1-nextjs-supabase/src/components/layout/brand.tsx +91 -0
  271. package/dist/templates/tier-1-nextjs-supabase/src/components/layout/nav-user.tsx +102 -0
  272. package/dist/templates/tier-1-nextjs-supabase/src/components/layout/theme-toggle.tsx +54 -0
  273. package/dist/templates/tier-1-nextjs-supabase/src/components/shared/auth-gate.tsx +55 -0
  274. package/dist/templates/tier-1-nextjs-supabase/src/components/shared/backend-status.tsx +72 -0
  275. package/dist/templates/tier-1-nextjs-supabase/src/components/shared/confirm-dialog.tsx +87 -0
  276. package/dist/templates/tier-1-nextjs-supabase/src/components/shared/page-header.tsx +42 -0
  277. package/dist/templates/tier-1-nextjs-supabase/src/components/shared/placeholder-panel.tsx +63 -0
  278. package/dist/templates/tier-1-nextjs-supabase/src/components/shared/role-guard.tsx +41 -0
  279. package/dist/templates/tier-1-nextjs-supabase/src/components/shared/section.tsx +47 -0
  280. package/dist/templates/tier-1-nextjs-supabase/src/components/shared/stat-card.tsx +82 -0
  281. package/dist/templates/tier-1-nextjs-supabase/src/components/shared/state-views.tsx +133 -0
  282. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/accordion.tsx +72 -0
  283. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/alert-dialog.tsx +187 -0
  284. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/alert.tsx +76 -0
  285. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/aspect-ratio.tsx +22 -0
  286. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/attachment.tsx +207 -0
  287. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/avatar.tsx +109 -0
  288. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/badge.tsx +52 -0
  289. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/breadcrumb.tsx +125 -0
  290. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/bubble.tsx +128 -0
  291. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/button-group.tsx +87 -0
  292. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/button.tsx +58 -0
  293. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/calendar.tsx +221 -0
  294. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/card.tsx +103 -0
  295. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/carousel.tsx +242 -0
  296. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/chart.tsx +373 -0
  297. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/checkbox.tsx +29 -0
  298. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/collapsible.tsx +21 -0
  299. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/combobox.tsx +297 -0
  300. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/command.tsx +196 -0
  301. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/context-menu.tsx +271 -0
  302. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/dialog.tsx +160 -0
  303. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/direction.tsx +6 -0
  304. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/drawer.tsx +228 -0
  305. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/dropdown-menu.tsx +268 -0
  306. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/empty.tsx +104 -0
  307. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/field.tsx +238 -0
  308. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/hover-card.tsx +51 -0
  309. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/input-group.tsx +158 -0
  310. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/input-otp.tsx +87 -0
  311. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/input.tsx +20 -0
  312. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/item.tsx +201 -0
  313. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/kbd.tsx +26 -0
  314. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/label.tsx +20 -0
  315. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/marker.tsx +71 -0
  316. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/menubar.tsx +280 -0
  317. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/message-scroller.tsx +131 -0
  318. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/message.tsx +92 -0
  319. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/native-select.tsx +61 -0
  320. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/navigation-menu.tsx +168 -0
  321. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/pagination.tsx +130 -0
  322. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/popover.tsx +90 -0
  323. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/progress.tsx +83 -0
  324. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/questionnaire.tsx +324 -0
  325. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/radio-group.tsx +38 -0
  326. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/resizable.tsx +50 -0
  327. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/scroll-area.tsx +55 -0
  328. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/select.tsx +201 -0
  329. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/separator.tsx +25 -0
  330. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/sheet.tsx +138 -0
  331. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/sidebar.tsx +723 -0
  332. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/skeleton.tsx +13 -0
  333. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/slider.tsx +52 -0
  334. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/spinner.tsx +10 -0
  335. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/switch.tsx +32 -0
  336. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/table.tsx +116 -0
  337. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/tabs.tsx +82 -0
  338. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/textarea.tsx +18 -0
  339. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/toast.tsx +234 -0
  340. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/toggle-group.tsx +89 -0
  341. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/toggle.tsx +45 -0
  342. package/dist/templates/tier-1-nextjs-supabase/src/components/ui/tooltip.tsx +66 -0
  343. package/dist/templates/tier-1-nextjs-supabase/src/features/auth/components/login-form.tsx +93 -0
  344. package/dist/templates/tier-1-nextjs-supabase/src/features/auth/hooks/use-login.ts +68 -0
  345. package/dist/templates/tier-1-nextjs-supabase/src/features/auth/index.ts +18 -0
  346. package/dist/templates/tier-1-nextjs-supabase/src/features/auth/schemas.ts +37 -0
  347. package/dist/templates/tier-1-nextjs-supabase/src/features/auth/services/auth.service.ts +26 -0
  348. package/dist/templates/tier-1-nextjs-supabase/src/features/auth/types.ts +16 -0
  349. package/dist/templates/tier-1-nextjs-supabase/src/features/dashboard/components/activity-feed.tsx +66 -0
  350. package/dist/templates/tier-1-nextjs-supabase/src/features/dashboard/components/dashboard-stats.tsx +62 -0
  351. package/dist/templates/tier-1-nextjs-supabase/src/features/dashboard/components/throughput-chart.tsx +88 -0
  352. package/dist/templates/tier-1-nextjs-supabase/src/features/dashboard/index.ts +15 -0
  353. package/dist/templates/tier-1-nextjs-supabase/src/features/settings/components/settings-tabs.tsx +97 -0
  354. package/dist/templates/tier-1-nextjs-supabase/src/features/settings/index.ts +7 -0
  355. package/dist/templates/tier-1-nextjs-supabase/src/features/users/components/users-table.tsx +190 -0
  356. package/dist/templates/tier-1-nextjs-supabase/src/features/users/hooks/use-users.ts +133 -0
  357. package/dist/templates/tier-1-nextjs-supabase/src/features/users/index.ts +22 -0
  358. package/dist/templates/tier-1-nextjs-supabase/src/features/users/schemas.ts +23 -0
  359. package/dist/templates/tier-1-nextjs-supabase/src/features/users/services/users.service.ts +37 -0
  360. package/dist/templates/tier-1-nextjs-supabase/src/features/users/types.ts +19 -0
  361. package/dist/templates/tier-1-nextjs-supabase/src/hooks/index.ts +20 -0
  362. package/dist/templates/tier-1-nextjs-supabase/src/hooks/use-auth.ts +17 -0
  363. package/dist/templates/tier-1-nextjs-supabase/src/hooks/use-copy-to-clipboard.ts +40 -0
  364. package/dist/templates/tier-1-nextjs-supabase/src/hooks/use-debounce.ts +53 -0
  365. package/dist/templates/tier-1-nextjs-supabase/src/hooks/use-disclosure.ts +24 -0
  366. package/dist/templates/tier-1-nextjs-supabase/src/hooks/use-local-storage.ts +115 -0
  367. package/dist/templates/tier-1-nextjs-supabase/src/hooks/use-media-query.ts +31 -0
  368. package/dist/templates/tier-1-nextjs-supabase/src/hooks/use-mobile.ts +17 -0
  369. package/dist/templates/tier-1-nextjs-supabase/src/hooks/use-mounted.ts +29 -0
  370. package/dist/templates/tier-1-nextjs-supabase/src/hooks/use-table-params.ts +96 -0
  371. package/dist/templates/tier-1-nextjs-supabase/src/lib/api/client.ts +210 -0
  372. package/dist/templates/tier-1-nextjs-supabase/src/lib/api/endpoints.ts +45 -0
  373. package/dist/templates/tier-1-nextjs-supabase/src/lib/api/http-error.ts +92 -0
  374. package/dist/templates/tier-1-nextjs-supabase/src/lib/api/query-keys.ts +42 -0
  375. package/dist/templates/tier-1-nextjs-supabase/src/lib/auth/auth-context.tsx +135 -0
  376. package/dist/templates/tier-1-nextjs-supabase/src/lib/auth/preview-user.ts +24 -0
  377. package/dist/templates/tier-1-nextjs-supabase/src/lib/auth/roles.ts +35 -0
  378. package/dist/templates/tier-1-nextjs-supabase/src/lib/auth/token-store.ts +52 -0
  379. package/dist/templates/tier-1-nextjs-supabase/src/lib/config/env.ts +143 -0
  380. package/dist/templates/tier-1-nextjs-supabase/src/lib/config/navigation.ts +138 -0
  381. package/dist/templates/tier-1-nextjs-supabase/src/lib/config/site.ts +24 -0
  382. package/dist/templates/tier-1-nextjs-supabase/src/lib/constants.ts +71 -0
  383. package/dist/templates/tier-1-nextjs-supabase/src/lib/db/README.md +72 -0
  384. package/dist/templates/tier-1-nextjs-supabase/src/lib/db/supabase/README.md +105 -0
  385. package/dist/templates/tier-1-nextjs-supabase/src/lib/db/supabase/admin.ts +67 -0
  386. package/dist/templates/tier-1-nextjs-supabase/src/lib/db/supabase/client.ts +28 -0
  387. package/dist/templates/tier-1-nextjs-supabase/src/lib/db/supabase/database.types.ts +28 -0
  388. package/dist/templates/tier-1-nextjs-supabase/src/lib/db/supabase/env.ts +25 -0
  389. package/dist/templates/tier-1-nextjs-supabase/src/lib/db/supabase/middleware.ts +54 -0
  390. package/dist/templates/tier-1-nextjs-supabase/src/lib/db/supabase/server.ts +70 -0
  391. package/dist/templates/tier-1-nextjs-supabase/src/lib/format.ts +161 -0
  392. package/dist/templates/tier-1-nextjs-supabase/src/lib/logger.ts +32 -0
  393. package/dist/templates/tier-1-nextjs-supabase/src/lib/toast.ts +54 -0
  394. package/dist/templates/tier-1-nextjs-supabase/src/lib/utils.ts +6 -0
  395. package/dist/templates/tier-1-nextjs-supabase/src/providers/index.tsx +35 -0
  396. package/dist/templates/tier-1-nextjs-supabase/src/providers/query-provider.tsx +66 -0
  397. package/dist/templates/tier-1-nextjs-supabase/src/providers/theme-provider.tsx +33 -0
  398. package/dist/templates/tier-1-nextjs-supabase/src/proxy.ts +61 -0
  399. package/dist/templates/tier-1-nextjs-supabase/src/types/api.ts +73 -0
  400. package/dist/templates/tier-1-nextjs-supabase/src/types/enums.ts +38 -0
  401. package/dist/templates/tier-1-nextjs-supabase/src/types/index.ts +24 -0
  402. package/dist/templates/tier-1-nextjs-supabase/src/types/models.ts +39 -0
  403. package/dist/templates/tier-1-nextjs-supabase/supabase/migrations/00000000000000_example_rls.sql.example +128 -0
  404. package/dist/templates/tier-1-nextjs-supabase/tsconfig.json +49 -0
  405. package/dist/templates/tier-2-express-postgres/README.md +29 -0
  406. package/dist/templates/tier-2-express-postgres/backend/.dockerignore +9 -0
  407. package/dist/templates/tier-2-express-postgres/backend/.editorconfig +9 -0
  408. package/dist/templates/tier-2-express-postgres/backend/.env.example +87 -0
  409. package/dist/templates/tier-2-express-postgres/backend/.gcloudignore +44 -0
  410. package/dist/templates/tier-2-express-postgres/backend/.github/workflows/ci.yml +36 -0
  411. package/dist/templates/tier-2-express-postgres/backend/.prettierrc +7 -0
  412. package/dist/templates/tier-2-express-postgres/backend/AGENTS.md +217 -0
  413. package/dist/templates/tier-2-express-postgres/backend/CLAUDE.md +1 -0
  414. package/dist/templates/tier-2-express-postgres/backend/Dockerfile +22 -0
  415. package/dist/templates/tier-2-express-postgres/backend/INITIALIZE.md +237 -0
  416. package/dist/templates/tier-2-express-postgres/backend/README.md +233 -0
  417. package/dist/templates/tier-2-express-postgres/backend/app.example.yaml +95 -0
  418. package/dist/templates/tier-2-express-postgres/backend/cloudbuild.yaml +237 -0
  419. package/dist/templates/tier-2-express-postgres/backend/dispatch.example.yaml +40 -0
  420. package/dist/templates/tier-2-express-postgres/backend/docker-compose.yml +21 -0
  421. package/dist/templates/tier-2-express-postgres/backend/docs/ARCHITECTURE.md +110 -0
  422. package/dist/templates/tier-2-express-postgres/backend/docs/CONVENTIONS.md +83 -0
  423. package/dist/templates/tier-2-express-postgres/backend/docs/DATABASE.md +98 -0
  424. package/dist/templates/tier-2-express-postgres/backend/docs/DEPLOY.md +257 -0
  425. package/dist/templates/tier-2-express-postgres/backend/docs/ENVIRONMENT.md +65 -0
  426. package/dist/templates/tier-2-express-postgres/backend/docs/README.md +35 -0
  427. package/dist/templates/tier-2-express-postgres/backend/docs/checklists/pre-build.md +138 -0
  428. package/dist/templates/tier-2-express-postgres/backend/docs/checklists/pre-launch.md +231 -0
  429. package/dist/templates/tier-2-express-postgres/backend/docs/checklists/security.md +268 -0
  430. package/dist/templates/tier-2-express-postgres/backend/docs/guides/03-database.md +337 -0
  431. package/dist/templates/tier-2-express-postgres/backend/docs/guides/04-auth.md +487 -0
  432. package/dist/templates/tier-2-express-postgres/backend/docs/guides/05-api.md +358 -0
  433. package/dist/templates/tier-2-express-postgres/backend/docs/guides/06-files.md +331 -0
  434. package/dist/templates/tier-2-express-postgres/backend/docs/guides/07-email.md +322 -0
  435. package/dist/templates/tier-2-express-postgres/backend/docs/guides/08-payments.md +346 -0
  436. package/dist/templates/tier-2-express-postgres/backend/docs/guides/10-jobs.md +327 -0
  437. package/dist/templates/tier-2-express-postgres/backend/docs/guides/12-observability.md +322 -0
  438. package/dist/templates/tier-2-express-postgres/backend/docs/guides/13-integrations.md +319 -0
  439. package/dist/templates/tier-2-express-postgres/backend/docs/guides/14-deployment.md +322 -0
  440. package/dist/templates/tier-2-express-postgres/backend/eslint.config.js +45 -0
  441. package/dist/templates/tier-2-express-postgres/backend/package-lock.json +8888 -0
  442. package/dist/templates/tier-2-express-postgres/backend/package.json +72 -0
  443. package/dist/templates/tier-2-express-postgres/backend/prisma/migrations/.gitkeep +0 -0
  444. package/dist/templates/tier-2-express-postgres/backend/prisma/migrations/20260819120000_init/migration.sql +47 -0
  445. package/dist/templates/tier-2-express-postgres/backend/prisma/schema.prisma +100 -0
  446. package/dist/templates/tier-2-express-postgres/backend/prisma.config.ts +32 -0
  447. package/dist/templates/tier-2-express-postgres/backend/scripts/deploy.sh +194 -0
  448. package/dist/templates/tier-2-express-postgres/backend/scripts/init-test-db.sql +3 -0
  449. package/dist/templates/tier-2-express-postgres/backend/src/core/audit/index.ts +35 -0
  450. package/dist/templates/tier-2-express-postgres/backend/src/core/auth/basic-auth.ts +56 -0
  451. package/dist/templates/tier-2-express-postgres/backend/src/core/auth/index.ts +4 -0
  452. package/dist/templates/tier-2-express-postgres/backend/src/core/auth/jwt.ts +79 -0
  453. package/dist/templates/tier-2-express-postgres/backend/src/core/auth/password.ts +28 -0
  454. package/dist/templates/tier-2-express-postgres/backend/src/core/auth/rbac.ts +66 -0
  455. package/dist/templates/tier-2-express-postgres/backend/src/core/config/index.ts +121 -0
  456. package/dist/templates/tier-2-express-postgres/backend/src/core/db/connection-string.ts +52 -0
  457. package/dist/templates/tier-2-express-postgres/backend/src/core/db/connection-string.unit.test.ts +45 -0
  458. package/dist/templates/tier-2-express-postgres/backend/src/core/db/enums.ts +6 -0
  459. package/dist/templates/tier-2-express-postgres/backend/src/core/db/index.ts +74 -0
  460. package/dist/templates/tier-2-express-postgres/backend/src/core/db/pagination.ts +62 -0
  461. package/dist/templates/tier-2-express-postgres/backend/src/core/db/types.ts +32 -0
  462. package/dist/templates/tier-2-express-postgres/backend/src/core/docs/index.ts +146 -0
  463. package/dist/templates/tier-2-express-postgres/backend/src/core/docs/registry.ts +54 -0
  464. package/dist/templates/tier-2-express-postgres/backend/src/core/errors/index.ts +115 -0
  465. package/dist/templates/tier-2-express-postgres/backend/src/core/http/app.ts +119 -0
  466. package/dist/templates/tier-2-express-postgres/backend/src/core/http/express.d.ts +16 -0
  467. package/dist/templates/tier-2-express-postgres/backend/src/core/http/landing.ts +458 -0
  468. package/dist/templates/tier-2-express-postgres/backend/src/core/http/middleware/error-handler.ts +52 -0
  469. package/dist/templates/tier-2-express-postgres/backend/src/core/http/middleware/index.ts +5 -0
  470. package/dist/templates/tier-2-express-postgres/backend/src/core/http/middleware/not-found.ts +7 -0
  471. package/dist/templates/tier-2-express-postgres/backend/src/core/http/middleware/rate-limit.ts +24 -0
  472. package/dist/templates/tier-2-express-postgres/backend/src/core/http/middleware/request-id.ts +16 -0
  473. package/dist/templates/tier-2-express-postgres/backend/src/core/http/response.ts +31 -0
  474. package/dist/templates/tier-2-express-postgres/backend/src/core/logging/index.ts +42 -0
  475. package/dist/templates/tier-2-express-postgres/backend/src/core/service.ts +49 -0
  476. package/dist/templates/tier-2-express-postgres/backend/src/core/storage/index.ts +23 -0
  477. package/dist/templates/tier-2-express-postgres/backend/src/core/storage/local.ts +51 -0
  478. package/dist/templates/tier-2-express-postgres/backend/src/index.ts +61 -0
  479. package/dist/templates/tier-2-express-postgres/backend/src/modules/README.md +42 -0
  480. package/dist/templates/tier-2-express-postgres/backend/src/modules/_template/README.md +19 -0
  481. package/dist/templates/tier-2-express-postgres/backend/src/modules/_template/_template.controller.ts +38 -0
  482. package/dist/templates/tier-2-express-postgres/backend/src/modules/_template/_template.docs.ts +35 -0
  483. package/dist/templates/tier-2-express-postgres/backend/src/modules/_template/_template.repository.ts +66 -0
  484. package/dist/templates/tier-2-express-postgres/backend/src/modules/_template/_template.routes.ts +21 -0
  485. package/dist/templates/tier-2-express-postgres/backend/src/modules/_template/_template.schema.ts +34 -0
  486. package/dist/templates/tier-2-express-postgres/backend/src/modules/_template/_template.service.ts +49 -0
  487. package/dist/templates/tier-2-express-postgres/backend/src/modules/_template/_template.test.ts +49 -0
  488. package/dist/templates/tier-2-express-postgres/backend/src/modules/_template/_template.types.ts +19 -0
  489. package/dist/templates/tier-2-express-postgres/backend/src/modules/router.ts +42 -0
  490. package/dist/templates/tier-2-express-postgres/backend/src/shared/api-response.ts +28 -0
  491. package/dist/templates/tier-2-express-postgres/backend/src/shared/pagination.ts +37 -0
  492. package/dist/templates/tier-2-express-postgres/backend/src/shared/roles.ts +36 -0
  493. package/dist/templates/tier-2-express-postgres/backend/src/shared/slices.ts +21 -0
  494. package/dist/templates/tier-2-express-postgres/backend/tests/helpers.ts +36 -0
  495. package/dist/templates/tier-2-express-postgres/backend/tests/setup.ts +61 -0
  496. package/dist/templates/tier-2-express-postgres/backend/tsconfig.json +22 -0
  497. package/dist/templates/tier-2-express-postgres/backend/tsconfig.test.json +9 -0
  498. package/dist/templates/tier-2-express-postgres/backend/vitest.config.ts +39 -0
  499. package/dist/templates/tier-2-express-postgres/frontend/.env.example +70 -0
  500. package/dist/templates/tier-2-express-postgres/frontend/AGENTS.md +217 -0
  501. package/dist/templates/tier-2-express-postgres/frontend/CLAUDE.md +1 -0
  502. package/dist/templates/tier-2-express-postgres/frontend/INITIALIZE.md +237 -0
  503. package/dist/templates/tier-2-express-postgres/frontend/README.md +320 -0
  504. package/dist/templates/tier-2-express-postgres/frontend/components.json +25 -0
  505. package/dist/templates/tier-2-express-postgres/frontend/docs/ARCHITECTURE.md +102 -0
  506. package/dist/templates/tier-2-express-postgres/frontend/docs/CONVENTIONS.md +74 -0
  507. package/dist/templates/tier-2-express-postgres/frontend/docs/DATABASE.md +72 -0
  508. package/dist/templates/tier-2-express-postgres/frontend/docs/ENVIRONMENT.md +90 -0
  509. package/dist/templates/tier-2-express-postgres/frontend/docs/README.md +39 -0
  510. package/dist/templates/tier-2-express-postgres/frontend/docs/checklists/pre-build.md +138 -0
  511. package/dist/templates/tier-2-express-postgres/frontend/docs/checklists/pre-launch.md +231 -0
  512. package/dist/templates/tier-2-express-postgres/frontend/docs/checklists/security.md +268 -0
  513. package/dist/templates/tier-2-express-postgres/frontend/docs/guides/01-frontend.md +323 -0
  514. package/dist/templates/tier-2-express-postgres/frontend/docs/guides/02-ui.md +284 -0
  515. package/dist/templates/tier-2-express-postgres/frontend/docs/guides/04-auth.md +487 -0
  516. package/dist/templates/tier-2-express-postgres/frontend/docs/guides/05-api.md +358 -0
  517. package/dist/templates/tier-2-express-postgres/frontend/docs/guides/06-files.md +331 -0
  518. package/dist/templates/tier-2-express-postgres/frontend/docs/guides/14-deployment.md +322 -0
  519. package/dist/templates/tier-2-express-postgres/frontend/eslint.config.mjs +68 -0
  520. package/dist/templates/tier-2-express-postgres/frontend/next.config.ts +24 -0
  521. package/dist/templates/tier-2-express-postgres/frontend/package-lock.json +11265 -0
  522. package/dist/templates/tier-2-express-postgres/frontend/package.json +52 -0
  523. package/dist/templates/tier-2-express-postgres/frontend/postcss.config.mjs +7 -0
  524. package/dist/templates/tier-2-express-postgres/frontend/public/file.svg +1 -0
  525. package/dist/templates/tier-2-express-postgres/frontend/public/globe.svg +1 -0
  526. package/dist/templates/tier-2-express-postgres/frontend/public/next.svg +1 -0
  527. package/dist/templates/tier-2-express-postgres/frontend/public/vercel.svg +1 -0
  528. package/dist/templates/tier-2-express-postgres/frontend/public/window.svg +1 -0
  529. package/dist/templates/tier-2-express-postgres/frontend/src/app/(app)/admin/activity/page.tsx +28 -0
  530. package/dist/templates/tier-2-express-postgres/frontend/src/app/(app)/admin/analytics/page.tsx +28 -0
  531. package/dist/templates/tier-2-express-postgres/frontend/src/app/(app)/admin/dashboard/page.tsx +44 -0
  532. package/dist/templates/tier-2-express-postgres/frontend/src/app/(app)/admin/layout.tsx +18 -0
  533. package/dist/templates/tier-2-express-postgres/frontend/src/app/(app)/admin/reports/page.tsx +28 -0
  534. package/dist/templates/tier-2-express-postgres/frontend/src/app/(app)/admin/settings/page.tsx +16 -0
  535. package/dist/templates/tier-2-express-postgres/frontend/src/app/(app)/admin/users/page.tsx +40 -0
  536. package/dist/templates/tier-2-express-postgres/frontend/src/app/(app)/layout.tsx +20 -0
  537. package/dist/templates/tier-2-express-postgres/frontend/src/app/(app)/loading.tsx +10 -0
  538. package/dist/templates/tier-2-express-postgres/frontend/src/app/(auth)/admin/login/page.tsx +44 -0
  539. package/dist/templates/tier-2-express-postgres/frontend/src/app/(auth)/layout.tsx +33 -0
  540. package/dist/templates/tier-2-express-postgres/frontend/src/app/api/README.md +93 -0
  541. package/dist/templates/tier-2-express-postgres/frontend/src/app/api/_lib/api-response.ts +46 -0
  542. package/dist/templates/tier-2-express-postgres/frontend/src/app/api/_lib/backend.ts +86 -0
  543. package/dist/templates/tier-2-express-postgres/frontend/src/app/api/auth/session/route.ts +124 -0
  544. package/dist/templates/tier-2-express-postgres/frontend/src/app/api/health/route.ts +42 -0
  545. package/dist/templates/tier-2-express-postgres/frontend/src/app/api/proxy/[...path]/route.ts +80 -0
  546. package/dist/templates/tier-2-express-postgres/frontend/src/app/error.tsx +53 -0
  547. package/dist/templates/tier-2-express-postgres/frontend/src/app/favicon.ico +0 -0
  548. package/dist/templates/tier-2-express-postgres/frontend/src/app/globals.css +186 -0
  549. package/dist/templates/tier-2-express-postgres/frontend/src/app/layout.tsx +77 -0
  550. package/dist/templates/tier-2-express-postgres/frontend/src/app/not-found.tsx +27 -0
  551. package/dist/templates/tier-2-express-postgres/frontend/src/app/page.tsx +116 -0
  552. package/dist/templates/tier-2-express-postgres/frontend/src/components/layout/app-shell.tsx +50 -0
  553. package/dist/templates/tier-2-express-postgres/frontend/src/components/layout/app-sidebar.tsx +104 -0
  554. package/dist/templates/tier-2-express-postgres/frontend/src/components/layout/app-topbar.tsx +74 -0
  555. package/dist/templates/tier-2-express-postgres/frontend/src/components/layout/brand.tsx +91 -0
  556. package/dist/templates/tier-2-express-postgres/frontend/src/components/layout/nav-user.tsx +102 -0
  557. package/dist/templates/tier-2-express-postgres/frontend/src/components/layout/theme-toggle.tsx +54 -0
  558. package/dist/templates/tier-2-express-postgres/frontend/src/components/shared/auth-gate.tsx +55 -0
  559. package/dist/templates/tier-2-express-postgres/frontend/src/components/shared/backend-status.tsx +72 -0
  560. package/dist/templates/tier-2-express-postgres/frontend/src/components/shared/confirm-dialog.tsx +87 -0
  561. package/dist/templates/tier-2-express-postgres/frontend/src/components/shared/page-header.tsx +42 -0
  562. package/dist/templates/tier-2-express-postgres/frontend/src/components/shared/placeholder-panel.tsx +63 -0
  563. package/dist/templates/tier-2-express-postgres/frontend/src/components/shared/role-guard.tsx +41 -0
  564. package/dist/templates/tier-2-express-postgres/frontend/src/components/shared/section.tsx +47 -0
  565. package/dist/templates/tier-2-express-postgres/frontend/src/components/shared/stat-card.tsx +82 -0
  566. package/dist/templates/tier-2-express-postgres/frontend/src/components/shared/state-views.tsx +133 -0
  567. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/accordion.tsx +72 -0
  568. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/alert-dialog.tsx +187 -0
  569. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/alert.tsx +76 -0
  570. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/aspect-ratio.tsx +22 -0
  571. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/attachment.tsx +207 -0
  572. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/avatar.tsx +109 -0
  573. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/badge.tsx +52 -0
  574. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/breadcrumb.tsx +125 -0
  575. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/bubble.tsx +128 -0
  576. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/button-group.tsx +87 -0
  577. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/button.tsx +58 -0
  578. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/calendar.tsx +221 -0
  579. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/card.tsx +103 -0
  580. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/carousel.tsx +242 -0
  581. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/chart.tsx +373 -0
  582. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/checkbox.tsx +29 -0
  583. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/collapsible.tsx +21 -0
  584. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/combobox.tsx +297 -0
  585. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/command.tsx +196 -0
  586. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/context-menu.tsx +271 -0
  587. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/dialog.tsx +160 -0
  588. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/direction.tsx +6 -0
  589. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/drawer.tsx +228 -0
  590. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/dropdown-menu.tsx +268 -0
  591. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/empty.tsx +104 -0
  592. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/field.tsx +238 -0
  593. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/hover-card.tsx +51 -0
  594. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/input-group.tsx +158 -0
  595. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/input-otp.tsx +87 -0
  596. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/input.tsx +20 -0
  597. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/item.tsx +201 -0
  598. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/kbd.tsx +26 -0
  599. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/label.tsx +20 -0
  600. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/marker.tsx +71 -0
  601. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/menubar.tsx +280 -0
  602. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/message-scroller.tsx +131 -0
  603. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/message.tsx +92 -0
  604. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/native-select.tsx +61 -0
  605. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/navigation-menu.tsx +168 -0
  606. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/pagination.tsx +130 -0
  607. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/popover.tsx +90 -0
  608. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/progress.tsx +83 -0
  609. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/questionnaire.tsx +324 -0
  610. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/radio-group.tsx +38 -0
  611. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/resizable.tsx +50 -0
  612. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/scroll-area.tsx +55 -0
  613. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/select.tsx +201 -0
  614. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/separator.tsx +25 -0
  615. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/sheet.tsx +138 -0
  616. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/sidebar.tsx +723 -0
  617. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/skeleton.tsx +13 -0
  618. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/slider.tsx +52 -0
  619. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/spinner.tsx +10 -0
  620. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/switch.tsx +32 -0
  621. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/table.tsx +116 -0
  622. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/tabs.tsx +82 -0
  623. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/textarea.tsx +18 -0
  624. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/toast.tsx +234 -0
  625. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/toggle-group.tsx +89 -0
  626. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/toggle.tsx +45 -0
  627. package/dist/templates/tier-2-express-postgres/frontend/src/components/ui/tooltip.tsx +66 -0
  628. package/dist/templates/tier-2-express-postgres/frontend/src/features/auth/components/login-form.tsx +93 -0
  629. package/dist/templates/tier-2-express-postgres/frontend/src/features/auth/hooks/use-login.ts +68 -0
  630. package/dist/templates/tier-2-express-postgres/frontend/src/features/auth/index.ts +18 -0
  631. package/dist/templates/tier-2-express-postgres/frontend/src/features/auth/schemas.ts +37 -0
  632. package/dist/templates/tier-2-express-postgres/frontend/src/features/auth/services/auth.service.ts +26 -0
  633. package/dist/templates/tier-2-express-postgres/frontend/src/features/auth/types.ts +16 -0
  634. package/dist/templates/tier-2-express-postgres/frontend/src/features/dashboard/components/activity-feed.tsx +66 -0
  635. package/dist/templates/tier-2-express-postgres/frontend/src/features/dashboard/components/dashboard-stats.tsx +62 -0
  636. package/dist/templates/tier-2-express-postgres/frontend/src/features/dashboard/components/throughput-chart.tsx +88 -0
  637. package/dist/templates/tier-2-express-postgres/frontend/src/features/dashboard/index.ts +15 -0
  638. package/dist/templates/tier-2-express-postgres/frontend/src/features/settings/components/settings-tabs.tsx +97 -0
  639. package/dist/templates/tier-2-express-postgres/frontend/src/features/settings/index.ts +7 -0
  640. package/dist/templates/tier-2-express-postgres/frontend/src/features/users/components/users-table.tsx +190 -0
  641. package/dist/templates/tier-2-express-postgres/frontend/src/features/users/hooks/use-users.ts +133 -0
  642. package/dist/templates/tier-2-express-postgres/frontend/src/features/users/index.ts +22 -0
  643. package/dist/templates/tier-2-express-postgres/frontend/src/features/users/schemas.ts +23 -0
  644. package/dist/templates/tier-2-express-postgres/frontend/src/features/users/services/users.service.ts +37 -0
  645. package/dist/templates/tier-2-express-postgres/frontend/src/features/users/types.ts +19 -0
  646. package/dist/templates/tier-2-express-postgres/frontend/src/hooks/index.ts +20 -0
  647. package/dist/templates/tier-2-express-postgres/frontend/src/hooks/use-auth.ts +17 -0
  648. package/dist/templates/tier-2-express-postgres/frontend/src/hooks/use-copy-to-clipboard.ts +40 -0
  649. package/dist/templates/tier-2-express-postgres/frontend/src/hooks/use-debounce.ts +53 -0
  650. package/dist/templates/tier-2-express-postgres/frontend/src/hooks/use-disclosure.ts +24 -0
  651. package/dist/templates/tier-2-express-postgres/frontend/src/hooks/use-local-storage.ts +115 -0
  652. package/dist/templates/tier-2-express-postgres/frontend/src/hooks/use-media-query.ts +31 -0
  653. package/dist/templates/tier-2-express-postgres/frontend/src/hooks/use-mobile.ts +17 -0
  654. package/dist/templates/tier-2-express-postgres/frontend/src/hooks/use-mounted.ts +29 -0
  655. package/dist/templates/tier-2-express-postgres/frontend/src/hooks/use-table-params.ts +96 -0
  656. package/dist/templates/tier-2-express-postgres/frontend/src/lib/api/client.ts +210 -0
  657. package/dist/templates/tier-2-express-postgres/frontend/src/lib/api/endpoints.ts +45 -0
  658. package/dist/templates/tier-2-express-postgres/frontend/src/lib/api/http-error.ts +92 -0
  659. package/dist/templates/tier-2-express-postgres/frontend/src/lib/api/query-keys.ts +42 -0
  660. package/dist/templates/tier-2-express-postgres/frontend/src/lib/auth/auth-context.tsx +135 -0
  661. package/dist/templates/tier-2-express-postgres/frontend/src/lib/auth/preview-user.ts +24 -0
  662. package/dist/templates/tier-2-express-postgres/frontend/src/lib/auth/roles.ts +35 -0
  663. package/dist/templates/tier-2-express-postgres/frontend/src/lib/auth/token-store.ts +52 -0
  664. package/dist/templates/tier-2-express-postgres/frontend/src/lib/config/env.ts +143 -0
  665. package/dist/templates/tier-2-express-postgres/frontend/src/lib/config/navigation.ts +138 -0
  666. package/dist/templates/tier-2-express-postgres/frontend/src/lib/config/site.ts +24 -0
  667. package/dist/templates/tier-2-express-postgres/frontend/src/lib/constants.ts +71 -0
  668. package/dist/templates/tier-2-express-postgres/frontend/src/lib/format.ts +161 -0
  669. package/dist/templates/tier-2-express-postgres/frontend/src/lib/logger.ts +32 -0
  670. package/dist/templates/tier-2-express-postgres/frontend/src/lib/toast.ts +54 -0
  671. package/dist/templates/tier-2-express-postgres/frontend/src/lib/utils.ts +6 -0
  672. package/dist/templates/tier-2-express-postgres/frontend/src/providers/index.tsx +35 -0
  673. package/dist/templates/tier-2-express-postgres/frontend/src/providers/query-provider.tsx +66 -0
  674. package/dist/templates/tier-2-express-postgres/frontend/src/providers/theme-provider.tsx +33 -0
  675. package/dist/templates/tier-2-express-postgres/frontend/src/proxy.ts +61 -0
  676. package/dist/templates/tier-2-express-postgres/frontend/src/types/api.ts +73 -0
  677. package/dist/templates/tier-2-express-postgres/frontend/src/types/enums.ts +38 -0
  678. package/dist/templates/tier-2-express-postgres/frontend/src/types/index.ts +24 -0
  679. package/dist/templates/tier-2-express-postgres/frontend/src/types/models.ts +39 -0
  680. package/dist/templates/tier-2-express-postgres/frontend/tsconfig.json +49 -0
  681. package/dist/templates/tier-2-express-postgres/mesa.kit.json +33 -0
  682. package/dist/templates/tier-3-express-postgres-platform/README.md +29 -0
  683. package/dist/templates/tier-3-express-postgres-platform/backend/.dockerignore +9 -0
  684. package/dist/templates/tier-3-express-postgres-platform/backend/.editorconfig +9 -0
  685. package/dist/templates/tier-3-express-postgres-platform/backend/.env.example +87 -0
  686. package/dist/templates/tier-3-express-postgres-platform/backend/.gcloudignore +44 -0
  687. package/dist/templates/tier-3-express-postgres-platform/backend/.github/workflows/ci.yml +36 -0
  688. package/dist/templates/tier-3-express-postgres-platform/backend/.prettierrc +7 -0
  689. package/dist/templates/tier-3-express-postgres-platform/backend/AGENTS.md +260 -0
  690. package/dist/templates/tier-3-express-postgres-platform/backend/CLAUDE.md +1 -0
  691. package/dist/templates/tier-3-express-postgres-platform/backend/Dockerfile +22 -0
  692. package/dist/templates/tier-3-express-postgres-platform/backend/INITIALIZE.md +249 -0
  693. package/dist/templates/tier-3-express-postgres-platform/backend/README.md +233 -0
  694. package/dist/templates/tier-3-express-postgres-platform/backend/app.example.yaml +95 -0
  695. package/dist/templates/tier-3-express-postgres-platform/backend/cloudbuild.yaml +237 -0
  696. package/dist/templates/tier-3-express-postgres-platform/backend/dispatch.example.yaml +40 -0
  697. package/dist/templates/tier-3-express-postgres-platform/backend/docker-compose.yml +21 -0
  698. package/dist/templates/tier-3-express-postgres-platform/backend/docs/ARCHITECTURE.md +110 -0
  699. package/dist/templates/tier-3-express-postgres-platform/backend/docs/CONVENTIONS.md +83 -0
  700. package/dist/templates/tier-3-express-postgres-platform/backend/docs/DATABASE.md +98 -0
  701. package/dist/templates/tier-3-express-postgres-platform/backend/docs/DEPLOY.md +257 -0
  702. package/dist/templates/tier-3-express-postgres-platform/backend/docs/ENVIRONMENT.md +65 -0
  703. package/dist/templates/tier-3-express-postgres-platform/backend/docs/README.md +35 -0
  704. package/dist/templates/tier-3-express-postgres-platform/backend/docs/checklists/pre-build.md +157 -0
  705. package/dist/templates/tier-3-express-postgres-platform/backend/docs/checklists/pre-launch.md +272 -0
  706. package/dist/templates/tier-3-express-postgres-platform/backend/docs/checklists/security.md +395 -0
  707. package/dist/templates/tier-3-express-postgres-platform/backend/docs/guides/03-database.md +344 -0
  708. package/dist/templates/tier-3-express-postgres-platform/backend/docs/guides/04-auth.md +453 -0
  709. package/dist/templates/tier-3-express-postgres-platform/backend/docs/guides/05-api.md +364 -0
  710. package/dist/templates/tier-3-express-postgres-platform/backend/docs/guides/06-files.md +337 -0
  711. package/dist/templates/tier-3-express-postgres-platform/backend/docs/guides/07-email.md +327 -0
  712. package/dist/templates/tier-3-express-postgres-platform/backend/docs/guides/08-payments.md +351 -0
  713. package/dist/templates/tier-3-express-postgres-platform/backend/docs/guides/09-notifications.md +374 -0
  714. package/dist/templates/tier-3-express-postgres-platform/backend/docs/guides/10-jobs.md +333 -0
  715. package/dist/templates/tier-3-express-postgres-platform/backend/docs/guides/11-ai.md +413 -0
  716. package/dist/templates/tier-3-express-postgres-platform/backend/docs/guides/12-observability.md +401 -0
  717. package/dist/templates/tier-3-express-postgres-platform/backend/docs/guides/13-integrations.md +319 -0
  718. package/dist/templates/tier-3-express-postgres-platform/backend/docs/guides/14-deployment.md +328 -0
  719. package/dist/templates/tier-3-express-postgres-platform/backend/eslint.config.js +45 -0
  720. package/dist/templates/tier-3-express-postgres-platform/backend/package-lock.json +8888 -0
  721. package/dist/templates/tier-3-express-postgres-platform/backend/package.json +72 -0
  722. package/dist/templates/tier-3-express-postgres-platform/backend/prisma/migrations/.gitkeep +0 -0
  723. package/dist/templates/tier-3-express-postgres-platform/backend/prisma/migrations/20260819120000_init/migration.sql +47 -0
  724. package/dist/templates/tier-3-express-postgres-platform/backend/prisma/schema.prisma +100 -0
  725. package/dist/templates/tier-3-express-postgres-platform/backend/prisma.config.ts +32 -0
  726. package/dist/templates/tier-3-express-postgres-platform/backend/scripts/deploy.sh +194 -0
  727. package/dist/templates/tier-3-express-postgres-platform/backend/scripts/init-test-db.sql +3 -0
  728. package/dist/templates/tier-3-express-postgres-platform/backend/src/core/audit/index.ts +35 -0
  729. package/dist/templates/tier-3-express-postgres-platform/backend/src/core/auth/basic-auth.ts +56 -0
  730. package/dist/templates/tier-3-express-postgres-platform/backend/src/core/auth/index.ts +4 -0
  731. package/dist/templates/tier-3-express-postgres-platform/backend/src/core/auth/jwt.ts +79 -0
  732. package/dist/templates/tier-3-express-postgres-platform/backend/src/core/auth/password.ts +28 -0
  733. package/dist/templates/tier-3-express-postgres-platform/backend/src/core/auth/rbac.ts +66 -0
  734. package/dist/templates/tier-3-express-postgres-platform/backend/src/core/config/index.ts +121 -0
  735. package/dist/templates/tier-3-express-postgres-platform/backend/src/core/db/connection-string.ts +52 -0
  736. package/dist/templates/tier-3-express-postgres-platform/backend/src/core/db/connection-string.unit.test.ts +45 -0
  737. package/dist/templates/tier-3-express-postgres-platform/backend/src/core/db/enums.ts +6 -0
  738. package/dist/templates/tier-3-express-postgres-platform/backend/src/core/db/index.ts +74 -0
  739. package/dist/templates/tier-3-express-postgres-platform/backend/src/core/db/pagination.ts +62 -0
  740. package/dist/templates/tier-3-express-postgres-platform/backend/src/core/db/types.ts +32 -0
  741. package/dist/templates/tier-3-express-postgres-platform/backend/src/core/docs/index.ts +146 -0
  742. package/dist/templates/tier-3-express-postgres-platform/backend/src/core/docs/registry.ts +54 -0
  743. package/dist/templates/tier-3-express-postgres-platform/backend/src/core/errors/index.ts +115 -0
  744. package/dist/templates/tier-3-express-postgres-platform/backend/src/core/http/app.ts +119 -0
  745. package/dist/templates/tier-3-express-postgres-platform/backend/src/core/http/express.d.ts +16 -0
  746. package/dist/templates/tier-3-express-postgres-platform/backend/src/core/http/landing.ts +458 -0
  747. package/dist/templates/tier-3-express-postgres-platform/backend/src/core/http/middleware/error-handler.ts +52 -0
  748. package/dist/templates/tier-3-express-postgres-platform/backend/src/core/http/middleware/index.ts +5 -0
  749. package/dist/templates/tier-3-express-postgres-platform/backend/src/core/http/middleware/not-found.ts +7 -0
  750. package/dist/templates/tier-3-express-postgres-platform/backend/src/core/http/middleware/rate-limit.ts +24 -0
  751. package/dist/templates/tier-3-express-postgres-platform/backend/src/core/http/middleware/request-id.ts +16 -0
  752. package/dist/templates/tier-3-express-postgres-platform/backend/src/core/http/response.ts +31 -0
  753. package/dist/templates/tier-3-express-postgres-platform/backend/src/core/logging/index.ts +42 -0
  754. package/dist/templates/tier-3-express-postgres-platform/backend/src/core/service.ts +49 -0
  755. package/dist/templates/tier-3-express-postgres-platform/backend/src/core/storage/index.ts +23 -0
  756. package/dist/templates/tier-3-express-postgres-platform/backend/src/core/storage/local.ts +51 -0
  757. package/dist/templates/tier-3-express-postgres-platform/backend/src/index.ts +61 -0
  758. package/dist/templates/tier-3-express-postgres-platform/backend/src/modules/README.md +42 -0
  759. package/dist/templates/tier-3-express-postgres-platform/backend/src/modules/_template/README.md +19 -0
  760. package/dist/templates/tier-3-express-postgres-platform/backend/src/modules/_template/_template.controller.ts +38 -0
  761. package/dist/templates/tier-3-express-postgres-platform/backend/src/modules/_template/_template.docs.ts +35 -0
  762. package/dist/templates/tier-3-express-postgres-platform/backend/src/modules/_template/_template.repository.ts +66 -0
  763. package/dist/templates/tier-3-express-postgres-platform/backend/src/modules/_template/_template.routes.ts +21 -0
  764. package/dist/templates/tier-3-express-postgres-platform/backend/src/modules/_template/_template.schema.ts +34 -0
  765. package/dist/templates/tier-3-express-postgres-platform/backend/src/modules/_template/_template.service.ts +49 -0
  766. package/dist/templates/tier-3-express-postgres-platform/backend/src/modules/_template/_template.test.ts +49 -0
  767. package/dist/templates/tier-3-express-postgres-platform/backend/src/modules/_template/_template.types.ts +19 -0
  768. package/dist/templates/tier-3-express-postgres-platform/backend/src/modules/router.ts +42 -0
  769. package/dist/templates/tier-3-express-postgres-platform/backend/src/shared/api-response.ts +28 -0
  770. package/dist/templates/tier-3-express-postgres-platform/backend/src/shared/pagination.ts +37 -0
  771. package/dist/templates/tier-3-express-postgres-platform/backend/src/shared/roles.ts +36 -0
  772. package/dist/templates/tier-3-express-postgres-platform/backend/src/shared/slices.ts +21 -0
  773. package/dist/templates/tier-3-express-postgres-platform/backend/tests/helpers.ts +36 -0
  774. package/dist/templates/tier-3-express-postgres-platform/backend/tests/setup.ts +61 -0
  775. package/dist/templates/tier-3-express-postgres-platform/backend/tsconfig.json +22 -0
  776. package/dist/templates/tier-3-express-postgres-platform/backend/tsconfig.test.json +9 -0
  777. package/dist/templates/tier-3-express-postgres-platform/backend/vitest.config.ts +39 -0
  778. package/dist/templates/tier-3-express-postgres-platform/frontend/.env.example +70 -0
  779. package/dist/templates/tier-3-express-postgres-platform/frontend/AGENTS.md +260 -0
  780. package/dist/templates/tier-3-express-postgres-platform/frontend/CLAUDE.md +1 -0
  781. package/dist/templates/tier-3-express-postgres-platform/frontend/INITIALIZE.md +249 -0
  782. package/dist/templates/tier-3-express-postgres-platform/frontend/README.md +320 -0
  783. package/dist/templates/tier-3-express-postgres-platform/frontend/components.json +25 -0
  784. package/dist/templates/tier-3-express-postgres-platform/frontend/docs/ARCHITECTURE.md +102 -0
  785. package/dist/templates/tier-3-express-postgres-platform/frontend/docs/CONVENTIONS.md +74 -0
  786. package/dist/templates/tier-3-express-postgres-platform/frontend/docs/DATABASE.md +72 -0
  787. package/dist/templates/tier-3-express-postgres-platform/frontend/docs/ENVIRONMENT.md +90 -0
  788. package/dist/templates/tier-3-express-postgres-platform/frontend/docs/README.md +39 -0
  789. package/dist/templates/tier-3-express-postgres-platform/frontend/docs/checklists/pre-build.md +157 -0
  790. package/dist/templates/tier-3-express-postgres-platform/frontend/docs/checklists/pre-launch.md +272 -0
  791. package/dist/templates/tier-3-express-postgres-platform/frontend/docs/checklists/security.md +395 -0
  792. package/dist/templates/tier-3-express-postgres-platform/frontend/docs/guides/01-frontend.md +330 -0
  793. package/dist/templates/tier-3-express-postgres-platform/frontend/docs/guides/02-ui.md +284 -0
  794. package/dist/templates/tier-3-express-postgres-platform/frontend/docs/guides/04-auth.md +453 -0
  795. package/dist/templates/tier-3-express-postgres-platform/frontend/docs/guides/05-api.md +364 -0
  796. package/dist/templates/tier-3-express-postgres-platform/frontend/docs/guides/09-notifications.md +374 -0
  797. package/dist/templates/tier-3-express-postgres-platform/frontend/docs/guides/14-deployment.md +328 -0
  798. package/dist/templates/tier-3-express-postgres-platform/frontend/eslint.config.mjs +68 -0
  799. package/dist/templates/tier-3-express-postgres-platform/frontend/next.config.ts +24 -0
  800. package/dist/templates/tier-3-express-postgres-platform/frontend/package-lock.json +11265 -0
  801. package/dist/templates/tier-3-express-postgres-platform/frontend/package.json +52 -0
  802. package/dist/templates/tier-3-express-postgres-platform/frontend/postcss.config.mjs +7 -0
  803. package/dist/templates/tier-3-express-postgres-platform/frontend/public/file.svg +1 -0
  804. package/dist/templates/tier-3-express-postgres-platform/frontend/public/globe.svg +1 -0
  805. package/dist/templates/tier-3-express-postgres-platform/frontend/public/next.svg +1 -0
  806. package/dist/templates/tier-3-express-postgres-platform/frontend/public/vercel.svg +1 -0
  807. package/dist/templates/tier-3-express-postgres-platform/frontend/public/window.svg +1 -0
  808. package/dist/templates/tier-3-express-postgres-platform/frontend/src/app/(app)/admin/activity/page.tsx +28 -0
  809. package/dist/templates/tier-3-express-postgres-platform/frontend/src/app/(app)/admin/analytics/page.tsx +28 -0
  810. package/dist/templates/tier-3-express-postgres-platform/frontend/src/app/(app)/admin/dashboard/page.tsx +44 -0
  811. package/dist/templates/tier-3-express-postgres-platform/frontend/src/app/(app)/admin/layout.tsx +18 -0
  812. package/dist/templates/tier-3-express-postgres-platform/frontend/src/app/(app)/admin/reports/page.tsx +28 -0
  813. package/dist/templates/tier-3-express-postgres-platform/frontend/src/app/(app)/admin/settings/page.tsx +16 -0
  814. package/dist/templates/tier-3-express-postgres-platform/frontend/src/app/(app)/admin/users/page.tsx +40 -0
  815. package/dist/templates/tier-3-express-postgres-platform/frontend/src/app/(app)/layout.tsx +20 -0
  816. package/dist/templates/tier-3-express-postgres-platform/frontend/src/app/(app)/loading.tsx +10 -0
  817. package/dist/templates/tier-3-express-postgres-platform/frontend/src/app/(auth)/admin/login/page.tsx +44 -0
  818. package/dist/templates/tier-3-express-postgres-platform/frontend/src/app/(auth)/layout.tsx +33 -0
  819. package/dist/templates/tier-3-express-postgres-platform/frontend/src/app/api/README.md +93 -0
  820. package/dist/templates/tier-3-express-postgres-platform/frontend/src/app/api/_lib/api-response.ts +46 -0
  821. package/dist/templates/tier-3-express-postgres-platform/frontend/src/app/api/_lib/backend.ts +86 -0
  822. package/dist/templates/tier-3-express-postgres-platform/frontend/src/app/api/auth/session/route.ts +124 -0
  823. package/dist/templates/tier-3-express-postgres-platform/frontend/src/app/api/health/route.ts +42 -0
  824. package/dist/templates/tier-3-express-postgres-platform/frontend/src/app/api/proxy/[...path]/route.ts +80 -0
  825. package/dist/templates/tier-3-express-postgres-platform/frontend/src/app/error.tsx +53 -0
  826. package/dist/templates/tier-3-express-postgres-platform/frontend/src/app/favicon.ico +0 -0
  827. package/dist/templates/tier-3-express-postgres-platform/frontend/src/app/globals.css +186 -0
  828. package/dist/templates/tier-3-express-postgres-platform/frontend/src/app/layout.tsx +77 -0
  829. package/dist/templates/tier-3-express-postgres-platform/frontend/src/app/not-found.tsx +27 -0
  830. package/dist/templates/tier-3-express-postgres-platform/frontend/src/app/page.tsx +116 -0
  831. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/layout/app-shell.tsx +50 -0
  832. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/layout/app-sidebar.tsx +104 -0
  833. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/layout/app-topbar.tsx +74 -0
  834. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/layout/brand.tsx +91 -0
  835. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/layout/nav-user.tsx +102 -0
  836. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/layout/theme-toggle.tsx +54 -0
  837. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/shared/auth-gate.tsx +55 -0
  838. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/shared/backend-status.tsx +72 -0
  839. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/shared/confirm-dialog.tsx +87 -0
  840. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/shared/page-header.tsx +42 -0
  841. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/shared/placeholder-panel.tsx +63 -0
  842. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/shared/role-guard.tsx +41 -0
  843. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/shared/section.tsx +47 -0
  844. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/shared/stat-card.tsx +82 -0
  845. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/shared/state-views.tsx +133 -0
  846. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/accordion.tsx +72 -0
  847. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/alert-dialog.tsx +187 -0
  848. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/alert.tsx +76 -0
  849. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/aspect-ratio.tsx +22 -0
  850. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/attachment.tsx +207 -0
  851. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/avatar.tsx +109 -0
  852. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/badge.tsx +52 -0
  853. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/breadcrumb.tsx +125 -0
  854. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/bubble.tsx +128 -0
  855. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/button-group.tsx +87 -0
  856. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/button.tsx +58 -0
  857. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/calendar.tsx +221 -0
  858. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/card.tsx +103 -0
  859. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/carousel.tsx +242 -0
  860. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/chart.tsx +373 -0
  861. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/checkbox.tsx +29 -0
  862. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/collapsible.tsx +21 -0
  863. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/combobox.tsx +297 -0
  864. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/command.tsx +196 -0
  865. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/context-menu.tsx +271 -0
  866. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/dialog.tsx +160 -0
  867. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/direction.tsx +6 -0
  868. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/drawer.tsx +228 -0
  869. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/dropdown-menu.tsx +268 -0
  870. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/empty.tsx +104 -0
  871. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/field.tsx +238 -0
  872. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/hover-card.tsx +51 -0
  873. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/input-group.tsx +158 -0
  874. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/input-otp.tsx +87 -0
  875. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/input.tsx +20 -0
  876. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/item.tsx +201 -0
  877. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/kbd.tsx +26 -0
  878. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/label.tsx +20 -0
  879. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/marker.tsx +71 -0
  880. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/menubar.tsx +280 -0
  881. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/message-scroller.tsx +131 -0
  882. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/message.tsx +92 -0
  883. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/native-select.tsx +61 -0
  884. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/navigation-menu.tsx +168 -0
  885. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/pagination.tsx +130 -0
  886. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/popover.tsx +90 -0
  887. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/progress.tsx +83 -0
  888. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/questionnaire.tsx +324 -0
  889. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/radio-group.tsx +38 -0
  890. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/resizable.tsx +50 -0
  891. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/scroll-area.tsx +55 -0
  892. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/select.tsx +201 -0
  893. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/separator.tsx +25 -0
  894. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/sheet.tsx +138 -0
  895. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/sidebar.tsx +723 -0
  896. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/skeleton.tsx +13 -0
  897. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/slider.tsx +52 -0
  898. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/spinner.tsx +10 -0
  899. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/switch.tsx +32 -0
  900. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/table.tsx +116 -0
  901. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/tabs.tsx +82 -0
  902. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/textarea.tsx +18 -0
  903. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/toast.tsx +234 -0
  904. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/toggle-group.tsx +89 -0
  905. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/toggle.tsx +45 -0
  906. package/dist/templates/tier-3-express-postgres-platform/frontend/src/components/ui/tooltip.tsx +66 -0
  907. package/dist/templates/tier-3-express-postgres-platform/frontend/src/features/auth/components/login-form.tsx +93 -0
  908. package/dist/templates/tier-3-express-postgres-platform/frontend/src/features/auth/hooks/use-login.ts +68 -0
  909. package/dist/templates/tier-3-express-postgres-platform/frontend/src/features/auth/index.ts +18 -0
  910. package/dist/templates/tier-3-express-postgres-platform/frontend/src/features/auth/schemas.ts +37 -0
  911. package/dist/templates/tier-3-express-postgres-platform/frontend/src/features/auth/services/auth.service.ts +26 -0
  912. package/dist/templates/tier-3-express-postgres-platform/frontend/src/features/auth/types.ts +16 -0
  913. package/dist/templates/tier-3-express-postgres-platform/frontend/src/features/dashboard/components/activity-feed.tsx +66 -0
  914. package/dist/templates/tier-3-express-postgres-platform/frontend/src/features/dashboard/components/dashboard-stats.tsx +62 -0
  915. package/dist/templates/tier-3-express-postgres-platform/frontend/src/features/dashboard/components/throughput-chart.tsx +88 -0
  916. package/dist/templates/tier-3-express-postgres-platform/frontend/src/features/dashboard/index.ts +15 -0
  917. package/dist/templates/tier-3-express-postgres-platform/frontend/src/features/settings/components/settings-tabs.tsx +97 -0
  918. package/dist/templates/tier-3-express-postgres-platform/frontend/src/features/settings/index.ts +7 -0
  919. package/dist/templates/tier-3-express-postgres-platform/frontend/src/features/users/components/users-table.tsx +190 -0
  920. package/dist/templates/tier-3-express-postgres-platform/frontend/src/features/users/hooks/use-users.ts +133 -0
  921. package/dist/templates/tier-3-express-postgres-platform/frontend/src/features/users/index.ts +22 -0
  922. package/dist/templates/tier-3-express-postgres-platform/frontend/src/features/users/schemas.ts +23 -0
  923. package/dist/templates/tier-3-express-postgres-platform/frontend/src/features/users/services/users.service.ts +37 -0
  924. package/dist/templates/tier-3-express-postgres-platform/frontend/src/features/users/types.ts +19 -0
  925. package/dist/templates/tier-3-express-postgres-platform/frontend/src/hooks/index.ts +20 -0
  926. package/dist/templates/tier-3-express-postgres-platform/frontend/src/hooks/use-auth.ts +17 -0
  927. package/dist/templates/tier-3-express-postgres-platform/frontend/src/hooks/use-copy-to-clipboard.ts +40 -0
  928. package/dist/templates/tier-3-express-postgres-platform/frontend/src/hooks/use-debounce.ts +53 -0
  929. package/dist/templates/tier-3-express-postgres-platform/frontend/src/hooks/use-disclosure.ts +24 -0
  930. package/dist/templates/tier-3-express-postgres-platform/frontend/src/hooks/use-local-storage.ts +115 -0
  931. package/dist/templates/tier-3-express-postgres-platform/frontend/src/hooks/use-media-query.ts +31 -0
  932. package/dist/templates/tier-3-express-postgres-platform/frontend/src/hooks/use-mobile.ts +17 -0
  933. package/dist/templates/tier-3-express-postgres-platform/frontend/src/hooks/use-mounted.ts +29 -0
  934. package/dist/templates/tier-3-express-postgres-platform/frontend/src/hooks/use-table-params.ts +96 -0
  935. package/dist/templates/tier-3-express-postgres-platform/frontend/src/lib/api/client.ts +210 -0
  936. package/dist/templates/tier-3-express-postgres-platform/frontend/src/lib/api/endpoints.ts +45 -0
  937. package/dist/templates/tier-3-express-postgres-platform/frontend/src/lib/api/http-error.ts +92 -0
  938. package/dist/templates/tier-3-express-postgres-platform/frontend/src/lib/api/query-keys.ts +42 -0
  939. package/dist/templates/tier-3-express-postgres-platform/frontend/src/lib/auth/auth-context.tsx +135 -0
  940. package/dist/templates/tier-3-express-postgres-platform/frontend/src/lib/auth/preview-user.ts +24 -0
  941. package/dist/templates/tier-3-express-postgres-platform/frontend/src/lib/auth/roles.ts +35 -0
  942. package/dist/templates/tier-3-express-postgres-platform/frontend/src/lib/auth/token-store.ts +52 -0
  943. package/dist/templates/tier-3-express-postgres-platform/frontend/src/lib/config/env.ts +143 -0
  944. package/dist/templates/tier-3-express-postgres-platform/frontend/src/lib/config/navigation.ts +138 -0
  945. package/dist/templates/tier-3-express-postgres-platform/frontend/src/lib/config/site.ts +24 -0
  946. package/dist/templates/tier-3-express-postgres-platform/frontend/src/lib/constants.ts +71 -0
  947. package/dist/templates/tier-3-express-postgres-platform/frontend/src/lib/format.ts +161 -0
  948. package/dist/templates/tier-3-express-postgres-platform/frontend/src/lib/logger.ts +32 -0
  949. package/dist/templates/tier-3-express-postgres-platform/frontend/src/lib/toast.ts +54 -0
  950. package/dist/templates/tier-3-express-postgres-platform/frontend/src/lib/utils.ts +6 -0
  951. package/dist/templates/tier-3-express-postgres-platform/frontend/src/providers/index.tsx +35 -0
  952. package/dist/templates/tier-3-express-postgres-platform/frontend/src/providers/query-provider.tsx +66 -0
  953. package/dist/templates/tier-3-express-postgres-platform/frontend/src/providers/theme-provider.tsx +33 -0
  954. package/dist/templates/tier-3-express-postgres-platform/frontend/src/proxy.ts +61 -0
  955. package/dist/templates/tier-3-express-postgres-platform/frontend/src/types/api.ts +73 -0
  956. package/dist/templates/tier-3-express-postgres-platform/frontend/src/types/enums.ts +38 -0
  957. package/dist/templates/tier-3-express-postgres-platform/frontend/src/types/index.ts +24 -0
  958. package/dist/templates/tier-3-express-postgres-platform/frontend/src/types/models.ts +39 -0
  959. package/dist/templates/tier-3-express-postgres-platform/frontend/tsconfig.json +49 -0
  960. package/dist/templates/tier-3-express-postgres-platform/mesa.kit.json +35 -0
  961. package/package.json +59 -44
package/LICENSE CHANGED
@@ -1,155 +1,155 @@
1
- THE AI CTO — PROPRIETARY LICENSE
2
-
3
- Copyright (c) 2026 Mesa Startup Lab. All rights reserved.
4
-
5
- Created by Gaurav Madan and the Mesa Startup Lab team.
6
-
7
- --------------------------------------------------------------------------------
8
- 1. DEFINITIONS
9
- --------------------------------------------------------------------------------
10
-
11
- "The Kit" means this repository and everything in it: the module execution guides,
12
- the concept cards, the checklists, the kit manifests, the AGENTS.md and
13
- INITIALIZE.md templates, the prompts, the pitch deck, the scripts, and any
14
- software published from it including the `mesa-ai-cto` command-line tool.
15
-
16
- "Licensor" means Mesa Startup Lab, the owner of the Kit.
17
-
18
- "You" means the individual or organisation granted a licence under these terms.
19
-
20
- "Your Products" means software You build for Yourself or for Your clients using
21
- the Kit.
22
-
23
- "Generated Code" means source code, configuration and other files produced by an
24
- AI agent, by You, or by the `mesa-ai-cto` tool while following the Kit.
25
-
26
- --------------------------------------------------------------------------------
27
- 2. WHAT YOU MAY DO
28
- --------------------------------------------------------------------------------
29
-
30
- Subject to Section 3, You are granted a non-exclusive, non-transferable,
31
- worldwide licence to:
32
-
33
- a. USE the Kit to design, build, test, deploy and operate Your Products,
34
- including for commercial purposes and including work delivered to clients.
35
-
36
- b. OWN the Generated Code outright. Nothing in this licence claims any right
37
- over the code You or Your agent produce by following the Kit. You may
38
- license, sell, open-source or keep that code entirely as You choose, with
39
- no obligation to attribute the Kit.
40
-
41
- c. COPY the guides, checklists, prompts and templates into Your own private
42
- repositories, and modify them there, for use on Your Products.
43
-
44
- d. SHARE the Kit within Your organisation, with employees and contractors
45
- working on Your Products, provided they are bound by these terms.
46
-
47
- --------------------------------------------------------------------------------
48
- 3. WHAT YOU MAY NOT DO
49
- --------------------------------------------------------------------------------
50
-
51
- You may not, without prior written permission from the Licensor:
52
-
53
- a. REDISTRIBUTE, resell, rent, lease, sublicense or otherwise make the Kit, or
54
- any substantial part of it, available to anyone outside Your organisation.
55
-
56
- b. PUBLISH the Kit, or any substantial part of it, publicly — including in a
57
- public repository, a website, a book, a course, or a video series.
58
-
59
- c. OFFER a product or service that is substantially the Kit, or that is derived
60
- from it and competes with it, whether paid or free.
61
-
62
- d. USE the Kit, or any substantial part of it, as training data for a machine
63
- learning model, or to generate a derivative work intended for distribution.
64
-
65
- e. REMOVE or obscure any copyright, attribution or licence notice in the Kit.
66
-
67
- For clarity: Section 3 restricts redistribution of *the Kit*. It places no
68
- restriction whatsoever on Your Products or on Generated Code, which are Yours
69
- under Section 2(b).
70
-
71
- --------------------------------------------------------------------------------
72
- 4. NO WARRANTY
73
- --------------------------------------------------------------------------------
74
-
75
- THE KIT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
76
- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
77
- PARTICULAR PURPOSE, AND NONINFRINGEMENT.
78
-
79
- The Kit contains security guidance, checklists and architectural
80
- recommendations. These are offered in good faith and are not a substitute for a
81
- professional security audit, legal advice, or compliance review appropriate to
82
- Your jurisdiction and industry. Software versions, provider behaviour and
83
- security best practice all change; each guide states the versions and the date it
84
- was last verified, and You are responsible for confirming that guidance is still
85
- current before relying on it.
86
-
87
- Following the Kit does not guarantee that Your Products are secure, correct,
88
- compliant, or fit for any purpose. You remain solely responsible for what You
89
- build, deploy and operate.
90
-
91
- --------------------------------------------------------------------------------
92
- 5. LIMITATION OF LIABILITY
93
- --------------------------------------------------------------------------------
94
-
95
- IN NO EVENT SHALL THE LICENSOR OR ITS AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
96
- OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
97
- FROM, OUT OF OR IN CONNECTION WITH THE KIT OR THE USE OR OTHER DEALINGS IN THE
98
- KIT — including without limitation any loss of data, loss of profit, business
99
- interruption, security incident, or third-party claim arising from software built
100
- using the Kit.
101
-
102
- --------------------------------------------------------------------------------
103
- 6. TERMINATION
104
- --------------------------------------------------------------------------------
105
-
106
- This licence terminates automatically if You breach Section 3. On termination You
107
- must stop using the Kit and delete Your copies of it. Your Products and Generated
108
- Code created before termination are unaffected and remain Yours.
109
-
110
- --------------------------------------------------------------------------------
111
- 7. GOVERNING LAW
112
- --------------------------------------------------------------------------------
113
-
114
- This licence is governed by the laws of India, and the courts of India shall have
115
- exclusive jurisdiction over any dispute arising from it.
116
-
117
- --------------------------------------------------------------------------------
118
- 8. CONTACT
119
- --------------------------------------------------------------------------------
120
-
121
- For permissions beyond the scope of this licence — redistribution, resale,
122
- white-labelling, training use, or an enterprise arrangement — contact Mesa Startup
123
- Lab.
124
-
125
- ================================================================================
126
- NOTICE — PROVENANCE
127
- ================================================================================
128
-
129
- The Kit is not theory. Its architectural patterns, its security checklists and
130
- its traps are generalised from Mesa LMS, a production platform built and operated
131
- by Mesa Startup Lab: four user roles with scoped permissions, roughly forty
132
- backend modules, around fifty frontend feature slices, PostgreSQL, object
133
- storage, transactional email, web push, a progressive web app and an LLM module.
134
-
135
- Specifically:
136
-
137
- * The response envelope, the error hierarchy, the boot-time environment
138
- validation, the guard chain and the request logging format are generalised
139
- from that codebase.
140
-
141
- * The security checklists are derived from a review of it. Findings carry
142
- identifiers (SEC-01 … SEC-20) so a rule in a checklist can be traced to the
143
- incident or pattern that produced it. That review is included at
144
- docs/specs/2026-08-19-mesa-security-review.md.
145
-
146
- * The "How Mesa LMS does it" boxes in the concept cards point at real files in
147
- that codebase, not at illustrative examples.
148
-
149
- Mesa LMS itself is separate proprietary software and is not licensed by this
150
- document. No right to Mesa LMS, its source code, its data, or any of its
151
- trademarks is granted here. The Kit is stack-generic: nothing in it requires You
152
- to use the same stack, the same providers, or the same conventions.
153
-
154
- "The AI CTO", "Mesa Startup Lab", "Mesa School of Business" and "Mesa LMS" are
155
- marks of Mesa Startup Lab.
1
+ THE AI CTO — PROPRIETARY LICENSE
2
+
3
+ Copyright (c) 2026 Mesa Startup Lab. All rights reserved.
4
+
5
+ Created by Gaurav Madan and the Mesa Startup Lab team.
6
+
7
+ --------------------------------------------------------------------------------
8
+ 1. DEFINITIONS
9
+ --------------------------------------------------------------------------------
10
+
11
+ "The Kit" means this repository and everything in it: the module execution guides,
12
+ the concept cards, the checklists, the kit manifests, the AGENTS.md and
13
+ INITIALIZE.md templates, the prompts, the pitch deck, the scripts, and any
14
+ software published from it including the `mesa-ai-cto` command-line tool.
15
+
16
+ "Licensor" means Mesa Startup Lab, the owner of the Kit.
17
+
18
+ "You" means the individual or organisation granted a licence under these terms.
19
+
20
+ "Your Products" means software You build for Yourself or for Your clients using
21
+ the Kit.
22
+
23
+ "Generated Code" means source code, configuration and other files produced by an
24
+ AI agent, by You, or by the `mesa-ai-cto` tool while following the Kit.
25
+
26
+ --------------------------------------------------------------------------------
27
+ 2. WHAT YOU MAY DO
28
+ --------------------------------------------------------------------------------
29
+
30
+ Subject to Section 3, You are granted a non-exclusive, non-transferable,
31
+ worldwide licence to:
32
+
33
+ a. USE the Kit to design, build, test, deploy and operate Your Products,
34
+ including for commercial purposes and including work delivered to clients.
35
+
36
+ b. OWN the Generated Code outright. Nothing in this licence claims any right
37
+ over the code You or Your agent produce by following the Kit. You may
38
+ license, sell, open-source or keep that code entirely as You choose, with
39
+ no obligation to attribute the Kit.
40
+
41
+ c. COPY the guides, checklists, prompts and templates into Your own private
42
+ repositories, and modify them there, for use on Your Products.
43
+
44
+ d. SHARE the Kit within Your organisation, with employees and contractors
45
+ working on Your Products, provided they are bound by these terms.
46
+
47
+ --------------------------------------------------------------------------------
48
+ 3. WHAT YOU MAY NOT DO
49
+ --------------------------------------------------------------------------------
50
+
51
+ You may not, without prior written permission from the Licensor:
52
+
53
+ a. REDISTRIBUTE, resell, rent, lease, sublicense or otherwise make the Kit, or
54
+ any substantial part of it, available to anyone outside Your organisation.
55
+
56
+ b. PUBLISH the Kit, or any substantial part of it, publicly — including in a
57
+ public repository, a website, a book, a course, or a video series.
58
+
59
+ c. OFFER a product or service that is substantially the Kit, or that is derived
60
+ from it and competes with it, whether paid or free.
61
+
62
+ d. USE the Kit, or any substantial part of it, as training data for a machine
63
+ learning model, or to generate a derivative work intended for distribution.
64
+
65
+ e. REMOVE or obscure any copyright, attribution or licence notice in the Kit.
66
+
67
+ For clarity: Section 3 restricts redistribution of *the Kit*. It places no
68
+ restriction whatsoever on Your Products or on Generated Code, which are Yours
69
+ under Section 2(b).
70
+
71
+ --------------------------------------------------------------------------------
72
+ 4. NO WARRANTY
73
+ --------------------------------------------------------------------------------
74
+
75
+ THE KIT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
76
+ INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
77
+ PARTICULAR PURPOSE, AND NONINFRINGEMENT.
78
+
79
+ The Kit contains security guidance, checklists and architectural
80
+ recommendations. These are offered in good faith and are not a substitute for a
81
+ professional security audit, legal advice, or compliance review appropriate to
82
+ Your jurisdiction and industry. Software versions, provider behaviour and
83
+ security best practice all change; each guide states the versions and the date it
84
+ was last verified, and You are responsible for confirming that guidance is still
85
+ current before relying on it.
86
+
87
+ Following the Kit does not guarantee that Your Products are secure, correct,
88
+ compliant, or fit for any purpose. You remain solely responsible for what You
89
+ build, deploy and operate.
90
+
91
+ --------------------------------------------------------------------------------
92
+ 5. LIMITATION OF LIABILITY
93
+ --------------------------------------------------------------------------------
94
+
95
+ IN NO EVENT SHALL THE LICENSOR OR ITS AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
96
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
97
+ FROM, OUT OF OR IN CONNECTION WITH THE KIT OR THE USE OR OTHER DEALINGS IN THE
98
+ KIT — including without limitation any loss of data, loss of profit, business
99
+ interruption, security incident, or third-party claim arising from software built
100
+ using the Kit.
101
+
102
+ --------------------------------------------------------------------------------
103
+ 6. TERMINATION
104
+ --------------------------------------------------------------------------------
105
+
106
+ This licence terminates automatically if You breach Section 3. On termination You
107
+ must stop using the Kit and delete Your copies of it. Your Products and Generated
108
+ Code created before termination are unaffected and remain Yours.
109
+
110
+ --------------------------------------------------------------------------------
111
+ 7. GOVERNING LAW
112
+ --------------------------------------------------------------------------------
113
+
114
+ This licence is governed by the laws of India, and the courts of India shall have
115
+ exclusive jurisdiction over any dispute arising from it.
116
+
117
+ --------------------------------------------------------------------------------
118
+ 8. CONTACT
119
+ --------------------------------------------------------------------------------
120
+
121
+ For permissions beyond the scope of this licence — redistribution, resale,
122
+ white-labelling, training use, or an enterprise arrangement — contact Mesa Startup
123
+ Lab.
124
+
125
+ ================================================================================
126
+ NOTICE — PROVENANCE
127
+ ================================================================================
128
+
129
+ The Kit is not theory. Its architectural patterns, its security checklists and
130
+ its traps are generalised from Mesa LMS, a production platform built and operated
131
+ by Mesa Startup Lab: four user roles with scoped permissions, roughly forty
132
+ backend modules, around fifty frontend feature slices, PostgreSQL, object
133
+ storage, transactional email, web push, a progressive web app and an LLM module.
134
+
135
+ Specifically:
136
+
137
+ * The response envelope, the error hierarchy, the boot-time environment
138
+ validation, the guard chain and the request logging format are generalised
139
+ from that codebase.
140
+
141
+ * The security checklists are derived from a review of it. Findings carry
142
+ identifiers (SEC-01 … SEC-20) so a rule in a checklist can be traced to the
143
+ incident or pattern that produced it. That review is included at
144
+ docs/specs/2026-08-19-mesa-security-review.md.
145
+
146
+ * The "How Mesa LMS does it" boxes in the concept cards point at real files in
147
+ that codebase, not at illustrative examples.
148
+
149
+ Mesa LMS itself is separate proprietary software and is not licensed by this
150
+ document. No right to Mesa LMS, its source code, its data, or any of its
151
+ trademarks is granted here. The Kit is stack-generic: nothing in it requires You
152
+ to use the same stack, the same providers, or the same conventions.
153
+
154
+ "The AI CTO", "Mesa Startup Lab", "Mesa School of Business" and "Mesa LMS" are
155
+ marks of Mesa Startup Lab.
package/README.md CHANGED
@@ -1,34 +1,114 @@
1
- # mesa-ai-cto
2
-
3
- Scaffolds a production-grade project from a plan produced by [The AI CTO](https://github.com/Mesa-School).
4
-
5
- > **Not yet released.** `0.0.1` is a placeholder and does not scaffold anything.
6
- > The working client ships as `0.1.0`.
7
-
8
- ## What it will do
9
-
10
- You describe your business to the AI CTO. It produces a plan — the tier, the stack, the
11
- modules, and what to build first. The plan gives you one command:
12
-
13
- ```bash
14
- npx mesa-ai-cto my-app --tier1 --token=mesa_i_…
15
- ```
16
-
17
- That command checks your machine, installs the right codebase, writes your plan and the
18
- module guides alongside it, installs dependencies, and leaves you with something running
19
- on localhost.
20
-
21
- ```
22
- my-app/
23
- ├── src/
24
- ├── docs/ module guides and checklists
25
- ├── plan.md what you are building, and in what order
26
- └── mesa.json
27
- ```
28
-
29
- ## Licence
30
-
31
- Proprietary. See [LICENSE](LICENSE).
32
-
33
- The guides, checklists and boilerplate are **not** contained in this package. They are
34
- delivered only to a holder of a valid install token.
1
+ # mesa-ai-cto
2
+
3
+ Check your machine, then scaffold a production-grade project from a plan produced by
4
+ [The AI CTO](https://github.com/Mesa-School).
5
+
6
+ ## `doctor`
7
+
8
+ ```bash
9
+ npx mesa-ai-cto doctor
10
+ ```
11
+
12
+ ```
13
+ Runtime
14
+ ✓ Node.js v22.18.0
15
+ ✓ npm 10.9.3
16
+ Git
17
+ ✓ git git version 2.50.0
18
+ ✓ user.name Gaurav Madan
19
+ ✗ user.email not set
20
+ Editor
21
+ ✓ VS Code detected
22
+ ✗ `code` on PATH not on PATH
23
+ GitHub
24
+ ✓ GitHub CLI github.com
25
+ Vercel
26
+ ✗ Vercel CLI not installed
27
+
28
+ Fix this before you start:
29
+ git config --global user.email "you@example.com"
30
+
31
+ Not needed yet, but you will want:
32
+ In VS Code: Command Palette → "Shell Command: Install 'code' command in PATH"
33
+ npm install -g vercel
34
+
35
+ Not ready yet — see above.
36
+ ```
37
+
38
+ Blocking problems are listed apart from ones you will only need later, because "one thing
39
+ to fix" sitting above "ready to build" does not answer the only question this command
40
+ exists to answer.
41
+
42
+ **Three results, not two.** A tool can be *missing*, *installed but not working*, or
43
+ *impossible to reach right now* — a `gh auth status` that times out on hotel wifi has not
44
+ told us your account is broken. Each leads to different advice, so each is reported
45
+ differently, and a result we could not determine never fails the run.
46
+
47
+ ### For coding agents
48
+
49
+ `doctor` is designed to be run by Claude Code, Codex or any agent driving a founder's
50
+ setup — so it does not just say what is wrong, it says what to do about it, on this
51
+ operating system, and whether the agent may do it unattended.
52
+
53
+ ```bash
54
+ npx mesa-ai-cto doctor --json
55
+ ```
56
+
57
+ JSON goes to stdout and nothing else does, so it pipes cleanly. Human output goes to
58
+ stderr. Exit codes: `0` ready, `1` a required check failed, `2` a usage error.
59
+
60
+ **Read `nextActions`.** It is the failures only, already ordered with blocking ones first,
61
+ so an agent that repairs one item and re-runs has removed the reason the build could not
62
+ start.
63
+
64
+ ```json
65
+ {
66
+ "ok": false,
67
+ "nextActions": [
68
+ { "id": "git.installed", "blocking": true, "autoRunnable": true,
69
+ "command": "winget install --id Git.Git -e --accept-package-agreements" },
70
+
71
+ { "id": "git.email", "blocking": true, "autoRunnable": false, "needsInput": true,
72
+ "commandTemplate": "git config --global user.email \"<user.email>\"" },
73
+
74
+ { "id": "editor.code", "blocking": false, "autoRunnable": false,
75
+ "manual": "Open VS Code, press the Command Palette shortcut, and run \"Shell Command: Install 'code' command in PATH\"" }
76
+ ]
77
+ }
78
+ ```
79
+
80
+ The loop:
81
+
82
+ 1. Run `doctor --json`. If `ok` is true, stop.
83
+ 2. For each entry in `nextActions` where `autoRunnable` is **true** — run `command`.
84
+ 3. Where `needsInput` is true — **ask the founder for the value**, then run
85
+ `commandTemplate` with the placeholder replaced. Do not invent one: a repository whose
86
+ history says `you@example.com` is worse than one with no commits, and rewriting author
87
+ history later is painful.
88
+ 4. Where only `manual` is present — relay it and wait. There is no command; guessing one
89
+ (symlinking `code` by hand, for instance) creates something the next update overwrites.
90
+ 5. Re-run `doctor --json`. Repeat at most a few times, then report what is left.
91
+
92
+ Only act on entries where `blocking` is true if the goal is to get building. The rest are
93
+ needed for deploying later and can wait.
94
+
95
+ **Platform.** Commands are chosen for the machine `doctor` ran on — `brew` on macOS,
96
+ `winget` on Windows. On Linux, where package managers differ too much between
97
+ distributions to guess safely, there is no `command`: the entry carries a `url` instead,
98
+ and guessing `apt` would be wrong often enough to matter.
99
+
100
+ ## Coming next
101
+
102
+ ```bash
103
+ npx mesa-ai-cto <name> --tier<N> --token=<t> scaffold a project
104
+ npx mesa-ai-cto add <module> add a module guide
105
+ ```
106
+
107
+ You get that command, with its token, from your plan in the AI CTO dashboard.
108
+
109
+ ## Licence
110
+
111
+ Proprietary. See [LICENSE](LICENSE).
112
+
113
+ The guides, checklists and boilerplate are **not** contained in this package. They are
114
+ delivered only to a holder of a valid install token.
@@ -1,50 +1,9 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Placeholder release.
4
- *
5
- * This exists so the name is held by the product that will use it — the dashboard already
6
- * renders `npx mesa-ai-cto …` in every plan it produces, and a command that resolves to
7
- * somebody else's package is worse than one that resolves to nothing.
8
- *
9
- * It also proves the publish pipeline while nothing is at stake. A version number can never
10
- * be reused and a package cannot meaningfully be unpublished after 72 hours, so the first
11
- * real release should not be the first release.
12
- *
13
- * Replaced by the real client in 0.1.0. See docs/specs/2026-08-22-cli-install-design.md.
14
- */
15
-
16
- const args = process.argv.slice(2);
17
- const wants = (...flags) => args.some((a) => flags.includes(a));
18
-
19
- // `--version` and `--help` are questions this build can answer honestly, so they succeed.
20
- if (wants("-v", "--version")) {
21
- process.stdout.write("0.0.1\n");
22
- process.exit(0);
23
- }
24
-
25
- const HELP = `
26
- mesa-ai-cto — scaffold a project from your AI CTO plan
27
-
28
- Not yet released. This version is a placeholder and does not scaffold anything.
29
-
30
- When it ships:
31
- npx mesa-ai-cto <name> --tier<N> --token=<t> scaffold a project
32
- npx mesa-ai-cto doctor check your machine
33
- npx mesa-ai-cto add <module> add a module guide
34
-
35
- You get the command, with its token, from your plan in the AI CTO dashboard.
36
- `;
37
-
38
- if (wants("-h", "--help") || args.length === 0) {
39
- process.stdout.write(`${HELP}\n`);
40
- // No arguments is a request for help, and help was given.
41
- process.exit(0);
42
- }
43
-
44
- // Anything else is somebody — or some agent — asking this to do real work. It cannot, and
45
- // exiting 0 would report success for a project that was never created.
46
- process.stderr.write(
47
- "\n mesa-ai-cto is not yet released — this is a placeholder version.\n" +
48
- " Nothing has been created. Run with --help for what is coming.\n\n",
49
- );
50
- process.exit(1);
1
+ #!/usr/bin/env node
2
+ /**
3
+ * The bin entry is a shim so the published package has one job here: hand control to the
4
+ * compiled CLI and turn its return value into an exit code. Keeping `process.exit` out of
5
+ * `src/` is what makes every command testable.
6
+ */
7
+ import { runCli } from "../dist/cli.js";
8
+
9
+ process.exitCode = await runCli(process.argv.slice(2));
@@ -0,0 +1,73 @@
1
+ import { perPlatform } from "./types.js";
2
+ /**
3
+ * Neither of these is required to reach localhost. They ship now so a founder sees what is
4
+ * coming in the next milestone without being blocked on it today.
5
+ *
6
+ * Neither probes a permission by using it: nothing is created to find out whether creating
7
+ * is allowed. `gh auth status` reports what the token can already do; the real operation
8
+ * reports the real failure when it runs.
9
+ */
10
+ function authCheck(args) {
11
+ return {
12
+ id: args.id,
13
+ group: args.group,
14
+ label: args.label,
15
+ required: false,
16
+ timeoutMs: 5000,
17
+ run: async ({ exec, present, platform }) => {
18
+ if (!(await present(args.cmd))) {
19
+ return {
20
+ state: "fail",
21
+ detail: "not installed",
22
+ fix: args.installFix,
23
+ remedy: args.installRemedy(platform),
24
+ };
25
+ }
26
+ const out = await exec(args.cmd, args.probe, { timeoutMs: 5000 });
27
+ if (out.kind === "ok") {
28
+ // `gh auth status` prints its useful line to stderr, not stdout.
29
+ const line = (out.stdout || out.stderr).split("\n").find((l) => l.trim().length > 0);
30
+ return { state: "pass", detail: (line ?? "authenticated").trim() };
31
+ }
32
+ // A network call that did not answer has told us nothing about the account.
33
+ if (out.kind === "timeout")
34
+ return { state: "unknown", detail: "no response — offline?" };
35
+ if (out.kind === "error")
36
+ return { state: "unknown", detail: out.code };
37
+ return {
38
+ state: "fail",
39
+ detail: "not authenticated",
40
+ fix: args.loginFix,
41
+ // Runnable, but it opens a browser and waits for a person. An agent should run it
42
+ // and then tell the founder to finish in the browser, not assume it completed.
43
+ remedy: { manual: `${args.loginFix} — this opens a browser and needs you to sign in` },
44
+ };
45
+ },
46
+ };
47
+ }
48
+ export const ghAuth = authCheck({
49
+ id: "github.auth",
50
+ group: "GitHub",
51
+ label: "GitHub CLI",
52
+ cmd: "gh",
53
+ probe: ["auth", "status"],
54
+ installFix: "Install the GitHub CLI from cli.github.com",
55
+ installRemedy: (platform) => perPlatform(platform, {
56
+ darwin: "brew install gh",
57
+ win32: "winget install --id GitHub.cli -e --accept-package-agreements",
58
+ manual: "Install the GitHub CLI",
59
+ url: "https://cli.github.com",
60
+ }),
61
+ loginFix: "gh auth login",
62
+ });
63
+ export const vercelAuth = authCheck({
64
+ id: "vercel.auth",
65
+ group: "Vercel",
66
+ label: "Vercel CLI",
67
+ cmd: "vercel",
68
+ probe: ["whoami"],
69
+ installFix: "npm install -g vercel",
70
+ // The only one that is genuinely identical everywhere, because it is an npm package.
71
+ installRemedy: () => ({ command: "npm install -g vercel" }),
72
+ loginFix: "vercel login",
73
+ });
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Installed and on the PATH are different facts.
3
+ *
4
+ * A founder who has VS Code open while being told to install VS Code stops trusting the
5
+ * tool. The fix names the command palette entry, because that is what actually resolves it.
6
+ */
7
+ export const codeOnPath = {
8
+ id: "editor.code",
9
+ group: "Editor",
10
+ label: "`code` on PATH",
11
+ // Not required: nothing about reaching localhost needs the shell command.
12
+ required: false,
13
+ timeoutMs: 3000,
14
+ run: async ({ present }) => {
15
+ if (await present("code"))
16
+ return { state: "pass", detail: "available" };
17
+ return {
18
+ state: "fail",
19
+ detail: "not on PATH",
20
+ fix: 'In VS Code: Command Palette → "Shell Command: Install \'code\' command in PATH"',
21
+ // No command exists — this is a GUI action inside the editor. Saying so plainly
22
+ // stops an agent inventing a symlink into /usr/local/bin that the next VS Code
23
+ // update will overwrite.
24
+ remedy: {
25
+ manual: 'Open VS Code, press the Command Palette shortcut, and run "Shell Command: Install \'code\' command in PATH"',
26
+ },
27
+ };
28
+ },
29
+ };
30
+ export const vscodePresent = {
31
+ id: "editor.vscode",
32
+ group: "Editor",
33
+ label: "VS Code",
34
+ required: false,
35
+ timeoutMs: 3000,
36
+ run: async ({ present }) => (await present("code"))
37
+ ? { state: "pass", detail: "detected" }
38
+ : {
39
+ state: "unknown",
40
+ // Absence of the shell command is not absence of the editor, and there is no
41
+ // portable way to see an installed GUI application. Reporting "not installed"
42
+ // here would be a guess, and a wrong one for most people who hit it.
43
+ detail: "could not detect without the `code` command",
44
+ },
45
+ };