vibecarbon 0.1.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 (495) hide show
  1. package/LICENSE +663 -0
  2. package/README.md +188 -0
  3. package/carbon/.claude/hooks/task-completed-gate.sh +19 -0
  4. package/carbon/.claude/hooks/teammate-idle-gate.sh +29 -0
  5. package/carbon/.claude/settings.json +29 -0
  6. package/carbon/.cursor/rules/vibecarbon.mdc +6 -0
  7. package/carbon/.dockerignore +57 -0
  8. package/carbon/.env.example +219 -0
  9. package/carbon/.github/copilot-instructions.md +3 -0
  10. package/carbon/.github/workflows/deploy.yml +346 -0
  11. package/carbon/.github/workflows/vibecarbon-build.yml +81 -0
  12. package/carbon/.windsurfrules +74 -0
  13. package/carbon/AGENTS.md +422 -0
  14. package/carbon/CLAUDE.md +3 -0
  15. package/carbon/DEVELOPMENT.md +187 -0
  16. package/carbon/Dockerfile +98 -0
  17. package/carbon/LICENSE +21 -0
  18. package/carbon/PRODUCTION.md +364 -0
  19. package/carbon/README.md +193 -0
  20. package/carbon/TESTING.md +138 -0
  21. package/carbon/backup/Dockerfile +75 -0
  22. package/carbon/backup/backup.sh +95 -0
  23. package/carbon/backup/compose-backup.sh +140 -0
  24. package/carbon/biome.json +83 -0
  25. package/carbon/cloud-init/docker-ce-setup.yaml +55 -0
  26. package/carbon/cloud-init/k3s/master-init.sh +215 -0
  27. package/carbon/cloud-init/k3s/supabase-init.sh +167 -0
  28. package/carbon/cloud-init/k3s/worker-init.sh +147 -0
  29. package/carbon/components.json +24 -0
  30. package/carbon/content/blog/authentication-guide.mdx +34 -0
  31. package/carbon/content/blog/getting-started.mdx +41 -0
  32. package/carbon/content/changelog/v0-1-0.mdx +40 -0
  33. package/carbon/content/docs/analytics.mdx +90 -0
  34. package/carbon/content/docs/authentication.mdx +231 -0
  35. package/carbon/content/docs/background-jobs.mdx +116 -0
  36. package/carbon/content/docs/cli.mdx +630 -0
  37. package/carbon/content/docs/database.mdx +236 -0
  38. package/carbon/content/docs/deployment.mdx +227 -0
  39. package/carbon/content/docs/development.mdx +238 -0
  40. package/carbon/content/docs/environments.mdx +84 -0
  41. package/carbon/content/docs/getting-started.mdx +112 -0
  42. package/carbon/content/docs/legal/privacy-policy.mdx +89 -0
  43. package/carbon/content/docs/legal/terms-of-service.mdx +99 -0
  44. package/carbon/content/docs/optional-services.mdx +160 -0
  45. package/carbon/db/Dockerfile +23 -0
  46. package/carbon/docker-compose.dev-init.yml +5 -0
  47. package/carbon/docker-compose.metabase.override.yml +14 -0
  48. package/carbon/docker-compose.metabase.prod.yml +28 -0
  49. package/carbon/docker-compose.metabase.yml +84 -0
  50. package/carbon/docker-compose.n8n.override.yml +14 -0
  51. package/carbon/docker-compose.n8n.prod.yml +31 -0
  52. package/carbon/docker-compose.n8n.yml +97 -0
  53. package/carbon/docker-compose.observability.override.yml +18 -0
  54. package/carbon/docker-compose.observability.prod.yml +28 -0
  55. package/carbon/docker-compose.observability.yml +125 -0
  56. package/carbon/docker-compose.override.yml +28 -0
  57. package/carbon/docker-compose.prod.yml +294 -0
  58. package/carbon/docker-compose.yml +508 -0
  59. package/carbon/docker-entrypoint.sh +12 -0
  60. package/carbon/ha/activate-standby.sh +52 -0
  61. package/carbon/ha/primary-init.sql +36 -0
  62. package/carbon/ha/standby-init.sh +74 -0
  63. package/carbon/k8s/LICENSE +99 -0
  64. package/carbon/k8s/README.md +272 -0
  65. package/carbon/k8s/base/app/deployment.yaml +130 -0
  66. package/carbon/k8s/base/app/hpa.yaml +44 -0
  67. package/carbon/k8s/base/app/kustomization.yaml +10 -0
  68. package/carbon/k8s/base/app/network-policy.yaml +124 -0
  69. package/carbon/k8s/base/app/pdb.yaml +14 -0
  70. package/carbon/k8s/base/app/rbac.yaml +36 -0
  71. package/carbon/k8s/base/app/service.yaml +16 -0
  72. package/carbon/k8s/base/backup/cronjob.yaml +120 -0
  73. package/carbon/k8s/base/backup/kustomization.yaml +7 -0
  74. package/carbon/k8s/base/backup/network-policy.yaml +31 -0
  75. package/carbon/k8s/base/backup/rbac.yaml +7 -0
  76. package/carbon/k8s/base/cluster-autoscaler/deployment.yaml +103 -0
  77. package/carbon/k8s/base/cluster-autoscaler/kustomization.yaml +17 -0
  78. package/carbon/k8s/base/cluster-autoscaler/rbac.yaml +109 -0
  79. package/carbon/k8s/base/config/configmap.yaml +48 -0
  80. package/carbon/k8s/base/config/kustomization.yaml +8 -0
  81. package/carbon/k8s/base/hetzner-ccm/kustomization.yaml +9 -0
  82. package/carbon/k8s/base/hetzner-csi/kustomization.yaml +9 -0
  83. package/carbon/k8s/base/kustomization.yaml +43 -0
  84. package/carbon/k8s/base/namespace.yaml +7 -0
  85. package/carbon/k8s/base/network-policies.yaml +95 -0
  86. package/carbon/k8s/base/registry/kustomization.yaml +5 -0
  87. package/carbon/k8s/base/registry/local-registry.yaml +193 -0
  88. package/carbon/k8s/base/traefik/certificate.yaml +21 -0
  89. package/carbon/k8s/base/traefik/configmap.yaml +13 -0
  90. package/carbon/k8s/base/traefik/deployment.yaml +165 -0
  91. package/carbon/k8s/base/traefik/ingressroute.yaml +141 -0
  92. package/carbon/k8s/base/traefik/kustomization.yaml +11 -0
  93. package/carbon/k8s/base/traefik/middleware.yaml +109 -0
  94. package/carbon/k8s/base/traefik/network-policy.yaml +92 -0
  95. package/carbon/k8s/base/traefik/service.yaml +38 -0
  96. package/carbon/k8s/flux/README.md +49 -0
  97. package/carbon/k8s/flux/clusters/primary/vibecarbon.yaml +128 -0
  98. package/carbon/k8s/flux/clusters/standby/vibecarbon.yaml +83 -0
  99. package/carbon/k8s/gitops/cert-manager-webhook-hetzner/helm-release.yaml +38 -0
  100. package/carbon/k8s/gitops/cert-manager-webhook-hetzner/helm-repository.yaml +16 -0
  101. package/carbon/k8s/gitops/cert-manager-webhook-hetzner/kustomization.yaml +10 -0
  102. package/carbon/k8s/gitops/supabase/helm-release.yaml +66 -0
  103. package/carbon/k8s/gitops/supabase/helm-repository.yaml +18 -0
  104. package/carbon/k8s/gitops/supabase/kustomization.yaml +33 -0
  105. package/carbon/k8s/infra/cert-manager-resources/cluster-issuers-cloudflare.yaml +51 -0
  106. package/carbon/k8s/infra/cert-manager-resources/cluster-issuers-hetzner.yaml +59 -0
  107. package/carbon/k8s/infra/cert-manager-resources/cluster-issuers-manual.yaml +43 -0
  108. package/carbon/k8s/infra/cert-manager-resources/kustomization.yaml +15 -0
  109. package/carbon/k8s/infra/kustomization.yaml +21 -0
  110. package/carbon/k8s/infra/traefik-crds/kustomization.yaml +10 -0
  111. package/carbon/k8s/overlays/local/configmap.yaml +23 -0
  112. package/carbon/k8s/overlays/local/ingressroute-studio.yaml +104 -0
  113. package/carbon/k8s/overlays/local/kustomization.yaml +215 -0
  114. package/carbon/k8s/overlays/local/namespace.yaml +8 -0
  115. package/carbon/k8s/overlays/local/secrets.yaml +32 -0
  116. package/carbon/k8s/overlays/production/kustomization.yaml +34 -0
  117. package/carbon/k8s/test-local.sh +318 -0
  118. package/carbon/k8s/values/supabase.values.yaml +133 -0
  119. package/carbon/package.json +154 -0
  120. package/carbon/runtime.Dockerfile +17 -0
  121. package/carbon/scripts/_dev-jwt.mjs +45 -0
  122. package/carbon/scripts/check-rls.ts +53 -0
  123. package/carbon/scripts/dev-init.js +191 -0
  124. package/carbon/scripts/dev.js +191 -0
  125. package/carbon/scripts/docker-down.js +63 -0
  126. package/carbon/scripts/docker-logs.js +59 -0
  127. package/carbon/scripts/docker-up.js +222 -0
  128. package/carbon/scripts/generate-dev-configs.sh +131 -0
  129. package/carbon/scripts/generate-rss.ts +116 -0
  130. package/carbon/scripts/generate-sitemap.ts +102 -0
  131. package/carbon/scripts/k8s-apply.js +71 -0
  132. package/carbon/scripts/k8s-delete.js +75 -0
  133. package/carbon/scripts/lib/manifest.js +176 -0
  134. package/carbon/scripts/secret-scan.mjs +278 -0
  135. package/carbon/scripts/validate-dev-configs.sh +101 -0
  136. package/carbon/src/client/App.tsx +202 -0
  137. package/carbon/src/client/assets/hyperformant-dark.svg +29 -0
  138. package/carbon/src/client/assets/hyperformant-light.svg +29 -0
  139. package/carbon/src/client/assets/logos/aider.svg +1 -0
  140. package/carbon/src/client/assets/logos/antigravity.svg +1 -0
  141. package/carbon/src/client/assets/logos/bolt.svg +1 -0
  142. package/carbon/src/client/assets/logos/claude-code.svg +1 -0
  143. package/carbon/src/client/assets/logos/copilot.svg +1 -0
  144. package/carbon/src/client/assets/logos/cursor.svg +1 -0
  145. package/carbon/src/client/assets/logos/gemini-cli.svg +1 -0
  146. package/carbon/src/client/assets/logos/lovable.svg +1 -0
  147. package/carbon/src/client/assets/logos/openai-codex.svg +1 -0
  148. package/carbon/src/client/assets/logos/v0.svg +1 -0
  149. package/carbon/src/client/assets/logos/windsurf.svg +1 -0
  150. package/carbon/src/client/assets/vibecarbon-icon.svg +19 -0
  151. package/carbon/src/client/assets/vibecarbon-logo-dark.svg +29 -0
  152. package/carbon/src/client/assets/vibecarbon-logo-light.svg +29 -0
  153. package/carbon/src/client/components/AIIntegrationSection.tsx +120 -0
  154. package/carbon/src/client/components/AppSidebar.tsx +760 -0
  155. package/carbon/src/client/components/ArchitectureSection.tsx +46 -0
  156. package/carbon/src/client/components/CTAFooter.tsx +59 -0
  157. package/carbon/src/client/components/ComparisonSection.tsx +132 -0
  158. package/carbon/src/client/components/ContentPanel.tsx +66 -0
  159. package/carbon/src/client/components/ContentSkeleton.tsx +21 -0
  160. package/carbon/src/client/components/ErrorBoundary.tsx +46 -0
  161. package/carbon/src/client/components/FAQSection.tsx +76 -0
  162. package/carbon/src/client/components/FileUpload.tsx +210 -0
  163. package/carbon/src/client/components/HeaderActions.tsx +17 -0
  164. package/carbon/src/client/components/Hero.tsx +608 -0
  165. package/carbon/src/client/components/ImpersonationBanner.tsx +31 -0
  166. package/carbon/src/client/components/LanguageSwitcher.tsx +67 -0
  167. package/carbon/src/client/components/Logo.tsx +87 -0
  168. package/carbon/src/client/components/LogoStrip.tsx +76 -0
  169. package/carbon/src/client/components/MetricsStrip.tsx +48 -0
  170. package/carbon/src/client/components/Nav.tsx +195 -0
  171. package/carbon/src/client/components/NewsletterSignup.tsx +147 -0
  172. package/carbon/src/client/components/NotificationDrawer.tsx +171 -0
  173. package/carbon/src/client/components/PageHeader.tsx +24 -0
  174. package/carbon/src/client/components/PlanGate.tsx +36 -0
  175. package/carbon/src/client/components/PricingSection.tsx +371 -0
  176. package/carbon/src/client/components/SEO.tsx +34 -0
  177. package/carbon/src/client/components/SmoothScroll.tsx +45 -0
  178. package/carbon/src/client/components/TechStackSection.tsx +165 -0
  179. package/carbon/src/client/components/WorkflowSection.tsx +604 -0
  180. package/carbon/src/client/components/admin/DockerLogs.tsx +276 -0
  181. package/carbon/src/client/components/admin/PerformanceMetrics.tsx +230 -0
  182. package/carbon/src/client/components/admin/ServiceCard.tsx +45 -0
  183. package/carbon/src/client/components/admin/ServicesStatus.tsx +296 -0
  184. package/carbon/src/client/components/architecture/ArchitectureDiagram.tsx +413 -0
  185. package/carbon/src/client/components/auth/AuthProvider.tsx +466 -0
  186. package/carbon/src/client/components/effects/FilmGrainOverlay.tsx +35 -0
  187. package/carbon/src/client/components/effects/FresnelEdge.tsx +49 -0
  188. package/carbon/src/client/components/effects/GlowTracker.tsx +46 -0
  189. package/carbon/src/client/components/effects/SparkBurst.tsx +145 -0
  190. package/carbon/src/client/components/effects/VGlowEffect.tsx +83 -0
  191. package/carbon/src/client/components/effects/index.ts +2 -0
  192. package/carbon/src/client/components/layouts/SidebarLayout.tsx +20 -0
  193. package/carbon/src/client/components/scroll/ScrollSection.tsx +76 -0
  194. package/carbon/src/client/components/scroll/ScrollytellingProvider.tsx +81 -0
  195. package/carbon/src/client/components/scroll/index.ts +2 -0
  196. package/carbon/src/client/components/ui/accordion.tsx +71 -0
  197. package/carbon/src/client/components/ui/alert-dialog.tsx +162 -0
  198. package/carbon/src/client/components/ui/alert.tsx +73 -0
  199. package/carbon/src/client/components/ui/aspect-ratio.tsx +22 -0
  200. package/carbon/src/client/components/ui/avatar.tsx +91 -0
  201. package/carbon/src/client/components/ui/badge.tsx +50 -0
  202. package/carbon/src/client/components/ui/breadcrumb.tsx +100 -0
  203. package/carbon/src/client/components/ui/button-group.tsx +78 -0
  204. package/carbon/src/client/components/ui/button.tsx +120 -0
  205. package/carbon/src/client/components/ui/calendar.tsx +182 -0
  206. package/carbon/src/client/components/ui/card.tsx +85 -0
  207. package/carbon/src/client/components/ui/carousel.tsx +227 -0
  208. package/carbon/src/client/components/ui/chart.tsx +357 -0
  209. package/carbon/src/client/components/ui/checkbox.tsx +27 -0
  210. package/carbon/src/client/components/ui/collapsible.tsx +15 -0
  211. package/carbon/src/client/components/ui/command.tsx +178 -0
  212. package/carbon/src/client/components/ui/context-menu.tsx +233 -0
  213. package/carbon/src/client/components/ui/dialog.tsx +132 -0
  214. package/carbon/src/client/components/ui/drawer.tsx +118 -0
  215. package/carbon/src/client/components/ui/dropdown-menu.tsx +242 -0
  216. package/carbon/src/client/components/ui/empty.tsx +94 -0
  217. package/carbon/src/client/components/ui/field.tsx +226 -0
  218. package/carbon/src/client/components/ui/hover-card.tsx +44 -0
  219. package/carbon/src/client/components/ui/input-group.tsx +146 -0
  220. package/carbon/src/client/components/ui/input-otp.tsx +83 -0
  221. package/carbon/src/client/components/ui/input.tsx +20 -0
  222. package/carbon/src/client/components/ui/item.tsx +188 -0
  223. package/carbon/src/client/components/ui/kbd.tsx +26 -0
  224. package/carbon/src/client/components/ui/label.tsx +21 -0
  225. package/carbon/src/client/components/ui/menubar.tsx +250 -0
  226. package/carbon/src/client/components/ui/navigation-menu.tsx +155 -0
  227. package/carbon/src/client/components/ui/pagination.tsx +102 -0
  228. package/carbon/src/client/components/ui/popover.tsx +75 -0
  229. package/carbon/src/client/components/ui/progress.tsx +66 -0
  230. package/carbon/src/client/components/ui/radio-group.tsx +36 -0
  231. package/carbon/src/client/components/ui/resizable.tsx +46 -0
  232. package/carbon/src/client/components/ui/scroll-area.tsx +48 -0
  233. package/carbon/src/client/components/ui/select.tsx +186 -0
  234. package/carbon/src/client/components/ui/separator.tsx +21 -0
  235. package/carbon/src/client/components/ui/sheet.tsx +124 -0
  236. package/carbon/src/client/components/ui/sidebar.tsx +702 -0
  237. package/carbon/src/client/components/ui/skeleton.tsx +13 -0
  238. package/carbon/src/client/components/ui/slider.tsx +57 -0
  239. package/carbon/src/client/components/ui/sonner.tsx +45 -0
  240. package/carbon/src/client/components/ui/spinner.tsx +15 -0
  241. package/carbon/src/client/components/ui/switch.tsx +30 -0
  242. package/carbon/src/client/components/ui/table.tsx +89 -0
  243. package/carbon/src/client/components/ui/tabs.tsx +73 -0
  244. package/carbon/src/client/components/ui/textarea.tsx +18 -0
  245. package/carbon/src/client/components/ui/toggle-group.tsx +87 -0
  246. package/carbon/src/client/components/ui/toggle.tsx +44 -0
  247. package/carbon/src/client/components/ui/tooltip.tsx +56 -0
  248. package/carbon/src/client/hooks/api/index.ts +14 -0
  249. package/carbon/src/client/hooks/api/useAuthSettings.ts +80 -0
  250. package/carbon/src/client/hooks/api/useSubscription.ts +87 -0
  251. package/carbon/src/client/hooks/use-mobile.ts +21 -0
  252. package/carbon/src/client/hooks/useMousePosition.ts +91 -0
  253. package/carbon/src/client/hooks/useNotifications.tsx +124 -0
  254. package/carbon/src/client/hooks/useOrganizationMembers.ts +127 -0
  255. package/carbon/src/client/hooks/useOrganizations.tsx +230 -0
  256. package/carbon/src/client/hooks/usePackageManager.ts +69 -0
  257. package/carbon/src/client/hooks/useReducedMotion.ts +20 -0
  258. package/carbon/src/client/hooks/useRunningServices.ts +114 -0
  259. package/carbon/src/client/hooks/useScrollProgress.ts +56 -0
  260. package/carbon/src/client/index.css +467 -0
  261. package/carbon/src/client/index.html +56 -0
  262. package/carbon/src/client/lib/admin-services.ts +151 -0
  263. package/carbon/src/client/lib/api.ts +32 -0
  264. package/carbon/src/client/lib/blog.ts +35 -0
  265. package/carbon/src/client/lib/changelog.ts +33 -0
  266. package/carbon/src/client/lib/docs-search.ts +101 -0
  267. package/carbon/src/client/lib/docs.ts +37 -0
  268. package/carbon/src/client/lib/i18n.ts +32 -0
  269. package/carbon/src/client/lib/supabase.ts +72 -0
  270. package/carbon/src/client/lib/tailwind-colors.ts +357 -0
  271. package/carbon/src/client/lib/theme.ts +117 -0
  272. package/carbon/src/client/lib/utils.ts +22 -0
  273. package/carbon/src/client/locales/de.json +529 -0
  274. package/carbon/src/client/locales/en.json +461 -0
  275. package/carbon/src/client/locales/es.json +529 -0
  276. package/carbon/src/client/locales/fr.json +529 -0
  277. package/carbon/src/client/locales/pt.json +529 -0
  278. package/carbon/src/client/main.tsx +56 -0
  279. package/carbon/src/client/mdx.d.ts +13 -0
  280. package/carbon/src/client/pages/ApiDocs.tsx +76 -0
  281. package/carbon/src/client/pages/AuthCallback.tsx +34 -0
  282. package/carbon/src/client/pages/Blog.tsx +167 -0
  283. package/carbon/src/client/pages/Changelog.tsx +171 -0
  284. package/carbon/src/client/pages/Charts.tsx +388 -0
  285. package/carbon/src/client/pages/Checkout.tsx +227 -0
  286. package/carbon/src/client/pages/Contact.tsx +174 -0
  287. package/carbon/src/client/pages/Dashboard.tsx +368 -0
  288. package/carbon/src/client/pages/Docs.tsx +372 -0
  289. package/carbon/src/client/pages/ForgotPassword.tsx +111 -0
  290. package/carbon/src/client/pages/Home.tsx +187 -0
  291. package/carbon/src/client/pages/Legal.tsx +100 -0
  292. package/carbon/src/client/pages/Login.tsx +408 -0
  293. package/carbon/src/client/pages/MFAVerify.tsx +156 -0
  294. package/carbon/src/client/pages/NotFound.tsx +21 -0
  295. package/carbon/src/client/pages/Onboarding.tsx +246 -0
  296. package/carbon/src/client/pages/ResetPassword.tsx +200 -0
  297. package/carbon/src/client/pages/UIComponents.tsx +390 -0
  298. package/carbon/src/client/pages/admin/ContactSubmissions.tsx +220 -0
  299. package/carbon/src/client/pages/admin/Dashboard.tsx +24 -0
  300. package/carbon/src/client/pages/admin/Infrastructure.tsx +257 -0
  301. package/carbon/src/client/pages/admin/Jobs.tsx +225 -0
  302. package/carbon/src/client/pages/admin/Logs.tsx +18 -0
  303. package/carbon/src/client/pages/admin/Newsletter.tsx +300 -0
  304. package/carbon/src/client/pages/admin/Notifications.tsx +603 -0
  305. package/carbon/src/client/pages/admin/Organizations.tsx +306 -0
  306. package/carbon/src/client/pages/admin/Settings.tsx +314 -0
  307. package/carbon/src/client/pages/admin/Theme.tsx +465 -0
  308. package/carbon/src/client/pages/admin/Users.tsx +365 -0
  309. package/carbon/src/client/pages/api-docs.css +156 -0
  310. package/carbon/src/client/pages/organizations/Details.tsx +200 -0
  311. package/carbon/src/client/pages/organizations/Members.tsx +402 -0
  312. package/carbon/src/client/pages/settings/Billing.tsx +473 -0
  313. package/carbon/src/client/pages/settings/Profile.tsx +160 -0
  314. package/carbon/src/client/pages/settings/Security.tsx +341 -0
  315. package/carbon/src/client/public/favicon.svg +19 -0
  316. package/carbon/src/client/public/robots.txt +8 -0
  317. package/carbon/src/server/billing/index.ts +104 -0
  318. package/carbon/src/server/billing/provider.ts +81 -0
  319. package/carbon/src/server/billing/providers/paddle.ts +314 -0
  320. package/carbon/src/server/billing/providers/polar.ts +325 -0
  321. package/carbon/src/server/billing/providers/stripe.ts +233 -0
  322. package/carbon/src/server/emails/templates.ts +116 -0
  323. package/carbon/src/server/index.ts +554 -0
  324. package/carbon/src/server/lib/auth.ts +6 -0
  325. package/carbon/src/server/lib/email.ts +64 -0
  326. package/carbon/src/server/lib/env.ts +112 -0
  327. package/carbon/src/server/lib/errors.ts +21 -0
  328. package/carbon/src/server/lib/logger.ts +17 -0
  329. package/carbon/src/server/lib/rate-limiter.ts +288 -0
  330. package/carbon/src/server/lib/request.ts +34 -0
  331. package/carbon/src/server/lib/stripe.ts +42 -0
  332. package/carbon/src/server/lib/supabase.ts +65 -0
  333. package/carbon/src/server/middleware/requirePlan.ts +80 -0
  334. package/carbon/src/server/routes/_internal/services-status.ts +958 -0
  335. package/carbon/src/server/routes/_internal/verify-role.ts +185 -0
  336. package/carbon/src/server/routes/health.ts +48 -0
  337. package/carbon/src/server/routes/v1/admin/contact.ts +128 -0
  338. package/carbon/src/server/routes/v1/admin/jobs.ts +171 -0
  339. package/carbon/src/server/routes/v1/admin/newsletter.ts +237 -0
  340. package/carbon/src/server/routes/v1/auth.ts +390 -0
  341. package/carbon/src/server/routes/v1/billing.ts +718 -0
  342. package/carbon/src/server/routes/v1/contact.ts +93 -0
  343. package/carbon/src/server/routes/v1/index.ts +1333 -0
  344. package/carbon/src/server/routes/v1/newsletter.ts +181 -0
  345. package/carbon/src/server/routes/v1/performance.ts +157 -0
  346. package/carbon/src/server/routes/v1/stats.ts +170 -0
  347. package/carbon/src/server/routes/v1/theme.ts +106 -0
  348. package/carbon/src/server/routes/webhooks/billing.ts +376 -0
  349. package/carbon/src/server/routes/webhooks/stripe.ts +276 -0
  350. package/carbon/src/server/types.ts +11 -0
  351. package/carbon/src/shared/pricing.ts +155 -0
  352. package/carbon/src/shared/types.ts +338 -0
  353. package/carbon/supabase/migrations/00001_init.sql +717 -0
  354. package/carbon/supabase/migrations/00002_theme_settings.sql +13 -0
  355. package/carbon/supabase/migrations/00003_pg_cron.sql +121 -0
  356. package/carbon/supabase/migrations/00004_contact_newsletter.sql +81 -0
  357. package/carbon/supabase/migrations/00005_localization_languages.sql +22 -0
  358. package/carbon/supabase/seed.sql +16 -0
  359. package/carbon/tests/_helpers/app.ts +45 -0
  360. package/carbon/tests/_helpers/env.ts +37 -0
  361. package/carbon/tests/_helpers/factories.ts +69 -0
  362. package/carbon/tests/_helpers/jwt.ts +23 -0
  363. package/carbon/tests/_helpers/setup-integration.ts +20 -0
  364. package/carbon/tests/_helpers/setup-rtl.ts +12 -0
  365. package/carbon/tests/component/ErrorBoundary.test.tsx +53 -0
  366. package/carbon/tests/component/use-auth-settings.test.tsx +119 -0
  367. package/carbon/tests/integration/server/routes/contact.test.ts +162 -0
  368. package/carbon/tests/integration/server/routes/health.test.ts +61 -0
  369. package/carbon/tests/structural/i18n-parity.test.ts +42 -0
  370. package/carbon/tests/unit/client/utils.test.ts +49 -0
  371. package/carbon/tests/unit/shared/pricing.test.ts +93 -0
  372. package/carbon/tsconfig.json +27 -0
  373. package/carbon/tsconfig.server.json +27 -0
  374. package/carbon/tsconfig.test.json +9 -0
  375. package/carbon/vite.config.ts +110 -0
  376. package/carbon/vitest.config.ts +74 -0
  377. package/carbon/volumes/db/jwt.sql +57 -0
  378. package/carbon/volumes/db/metabase-init.sh +29 -0
  379. package/carbon/volumes/db/n8n-init.sh +25 -0
  380. package/carbon/volumes/db/realtime.sql +33 -0
  381. package/carbon/volumes/db/roles.sql +93 -0
  382. package/carbon/volumes/db/set-passwords.sh +12 -0
  383. package/carbon/volumes/db/super-admin.dev.sql +113 -0
  384. package/carbon/volumes/db/super-admin.generated.sql +113 -0
  385. package/carbon/volumes/db/super-admin.sql +114 -0
  386. package/carbon/volumes/grafana/dashboards/logs.json +179 -0
  387. package/carbon/volumes/grafana/dashboards/overview.json +523 -0
  388. package/carbon/volumes/grafana/dashboards/postgresql.json +337 -0
  389. package/carbon/volumes/grafana/dashboards.dev/logs.json +179 -0
  390. package/carbon/volumes/grafana/dashboards.dev/overview.json +156 -0
  391. package/carbon/volumes/grafana/dashboards.dev/postgresql.json +337 -0
  392. package/carbon/volumes/grafana/provisioning/dashboards/dashboards.dev.yml +16 -0
  393. package/carbon/volumes/grafana/provisioning/dashboards/dashboards.yml +16 -0
  394. package/carbon/volumes/grafana/provisioning/datasources/datasources.yml +43 -0
  395. package/carbon/volumes/kong/docker-entrypoint.sh +9 -0
  396. package/carbon/volumes/kong/kong.yml +208 -0
  397. package/carbon/volumes/loki/loki-config.yml +58 -0
  398. package/carbon/volumes/n8n/hooks.js +131 -0
  399. package/carbon/volumes/n8n/scripts/setup.sh +66 -0
  400. package/carbon/volumes/prometheus/prometheus.yml +43 -0
  401. package/carbon/volumes/promtail/promtail-config.yml +64 -0
  402. package/carbon/volumes/traefik/middlewares.dev.yml +83 -0
  403. package/carbon/volumes/traefik/middlewares.yml +95 -0
  404. package/carbon/volumes/traefik/vite-dev.yml +20 -0
  405. package/package.json +95 -0
  406. package/src/access.js +354 -0
  407. package/src/activate.js +187 -0
  408. package/src/add.js +718 -0
  409. package/src/backup.js +786 -0
  410. package/src/cli.js +350 -0
  411. package/src/configure.js +967 -0
  412. package/src/console.js +155 -0
  413. package/src/create.js +1499 -0
  414. package/src/deploy.js +311 -0
  415. package/src/destroy.js +2033 -0
  416. package/src/diagnose.js +735 -0
  417. package/src/down.js +80 -0
  418. package/src/failover.js +1032 -0
  419. package/src/lib/backup-s3.js +179 -0
  420. package/src/lib/build.js +33 -0
  421. package/src/lib/checksum.js +28 -0
  422. package/src/lib/ci-setup.js +666 -0
  423. package/src/lib/cli/help.js +129 -0
  424. package/src/lib/cli/parse-flags.js +160 -0
  425. package/src/lib/cli/select-action.js +65 -0
  426. package/src/lib/cli/select-environment.js +108 -0
  427. package/src/lib/cli/tty-guard.js +75 -0
  428. package/src/lib/cloudflare.js +447 -0
  429. package/src/lib/colors.js +52 -0
  430. package/src/lib/command.js +361 -0
  431. package/src/lib/config.js +359 -0
  432. package/src/lib/cost.js +103 -0
  433. package/src/lib/deploy/bundle.js +231 -0
  434. package/src/lib/deploy/compose/acme-verify.js +121 -0
  435. package/src/lib/deploy/compose/build-args.js +78 -0
  436. package/src/lib/deploy/compose/ha.js +1874 -0
  437. package/src/lib/deploy/compose/index.js +1294 -0
  438. package/src/lib/deploy/compose/reconcile.js +74 -0
  439. package/src/lib/deploy/github.js +382 -0
  440. package/src/lib/deploy/image.js +191 -0
  441. package/src/lib/deploy/index.js +119 -0
  442. package/src/lib/deploy/k8s/LICENSE +99 -0
  443. package/src/lib/deploy/k8s/gitops-deploy.js +298 -0
  444. package/src/lib/deploy/k8s/ha/index.js +1000 -0
  445. package/src/lib/deploy/k8s/index.js +62 -0
  446. package/src/lib/deploy/k8s/k3s.js +2515 -0
  447. package/src/lib/deploy/orchestrator.js +1401 -0
  448. package/src/lib/deploy/prompts.js +545 -0
  449. package/src/lib/deploy/remote-build.js +130 -0
  450. package/src/lib/deploy/state.js +120 -0
  451. package/src/lib/deploy/utils.js +328 -0
  452. package/src/lib/deploy-logger.js +93 -0
  453. package/src/lib/dns-propagation.js +48 -0
  454. package/src/lib/environment.js +58 -0
  455. package/src/lib/fetch-retry.js +103 -0
  456. package/src/lib/github-environments.js +335 -0
  457. package/src/lib/hetzner-dns.js +377 -0
  458. package/src/lib/hetzner-guided-setup.js +275 -0
  459. package/src/lib/host-keys.js +37 -0
  460. package/src/lib/iac/cloud-init.js +52 -0
  461. package/src/lib/iac/index.js +325 -0
  462. package/src/lib/iac/programs/hetzner-compose.js +130 -0
  463. package/src/lib/iac/programs/hetzner-k8s.js +320 -0
  464. package/src/lib/kubectl.js +81 -0
  465. package/src/lib/licensing/index.js +259 -0
  466. package/src/lib/licensing/tiers.js +181 -0
  467. package/src/lib/licensing/validator.js +171 -0
  468. package/src/lib/merge-package-json.js +90 -0
  469. package/src/lib/operator-ip.js +381 -0
  470. package/src/lib/package-manager.js +111 -0
  471. package/src/lib/perf.js +71 -0
  472. package/src/lib/project-guard.js +39 -0
  473. package/src/lib/project.js +334 -0
  474. package/src/lib/providers/base.js +276 -0
  475. package/src/lib/providers/hetzner-s3.js +656 -0
  476. package/src/lib/providers/hetzner.js +755 -0
  477. package/src/lib/providers/index.js +164 -0
  478. package/src/lib/s3.js +510 -0
  479. package/src/lib/secret-scan.js +583 -0
  480. package/src/lib/secrets.js +63 -0
  481. package/src/lib/server-types.js +195 -0
  482. package/src/lib/shell.js +91 -0
  483. package/src/lib/ssh.js +241 -0
  484. package/src/lib/tracker.js +242 -0
  485. package/src/lib/upgrade-policy.js +170 -0
  486. package/src/lib/validators.js +105 -0
  487. package/src/lib/version.js +5 -0
  488. package/src/remove.js +292 -0
  489. package/src/reset.js +97 -0
  490. package/src/restore.js +871 -0
  491. package/src/scale.js +1734 -0
  492. package/src/shell.js +222 -0
  493. package/src/status.js +981 -0
  494. package/src/up.js +264 -0
  495. package/src/upgrade.js +721 -0
@@ -0,0 +1,84 @@
1
+ ---
2
+ title: "Environments"
3
+ description: "Manage multiple deployment environments with per-environment configuration and defaults."
4
+ order: 8
5
+ ---
6
+
7
+ ## Overview
8
+
9
+ Vibecarbon supports multiple named environments. Each environment is an independent deployment with its own infrastructure, database, secrets, and configuration.
10
+
11
+ ```bash
12
+ npx vibecarbon deploy prod # Production
13
+ npx vibecarbon deploy staging # Staging
14
+ npx vibecarbon deploy dev # Dev / preview
15
+ ```
16
+
17
+ The environment name is free-form — use any name that fits your workflow. `prod` (and its alias `production`) is the only special name and unlocks production-grade defaults.
18
+
19
+ ## Environment Defaults
20
+
21
+ The following defaults differ between `prod` and all other environments:
22
+
23
+ | Setting | `prod` | `staging` / `dev` / `qa` |
24
+ |---------|--------|--------------------------|
25
+ | Default server type | `cpx21` (3 vCPU, 4GB) | `cx22` (2 vCPU, 4GB) |
26
+ | Backup schedule | Every 6 hours | Daily at 2 AM |
27
+ | Backup retention | 30 days | 7 days |
28
+
29
+ All settings can be overridden interactively during the deploy prompt. After the first deploy, choices are saved to `.vibecarbon.json` and reused automatically on subsequent deploys.
30
+
31
+ ## Managing Multiple Environments
32
+
33
+ You can run as many environments as you need. A typical setup:
34
+
35
+ | Environment | Purpose |
36
+ |-------------|---------|
37
+ | `prod` | Live traffic, production data |
38
+ | `staging` | Pre-release validation, mirrors prod config |
39
+ | `dev` | Feature development, throwaway data |
40
+
41
+ Each environment gets its own cluster, domain, and database — they share nothing at the infrastructure level.
42
+
43
+ ## Node Scaling
44
+
45
+ Worker nodes are bounds-controlled at deploy time — the default is `min=1, max=3` (cluster-autoscaler scales 0..(max-min) workers on top of the static floor). Worker bounds are set during the `vibecarbon deploy` interactive prompt or in `.vibecarbon.json`.
46
+
47
+ ```bash
48
+ # Pick mode interactively, including k8s/k8s-ha and worker bounds
49
+ npx vibecarbon deploy prod
50
+
51
+ # Scripted: explicit mode, region, and skip prompts
52
+ npx vibecarbon deploy prod -mode k8s-ha -region hel1 -y
53
+ ```
54
+
55
+ Available modes: `compose`, `compose-ha` (multi-region with streaming replication), `k8s`, and `k8s-ha`. All modes are available on Diamond and Fullerene.
56
+
57
+ To re-tune bounds or worker server types on an existing cluster, run `npx vibecarbon scale` — the wizard walks you through what's changeable. Power users can seed a server-type change with `-type` (e.g. `npx vibecarbon scale prod -type cx33 -y`).
58
+
59
+ ## Backups
60
+
61
+ Backups run automatically on a schedule that differs by environment:
62
+
63
+ ```bash
64
+ # Create a manual backup
65
+ npx vibecarbon backup staging
66
+
67
+ # List backups
68
+ npx vibecarbon backup prod -l
69
+
70
+ # Restore (interactive picker)
71
+ npx vibecarbon restore staging
72
+ ```
73
+
74
+ See the [Deployment](/docs/deployment) guide for full backup and restore options.
75
+
76
+ ## Destroying an Environment
77
+
78
+ To tear down an environment and all its infrastructure:
79
+
80
+ ```bash
81
+ npx vibecarbon destroy staging
82
+ ```
83
+
84
+ This removes the cluster, load balancers, volumes, and DNS records for that environment. Production environments prompt for confirmation before proceeding.
@@ -0,0 +1,112 @@
1
+ ---
2
+ title: "Getting Started"
3
+ description: "Scaffold a full-stack app, run it locally, and deploy to production."
4
+ order: 1
5
+ ---
6
+
7
+ ## Prerequisites
8
+
9
+ - **Node.js 22+** — [Download](https://nodejs.org)
10
+ - **Docker** — [Download](https://docker.com/get-started)
11
+ - **pnpm** — Install with `npm install -g pnpm`
12
+
13
+ ## 1. Create Your Project
14
+
15
+ ```bash
16
+ npx vibecarbon create my-app
17
+ ```
18
+
19
+ This scaffolds a complete full-stack application. You'll be prompted for an admin email and password — these become your first sign-in credentials.
20
+
21
+ Behind the scenes, `create` generates secure secrets, copies the template, installs dependencies, and initializes a git repository. When it finishes you'll have a complete project in the `my-app/` directory, ready for local development.
22
+
23
+ ### What's Included
24
+
25
+ | Category | Features |
26
+ |----------|----------|
27
+ | Auth | Email/password, magic links, OAuth (Google, GitHub, Microsoft, Apple, Discord), MFA |
28
+ | Billing | Multi-provider (Stripe, Paddle, Polar) subscriptions, checkout, portal, plan gating |
29
+ | Admin | Super admin panel, user/org management, impersonation, notifications, jobs, contact, newsletter |
30
+ | Content | MDX blog, changelog, docs (with search), legal pages (privacy, terms) |
31
+ | Engagement | Contact form, newsletter (double opt-in), language switcher, analytics (Plausible) |
32
+ | Infrastructure | File uploads, i18n, background jobs (pg_cron), onboarding wizard, rate limiting |
33
+
34
+ ## 2. Start Developing
35
+
36
+ ```bash
37
+ cd my-app
38
+ npx vibecarbon up
39
+ ```
40
+
41
+ This single command boots your entire development environment:
42
+
43
+ 1. **Starts Docker services** — PostgreSQL, Supabase (Auth, REST, Realtime, Storage, Studio), and Traefik reverse proxy
44
+ 2. **Runs database migrations** — Creates tables, security policies, and your admin user
45
+ 3. **Launches dev servers** — Hono API on port 3000 and Vite on port 5173 with hot reloading
46
+
47
+ Open [http://app.localhost](http://app.localhost) and sign in with the credentials you chose during creation. You'll be guided through onboarding to set up your profile, create an organization, and choose a plan.
48
+
49
+ | Service | URL |
50
+ |---------|-----|
51
+ | App | http://app.localhost |
52
+ | Supabase Studio | http://studio.localhost |
53
+ | Traefik Dashboard | http://traefik.localhost |
54
+
55
+ Before deploying, configure `DOMAIN` in `.env.local` to match your production domain.
56
+
57
+ ## 3. Deploy to Production
58
+
59
+ Deployment requires a license key. Vibecarbon has three tiers:
60
+
61
+ | Tier | Price | Who it's for |
62
+ |------|-------|--------------|
63
+ | **Graphite** | Free | Everyone — create projects, develop locally, use every add-on |
64
+ | **Diamond** | $149 lifetime | Full automation for indie hackers & startups |
65
+ | **Fullerene** | $499 lifetime | Commercial license for agencies & enterprise |
66
+
67
+ Diamond and Fullerene have **identical technical capabilities**. The difference is use rights: Diamond covers indie hackers and startups deploying their own products; Fullerene is the commercial license for agencies and enterprise deploying on behalf of clients or organizations.
68
+
69
+ Activate your license, then deploy:
70
+
71
+ ```bash
72
+ npx vibecarbon activate <your-key>
73
+ npx vibecarbon deploy
74
+ ```
75
+
76
+ The bare `deploy` command opens a guided prompt that walks you through environment selection, mode (`compose`, `compose-ha`, `k8s`, or `k8s-ha`), region, and other settings. Behind the scenes it builds your app, pushes container images, and applies your infrastructure configuration. Traefik handles SSL certificates automatically via Let's Encrypt.
77
+
78
+ See the [Deployment](/docs/deployment) guide for details on Docker Compose and Kubernetes options.
79
+
80
+ ## Project Structure
81
+
82
+ ```
83
+ src/
84
+ ├── client/ # React SPA (Vite)
85
+ ├── server/ # Hono API (Node.js)
86
+ └── shared/ # Shared TypeScript types
87
+
88
+ supabase/
89
+ └── migrations/ # SQL migrations
90
+
91
+ content/
92
+ ├── blog/ # Blog posts (MDX)
93
+ ├── changelog/ # Release notes (MDX)
94
+ └── docs/ # Documentation (MDX)
95
+
96
+ docker-compose.yml # Local dev environment (Supabase, Traefik)
97
+ docker-compose.prod.yml # Production overlay
98
+ k8s/ # Kubernetes manifests (Kustomize)
99
+ .env.local # Local environment variables (git-ignored)
100
+ ```
101
+
102
+ ## Next Steps
103
+
104
+ - [CLI Reference](/docs/cli) — All commands, options, and flags
105
+ - [Development](/docs/development) — Commands, adding pages, routes, and content
106
+ - [Authentication](/docs/authentication) — Sign-in methods and security
107
+ - [Database](/docs/database) — Supabase, migrations, and RLS
108
+ - [Deployment](/docs/deployment) — Deploy to production
109
+ - [Background Jobs](/docs/background-jobs) — Scheduled tasks with pg_cron
110
+ - [Analytics](/docs/analytics) — Privacy-friendly analytics with Plausible
111
+ - [Environments](/docs/environments) — Manage staging, dev, and production environments
112
+ - [Optional Services](/docs/optional-services) — Add n8n, Metabase, Redis, and more
@@ -0,0 +1,89 @@
1
+ ---
2
+ title: "Privacy Policy"
3
+ description: "How we collect, use, and protect your personal information."
4
+ order: 100
5
+ ---
6
+
7
+ **Last updated:** March 2026
8
+
9
+ This Privacy Policy describes how {{PROJECT_NAME}} ("we", "us", or "our") collects, uses, and shares your personal information when you use our service.
10
+
11
+ ## Information We Collect
12
+
13
+ ### Information You Provide
14
+
15
+ - **Account information**: Email address, name, and password when you create an account.
16
+ - **Billing information**: Payment details processed securely through our payment provider. We do not store credit card numbers.
17
+ - **Organization data**: Organization names, member roles, and settings you configure.
18
+ - **Content**: Any data, files, or content you create or upload through the service.
19
+ - **Communications**: Messages you send to us through contact forms or email.
20
+
21
+ ### Information Collected Automatically
22
+
23
+ - **Usage data**: Pages visited, features used, and actions taken within the service.
24
+ - **Device information**: Browser type, operating system, and device identifiers.
25
+ - **Log data**: IP addresses, access times, and referring URLs.
26
+ - **Cookies**: Essential cookies for authentication and session management. We do not use advertising or tracking cookies.
27
+
28
+ ## How We Use Your Information
29
+
30
+ We use your information to:
31
+
32
+ - Provide, maintain, and improve the service
33
+ - Process transactions and send billing-related communications
34
+ - Send service-related notices (security alerts, updates, support messages)
35
+ - Respond to your requests and provide customer support
36
+ - Detect, prevent, and address technical issues and security threats
37
+ - Comply with legal obligations
38
+
39
+ ## Data Sharing
40
+
41
+ We do not sell your personal information. We may share your information with:
42
+
43
+ - **Service providers**: Payment processors, email delivery services, and hosting providers that help us operate the service.
44
+ - **Legal requirements**: When required by law, subpoena, or to protect our rights and the safety of our users.
45
+ - **Business transfers**: In connection with a merger, acquisition, or sale of assets, with notice to affected users.
46
+
47
+ ## Data Security
48
+
49
+ We implement industry-standard security measures including:
50
+
51
+ - Encryption in transit (TLS/HTTPS) and at rest
52
+ - Row-level security (RLS) for database access control
53
+ - Rate limiting and brute force protection
54
+ - Regular security audits and monitoring
55
+ - Account lockout after repeated failed login attempts
56
+
57
+ ## Data Retention
58
+
59
+ - **Account data**: Retained while your account is active. Deleted upon account closure, subject to legal retention requirements.
60
+ - **Backups**: Database backups are retained for 30 days and then permanently deleted.
61
+ - **Logs**: Server logs are retained for 90 days for security and debugging purposes.
62
+
63
+ ## Your Rights
64
+
65
+ Depending on your jurisdiction, you may have the right to:
66
+
67
+ - **Access**: Request a copy of the personal information we hold about you.
68
+ - **Correction**: Request correction of inaccurate personal information.
69
+ - **Deletion**: Request deletion of your personal information.
70
+ - **Portability**: Receive your data in a structured, machine-readable format.
71
+ - **Objection**: Object to processing of your personal information.
72
+
73
+ To exercise these rights, contact us at the email address below.
74
+
75
+ ## International Data Transfers
76
+
77
+ Your data may be processed in countries other than your country of residence. We ensure appropriate safeguards are in place for any international data transfers.
78
+
79
+ ## Children's Privacy
80
+
81
+ Our service is not directed to children under 16. We do not knowingly collect personal information from children. If you believe we have collected information from a child, please contact us.
82
+
83
+ ## Changes to This Policy
84
+
85
+ We may update this Privacy Policy from time to time. We will notify you of material changes by posting the updated policy on our website and updating the "Last updated" date.
86
+
87
+ ## Contact Us
88
+
89
+ If you have questions about this Privacy Policy, please contact us at **{{ADMIN_EMAIL}}**.
@@ -0,0 +1,99 @@
1
+ ---
2
+ title: "Terms of Service"
3
+ description: "Terms and conditions for using our service."
4
+ order: 101
5
+ ---
6
+
7
+ **Last updated:** March 2026
8
+
9
+ These Terms of Service ("Terms") govern your use of {{PROJECT_NAME}} ("the Service"), operated by {{PROJECT_NAME}} ("we", "us", or "our"). By using the Service, you agree to these Terms.
10
+
11
+ ## 1. Account Registration
12
+
13
+ - You must provide accurate and complete information when creating an account.
14
+ - You are responsible for maintaining the confidentiality of your account credentials.
15
+ - You must be at least 16 years old to use the Service.
16
+ - You are responsible for all activities that occur under your account.
17
+ - Notify us immediately if you suspect unauthorized access to your account.
18
+
19
+ ## 2. Acceptable Use
20
+
21
+ You agree not to:
22
+
23
+ - Use the Service for any unlawful purpose or in violation of any applicable laws
24
+ - Attempt to gain unauthorized access to the Service or its related systems
25
+ - Interfere with or disrupt the Service or its infrastructure
26
+ - Upload malicious code, viruses, or harmful content
27
+ - Scrape, crawl, or use automated means to access the Service without permission
28
+ - Impersonate another person or entity
29
+ - Use the Service to send spam or unsolicited communications
30
+ - Circumvent any access controls, rate limits, or security measures
31
+
32
+ ## 3. Subscriptions and Billing
33
+
34
+ - Some features require a paid subscription. Prices are displayed on our pricing page.
35
+ - Subscriptions are billed in advance on a recurring basis (monthly or annually).
36
+ - You may cancel your subscription at any time. Cancellation takes effect at the end of the current billing period.
37
+ - We reserve the right to change pricing with 30 days' notice to active subscribers.
38
+ - Refunds are handled on a case-by-case basis. Contact us if you have billing concerns.
39
+
40
+ ## 4. Your Data
41
+
42
+ - You retain all rights to the data and content you upload to the Service.
43
+ - You grant us a limited license to host, store, and process your data solely to provide the Service.
44
+ - We will not access your data except as necessary to provide the Service, prevent abuse, or comply with legal obligations.
45
+ - You are responsible for maintaining backups of your data. While we perform regular backups, we are not liable for data loss.
46
+ - Upon account deletion, your data will be removed in accordance with our Privacy Policy.
47
+
48
+ ## 5. Organizations and Teams
49
+
50
+ - Organization owners are responsible for managing members and their access levels.
51
+ - Organization owners can transfer ownership to another member.
52
+ - When you join an organization, the organization owner and admins can manage your membership and access within that organization.
53
+
54
+ ## 6. Intellectual Property
55
+
56
+ - The Service, including its design, code, and documentation, is protected by intellectual property laws.
57
+ - We grant you a limited, non-exclusive, non-transferable license to use the Service in accordance with these Terms.
58
+ - Feedback and suggestions you provide about the Service may be used by us without obligation to you.
59
+
60
+ ## 7. Service Availability
61
+
62
+ - We strive to maintain high availability but do not guarantee uninterrupted access.
63
+ - We may perform scheduled maintenance with advance notice when possible.
64
+ - We are not liable for any downtime, data loss, or service interruptions.
65
+
66
+ ## 8. Limitation of Liability
67
+
68
+ TO THE MAXIMUM EXTENT PERMITTED BY LAW:
69
+
70
+ - THE SERVICE IS PROVIDED "AS IS" WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED.
71
+ - WE ARE NOT LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES.
72
+ - OUR TOTAL LIABILITY SHALL NOT EXCEED THE AMOUNT YOU PAID US IN THE 12 MONTHS PRECEDING THE CLAIM.
73
+
74
+ ## 9. Indemnification
75
+
76
+ You agree to indemnify and hold us harmless from any claims, damages, or expenses arising from your use of the Service or violation of these Terms.
77
+
78
+ ## 10. Termination
79
+
80
+ - We may suspend or terminate your account if you violate these Terms.
81
+ - You may terminate your account at any time by contacting us.
82
+ - Upon termination, your right to use the Service ceases immediately.
83
+ - Provisions that by their nature should survive termination will survive (including limitations of liability, indemnification, and dispute resolution).
84
+
85
+ ## 11. Dispute Resolution
86
+
87
+ - These Terms are governed by the laws of the jurisdiction in which we operate.
88
+ - Any disputes shall be resolved through good-faith negotiation first.
89
+ - If negotiation fails, disputes shall be resolved through binding arbitration or in the courts of competent jurisdiction.
90
+
91
+ ## 12. Changes to These Terms
92
+
93
+ - We may update these Terms from time to time.
94
+ - Material changes will be communicated via email or through a notice on the Service.
95
+ - Continued use of the Service after changes constitutes acceptance of the updated Terms.
96
+
97
+ ## 13. Contact Us
98
+
99
+ If you have questions about these Terms, please contact us at **{{ADMIN_EMAIL}}**.
@@ -0,0 +1,160 @@
1
+ ---
2
+ title: "Optional Services"
3
+ description: "Add workflow automation, analytics, caching, monitoring, and CI/CD to your project."
4
+ order: 10
5
+ ---
6
+
7
+ ## Overview
8
+
9
+ Vibecarbon ships with a core stack (Supabase, Traefik, Hono API, React SPA). You can extend it with optional services using the CLI:
10
+
11
+ ```bash
12
+ # Interactive — prompts for which service to add
13
+ npx vibecarbon add
14
+
15
+ # Or seed the service name to skip the prompt
16
+ npx vibecarbon add <service>
17
+ ```
18
+
19
+ Each service adds Docker Compose files, Kubernetes manifests, environment variables, and feature flags to your project. Running the command multiple times is safe — it won't duplicate anything.
20
+
21
+ ```bash
22
+ # See available services in the interactive prompt body
23
+ npx vibecarbon add
24
+
25
+ # Remove a previously added service
26
+ npx vibecarbon remove <service>
27
+ ```
28
+
29
+ ## n8n — Workflow Automation
30
+
31
+ A self-hosted workflow automation platform for building integrations, scheduled jobs, and webhook-driven pipelines.
32
+
33
+ ```bash
34
+ npx vibecarbon add n8n
35
+ ```
36
+
37
+ **What gets added:**
38
+ - `docker-compose.n8n.yml` — n8n container with PostgreSQL backend
39
+ - `k8s/base/n8n/` — Kubernetes manifests
40
+ - `volumes/db/n8n-init.sh` — Database initialization script
41
+ - Environment variables: `N8N_WEBHOOK_URL`, `N8N_API_KEY`
42
+ - Feature flags: `VITE_N8N_ENABLED`, `N8N_ENABLED`
43
+
44
+ | Setting | Value |
45
+ |---------|-------|
46
+ | Dev URL | http://n8n.localhost |
47
+ | Port | 5678 |
48
+ | Production auth | Traefik ForwardAuth (`super_admin` role) |
49
+
50
+ ## Metabase — Business Intelligence
51
+
52
+ A self-hosted analytics dashboard that connects directly to your Supabase PostgreSQL database.
53
+
54
+ ```bash
55
+ npx vibecarbon add metabase
56
+ ```
57
+
58
+ **What gets added:**
59
+ - `docker-compose.metabase.yml` — Metabase container
60
+ - `k8s/base/metabase/` — Kubernetes manifests
61
+ - `volumes/db/metabase-init.sh` — Database initialization script
62
+ - Environment variables: `METABASE_ADMIN_EMAIL`, `METABASE_ADMIN_PASSWORD`
63
+ - Feature flags: `VITE_METABASE_ENABLED`, `METABASE_ENABLED`
64
+
65
+ | Setting | Value |
66
+ |---------|-------|
67
+ | Dev URL | http://metabase.localhost |
68
+ | Port | 3001 |
69
+ | Production auth | Traefik ForwardAuth (`super_admin` role) |
70
+
71
+ ## Redis — Caching & Sessions
72
+
73
+ An in-memory data store for server-side caching, rate limiting, and session storage.
74
+
75
+ ```bash
76
+ npx vibecarbon add redis
77
+ ```
78
+
79
+ **What gets added:**
80
+ - `docker-compose.redis.yml` — Redis container
81
+ - `k8s/base/redis/` — Kubernetes manifests
82
+ - Environment variables: `REDIS_PASSWORD` (auto-generated)
83
+ - Feature flags: `VITE_REDIS_ENABLED`, `REDIS_ENABLED`
84
+
85
+ | Setting | Value |
86
+ |---------|-------|
87
+ | Host | localhost:6379 |
88
+ | Credentials | Stored in `.env.local` (`REDIS_PASSWORD`) |
89
+
90
+ When `REDIS_URL` is set, the built-in rate limiter automatically uses Redis for distributed limiting across multiple replicas. Without Redis, it falls back to an in-memory store — this works for single-instance deployments but does not share state across replicas.
91
+
92
+ ## Observability — Monitoring Stack
93
+
94
+ Enables the built-in Prometheus, Grafana, and Loki stack for metrics, dashboards, and log aggregation.
95
+
96
+ ```bash
97
+ npx vibecarbon add observability
98
+ ```
99
+
100
+ **What gets added:**
101
+ - Enables `docker-compose.observability.yml` (already bundled in your project)
102
+ - Feature flags: `VITE_OBSERVABILITY_ENABLED`, `OBSERVABILITY_ENABLED`
103
+
104
+ | Setting | Value |
105
+ |---------|-------|
106
+ | Grafana URL | http://grafana.localhost |
107
+ | Prometheus Port | 9190 |
108
+ | Loki Port | 3100 |
109
+ | Production auth | Traefik ForwardAuth (`super_admin` role) |
110
+
111
+ ## GitHub — Repository & CI/CD
112
+
113
+ CI/CD lives in `vibecarbon configure`, not `vibecarbon add`. It creates the GitHub repository (if missing), installs the canonical build + deploy workflows under `.github/workflows/`, rewrites image references to `ghcr.io/<owner>/<project>`, and flips `cicdEnabled: true` in `vibecarbon.json`.
114
+
115
+ ```bash
116
+ npx vibecarbon configure
117
+ ```
118
+
119
+ Pick **CI/CD** from the feature list. The wizard handles repo creation, image-ref rewriting, and workflow installation in one pass.
120
+
121
+ **Prerequisites:** The [GitHub CLI](https://cli.github.com/) (`gh`) must be installed and authenticated.
122
+
123
+ **What gets added:**
124
+ - `.github/workflows/vibecarbon-build.yml` — image build pipeline
125
+ - `.github/workflows/deploy.yml` — k8s push-deploy pipeline
126
+ - Container image + Flux GitRepository references updated to `<owner>/<project>`
127
+
128
+ ## Production Auth for Admin Services
129
+
130
+ In development, n8n, Metabase, and Grafana are accessible without authentication. In production, they are protected by Traefik ForwardAuth — only users with the `super_admin` role can access them.
131
+
132
+ The dev override compose files disable this requirement locally. When adding a new service that needs protection, follow the same pattern:
133
+
134
+ 1. Add `traefik.http.routers.<name>.middlewares=super-admin-auth@file` in the service compose file
135
+ 2. Create a dev override that sets the middleware to empty
136
+
137
+ ## Feature Flags
138
+
139
+ Each service sets client and server feature flags in `.env.local`:
140
+
141
+ | Service | Client Flag | Server Flag |
142
+ |---------|------------|-------------|
143
+ | n8n | `VITE_N8N_ENABLED` | `N8N_ENABLED` |
144
+ | Metabase | `VITE_METABASE_ENABLED` | `METABASE_ENABLED` |
145
+ | Redis | `VITE_REDIS_ENABLED` | `REDIS_ENABLED` |
146
+ | Observability | `VITE_OBSERVABILITY_ENABLED` | `OBSERVABILITY_ENABLED` |
147
+
148
+ Use these flags to conditionally render UI elements or enable server-side integrations:
149
+
150
+ ```typescript
151
+ // Client-side
152
+ if (import.meta.env.VITE_N8N_ENABLED === 'true') {
153
+ // Show n8n link in admin sidebar
154
+ }
155
+
156
+ // Server-side
157
+ if (process.env.REDIS_ENABLED === 'true') {
158
+ // Use Redis for caching
159
+ }
160
+ ```
@@ -0,0 +1,23 @@
1
+ # syntax=docker/dockerfile:1
2
+ FROM supabase/postgres:15.8.1.085
3
+
4
+ # Install WAL-G v3.0.5 — kept in lockstep with carbon/backup/Dockerfile.
5
+ # Earlier v3.0.3 URL 404'd in 2026-04-26 (alpine variant retired upstream),
6
+ # and curl without --fail piped a 404 HTML body into tar which surfaced
7
+ # as "not in gzip format" instead of an honest HTTP error. --fail makes
8
+ # curl exit non-zero on 4xx/5xx so the failure is unmistakable.
9
+ #
10
+ # Single RUN with `apt-get purge -y --auto-remove curl` collapses the
11
+ # install + cleanup into one layer so the curl binary doesn't end up
12
+ # in the published image (saving ~5MB and reducing attack surface).
13
+ RUN apt-get update && apt-get install -y --no-install-recommends \
14
+ curl \
15
+ ca-certificates \
16
+ && curl -fL https://github.com/wal-g/wal-g/releases/download/v3.0.5/wal-g-pg-ubuntu-22.04-amd64.tar.gz | tar -xz \
17
+ && mv wal-g-pg-ubuntu-22.04-amd64 /usr/local/bin/wal-g \
18
+ && chmod +x /usr/local/bin/wal-g \
19
+ && apt-get purge -y --auto-remove curl \
20
+ && rm -rf /var/lib/apt/lists/*
21
+
22
+ # The supabase image already has many configurations.
23
+ # We will enable archiving via environment variables or a custom config snippet if needed.
@@ -0,0 +1,5 @@
1
+ # Generated by dev-init.js — DO NOT COMMIT
2
+ services:
3
+ db:
4
+ volumes:
5
+ - ./volumes/db/super-admin.generated.sql:/docker-entrypoint-initdb.d/post-init/super-admin.sql:Z
@@ -0,0 +1,14 @@
1
+ # Development overrides for Metabase
2
+ # Use with: docker compose -f docker-compose.yml -f docker-compose.metabase.yml -f docker-compose.metabase.override.yml up -d
3
+
4
+ services:
5
+ metabase:
6
+ labels:
7
+ # Dev: No auth required (same as studio/traefik in local dev)
8
+ # Production uses ForwardAuth via docker-compose.metabase.yml labels
9
+ # Empty middlewares override removes ForwardAuth requirement
10
+ - "traefik.enable=true"
11
+ - "traefik.http.routers.metabase.rule=Host(`metabase.localhost`)"
12
+ - "traefik.http.routers.metabase.entrypoints=web"
13
+ - "traefik.http.routers.metabase.middlewares="
14
+ - "traefik.http.services.metabase.loadbalancer.server.port=3000"
@@ -0,0 +1,28 @@
1
+ # Metabase Production Overrides
2
+ # Use with: docker compose -f docker-compose.yml -f docker-compose.prod.yml -f docker-compose.metabase.yml -f docker-compose.metabase.prod.yml up -d
3
+ #
4
+ # Adds:
5
+ # - SSL subdomain routing for Metabase (metabase.yourdomain.com)
6
+ # - ForwardAuth (super_admin role required)
7
+ # - HTTP to HTTPS redirect
8
+
9
+ services:
10
+ metabase:
11
+ environment:
12
+ # Override site URL for production subdomain
13
+ - MB_SITE_URL=https://metabase.${DOMAIN}
14
+ - MB_EMBEDDING_APP_ORIGIN=https://${DOMAIN}
15
+ labels:
16
+ # Production Traefik routing with SSL
17
+ - "traefik.enable=true"
18
+ # HTTPS router with super_admin auth
19
+ - "traefik.http.routers.metabase.rule=Host(`metabase.${DOMAIN}`)"
20
+ - "traefik.http.routers.metabase.entrypoints=websecure"
21
+ - "traefik.http.routers.metabase.tls=true"
22
+ - "traefik.http.routers.metabase.tls.certresolver=letsencrypt"
23
+ - "traefik.http.routers.metabase.middlewares=super-admin-auth@file"
24
+ - "traefik.http.services.metabase.loadbalancer.server.port=3000"
25
+ # HTTP to HTTPS redirect
26
+ - "traefik.http.routers.metabase-http.rule=Host(`metabase.${DOMAIN}`)"
27
+ - "traefik.http.routers.metabase-http.entrypoints=web"
28
+ - "traefik.http.routers.metabase-http.middlewares=redirect-to-https"