ui-syncup 0.3.13 → 0.4.0-beta.2

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 (1047) hide show
  1. package/.agents/skills/ai-spec-workflow/SKILL.md +58 -0
  2. package/.agents/skills/ai-spec-workflow/references/AI_SPECIFICATION_WORKFLOW.md +1434 -0
  3. package/.agents/skills/ai-spec-workflow/references/templates/design-template.md +729 -0
  4. package/.agents/skills/ai-spec-workflow/references/templates/requirements-template.md +179 -0
  5. package/.agents/skills/ai-spec-workflow/references/templates/tasks-template.md +501 -0
  6. package/.agents/skills/animation-designer/SKILL.md +688 -0
  7. package/.agents/skills/animation-designer/manifest.yaml +44 -0
  8. package/.agents/skills/brainstorming/SKILL.md +54 -0
  9. package/.agents/skills/contract-driven-ui/SKILL.md +270 -0
  10. package/.agents/skills/dispatching-parallel-agents/SKILL.md +180 -0
  11. package/.agents/skills/executing-plans/SKILL.md +76 -0
  12. package/.agents/skills/executing-specs/SKILL.md +53 -0
  13. package/.agents/skills/finishing-a-development-branch/SKILL.md +200 -0
  14. package/.agents/skills/github-workflow-automation/SKILL.md +846 -0
  15. package/.agents/skills/react-best-practices/AGENTS.md +2249 -0
  16. package/.agents/skills/react-best-practices/README.md +123 -0
  17. package/.agents/skills/react-best-practices/SKILL.md +121 -0
  18. package/.agents/skills/react-best-practices/metadata.json +15 -0
  19. package/.agents/skills/react-best-practices/rules/_sections.md +46 -0
  20. package/.agents/skills/react-best-practices/rules/_template.md +28 -0
  21. package/.agents/skills/react-best-practices/rules/advanced-event-handler-refs.md +55 -0
  22. package/.agents/skills/react-best-practices/rules/advanced-use-latest.md +49 -0
  23. package/.agents/skills/react-best-practices/rules/async-api-routes.md +38 -0
  24. package/.agents/skills/react-best-practices/rules/async-defer-await.md +80 -0
  25. package/.agents/skills/react-best-practices/rules/async-dependencies.md +36 -0
  26. package/.agents/skills/react-best-practices/rules/async-parallel.md +28 -0
  27. package/.agents/skills/react-best-practices/rules/async-suspense-boundaries.md +99 -0
  28. package/.agents/skills/react-best-practices/rules/bundle-barrel-imports.md +59 -0
  29. package/.agents/skills/react-best-practices/rules/bundle-conditional.md +31 -0
  30. package/.agents/skills/react-best-practices/rules/bundle-defer-third-party.md +49 -0
  31. package/.agents/skills/react-best-practices/rules/bundle-dynamic-imports.md +35 -0
  32. package/.agents/skills/react-best-practices/rules/bundle-preload.md +50 -0
  33. package/.agents/skills/react-best-practices/rules/client-event-listeners.md +74 -0
  34. package/.agents/skills/react-best-practices/rules/client-swr-dedup.md +56 -0
  35. package/.agents/skills/react-best-practices/rules/js-batch-dom-css.md +82 -0
  36. package/.agents/skills/react-best-practices/rules/js-cache-function-results.md +80 -0
  37. package/.agents/skills/react-best-practices/rules/js-cache-property-access.md +28 -0
  38. package/.agents/skills/react-best-practices/rules/js-cache-storage.md +70 -0
  39. package/.agents/skills/react-best-practices/rules/js-combine-iterations.md +32 -0
  40. package/.agents/skills/react-best-practices/rules/js-early-exit.md +50 -0
  41. package/.agents/skills/react-best-practices/rules/js-hoist-regexp.md +45 -0
  42. package/.agents/skills/react-best-practices/rules/js-index-maps.md +37 -0
  43. package/.agents/skills/react-best-practices/rules/js-length-check-first.md +49 -0
  44. package/.agents/skills/react-best-practices/rules/js-min-max-loop.md +82 -0
  45. package/.agents/skills/react-best-practices/rules/js-set-map-lookups.md +24 -0
  46. package/.agents/skills/react-best-practices/rules/js-tosorted-immutable.md +57 -0
  47. package/.agents/skills/react-best-practices/rules/rendering-activity.md +26 -0
  48. package/.agents/skills/react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
  49. package/.agents/skills/react-best-practices/rules/rendering-conditional-render.md +40 -0
  50. package/.agents/skills/react-best-practices/rules/rendering-content-visibility.md +38 -0
  51. package/.agents/skills/react-best-practices/rules/rendering-hoist-jsx.md +46 -0
  52. package/.agents/skills/react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
  53. package/.agents/skills/react-best-practices/rules/rendering-svg-precision.md +28 -0
  54. package/.agents/skills/react-best-practices/rules/rerender-defer-reads.md +39 -0
  55. package/.agents/skills/react-best-practices/rules/rerender-dependencies.md +45 -0
  56. package/.agents/skills/react-best-practices/rules/rerender-derived-state.md +29 -0
  57. package/.agents/skills/react-best-practices/rules/rerender-functional-setstate.md +74 -0
  58. package/.agents/skills/react-best-practices/rules/rerender-lazy-state-init.md +58 -0
  59. package/.agents/skills/react-best-practices/rules/rerender-memo.md +44 -0
  60. package/.agents/skills/react-best-practices/rules/rerender-transitions.md +40 -0
  61. package/.agents/skills/react-best-practices/rules/server-after-nonblocking.md +73 -0
  62. package/.agents/skills/react-best-practices/rules/server-cache-lru.md +41 -0
  63. package/.agents/skills/react-best-practices/rules/server-cache-react.md +26 -0
  64. package/.agents/skills/react-best-practices/rules/server-parallel-fetching.md +79 -0
  65. package/.agents/skills/react-best-practices/rules/server-serialization.md +38 -0
  66. package/.agents/skills/react-ui-patterns/SKILL.md +289 -0
  67. package/.agents/skills/receiving-code-review/SKILL.md +213 -0
  68. package/.agents/skills/requesting-code-review/SKILL.md +105 -0
  69. package/.agents/skills/requesting-code-review/code-reviewer.md +146 -0
  70. package/.agents/skills/reviewing-code/SKILL.md +28 -0
  71. package/.agents/skills/shadcn/SKILL.md +240 -0
  72. package/.agents/skills/shadcn/agents/openai.yml +5 -0
  73. package/.agents/skills/shadcn/assets/shadcn-small.png +0 -0
  74. package/.agents/skills/shadcn/assets/shadcn.png +0 -0
  75. package/.agents/skills/shadcn/cli.md +255 -0
  76. package/.agents/skills/shadcn/customization.md +202 -0
  77. package/.agents/skills/shadcn/evals/evals.json +47 -0
  78. package/.agents/skills/shadcn/mcp.md +94 -0
  79. package/.agents/skills/shadcn/rules/base-vs-radix.md +306 -0
  80. package/.agents/skills/shadcn/rules/composition.md +195 -0
  81. package/.agents/skills/shadcn/rules/forms.md +192 -0
  82. package/.agents/skills/shadcn/rules/icons.md +101 -0
  83. package/.agents/skills/shadcn/rules/styling.md +162 -0
  84. package/.agents/skills/steering-creation/SKILL.md +221 -0
  85. package/.agents/skills/steering-creation/references/STEERING_CREATION_INSTRUCTION.md +850 -0
  86. package/.agents/skills/subagent-driven-development/SKILL.md +240 -0
  87. package/.agents/skills/subagent-driven-development/code-quality-reviewer-prompt.md +20 -0
  88. package/.agents/skills/subagent-driven-development/implementer-prompt.md +78 -0
  89. package/.agents/skills/subagent-driven-development/spec-reviewer-prompt.md +61 -0
  90. package/.agents/skills/systematic-debugging/CREATION-LOG.md +119 -0
  91. package/.agents/skills/systematic-debugging/SKILL.md +296 -0
  92. package/.agents/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
  93. package/.agents/skills/systematic-debugging/condition-based-waiting.md +115 -0
  94. package/.agents/skills/systematic-debugging/defense-in-depth.md +122 -0
  95. package/.agents/skills/systematic-debugging/find-polluter.sh +63 -0
  96. package/.agents/skills/systematic-debugging/root-cause-tracing.md +169 -0
  97. package/.agents/skills/systematic-debugging/test-academic.md +14 -0
  98. package/.agents/skills/systematic-debugging/test-pressure-1.md +58 -0
  99. package/.agents/skills/systematic-debugging/test-pressure-2.md +68 -0
  100. package/.agents/skills/systematic-debugging/test-pressure-3.md +69 -0
  101. package/.agents/skills/test-driven-development/SKILL.md +371 -0
  102. package/.agents/skills/test-driven-development/testing-anti-patterns.md +299 -0
  103. package/.agents/skills/using-git-worktrees/SKILL.md +217 -0
  104. package/.agents/skills/using-superpowers/SKILL.md +87 -0
  105. package/.agents/skills/verification-before-completion/SKILL.md +139 -0
  106. package/.agents/skills/web-design-guidelines/SKILL.md +36 -0
  107. package/.agents/skills/writing-plans/SKILL.md +116 -0
  108. package/.agents/skills/writing-skills/SKILL.md +655 -0
  109. package/.agents/skills/writing-skills/anthropic-best-practices.md +1150 -0
  110. package/.agents/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
  111. package/.agents/skills/writing-skills/graphviz-conventions.dot +172 -0
  112. package/.agents/skills/writing-skills/persuasion-principles.md +187 -0
  113. package/.agents/skills/writing-skills/render-graphs.js +168 -0
  114. package/.agents/skills/writing-skills/testing-skills-with-subagents.md +384 -0
  115. package/.ai/steering/product.md +51 -0
  116. package/.ai/steering/structure.md +275 -0
  117. package/.ai/steering/tech.md +188 -0
  118. package/.claude/agents/database-architect.md +96 -0
  119. package/.claude/agents/deployment-pipeline-architect.md +122 -0
  120. package/.claude/agents/nextjs-expert.md +69 -0
  121. package/.claude/agents/ui-design-expert.md +106 -0
  122. package/.claudeignore +69 -0
  123. package/.dockerignore +8 -0
  124. package/.env.development +86 -0
  125. package/.env.example +171 -0
  126. package/.env.production +139 -0
  127. package/.env.test +58 -0
  128. package/.gitattributes +2 -0
  129. package/.github/ISSUE_TEMPLATE/bug_report.yml +33 -0
  130. package/.github/ISSUE_TEMPLATE/feature_request.yml +20 -0
  131. package/.github/PULL_REQUEST_TEMPLATE.md +23 -0
  132. package/.github/workflows/ci.yml +64 -0
  133. package/.github/workflows/release.yml +174 -0
  134. package/.nvmrc +1 -0
  135. package/.releaserc.json +18 -0
  136. package/.vercelignore +73 -0
  137. package/AGENTS.md +544 -0
  138. package/CHANGELOG.md +69 -0
  139. package/CODE_OF_CONDUCT.md +21 -0
  140. package/CONTRIBUTING.md +32 -0
  141. package/Dockerfile +84 -0
  142. package/LICENSE +21 -0
  143. package/README.md +328 -59
  144. package/SECURITY.md +16 -0
  145. package/bun.lock +3853 -0
  146. package/cli/README.md +94 -0
  147. package/cli/bun.lock +306 -0
  148. package/cli/index.ts +96 -0
  149. package/cli/package-lock.json +2157 -0
  150. package/cli/package.json +30 -0
  151. package/cli/src/commands/backup.ts +78 -0
  152. package/cli/src/commands/doctor.ts +82 -0
  153. package/cli/src/commands/init.ts +234 -0
  154. package/cli/src/commands/logs.ts +26 -0
  155. package/cli/src/commands/open.ts +23 -0
  156. package/cli/src/commands/remove.ts +44 -0
  157. package/cli/src/commands/restart.ts +21 -0
  158. package/cli/src/commands/restore.ts +90 -0
  159. package/cli/src/commands/start.ts +26 -0
  160. package/cli/src/commands/status.ts +25 -0
  161. package/cli/src/commands/stop.ts +20 -0
  162. package/cli/src/commands/upgrade.ts +28 -0
  163. package/cli/src/lib/docker.ts +40 -0
  164. package/cli/src/lib/env.ts +42 -0
  165. package/cli/src/lib/ui.ts +43 -0
  166. package/cli/tsconfig.json +13 -0
  167. package/cli/tsup.config.ts +12 -0
  168. package/components.json +24 -0
  169. package/docker/README.md +430 -0
  170. package/docker/compose.dev-minio.yml +30 -0
  171. package/docker/compose.dev.yml +39 -0
  172. package/docker/compose.local.yml +84 -0
  173. package/docker/compose.yml +153 -0
  174. package/docs/VERSIONING.md +101 -0
  175. package/docs/database/DRIZZLE_COMMANDS_EXPLAINED.md +1779 -0
  176. package/docs/database/DRIZZLE_ZOD_POSTGRESQL_INSTRUCTION.md +646 -0
  177. package/docs/database/MIGRATION_BEST_PRACTICES.md +601 -0
  178. package/docs/database/MIGRATION_ROLLBACK.md +1080 -0
  179. package/docs/database/MIGRATION_SYSTEM.md +165 -0
  180. package/docs/database/MIGRATION_TROUBLESHOOTING.md +881 -0
  181. package/docs/development/ENVIRONMENT_CONFIG.md +896 -0
  182. package/docs/development/LOCAL_DEVELOPMENT.md +456 -0
  183. package/docs/development/REMOTE_DATABASE_SETUP.md +786 -0
  184. package/docs/development/STORAGE_SETUP.md +207 -0
  185. package/docs/development/SUPABASE_LOCAL_SETUP.md +178 -0
  186. package/docs/development/TESTING.md +714 -0
  187. package/docs/feature-architectures/LOADING_ARCHITECTURE.md +343 -0
  188. package/docs/feature-architectures/NOTIFICATION_ARCHITECTURE.md +858 -0
  189. package/docs/feature-architectures/RATE_LIMIT_RESET.md +147 -0
  190. package/docs/feature-architectures/RBAC.md +1132 -0
  191. package/docs/feature-architectures/RESOURCE_LIMITS.md +69 -0
  192. package/docs/feature-architectures/SECURITY.md +284 -0
  193. package/docs/feature-architectures/WORKSPACES.md +278 -0
  194. package/docs/plans/admin-setup-wizard-routing-plan.md +623 -0
  195. package/drizzle/0000_purple_wilson_fisk.sql +360 -0
  196. package/drizzle/0001_drop_instance_public_url.sql +1 -0
  197. package/drizzle/meta/0000_snapshot.json +3118 -0
  198. package/drizzle/meta/_journal.json +20 -0
  199. package/drizzle.config.ts +13 -0
  200. package/eslint.config.mjs +44 -0
  201. package/install.sh +180 -0
  202. package/next.config.ts +91 -0
  203. package/package.json +128 -22
  204. package/playwright.config.ts +70 -0
  205. package/postcss.config.mjs +7 -0
  206. package/public/file.svg +1 -0
  207. package/public/globe.svg +1 -0
  208. package/public/logo.svg +11 -0
  209. package/public/next.svg +1 -0
  210. package/public/playground/CPM-101/as-is-image.jpg +0 -0
  211. package/public/playground/CPM-101/to-be-image.jpg +0 -0
  212. package/public/playground/TEST-1/LinkedIn-skeleton-screen.png +0 -0
  213. package/public/playground/TEST-1/https___dev-to-uploads.s3.amazonaws.com_uploads_articles_vuahe90ka1mkx9aepmea.webp +0 -0
  214. package/public/playground/TEST-1/linkedin_skeletonscreen.jpg +0 -0
  215. package/public/vercel.svg +1 -0
  216. package/public/window.svg +1 -0
  217. package/scripts/__tests__/migrate.integration.test.ts +642 -0
  218. package/scripts/__tests__/migrate.property.test.ts +1714 -0
  219. package/scripts/__tests__/migrate.test.ts +536 -0
  220. package/scripts/admin-reset-password.ts +114 -0
  221. package/scripts/check-email-queue.ts +99 -0
  222. package/scripts/check-sessions.ts +50 -0
  223. package/scripts/db-pull-data.sh +73 -0
  224. package/scripts/force-verify-email.sh +13 -0
  225. package/scripts/migrate.ts +693 -0
  226. package/scripts/process-email-queue.ts +26 -0
  227. package/scripts/reset-db.ts +47 -0
  228. package/scripts/reset-rate-limit.sh +26 -0
  229. package/scripts/reset-remote-db.sql +31 -0
  230. package/scripts/retry-failed-emails.ts +67 -0
  231. package/scripts/seed.ts +605 -0
  232. package/scripts/setup-monitoring.sh +440 -0
  233. package/scripts/sync-migration-tracking.ts +113 -0
  234. package/scripts/test-ci-error-handling.sh +237 -0
  235. package/scripts/test-ci-workflow.sh +200 -0
  236. package/scripts/test-migration.sh +151 -0
  237. package/scripts/validate-env.ts +25 -0
  238. package/scripts/validate-migration-system.ts +566 -0
  239. package/scripts/verify-ci-status-reporting.sh +206 -0
  240. package/scripts/verify-user-email.sql +22 -0
  241. package/scripts/verify-vercel-integration.ts +292 -0
  242. package/seed_data.md +54 -0
  243. package/src/app/(protected)/(team)/(routes)/[projectSlug]/error.tsx +89 -0
  244. package/src/app/(protected)/(team)/(routes)/[projectSlug]/loading.tsx +101 -0
  245. package/src/app/(protected)/(team)/(routes)/[projectSlug]/page.tsx +91 -0
  246. package/src/app/(protected)/(team)/(routes)/issue/[issueKey]/README.md +192 -0
  247. package/src/app/(protected)/(team)/(routes)/issue/[issueKey]/error.tsx +58 -0
  248. package/src/app/(protected)/(team)/(routes)/issue/[issueKey]/loading.tsx +14 -0
  249. package/src/app/(protected)/(team)/(routes)/issue/[issueKey]/not-found.tsx +47 -0
  250. package/src/app/(protected)/(team)/(routes)/issue/[issueKey]/page.tsx +91 -0
  251. package/src/app/(protected)/(team)/projects/page.tsx +16 -0
  252. package/src/app/(protected)/(team)/team/settings/(section)/instance/page.tsx +52 -0
  253. package/src/app/(protected)/(team)/team/settings/(section)/integrations/loading.tsx +5 -0
  254. package/src/app/(protected)/(team)/team/settings/(section)/integrations/page.tsx +23 -0
  255. package/src/app/(protected)/(team)/team/settings/(section)/members/loading.tsx +5 -0
  256. package/src/app/(protected)/(team)/team/settings/(section)/members/page.tsx +35 -0
  257. package/src/app/(protected)/(team)/team/settings/layout.tsx +72 -0
  258. package/src/app/(protected)/(team)/team/settings/loading.tsx +5 -0
  259. package/src/app/(protected)/(team)/team/settings/page.tsx +71 -0
  260. package/src/app/(protected)/dev/auth/README.md +151 -0
  261. package/src/app/(protected)/dev/auth/page.tsx +590 -0
  262. package/src/app/(protected)/layout.test.tsx +209 -0
  263. package/src/app/(protected)/layout.tsx +28 -0
  264. package/src/app/(protected)/onboarding/page.tsx +27 -0
  265. package/src/app/(protected)/settings/integrations/page.tsx +23 -0
  266. package/src/app/(protected)/settings/layout.tsx +26 -0
  267. package/src/app/(protected)/settings/notifications/page.tsx +26 -0
  268. package/src/app/(protected)/settings/other/page.tsx +23 -0
  269. package/src/app/(protected)/settings/page.tsx +23 -0
  270. package/src/app/(protected)/settings/preferences/page.tsx +23 -0
  271. package/src/app/(protected)/settings/security/page.tsx +37 -0
  272. package/src/app/(public)/forgot-password/page.tsx +20 -0
  273. package/src/app/(public)/invite/project/[token]/error.tsx +50 -0
  274. package/src/app/(public)/invite/project/[token]/loading.tsx +39 -0
  275. package/src/app/(public)/invite/project/[token]/page.tsx +156 -0
  276. package/src/app/(public)/layout.tsx +9 -0
  277. package/src/app/(public)/privacy-policy/page.tsx +12 -0
  278. package/src/app/(public)/reset-password/page.tsx +37 -0
  279. package/src/app/(public)/setup/__tests__/page.test.tsx +30 -0
  280. package/src/app/(public)/setup/page.tsx +17 -0
  281. package/src/app/(public)/share/issue/[token]/page.tsx +51 -0
  282. package/src/app/(public)/sign-in/page.tsx +55 -0
  283. package/src/app/(public)/sign-up/page.tsx +23 -0
  284. package/src/app/(public)/verify-email/page.tsx +22 -0
  285. package/src/app/(public)/verify-email-confirm/page.tsx +40 -0
  286. package/src/app/api/auth/[...all]/route.ts +6 -0
  287. package/src/app/api/auth/delete-account/route.ts +134 -0
  288. package/src/app/api/auth/dev/force-verify/route.ts +180 -0
  289. package/src/app/api/auth/dev/reset-rate-limit/route.ts +144 -0
  290. package/src/app/api/auth/dev/sessions/route.ts +172 -0
  291. package/src/app/api/auth/forgot-password/__tests__/forgot-password.property.test.ts +397 -0
  292. package/src/app/api/auth/forgot-password/route.ts +277 -0
  293. package/src/app/api/auth/logout/route.ts +115 -0
  294. package/src/app/api/auth/me/route.ts +123 -0
  295. package/src/app/api/auth/providers/__tests__/route.test.ts +236 -0
  296. package/src/app/api/auth/providers/route.ts +119 -0
  297. package/src/app/api/auth/resend-verification/route.ts +262 -0
  298. package/src/app/api/auth/reset-password/__tests__/reset-password.property.test.ts +493 -0
  299. package/src/app/api/auth/reset-password/__tests__/route.test.ts +284 -0
  300. package/src/app/api/auth/reset-password/route.ts +251 -0
  301. package/src/app/api/auth/verify-email/route.ts +232 -0
  302. package/src/app/api/example-cors/route.ts +61 -0
  303. package/src/app/api/health/route.ts +14 -0
  304. package/src/app/api/invite/project/[token]/__tests__/accept-invitation.integration.test.ts +348 -0
  305. package/src/app/api/invite/project/[token]/decline/route.ts +99 -0
  306. package/src/app/api/invite/project/[token]/route.ts +269 -0
  307. package/src/app/api/issues/[issueId]/activities/route.ts +213 -0
  308. package/src/app/api/issues/[issueId]/attachments/[attachmentId]/annotations/[annotationId]/comments/[commentId]/route.ts +486 -0
  309. package/src/app/api/issues/[issueId]/attachments/[attachmentId]/annotations/[annotationId]/comments/route.ts +283 -0
  310. package/src/app/api/issues/[issueId]/attachments/[attachmentId]/annotations/[annotationId]/read/route.ts +242 -0
  311. package/src/app/api/issues/[issueId]/attachments/[attachmentId]/annotations/[annotationId]/route.ts +534 -0
  312. package/src/app/api/issues/[issueId]/attachments/[attachmentId]/annotations/route.ts +514 -0
  313. package/src/app/api/issues/[issueId]/attachments/[attachmentId]/route.ts +161 -0
  314. package/src/app/api/issues/[issueId]/attachments/route.ts +376 -0
  315. package/src/app/api/issues/[issueId]/route.ts +516 -0
  316. package/src/app/api/notifications/[id]/read/route.ts +131 -0
  317. package/src/app/api/notifications/__tests__/notifications.integration.test.ts +350 -0
  318. package/src/app/api/notifications/read-all/route.ts +72 -0
  319. package/src/app/api/notifications/route.ts +148 -0
  320. package/src/app/api/notifications/unread-count/route.ts +77 -0
  321. package/src/app/api/projects/[id]/activities/route.ts +174 -0
  322. package/src/app/api/projects/[id]/invitations/[invitationId]/resend/route.ts +99 -0
  323. package/src/app/api/projects/[id]/invitations/[invitationId]/route.ts +96 -0
  324. package/src/app/api/projects/[id]/invitations/route.ts +254 -0
  325. package/src/app/api/projects/[id]/issues/route.ts +452 -0
  326. package/src/app/api/projects/[id]/join/route.ts +207 -0
  327. package/src/app/api/projects/[id]/members/[memberId]/route.ts +364 -0
  328. package/src/app/api/projects/[id]/members/me/route.ts +121 -0
  329. package/src/app/api/projects/[id]/members/route.ts +129 -0
  330. package/src/app/api/projects/[id]/route.ts +476 -0
  331. package/src/app/api/projects/route.ts +394 -0
  332. package/src/app/api/setup/admin/route.ts +255 -0
  333. package/src/app/api/setup/complete/__tests__/route.test.ts +60 -0
  334. package/src/app/api/setup/complete/route.ts +244 -0
  335. package/src/app/api/setup/config/route.ts +195 -0
  336. package/src/app/api/setup/export/route.ts +111 -0
  337. package/src/app/api/setup/health/route.ts +74 -0
  338. package/src/app/api/setup/import/route.ts +154 -0
  339. package/src/app/api/setup/status/route.ts +82 -0
  340. package/src/app/api/setup/workspace/route.ts +252 -0
  341. package/src/app/api/teams/[teamId]/export/route.ts +115 -0
  342. package/src/app/api/teams/[teamId]/invitations/[invitationId]/resend/route.ts +132 -0
  343. package/src/app/api/teams/[teamId]/invitations/[invitationId]/route.ts +117 -0
  344. package/src/app/api/teams/[teamId]/invitations/route.ts +363 -0
  345. package/src/app/api/teams/[teamId]/members/[userId]/route.ts +335 -0
  346. package/src/app/api/teams/[teamId]/members/route.ts +184 -0
  347. package/src/app/api/teams/[teamId]/members/search/route.ts +202 -0
  348. package/src/app/api/teams/[teamId]/route.ts +423 -0
  349. package/src/app/api/teams/[teamId]/switch/route.ts +140 -0
  350. package/src/app/api/teams/[teamId]/transfer-ownership/route.ts +212 -0
  351. package/src/app/api/teams/invitations/[token]/accept/route.ts +140 -0
  352. package/src/app/api/teams/invitations/by-id/[id]/accept/route.ts +98 -0
  353. package/src/app/api/teams/invitations/by-id/[id]/decline/route.ts +90 -0
  354. package/src/app/api/teams/route.ts +278 -0
  355. package/src/app/api/uploads/media/route.ts +118 -0
  356. package/src/app/api/uploads/presigned/route.ts +49 -0
  357. package/src/app/api/user/linked-accounts/route.ts +35 -0
  358. package/src/app/email-preview/page.tsx +11 -0
  359. package/src/app/favicon.ico +0 -0
  360. package/src/app/global-error.tsx +21 -0
  361. package/src/app/layout.tsx +50 -0
  362. package/src/app/page.tsx +5 -0
  363. package/src/components/icons/atlassian-icon.tsx +22 -0
  364. package/src/components/icons/index.ts +1 -0
  365. package/src/components/layout/SIDEBAR_LAYOUT_BEST_PRACTICES.md +240 -0
  366. package/src/components/layout/app-shell-header-store.tsx +20 -0
  367. package/src/components/layout/app-shell-skeleton.tsx +89 -0
  368. package/src/components/layout/app-shell-wrapper.tsx +32 -0
  369. package/src/components/layout/app-shell.test.tsx +155 -0
  370. package/src/components/layout/app-shell.tsx +100 -0
  371. package/src/components/shared/headers/app-header-configurator.tsx +42 -0
  372. package/src/components/shared/headers/app-header.tsx +103 -0
  373. package/src/components/shared/headers/header-user-menu.tsx +247 -0
  374. package/src/components/shared/headers/index.ts +44 -0
  375. package/src/components/shared/headers/page-header.tsx +25 -0
  376. package/src/components/shared/notifications/__tests__/notification-bell.test.tsx +159 -0
  377. package/src/components/shared/notifications/__tests__/notification-dropdown.test.tsx +296 -0
  378. package/src/components/shared/notifications/__tests__/notification-item.test.tsx +328 -0
  379. package/src/components/shared/notifications/index.ts +45 -0
  380. package/src/components/shared/notifications/notification-actions.tsx +295 -0
  381. package/src/components/shared/notifications/notification-bell-button.tsx +77 -0
  382. package/src/components/shared/notifications/notification-dropdown.tsx +160 -0
  383. package/src/components/shared/notifications/notification-group-item.tsx +268 -0
  384. package/src/components/shared/notifications/notification-item.tsx +193 -0
  385. package/src/components/shared/notifications/notification-load-more.tsx +50 -0
  386. package/src/components/shared/notifications/notification-panel.tsx +49 -0
  387. package/src/components/shared/notifications/utils.tsx +127 -0
  388. package/src/components/shared/permission-guard/index.ts +1 -0
  389. package/src/components/shared/permission-guard/permission-tooltip.tsx +45 -0
  390. package/src/components/shared/relative-time.tsx +53 -0
  391. package/src/components/shared/section-container.tsx +32 -0
  392. package/src/components/shared/service-status-banner.tsx +121 -0
  393. package/src/components/shared/settings-sidebar/index.ts +2 -0
  394. package/src/components/shared/settings-sidebar/team-setting-aside.tsx +97 -0
  395. package/src/components/shared/settings-sidebar/user-settings-aside.tsx +66 -0
  396. package/src/components/shared/sidebar/app-sidebar.tsx +146 -0
  397. package/src/components/shared/sidebar/index.ts +36 -0
  398. package/src/components/shared/sidebar/sidebar-main.tsx +81 -0
  399. package/src/components/shared/sidebar/sidebar-project.tsx +61 -0
  400. package/src/components/shared/sidebar/sidebar-team-avatar.tsx +126 -0
  401. package/src/components/shared/sidebar/sidebar-team-switcher.tsx +185 -0
  402. package/src/components/shared/sidebar/type.ts +97 -0
  403. package/src/components/ui/alert-dialog.tsx +157 -0
  404. package/src/components/ui/alert.tsx +66 -0
  405. package/src/components/ui/avatar-upload.tsx +147 -0
  406. package/src/components/ui/avatar.tsx +53 -0
  407. package/src/components/ui/badge.tsx +46 -0
  408. package/src/components/ui/breadcrumb.tsx +109 -0
  409. package/src/components/ui/button.tsx +60 -0
  410. package/src/components/ui/card.tsx +92 -0
  411. package/src/components/ui/checkbox.tsx +32 -0
  412. package/src/components/ui/collapsible.tsx +33 -0
  413. package/src/components/ui/command.tsx +184 -0
  414. package/src/components/ui/dialog.tsx +143 -0
  415. package/src/components/ui/dropdown-menu.tsx +257 -0
  416. package/src/components/ui/empty.tsx +104 -0
  417. package/src/components/ui/field.tsx +244 -0
  418. package/src/components/ui/image-cropper-dialog.tsx +167 -0
  419. package/src/components/ui/input.tsx +21 -0
  420. package/src/components/ui/label.tsx +24 -0
  421. package/src/components/ui/optimized-image.tsx +220 -0
  422. package/src/components/ui/pagination.tsx +127 -0
  423. package/src/components/ui/popover.tsx +48 -0
  424. package/src/components/ui/progress.tsx +31 -0
  425. package/src/components/ui/radio-group.tsx +45 -0
  426. package/src/components/ui/scroll-area.tsx +58 -0
  427. package/src/components/ui/select.tsx +187 -0
  428. package/src/components/ui/separator.tsx +28 -0
  429. package/src/components/ui/sheet.tsx +139 -0
  430. package/src/components/ui/sidebar.tsx +733 -0
  431. package/src/components/ui/skeleton.tsx +13 -0
  432. package/src/components/ui/sonner.tsx +40 -0
  433. package/src/components/ui/spinner.tsx +16 -0
  434. package/src/components/ui/switch.tsx +31 -0
  435. package/src/components/ui/table.tsx +116 -0
  436. package/src/components/ui/tabs.tsx +66 -0
  437. package/src/components/ui/textarea.tsx +23 -0
  438. package/src/components/ui/tooltip.tsx +61 -0
  439. package/src/config/__tests__/workspace.property.test.ts +40 -0
  440. package/src/config/auth.ts +62 -0
  441. package/src/config/integrations.ts +126 -0
  442. package/src/config/quotas.ts +20 -0
  443. package/src/config/roles.ts +463 -0
  444. package/src/config/settings-nav.ts +39 -0
  445. package/src/config/team-settings-nav.ts +37 -0
  446. package/src/config/user-settings-nav.ts +42 -0
  447. package/src/config/version.ts +1 -0
  448. package/src/config/workspace.ts +64 -0
  449. package/src/features/annotations/README.md +283 -0
  450. package/src/features/annotations/api/annotations-api.ts +194 -0
  451. package/src/features/annotations/api/comments-api.ts +147 -0
  452. package/src/features/annotations/api/index.ts +71 -0
  453. package/src/features/annotations/api/save-annotation.ts +150 -0
  454. package/src/features/annotations/api/schemas.ts +142 -0
  455. package/src/features/annotations/components/annotated-attachment-view.tsx +576 -0
  456. package/src/features/annotations/components/annotation-action-sheet.tsx +140 -0
  457. package/src/features/annotations/components/annotation-annotations-panel.tsx +213 -0
  458. package/src/features/annotations/components/annotation-box.tsx +539 -0
  459. package/src/features/annotations/components/annotation-canvas.tsx +534 -0
  460. package/src/features/annotations/components/annotation-comment-input.tsx +145 -0
  461. package/src/features/annotations/components/annotation-context-menu.tsx +164 -0
  462. package/src/features/annotations/components/annotation-drawer.tsx +231 -0
  463. package/src/features/annotations/components/annotation-layer.tsx +271 -0
  464. package/src/features/annotations/components/annotation-pin.tsx +318 -0
  465. package/src/features/annotations/components/annotation-popover.tsx +562 -0
  466. package/src/features/annotations/components/annotation-thread-panel.tsx +485 -0
  467. package/src/features/annotations/components/annotation-thread-preview.tsx +195 -0
  468. package/src/features/annotations/components/annotation-toolbar.tsx +244 -0
  469. package/src/features/annotations/components/keyboard-shortcuts-modal.tsx +79 -0
  470. package/src/features/annotations/docs/ANNOTATIONS_ARCHITECTURE.md +67 -0
  471. package/src/features/annotations/docs/ANNOTATION_SAVE_ARCHITECTURE.md +422 -0
  472. package/src/features/annotations/docs/ANNOTATION_SAVE_FEATURE.md +408 -0
  473. package/src/features/annotations/docs/BOX_ANNOTATION_GUIDE.md +542 -0
  474. package/src/features/annotations/docs/NEXTSTEP.md +28 -0
  475. package/src/features/annotations/docs/STALE_CLOSURE_FIX.md +344 -0
  476. package/src/features/annotations/docs/UNDO_REDO_QUICK_START.md +545 -0
  477. package/src/features/annotations/docs/local_first_canvas_autosave_architecture.md +674 -0
  478. package/src/features/annotations/examples/complete-example.tsx +266 -0
  479. package/src/features/annotations/examples/save-annotation-example.tsx +309 -0
  480. package/src/features/annotations/hooks/__tests__/use-annotation-permissions.property.test.tsx +493 -0
  481. package/src/features/annotations/hooks/index.ts +36 -0
  482. package/src/features/annotations/hooks/use-annotation-batch-save.ts +109 -0
  483. package/src/features/annotations/hooks/use-annotation-comments.ts +353 -0
  484. package/src/features/annotations/hooks/use-annotation-drafts.ts +137 -0
  485. package/src/features/annotations/hooks/use-annotation-edit-state.ts +99 -0
  486. package/src/features/annotations/hooks/use-annotation-history-tracker.ts +159 -0
  487. package/src/features/annotations/hooks/use-annotation-integration.ts +916 -0
  488. package/src/features/annotations/hooks/use-annotation-permissions.ts +210 -0
  489. package/src/features/annotations/hooks/use-annotation-popover.ts +175 -0
  490. package/src/features/annotations/hooks/use-annotation-save.ts +208 -0
  491. package/src/features/annotations/hooks/use-annotation-tools.ts +237 -0
  492. package/src/features/annotations/hooks/use-annotations-with-history.ts +332 -0
  493. package/src/features/annotations/hooks/use-auto-save.ts +94 -0
  494. package/src/features/annotations/index.ts +111 -0
  495. package/src/features/annotations/types/annotation.ts +201 -0
  496. package/src/features/annotations/types/index.ts +28 -0
  497. package/src/features/annotations/utils/history-manager.ts +73 -0
  498. package/src/features/annotations/utils/index.ts +2 -0
  499. package/src/features/annotations/utils/map-attachments-to-threads.ts +28 -0
  500. package/src/features/annotations/utils/position-comment-input.ts +136 -0
  501. package/src/features/annotations/utils/re-sequence-labels.ts +92 -0
  502. package/src/features/annotations/utils/validate-annotation-label.ts +120 -0
  503. package/src/features/auth/api/types.ts +101 -0
  504. package/src/features/auth/components/__tests__/role-gate.test.tsx +448 -0
  505. package/src/features/auth/components/__tests__/social-login-buttons.test.tsx +313 -0
  506. package/src/features/auth/components/auth-card.tsx +36 -0
  507. package/src/features/auth/components/forgot-password-form.tsx +115 -0
  508. package/src/features/auth/components/index.ts +14 -0
  509. package/src/features/auth/components/invite-code-input.tsx +155 -0
  510. package/src/features/auth/components/invited-user-form.tsx +309 -0
  511. package/src/features/auth/components/onboarding-form.tsx +195 -0
  512. package/src/features/auth/components/password-strength-indicator.tsx +113 -0
  513. package/src/features/auth/components/reset-password-form.tsx +138 -0
  514. package/src/features/auth/components/role-gate.tsx +124 -0
  515. package/src/features/auth/components/self-registration-choice.tsx +153 -0
  516. package/src/features/auth/components/sign-in-form.tsx +159 -0
  517. package/src/features/auth/components/sign-up-form.tsx +158 -0
  518. package/src/features/auth/components/social-login-buttons.tsx +219 -0
  519. package/src/features/auth/hooks/__tests__/use-onboarding.test.tsx +109 -0
  520. package/src/features/auth/hooks/__tests__/use-session.test.tsx +160 -0
  521. package/src/features/auth/hooks/index.ts +15 -0
  522. package/src/features/auth/hooks/use-accept-invitation.ts +194 -0
  523. package/src/features/auth/hooks/use-delete-account.ts +86 -0
  524. package/src/features/auth/hooks/use-force-verify.ts +89 -0
  525. package/src/features/auth/hooks/use-forgot-password.ts +144 -0
  526. package/src/features/auth/hooks/use-link-account.ts +78 -0
  527. package/src/features/auth/hooks/use-linked-accounts.ts +88 -0
  528. package/src/features/auth/hooks/use-onboarding.ts +159 -0
  529. package/src/features/auth/hooks/use-resend-verification.ts +139 -0
  530. package/src/features/auth/hooks/use-reset-password.ts +151 -0
  531. package/src/features/auth/hooks/use-reset-rate-limit.ts +56 -0
  532. package/src/features/auth/hooks/use-self-registration.ts +202 -0
  533. package/src/features/auth/hooks/use-session.ts +81 -0
  534. package/src/features/auth/hooks/use-sessions.ts +59 -0
  535. package/src/features/auth/hooks/use-sign-in.ts +234 -0
  536. package/src/features/auth/hooks/use-sign-out.ts +88 -0
  537. package/src/features/auth/hooks/use-sign-up.ts +194 -0
  538. package/src/features/auth/hooks/use-unlink-account.ts +100 -0
  539. package/src/features/auth/hooks/use-verify-email-token.ts +125 -0
  540. package/src/features/auth/index.ts +75 -0
  541. package/src/features/auth/screens/forgot-password-screen.tsx +33 -0
  542. package/src/features/auth/screens/index.ts +7 -0
  543. package/src/features/auth/screens/onboarding-screen.tsx +49 -0
  544. package/src/features/auth/screens/reset-password-screen.tsx +33 -0
  545. package/src/features/auth/screens/sign-in-screen.tsx +61 -0
  546. package/src/features/auth/screens/sign-up-screen.tsx +37 -0
  547. package/src/features/auth/screens/verify-email-confirm-screen.tsx +286 -0
  548. package/src/features/auth/screens/verify-email-screen.tsx +146 -0
  549. package/src/features/auth/types/index.ts +14 -0
  550. package/src/features/auth/utils/__tests__/validators.test.ts +331 -0
  551. package/src/features/auth/utils/password-strength.ts +129 -0
  552. package/src/features/auth/utils/validators.ts +124 -0
  553. package/src/features/email-preview/actions/render-email.ts +21 -0
  554. package/src/features/email-preview/screens/email-preview-screen.tsx +81 -0
  555. package/src/features/folder-scaffold-template/index.ts +0 -0
  556. package/src/features/instance-settings/components/index.ts +6 -0
  557. package/src/features/instance-settings/components/instance-settings-form.tsx +180 -0
  558. package/src/features/instance-settings/components/instance-status-display.tsx +158 -0
  559. package/src/features/instance-settings/index.ts +7 -0
  560. package/src/features/instance-settings/screens/index.ts +5 -0
  561. package/src/features/instance-settings/screens/instance-settings-screen.tsx +59 -0
  562. package/src/features/issues/README.md +330 -0
  563. package/src/features/issues/api/create-issue.ts +19 -0
  564. package/src/features/issues/api/delete-issue.ts +27 -0
  565. package/src/features/issues/api/get-issue-activities.ts +58 -0
  566. package/src/features/issues/api/get-issue-details.ts +25 -0
  567. package/src/features/issues/api/get-project-issues-server.ts +44 -0
  568. package/src/features/issues/api/get-project-issues.ts +21 -0
  569. package/src/features/issues/api/index.ts +44 -0
  570. package/src/features/issues/api/update-issue.ts +31 -0
  571. package/src/features/issues/api/upload-attachment.ts +81 -0
  572. package/src/features/issues/components/activity-timeline.tsx +440 -0
  573. package/src/features/issues/components/canvas-state-indicator.tsx +90 -0
  574. package/src/features/issues/components/centered-canvas-view.tsx +739 -0
  575. package/src/features/issues/components/image-selector.tsx +123 -0
  576. package/src/features/issues/components/image-upload-zone.tsx +262 -0
  577. package/src/features/issues/components/infinite-canvas-background.tsx +163 -0
  578. package/src/features/issues/components/inline-editable-select.tsx +173 -0
  579. package/src/features/issues/components/inline-editable-text.tsx +225 -0
  580. package/src/features/issues/components/inline-editable-textarea.tsx +219 -0
  581. package/src/features/issues/components/inline-editable-user-select.tsx +202 -0
  582. package/src/features/issues/components/issue-deletion-dialog.tsx +142 -0
  583. package/src/features/issues/components/issue-details-panel.tsx +101 -0
  584. package/src/features/issues/components/issues-create-dialog.tsx +578 -0
  585. package/src/features/issues/components/issues-list-filter.tsx +312 -0
  586. package/src/features/issues/components/issues-list.tsx +151 -0
  587. package/src/features/issues/components/issues-priority-badge.tsx +77 -0
  588. package/src/features/issues/components/issues-status-badge.tsx +100 -0
  589. package/src/features/issues/components/metadata-section.tsx +389 -0
  590. package/src/features/issues/components/optimized-attachment-view.tsx +528 -0
  591. package/src/features/issues/components/optimized-image.tsx +257 -0
  592. package/src/features/issues/components/panel-header.tsx +186 -0
  593. package/src/features/issues/components/preload.ts +31 -0
  594. package/src/features/issues/components/priority-selector.tsx +101 -0
  595. package/src/features/issues/components/responsive-issue-layout-skeleton.tsx +139 -0
  596. package/src/features/issues/components/responsive-issue-layout.tsx +617 -0
  597. package/src/features/issues/components/status-selector.tsx +320 -0
  598. package/src/features/issues/components/type-selector.tsx +102 -0
  599. package/src/features/issues/components/upload-progress-overlay.tsx +35 -0
  600. package/src/features/issues/components/uploaded-image-preview.tsx +173 -0
  601. package/src/features/issues/components/workflow-control.tsx +318 -0
  602. package/src/features/issues/components/zoom-controls.tsx +150 -0
  603. package/src/features/issues/config/index.ts +47 -0
  604. package/src/features/issues/config/options.ts +323 -0
  605. package/src/features/issues/config/workflow.ts +102 -0
  606. package/src/features/issues/docs/ARCHITECTURE_DIAGRAM.md +321 -0
  607. package/src/features/issues/docs/BACKEND_ARCHITECTURE.md +194 -0
  608. package/src/features/issues/docs/IMAGE_COMPONENTS_ARCHITECTURE.md +363 -0
  609. package/src/features/issues/docs/IMAGE_COMPONENTS_IMPORTS.md +412 -0
  610. package/src/features/issues/docs/IMPLEMENTATION_CHECKLIST.md +210 -0
  611. package/src/features/issues/docs/ROUTE_SETUP_COMPLETE.md +242 -0
  612. package/src/features/issues/hooks/index.ts +78 -0
  613. package/src/features/issues/hooks/use-canvas-transform.ts +255 -0
  614. package/src/features/issues/hooks/use-create-issue.ts +28 -0
  615. package/src/features/issues/hooks/use-elastic-scroll.ts +296 -0
  616. package/src/features/issues/hooks/use-issue-activities.ts +71 -0
  617. package/src/features/issues/hooks/use-issue-delete.ts +84 -0
  618. package/src/features/issues/hooks/use-issue-details.ts +70 -0
  619. package/src/features/issues/hooks/use-issue-filters.ts +50 -0
  620. package/src/features/issues/hooks/use-issue-update.ts +93 -0
  621. package/src/features/issues/hooks/use-keyboard-shortcuts.ts +104 -0
  622. package/src/features/issues/hooks/use-optimized-image.ts +228 -0
  623. package/src/features/issues/hooks/use-project-issues.ts +14 -0
  624. package/src/features/issues/index.ts +65 -0
  625. package/src/features/issues/screens/issue-details-screen.tsx +207 -0
  626. package/src/features/issues/screens/issue-details-skeletons.tsx +295 -0
  627. package/src/features/issues/screens/issue-share-screen.tsx +56 -0
  628. package/src/features/issues/types/index.ts +48 -0
  629. package/src/features/issues/types/issue.ts +291 -0
  630. package/src/features/issues/utils/filter-issues.ts +141 -0
  631. package/src/features/issues/utils/index.ts +14 -0
  632. package/src/features/legal/index.ts +1 -0
  633. package/src/features/legal/screens/privacy-policy-screen.tsx +307 -0
  634. package/src/features/notifications/api/get-notifications.ts +58 -0
  635. package/src/features/notifications/api/get-unread-count.ts +37 -0
  636. package/src/features/notifications/api/index.ts +35 -0
  637. package/src/features/notifications/api/mark-all-as-read.ts +37 -0
  638. package/src/features/notifications/api/mark-as-read.ts +41 -0
  639. package/src/features/notifications/api/types.ts +109 -0
  640. package/src/features/notifications/hooks/__tests__/use-notification-subscription.test.ts +206 -0
  641. package/src/features/notifications/hooks/index.ts +28 -0
  642. package/src/features/notifications/hooks/use-mark-all-as-read.ts +106 -0
  643. package/src/features/notifications/hooks/use-mark-as-read.ts +106 -0
  644. package/src/features/notifications/hooks/use-notification-subscription.ts +244 -0
  645. package/src/features/notifications/hooks/use-notification-toast.ts +161 -0
  646. package/src/features/notifications/hooks/use-notifications.ts +80 -0
  647. package/src/features/notifications/hooks/use-unread-count.ts +60 -0
  648. package/src/features/notifications/index.ts +48 -0
  649. package/src/features/notifications/utils/group-notifications.ts +152 -0
  650. package/src/features/notifications/utils/index.ts +9 -0
  651. package/src/features/projects/api/create-invitation.ts +45 -0
  652. package/src/features/projects/api/create-project.ts +64 -0
  653. package/src/features/projects/api/delete-project.ts +50 -0
  654. package/src/features/projects/api/get-project-activities.ts +43 -0
  655. package/src/features/projects/api/get-project-members.ts +53 -0
  656. package/src/features/projects/api/get-project.ts +49 -0
  657. package/src/features/projects/api/get-projects.ts +61 -0
  658. package/src/features/projects/api/index.ts +27 -0
  659. package/src/features/projects/api/join-project.ts +52 -0
  660. package/src/features/projects/api/leave-project.ts +51 -0
  661. package/src/features/projects/api/list-invitations.ts +36 -0
  662. package/src/features/projects/api/remove-member.ts +60 -0
  663. package/src/features/projects/api/resend-invitation.ts +36 -0
  664. package/src/features/projects/api/revoke-invitation.ts +36 -0
  665. package/src/features/projects/api/types.ts +286 -0
  666. package/src/features/projects/api/update-member-role.ts +70 -0
  667. package/src/features/projects/api/update-project.ts +69 -0
  668. package/src/features/projects/components/__tests__/project-detail-activity-feed.test.tsx +106 -0
  669. package/src/features/projects/components/__tests__/project-invitation-dialog.test.tsx +211 -0
  670. package/src/features/projects/components/__tests__/project-member-manager-dialog.test.tsx +254 -0
  671. package/src/features/projects/components/index.ts +21 -0
  672. package/src/features/projects/components/project-actions.tsx +248 -0
  673. package/src/features/projects/components/project-create-dialog.tsx +410 -0
  674. package/src/features/projects/components/project-detail-activity-feed.tsx +206 -0
  675. package/src/features/projects/components/project-detail-header.tsx +103 -0
  676. package/src/features/projects/components/project-detail-overview.tsx +128 -0
  677. package/src/features/projects/components/project-icon-selector.test.tsx +49 -0
  678. package/src/features/projects/components/project-icon-selector.tsx +76 -0
  679. package/src/features/projects/components/project-invitation-dialog.tsx +368 -0
  680. package/src/features/projects/components/project-issues.tsx +128 -0
  681. package/src/features/projects/components/project-leave-button.tsx +69 -0
  682. package/src/features/projects/components/project-list-card.tsx +246 -0
  683. package/src/features/projects/components/project-list-filters.tsx +320 -0
  684. package/src/features/projects/components/project-member-manager-dialog.tsx +419 -0
  685. package/src/features/projects/components/project-settings-dialog.tsx +204 -0
  686. package/src/features/projects/components/project-stats.tsx +46 -0
  687. package/src/features/projects/components/project-title-section.tsx +78 -0
  688. package/src/features/projects/config/icons.ts +91 -0
  689. package/src/features/projects/hooks/index.ts +28 -0
  690. package/src/features/projects/hooks/use-create-invitation.ts +83 -0
  691. package/src/features/projects/hooks/use-create-project.ts +77 -0
  692. package/src/features/projects/hooks/use-delete-project.ts +84 -0
  693. package/src/features/projects/hooks/use-join-project.ts +43 -0
  694. package/src/features/projects/hooks/use-leave-project.ts +84 -0
  695. package/src/features/projects/hooks/use-project-activities.ts +39 -0
  696. package/src/features/projects/hooks/use-project-filters.ts +86 -0
  697. package/src/features/projects/hooks/use-project-invitations.ts +66 -0
  698. package/src/features/projects/hooks/use-project-members.ts +57 -0
  699. package/src/features/projects/hooks/use-project.ts +67 -0
  700. package/src/features/projects/hooks/use-projects.ts +49 -0
  701. package/src/features/projects/hooks/use-recent-projects.ts +58 -0
  702. package/src/features/projects/hooks/use-remove-member.ts +89 -0
  703. package/src/features/projects/hooks/use-resend-invitation.ts +68 -0
  704. package/src/features/projects/hooks/use-revoke-invitation.ts +71 -0
  705. package/src/features/projects/hooks/use-team-member-suggestions.ts +133 -0
  706. package/src/features/projects/hooks/use-update-member-role.ts +92 -0
  707. package/src/features/projects/hooks/use-update-project.ts +88 -0
  708. package/src/features/projects/index.ts +91 -0
  709. package/src/features/projects/screens/index.ts +3 -0
  710. package/src/features/projects/screens/invitation-acceptance-screen.tsx +320 -0
  711. package/src/features/projects/screens/project-detail-screen-wrapper.tsx +47 -0
  712. package/src/features/projects/screens/project-detail-screen.tsx +661 -0
  713. package/src/features/projects/screens/projects-list-screen.tsx +161 -0
  714. package/src/features/projects/types/index.ts +59 -0
  715. package/src/features/projects/utils/format-helpers.ts +16 -0
  716. package/src/features/projects/utils/index.ts +2 -0
  717. package/src/features/projects/utils/role-helpers.ts +25 -0
  718. package/src/features/setup/api/complete-setup.ts +21 -0
  719. package/src/features/setup/api/create-admin.ts +21 -0
  720. package/src/features/setup/api/create-first-workspace.ts +21 -0
  721. package/src/features/setup/api/get-instance-status.ts +12 -0
  722. package/src/features/setup/api/get-service-health.ts +12 -0
  723. package/src/features/setup/api/index.ts +44 -0
  724. package/src/features/setup/api/save-instance-config.ts +21 -0
  725. package/src/features/setup/api/types.ts +122 -0
  726. package/src/features/setup/components/__tests__/setup-wizard-ui.test.tsx +362 -0
  727. package/src/features/setup/components/admin-account-step.tsx +205 -0
  728. package/src/features/setup/components/first-workspace-step.tsx +120 -0
  729. package/src/features/setup/components/index.ts +9 -0
  730. package/src/features/setup/components/instance-config-step.tsx +107 -0
  731. package/src/features/setup/components/mail-config-step.tsx +205 -0
  732. package/src/features/setup/components/sample-data-step.tsx +131 -0
  733. package/src/features/setup/components/service-health-step.tsx +180 -0
  734. package/src/features/setup/components/service-status-badge.tsx +50 -0
  735. package/src/features/setup/components/setup-progress.tsx +103 -0
  736. package/src/features/setup/components/setup-wizard.tsx +169 -0
  737. package/src/features/setup/hooks/index.ts +12 -0
  738. package/src/features/setup/hooks/use-complete-setup.ts +23 -0
  739. package/src/features/setup/hooks/use-create-admin.ts +25 -0
  740. package/src/features/setup/hooks/use-create-first-workspace.ts +24 -0
  741. package/src/features/setup/hooks/use-instance-status.ts +21 -0
  742. package/src/features/setup/hooks/use-save-instance-config.ts +23 -0
  743. package/src/features/setup/hooks/use-service-health.ts +21 -0
  744. package/src/features/setup/hooks/use-setup-wizard.ts +152 -0
  745. package/src/features/setup/hooks/use-workspace-mode.ts +19 -0
  746. package/src/features/setup/index.ts +30 -0
  747. package/src/features/setup/screens/index.ts +1 -0
  748. package/src/features/setup/screens/setup-screen.tsx +40 -0
  749. package/src/features/setup/types/index.ts +69 -0
  750. package/src/features/setup/utils/index.ts +78 -0
  751. package/src/features/team-settings/components/index.ts +39 -0
  752. package/src/features/team-settings/components/loading-states.tsx +296 -0
  753. package/src/features/team-settings/components/permission-guard.tsx +23 -0
  754. package/src/features/team-settings/components/settings-card.tsx +22 -0
  755. package/src/features/team-settings/components/settings-context-provider.tsx +51 -0
  756. package/src/features/team-settings/components/settings-error-boundary.tsx +366 -0
  757. package/src/features/team-settings/components/settings-navigation.tsx +87 -0
  758. package/src/features/team-settings/components/settings-section.tsx +23 -0
  759. package/src/features/team-settings/components/team-danger-zone.tsx +275 -0
  760. package/src/features/team-settings/components/team-information-form.tsx +116 -0
  761. package/src/features/team-settings/components/team-invitations-list.tsx +463 -0
  762. package/src/features/team-settings/components/team-members-list.tsx +342 -0
  763. package/src/features/team-settings/components/team-permission-guard.tsx +56 -0
  764. package/src/features/team-settings/components/team-setting-integrations.tsx +27 -0
  765. package/src/features/team-settings/components/team-setting-member.tsx +28 -0
  766. package/src/features/team-settings/components/team-settings-general.tsx +131 -0
  767. package/src/features/team-settings/components/transfer-ownership-modal.tsx +164 -0
  768. package/src/features/team-settings/components/unauthorized-access.tsx +52 -0
  769. package/src/features/team-settings/hooks/__tests__/use-team-settings.test.tsx +139 -0
  770. package/src/features/team-settings/hooks/index.ts +1 -0
  771. package/src/features/team-settings/hooks/use-team-settings.ts +148 -0
  772. package/src/features/team-settings/hooks/use-transfer-ownership.ts +45 -0
  773. package/src/features/team-settings/index.ts +25 -0
  774. package/src/features/team-settings/screens/index.ts +1 -0
  775. package/src/features/team-settings/screens/team-settings-screen.tsx +33 -0
  776. package/src/features/team-settings/types/index.ts +78 -0
  777. package/src/features/team-settings/utils/index.ts +6 -0
  778. package/src/features/team-settings/utils/mock-data.ts +40 -0
  779. package/src/features/teams/api/cancel-invitation.ts +25 -0
  780. package/src/features/teams/api/create-invitation.ts +28 -0
  781. package/src/features/teams/api/create-team.ts +14 -0
  782. package/src/features/teams/api/delete-team.ts +19 -0
  783. package/src/features/teams/api/get-invitations.ts +25 -0
  784. package/src/features/teams/api/get-team-members.ts +25 -0
  785. package/src/features/teams/api/get-team.ts +13 -0
  786. package/src/features/teams/api/get-teams.ts +19 -0
  787. package/src/features/teams/api/index.ts +49 -0
  788. package/src/features/teams/api/leave-team.ts +22 -0
  789. package/src/features/teams/api/remove-member.ts +25 -0
  790. package/src/features/teams/api/resend-invitation.ts +26 -0
  791. package/src/features/teams/api/switch-team.ts +13 -0
  792. package/src/features/teams/api/types.ts +122 -0
  793. package/src/features/teams/api/update-member-roles.ts +28 -0
  794. package/src/features/teams/api/update-team.ts +17 -0
  795. package/src/features/teams/components/create-team-dialog.tsx +105 -0
  796. package/src/features/teams/hooks/__tests__/cache-invalidation.property.test.tsx +268 -0
  797. package/src/features/teams/hooks/index.ts +35 -0
  798. package/src/features/teams/hooks/use-can-manage-members.ts +21 -0
  799. package/src/features/teams/hooks/use-can-manage-team.ts +21 -0
  800. package/src/features/teams/hooks/use-cancel-invitation.ts +52 -0
  801. package/src/features/teams/hooks/use-create-invitation.ts +59 -0
  802. package/src/features/teams/hooks/use-create-team.ts +38 -0
  803. package/src/features/teams/hooks/use-delete-team.ts +43 -0
  804. package/src/features/teams/hooks/use-invitations.ts +31 -0
  805. package/src/features/teams/hooks/use-leave-team.ts +43 -0
  806. package/src/features/teams/hooks/use-remove-member.ts +58 -0
  807. package/src/features/teams/hooks/use-resend-invitation.ts +52 -0
  808. package/src/features/teams/hooks/use-switch-team.ts +41 -0
  809. package/src/features/teams/hooks/use-team-members.ts +31 -0
  810. package/src/features/teams/hooks/use-team-permissions.ts +102 -0
  811. package/src/features/teams/hooks/use-team.ts +30 -0
  812. package/src/features/teams/hooks/use-teams.ts +26 -0
  813. package/src/features/teams/hooks/use-update-member-roles.ts +64 -0
  814. package/src/features/teams/hooks/use-update-team.ts +47 -0
  815. package/src/features/teams/index.ts +111 -0
  816. package/src/features/user-settings/actions/set-password.ts +63 -0
  817. package/src/features/user-settings/api/index.ts +16 -0
  818. package/src/features/user-settings/components/__tests__/security-settings.test.tsx +125 -0
  819. package/src/features/user-settings/components/delete-account-dialog.tsx +185 -0
  820. package/src/features/user-settings/components/index.ts +13 -0
  821. package/src/features/user-settings/components/integrations-list.tsx +152 -0
  822. package/src/features/user-settings/components/notification-preferences.tsx +112 -0
  823. package/src/features/user-settings/components/other-settings.tsx +126 -0
  824. package/src/features/user-settings/components/password-section.tsx +297 -0
  825. package/src/features/user-settings/components/security-settings.tsx +184 -0
  826. package/src/features/user-settings/components/user-preferences.tsx +146 -0
  827. package/src/features/user-settings/hooks/index.ts +8 -0
  828. package/src/features/user-settings/hooks/use-notification-preferences.ts +65 -0
  829. package/src/features/user-settings/hooks/use-user-preferences.ts +52 -0
  830. package/src/features/user-settings/index.ts +22 -0
  831. package/src/features/user-settings/screens/index.ts +11 -0
  832. package/src/features/user-settings/screens/integrations-screen.tsx +24 -0
  833. package/src/features/user-settings/screens/notifications-screen.tsx +29 -0
  834. package/src/features/user-settings/screens/other-settings-screen.tsx +24 -0
  835. package/src/features/user-settings/screens/setting-preferences-screen.tsx +24 -0
  836. package/src/features/user-settings/screens/user-settings-screen.tsx +23 -0
  837. package/src/features/user-settings/types/index.ts +42 -0
  838. package/src/features/user-settings/utils/index.ts +8 -0
  839. package/src/hooks/use-long-press.ts +196 -0
  840. package/src/hooks/use-media-upload.ts +95 -0
  841. package/src/hooks/use-mobile.ts +19 -0
  842. package/src/hooks/use-team.ts +32 -0
  843. package/src/instrumentation.ts +14 -0
  844. package/src/lib/__tests__/auth-config.test.ts +166 -0
  845. package/src/lib/__tests__/config.test.ts +42 -0
  846. package/src/lib/__tests__/db.test.ts +101 -0
  847. package/src/lib/__tests__/env.property.test.ts +197 -0
  848. package/src/lib/__tests__/env.test.ts +177 -0
  849. package/src/lib/__tests__/health-check.test.ts +87 -0
  850. package/src/lib/__tests__/oauth-errors.test.ts +184 -0
  851. package/src/lib/__tests__/oauth-redirect.test.ts +224 -0
  852. package/src/lib/__tests__/oauth-scopes.test.ts +268 -0
  853. package/src/lib/__tests__/storage.test.ts +58 -0
  854. package/src/lib/__tests__/url-validator.test.ts +232 -0
  855. package/src/lib/api-client.ts +93 -0
  856. package/src/lib/auth-client.ts +5 -0
  857. package/src/lib/auth-config.ts +146 -0
  858. package/src/lib/auth.ts +209 -0
  859. package/src/lib/config.ts +228 -0
  860. package/src/lib/cors.ts +96 -0
  861. package/src/lib/date.ts +16 -0
  862. package/src/lib/db.ts +88 -0
  863. package/src/lib/env.ts +489 -0
  864. package/src/lib/feedback.ts +29 -0
  865. package/src/lib/health-check.ts +229 -0
  866. package/src/lib/logger.ts +204 -0
  867. package/src/lib/oauth-errors.ts +138 -0
  868. package/src/lib/performance.ts +367 -0
  869. package/src/lib/query-server.ts +35 -0
  870. package/src/lib/query.tsx +43 -0
  871. package/src/lib/resend.ts +36 -0
  872. package/src/lib/security-headers.ts +165 -0
  873. package/src/lib/setup-status.ts +34 -0
  874. package/src/lib/storage.ts +150 -0
  875. package/src/lib/supabase-client.ts +58 -0
  876. package/src/lib/testing/test-db.ts +75 -0
  877. package/src/lib/url-validator.ts +168 -0
  878. package/src/lib/utils.ts +6 -0
  879. package/src/mocks/README.md +42 -0
  880. package/src/mocks/activity.fixtures.ts +281 -0
  881. package/src/mocks/annotation.fixtures.ts +325 -0
  882. package/src/mocks/attachment.fixtures.ts +80 -0
  883. package/src/mocks/email.fixtures.ts +61 -0
  884. package/src/mocks/index.ts +33 -0
  885. package/src/mocks/issue.fixtures.ts +364 -0
  886. package/src/mocks/landing.fixtures.ts +118 -0
  887. package/src/mocks/notification.fixtures.ts +111 -0
  888. package/src/mocks/project-activity.fixtures.ts +69 -0
  889. package/src/mocks/project-invitation.fixtures.ts +95 -0
  890. package/src/mocks/project-member.fixtures.ts +93 -0
  891. package/src/mocks/project.fixtures.ts +249 -0
  892. package/src/mocks/settings.fixtures.ts +56 -0
  893. package/src/mocks/share.fixtures.ts +48 -0
  894. package/src/mocks/team-member.fixtures.ts +147 -0
  895. package/src/mocks/team.fixtures.ts +35 -0
  896. package/src/mocks/user-settings.fixtures.ts +77 -0
  897. package/src/mocks/user.fixtures.ts +21 -0
  898. package/src/providers/theme-provider.tsx +11 -0
  899. package/src/proxy/__tests__/proxy-setup-gate.test.ts +43 -0
  900. package/src/proxy.ts +169 -0
  901. package/src/server/annotations/__tests__/annotation-limit.property.test.ts +291 -0
  902. package/src/server/annotations/__tests__/attachment-deletion-cascade.property.test.ts +385 -0
  903. package/src/server/annotations/__tests__/comment-delete-authorization.property.test.ts +419 -0
  904. package/src/server/annotations/__tests__/sanitize.property.test.ts +302 -0
  905. package/src/server/annotations/annotation-service.ts +305 -0
  906. package/src/server/annotations/comment-service.ts +288 -0
  907. package/src/server/annotations/index.ts +61 -0
  908. package/src/server/annotations/permission-utils.ts +125 -0
  909. package/src/server/annotations/sanitize.ts +134 -0
  910. package/src/server/annotations/types.ts +161 -0
  911. package/src/server/audit/audit-service.ts +85 -0
  912. package/src/server/audit/index.ts +11 -0
  913. package/src/server/audit/types.ts +75 -0
  914. package/src/server/auth/__tests__/README.md +368 -0
  915. package/src/server/auth/__tests__/account-linking.integration.test.ts +410 -0
  916. package/src/server/auth/__tests__/auth-integration.test.ts +811 -0
  917. package/src/server/auth/__tests__/cookies.test.ts +337 -0
  918. package/src/server/auth/__tests__/login.property.test.ts +428 -0
  919. package/src/server/auth/__tests__/oauth-integration.test.ts +555 -0
  920. package/src/server/auth/__tests__/password.test.ts +194 -0
  921. package/src/server/auth/__tests__/rate-limiter.test.ts +450 -0
  922. package/src/server/auth/__tests__/rbac.test.ts +474 -0
  923. package/src/server/auth/__tests__/session.test.ts +599 -0
  924. package/src/server/auth/__tests__/signup.property.test.ts +224 -0
  925. package/src/server/auth/__tests__/token-encryption.test.ts +171 -0
  926. package/src/server/auth/__tests__/tokens.test.ts +476 -0
  927. package/src/server/auth/__tests__/verify-email.property.test.ts +372 -0
  928. package/src/server/auth/cookies.ts +184 -0
  929. package/src/server/auth/password.ts +94 -0
  930. package/src/server/auth/rate-limiter.ts +257 -0
  931. package/src/server/auth/rbac.ts +1168 -0
  932. package/src/server/auth/session.ts +392 -0
  933. package/src/server/auth/token-encryption.ts +201 -0
  934. package/src/server/auth/tokens.ts +397 -0
  935. package/src/server/db/schema/account.ts +21 -0
  936. package/src/server/db/schema/annotation-read-status.ts +57 -0
  937. package/src/server/db/schema/better-auth-verifications.ts +27 -0
  938. package/src/server/db/schema/email-jobs.ts +24 -0
  939. package/src/server/db/schema/index.ts +20 -0
  940. package/src/server/db/schema/instance-settings.ts +42 -0
  941. package/src/server/db/schema/issue-activities.ts +97 -0
  942. package/src/server/db/schema/issue-attachments.ts +101 -0
  943. package/src/server/db/schema/issues.ts +139 -0
  944. package/src/server/db/schema/notifications.ts +119 -0
  945. package/src/server/db/schema/project-activities.ts +116 -0
  946. package/src/server/db/schema/project-invitations.ts +34 -0
  947. package/src/server/db/schema/project-members.ts +29 -0
  948. package/src/server/db/schema/projects.ts +46 -0
  949. package/src/server/db/schema/sessions.ts +17 -0
  950. package/src/server/db/schema/team-invitations.ts +22 -0
  951. package/src/server/db/schema/team-members.ts +18 -0
  952. package/src/server/db/schema/teams.ts +15 -0
  953. package/src/server/db/schema/user-roles.ts +14 -0
  954. package/src/server/db/schema/users.ts +17 -0
  955. package/src/server/db/schema/verification-tokens.ts +15 -0
  956. package/src/server/email/README.md +258 -0
  957. package/src/server/email/__tests__/client.property.test.ts +218 -0
  958. package/src/server/email/__tests__/payload.property.test.ts +205 -0
  959. package/src/server/email/__tests__/queue.test.ts +407 -0
  960. package/src/server/email/__tests__/render-template.test.tsx +172 -0
  961. package/src/server/email/client.ts +70 -0
  962. package/src/server/email/index.ts +20 -0
  963. package/src/server/email/providers/console-provider.ts +43 -0
  964. package/src/server/email/providers/index.ts +5 -0
  965. package/src/server/email/providers/resend-provider.ts +59 -0
  966. package/src/server/email/providers/smtp-provider.ts +65 -0
  967. package/src/server/email/queue.ts +365 -0
  968. package/src/server/email/render-template.tsx +117 -0
  969. package/src/server/email/templates/layout.tsx +66 -0
  970. package/src/server/email/templates/ownership-transfer-email.tsx +75 -0
  971. package/src/server/email/templates/password-reset-email.tsx +72 -0
  972. package/src/server/email/templates/project-invitation-email.tsx +70 -0
  973. package/src/server/email/templates/security-alert-email.tsx +161 -0
  974. package/src/server/email/templates/team-invitation-email.tsx +68 -0
  975. package/src/server/email/templates/verification-email.tsx +61 -0
  976. package/src/server/email/templates/welcome-email.tsx +60 -0
  977. package/src/server/email/worker.ts +182 -0
  978. package/src/server/issues/activity-service.ts +422 -0
  979. package/src/server/issues/attachment-service.ts +379 -0
  980. package/src/server/issues/index.ts +68 -0
  981. package/src/server/issues/issue-service.ts +569 -0
  982. package/src/server/issues/types.ts +233 -0
  983. package/src/server/notifications/__tests__/notification-service.integration.test.ts +405 -0
  984. package/src/server/notifications/index.ts +13 -0
  985. package/src/server/notifications/notification-service.ts +526 -0
  986. package/src/server/notifications/types.ts +234 -0
  987. package/src/server/projects/__tests__/activity-logging.integration.test.ts +319 -0
  988. package/src/server/projects/__tests__/invitation-email.integration.test.ts +258 -0
  989. package/src/server/projects/__tests__/invitation-service.integration.test.ts +651 -0
  990. package/src/server/projects/__tests__/member-service.property.test.ts +397 -0
  991. package/src/server/projects/__tests__/project-service.property.test.ts +116 -0
  992. package/src/server/projects/activity-service.ts +548 -0
  993. package/src/server/projects/index.ts +11 -0
  994. package/src/server/projects/invitation-service.ts +773 -0
  995. package/src/server/projects/member-service.ts +458 -0
  996. package/src/server/projects/project-service.ts +491 -0
  997. package/src/server/projects/schemas.ts +310 -0
  998. package/src/server/projects/types.ts +166 -0
  999. package/src/server/projects/utils.ts +128 -0
  1000. package/src/server/setup/__tests__/health-check.property.test.ts +70 -0
  1001. package/src/server/setup/__tests__/sample-data.property.test.ts +82 -0
  1002. package/src/server/setup/__tests__/setup.property.test.ts +95 -0
  1003. package/src/server/setup/health-check-service.ts +294 -0
  1004. package/src/server/setup/index.ts +35 -0
  1005. package/src/server/setup/sample-data-service.ts +233 -0
  1006. package/src/server/setup/setup-service.ts +229 -0
  1007. package/src/server/setup/types.ts +96 -0
  1008. package/src/server/teams/__tests__/export.property.test.ts +542 -0
  1009. package/src/server/teams/__tests__/get-members.integration.test.ts +105 -0
  1010. package/src/server/teams/__tests__/invitation-flow.integration.test.ts +402 -0
  1011. package/src/server/teams/__tests__/invitations.property.test.ts +235 -0
  1012. package/src/server/teams/__tests__/member-management-flow.integration.test.ts +306 -0
  1013. package/src/server/teams/__tests__/members.property.test.ts +180 -0
  1014. package/src/server/teams/__tests__/ownership-transfer.property.test.ts +173 -0
  1015. package/src/server/teams/__tests__/resource-limits.property.test.ts +382 -0
  1016. package/src/server/teams/__tests__/team-context-management.integration.test.ts +396 -0
  1017. package/src/server/teams/__tests__/team-context.property.test.ts +854 -0
  1018. package/src/server/teams/__tests__/team-creation-flow.integration.test.ts +310 -0
  1019. package/src/server/teams/__tests__/team-creation.property.test.ts +280 -0
  1020. package/src/server/teams/errors.ts +396 -0
  1021. package/src/server/teams/export-service.ts +383 -0
  1022. package/src/server/teams/index.ts +10 -0
  1023. package/src/server/teams/invitation-service.ts +708 -0
  1024. package/src/server/teams/member-service.ts +334 -0
  1025. package/src/server/teams/resource-limits.ts +211 -0
  1026. package/src/server/teams/slug.ts +58 -0
  1027. package/src/server/teams/team-context.ts +648 -0
  1028. package/src/server/teams/team-service.ts +660 -0
  1029. package/src/server/teams/types.ts +81 -0
  1030. package/src/server/teams/validation.ts +209 -0
  1031. package/src/styles/globals.css +160 -0
  1032. package/src/types/deployment.ts +39 -0
  1033. package/supabase/config.toml +357 -0
  1034. package/supabase/seed.sql +480 -0
  1035. package/tests/e2e/.gitkeep +0 -0
  1036. package/tests/e2e/QUICK_START.md +98 -0
  1037. package/tests/e2e/README.md +301 -0
  1038. package/tests/e2e/auth.spec.ts +583 -0
  1039. package/tests/e2e/global-setup.ts +23 -0
  1040. package/tests/e2e/global-teardown.ts +23 -0
  1041. package/tests/e2e/helpers/auth-helpers.ts +310 -0
  1042. package/tests/e2e/helpers/test-fixtures.ts +286 -0
  1043. package/tests/e2e/smoke-test.spec.ts +330 -0
  1044. package/tsconfig.json +48 -0
  1045. package/vitest.config.ts +50 -0
  1046. package/vitest.setup.ts +56 -0
  1047. package/dist/index.js +0 -778
@@ -0,0 +1,3118 @@
1
+ {
2
+ "id": "f383381e-4b30-49bb-a2eb-e1ac7597bc8a",
3
+ "prevId": "00000000-0000-0000-0000-000000000000",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.users": {
8
+ "name": "users",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "uuid",
14
+ "primaryKey": true,
15
+ "notNull": true,
16
+ "default": "gen_random_uuid()"
17
+ },
18
+ "email": {
19
+ "name": "email",
20
+ "type": "varchar(320)",
21
+ "primaryKey": false,
22
+ "notNull": true
23
+ },
24
+ "email_verified": {
25
+ "name": "email_verified",
26
+ "type": "boolean",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "default": false
30
+ },
31
+ "password_hash": {
32
+ "name": "password_hash",
33
+ "type": "varchar(255)",
34
+ "primaryKey": false,
35
+ "notNull": false
36
+ },
37
+ "name": {
38
+ "name": "name",
39
+ "type": "varchar(120)",
40
+ "primaryKey": false,
41
+ "notNull": true
42
+ },
43
+ "image": {
44
+ "name": "image",
45
+ "type": "text",
46
+ "primaryKey": false,
47
+ "notNull": false
48
+ },
49
+ "last_active_team_id": {
50
+ "name": "last_active_team_id",
51
+ "type": "uuid",
52
+ "primaryKey": false,
53
+ "notNull": false
54
+ },
55
+ "created_at": {
56
+ "name": "created_at",
57
+ "type": "timestamp with time zone",
58
+ "primaryKey": false,
59
+ "notNull": true,
60
+ "default": "now()"
61
+ },
62
+ "updated_at": {
63
+ "name": "updated_at",
64
+ "type": "timestamp with time zone",
65
+ "primaryKey": false,
66
+ "notNull": true,
67
+ "default": "now()"
68
+ }
69
+ },
70
+ "indexes": {},
71
+ "foreignKeys": {
72
+ "users_last_active_team_id_teams_id_fk": {
73
+ "name": "users_last_active_team_id_teams_id_fk",
74
+ "tableFrom": "users",
75
+ "tableTo": "teams",
76
+ "columnsFrom": [
77
+ "last_active_team_id"
78
+ ],
79
+ "columnsTo": [
80
+ "id"
81
+ ],
82
+ "onDelete": "set null",
83
+ "onUpdate": "no action"
84
+ }
85
+ },
86
+ "compositePrimaryKeys": {},
87
+ "uniqueConstraints": {
88
+ "users_email_unique": {
89
+ "name": "users_email_unique",
90
+ "nullsNotDistinct": false,
91
+ "columns": [
92
+ "email"
93
+ ]
94
+ }
95
+ },
96
+ "policies": {},
97
+ "checkConstraints": {},
98
+ "isRLSEnabled": false
99
+ },
100
+ "public.sessions": {
101
+ "name": "sessions",
102
+ "schema": "",
103
+ "columns": {
104
+ "id": {
105
+ "name": "id",
106
+ "type": "uuid",
107
+ "primaryKey": true,
108
+ "notNull": true,
109
+ "default": "gen_random_uuid()"
110
+ },
111
+ "user_id": {
112
+ "name": "user_id",
113
+ "type": "uuid",
114
+ "primaryKey": false,
115
+ "notNull": true
116
+ },
117
+ "token": {
118
+ "name": "token",
119
+ "type": "varchar(255)",
120
+ "primaryKey": false,
121
+ "notNull": true
122
+ },
123
+ "expires_at": {
124
+ "name": "expires_at",
125
+ "type": "timestamp with time zone",
126
+ "primaryKey": false,
127
+ "notNull": true
128
+ },
129
+ "created_at": {
130
+ "name": "created_at",
131
+ "type": "timestamp with time zone",
132
+ "primaryKey": false,
133
+ "notNull": true,
134
+ "default": "now()"
135
+ },
136
+ "updated_at": {
137
+ "name": "updated_at",
138
+ "type": "timestamp with time zone",
139
+ "primaryKey": false,
140
+ "notNull": true,
141
+ "default": "now()"
142
+ },
143
+ "ip_address": {
144
+ "name": "ip_address",
145
+ "type": "varchar(45)",
146
+ "primaryKey": false,
147
+ "notNull": false
148
+ },
149
+ "user_agent": {
150
+ "name": "user_agent",
151
+ "type": "text",
152
+ "primaryKey": false,
153
+ "notNull": false
154
+ }
155
+ },
156
+ "indexes": {},
157
+ "foreignKeys": {
158
+ "sessions_user_id_users_id_fk": {
159
+ "name": "sessions_user_id_users_id_fk",
160
+ "tableFrom": "sessions",
161
+ "tableTo": "users",
162
+ "columnsFrom": [
163
+ "user_id"
164
+ ],
165
+ "columnsTo": [
166
+ "id"
167
+ ],
168
+ "onDelete": "cascade",
169
+ "onUpdate": "no action"
170
+ }
171
+ },
172
+ "compositePrimaryKeys": {},
173
+ "uniqueConstraints": {
174
+ "sessions_token_unique": {
175
+ "name": "sessions_token_unique",
176
+ "nullsNotDistinct": false,
177
+ "columns": [
178
+ "token"
179
+ ]
180
+ }
181
+ },
182
+ "policies": {},
183
+ "checkConstraints": {},
184
+ "isRLSEnabled": false
185
+ },
186
+ "public.verification_tokens": {
187
+ "name": "verification_tokens",
188
+ "schema": "",
189
+ "columns": {
190
+ "id": {
191
+ "name": "id",
192
+ "type": "uuid",
193
+ "primaryKey": true,
194
+ "notNull": true,
195
+ "default": "gen_random_uuid()"
196
+ },
197
+ "user_id": {
198
+ "name": "user_id",
199
+ "type": "uuid",
200
+ "primaryKey": false,
201
+ "notNull": true
202
+ },
203
+ "token": {
204
+ "name": "token",
205
+ "type": "varchar(255)",
206
+ "primaryKey": false,
207
+ "notNull": true
208
+ },
209
+ "type": {
210
+ "name": "type",
211
+ "type": "varchar(50)",
212
+ "primaryKey": false,
213
+ "notNull": true
214
+ },
215
+ "expires_at": {
216
+ "name": "expires_at",
217
+ "type": "timestamp with time zone",
218
+ "primaryKey": false,
219
+ "notNull": true
220
+ },
221
+ "used_at": {
222
+ "name": "used_at",
223
+ "type": "timestamp with time zone",
224
+ "primaryKey": false,
225
+ "notNull": false
226
+ },
227
+ "created_at": {
228
+ "name": "created_at",
229
+ "type": "timestamp with time zone",
230
+ "primaryKey": false,
231
+ "notNull": true,
232
+ "default": "now()"
233
+ }
234
+ },
235
+ "indexes": {},
236
+ "foreignKeys": {
237
+ "verification_tokens_user_id_users_id_fk": {
238
+ "name": "verification_tokens_user_id_users_id_fk",
239
+ "tableFrom": "verification_tokens",
240
+ "tableTo": "users",
241
+ "columnsFrom": [
242
+ "user_id"
243
+ ],
244
+ "columnsTo": [
245
+ "id"
246
+ ],
247
+ "onDelete": "cascade",
248
+ "onUpdate": "no action"
249
+ }
250
+ },
251
+ "compositePrimaryKeys": {},
252
+ "uniqueConstraints": {
253
+ "verification_tokens_token_unique": {
254
+ "name": "verification_tokens_token_unique",
255
+ "nullsNotDistinct": false,
256
+ "columns": [
257
+ "token"
258
+ ]
259
+ }
260
+ },
261
+ "policies": {},
262
+ "checkConstraints": {},
263
+ "isRLSEnabled": false
264
+ },
265
+ "public.better_auth_verifications": {
266
+ "name": "better_auth_verifications",
267
+ "schema": "",
268
+ "columns": {
269
+ "id": {
270
+ "name": "id",
271
+ "type": "uuid",
272
+ "primaryKey": true,
273
+ "notNull": true,
274
+ "default": "gen_random_uuid()"
275
+ },
276
+ "identifier": {
277
+ "name": "identifier",
278
+ "type": "varchar(255)",
279
+ "primaryKey": false,
280
+ "notNull": true
281
+ },
282
+ "value": {
283
+ "name": "value",
284
+ "type": "text",
285
+ "primaryKey": false,
286
+ "notNull": true
287
+ },
288
+ "expires_at": {
289
+ "name": "expires_at",
290
+ "type": "timestamp with time zone",
291
+ "primaryKey": false,
292
+ "notNull": true
293
+ },
294
+ "created_at": {
295
+ "name": "created_at",
296
+ "type": "timestamp with time zone",
297
+ "primaryKey": false,
298
+ "notNull": true,
299
+ "default": "now()"
300
+ },
301
+ "updated_at": {
302
+ "name": "updated_at",
303
+ "type": "timestamp with time zone",
304
+ "primaryKey": false,
305
+ "notNull": true,
306
+ "default": "now()"
307
+ }
308
+ },
309
+ "indexes": {},
310
+ "foreignKeys": {},
311
+ "compositePrimaryKeys": {},
312
+ "uniqueConstraints": {
313
+ "better_auth_verifications_identifier_unique": {
314
+ "name": "better_auth_verifications_identifier_unique",
315
+ "nullsNotDistinct": false,
316
+ "columns": [
317
+ "identifier"
318
+ ]
319
+ }
320
+ },
321
+ "policies": {},
322
+ "checkConstraints": {},
323
+ "isRLSEnabled": false
324
+ },
325
+ "public.user_roles": {
326
+ "name": "user_roles",
327
+ "schema": "",
328
+ "columns": {
329
+ "id": {
330
+ "name": "id",
331
+ "type": "uuid",
332
+ "primaryKey": true,
333
+ "notNull": true,
334
+ "default": "gen_random_uuid()"
335
+ },
336
+ "user_id": {
337
+ "name": "user_id",
338
+ "type": "uuid",
339
+ "primaryKey": false,
340
+ "notNull": true
341
+ },
342
+ "role": {
343
+ "name": "role",
344
+ "type": "varchar(50)",
345
+ "primaryKey": false,
346
+ "notNull": true
347
+ },
348
+ "resource_type": {
349
+ "name": "resource_type",
350
+ "type": "varchar(50)",
351
+ "primaryKey": false,
352
+ "notNull": true
353
+ },
354
+ "resource_id": {
355
+ "name": "resource_id",
356
+ "type": "uuid",
357
+ "primaryKey": false,
358
+ "notNull": true
359
+ },
360
+ "created_at": {
361
+ "name": "created_at",
362
+ "type": "timestamp with time zone",
363
+ "primaryKey": false,
364
+ "notNull": true,
365
+ "default": "now()"
366
+ }
367
+ },
368
+ "indexes": {},
369
+ "foreignKeys": {
370
+ "user_roles_user_id_users_id_fk": {
371
+ "name": "user_roles_user_id_users_id_fk",
372
+ "tableFrom": "user_roles",
373
+ "tableTo": "users",
374
+ "columnsFrom": [
375
+ "user_id"
376
+ ],
377
+ "columnsTo": [
378
+ "id"
379
+ ],
380
+ "onDelete": "cascade",
381
+ "onUpdate": "no action"
382
+ }
383
+ },
384
+ "compositePrimaryKeys": {},
385
+ "uniqueConstraints": {},
386
+ "policies": {},
387
+ "checkConstraints": {},
388
+ "isRLSEnabled": false
389
+ },
390
+ "public.email_jobs": {
391
+ "name": "email_jobs",
392
+ "schema": "",
393
+ "columns": {
394
+ "id": {
395
+ "name": "id",
396
+ "type": "uuid",
397
+ "primaryKey": true,
398
+ "notNull": true,
399
+ "default": "gen_random_uuid()"
400
+ },
401
+ "user_id": {
402
+ "name": "user_id",
403
+ "type": "uuid",
404
+ "primaryKey": false,
405
+ "notNull": true
406
+ },
407
+ "token_id": {
408
+ "name": "token_id",
409
+ "type": "uuid",
410
+ "primaryKey": false,
411
+ "notNull": false
412
+ },
413
+ "type": {
414
+ "name": "type",
415
+ "type": "varchar(50)",
416
+ "primaryKey": false,
417
+ "notNull": true
418
+ },
419
+ "to": {
420
+ "name": "to",
421
+ "type": "varchar(320)",
422
+ "primaryKey": false,
423
+ "notNull": true
424
+ },
425
+ "subject": {
426
+ "name": "subject",
427
+ "type": "text",
428
+ "primaryKey": false,
429
+ "notNull": true
430
+ },
431
+ "template": {
432
+ "name": "template",
433
+ "type": "varchar(100)",
434
+ "primaryKey": false,
435
+ "notNull": true
436
+ },
437
+ "data": {
438
+ "name": "data",
439
+ "type": "jsonb",
440
+ "primaryKey": false,
441
+ "notNull": true
442
+ },
443
+ "attempts": {
444
+ "name": "attempts",
445
+ "type": "integer",
446
+ "primaryKey": false,
447
+ "notNull": true,
448
+ "default": 0
449
+ },
450
+ "max_attempts": {
451
+ "name": "max_attempts",
452
+ "type": "integer",
453
+ "primaryKey": false,
454
+ "notNull": true,
455
+ "default": 3
456
+ },
457
+ "status": {
458
+ "name": "status",
459
+ "type": "varchar(20)",
460
+ "primaryKey": false,
461
+ "notNull": true,
462
+ "default": "'pending'"
463
+ },
464
+ "last_error": {
465
+ "name": "last_error",
466
+ "type": "text",
467
+ "primaryKey": false,
468
+ "notNull": false
469
+ },
470
+ "scheduled_for": {
471
+ "name": "scheduled_for",
472
+ "type": "timestamp with time zone",
473
+ "primaryKey": false,
474
+ "notNull": true,
475
+ "default": "now()"
476
+ },
477
+ "created_at": {
478
+ "name": "created_at",
479
+ "type": "timestamp with time zone",
480
+ "primaryKey": false,
481
+ "notNull": true,
482
+ "default": "now()"
483
+ },
484
+ "updated_at": {
485
+ "name": "updated_at",
486
+ "type": "timestamp with time zone",
487
+ "primaryKey": false,
488
+ "notNull": true,
489
+ "default": "now()"
490
+ }
491
+ },
492
+ "indexes": {},
493
+ "foreignKeys": {
494
+ "email_jobs_user_id_users_id_fk": {
495
+ "name": "email_jobs_user_id_users_id_fk",
496
+ "tableFrom": "email_jobs",
497
+ "tableTo": "users",
498
+ "columnsFrom": [
499
+ "user_id"
500
+ ],
501
+ "columnsTo": [
502
+ "id"
503
+ ],
504
+ "onDelete": "cascade",
505
+ "onUpdate": "no action"
506
+ },
507
+ "email_jobs_token_id_verification_tokens_id_fk": {
508
+ "name": "email_jobs_token_id_verification_tokens_id_fk",
509
+ "tableFrom": "email_jobs",
510
+ "tableTo": "verification_tokens",
511
+ "columnsFrom": [
512
+ "token_id"
513
+ ],
514
+ "columnsTo": [
515
+ "id"
516
+ ],
517
+ "onDelete": "set null",
518
+ "onUpdate": "no action"
519
+ }
520
+ },
521
+ "compositePrimaryKeys": {},
522
+ "uniqueConstraints": {},
523
+ "policies": {},
524
+ "checkConstraints": {},
525
+ "isRLSEnabled": false
526
+ },
527
+ "public.account": {
528
+ "name": "account",
529
+ "schema": "",
530
+ "columns": {
531
+ "id": {
532
+ "name": "id",
533
+ "type": "uuid",
534
+ "primaryKey": true,
535
+ "notNull": true,
536
+ "default": "gen_random_uuid()"
537
+ },
538
+ "account_id": {
539
+ "name": "account_id",
540
+ "type": "text",
541
+ "primaryKey": false,
542
+ "notNull": true
543
+ },
544
+ "provider_id": {
545
+ "name": "provider_id",
546
+ "type": "text",
547
+ "primaryKey": false,
548
+ "notNull": true
549
+ },
550
+ "user_id": {
551
+ "name": "user_id",
552
+ "type": "uuid",
553
+ "primaryKey": false,
554
+ "notNull": true
555
+ },
556
+ "access_token": {
557
+ "name": "access_token",
558
+ "type": "text",
559
+ "primaryKey": false,
560
+ "notNull": false
561
+ },
562
+ "refresh_token": {
563
+ "name": "refresh_token",
564
+ "type": "text",
565
+ "primaryKey": false,
566
+ "notNull": false
567
+ },
568
+ "id_token": {
569
+ "name": "id_token",
570
+ "type": "text",
571
+ "primaryKey": false,
572
+ "notNull": false
573
+ },
574
+ "access_token_expires_at": {
575
+ "name": "access_token_expires_at",
576
+ "type": "timestamp with time zone",
577
+ "primaryKey": false,
578
+ "notNull": false
579
+ },
580
+ "refresh_token_expires_at": {
581
+ "name": "refresh_token_expires_at",
582
+ "type": "timestamp with time zone",
583
+ "primaryKey": false,
584
+ "notNull": false
585
+ },
586
+ "scope": {
587
+ "name": "scope",
588
+ "type": "text",
589
+ "primaryKey": false,
590
+ "notNull": false
591
+ },
592
+ "password": {
593
+ "name": "password",
594
+ "type": "text",
595
+ "primaryKey": false,
596
+ "notNull": false
597
+ },
598
+ "created_at": {
599
+ "name": "created_at",
600
+ "type": "timestamp with time zone",
601
+ "primaryKey": false,
602
+ "notNull": true,
603
+ "default": "now()"
604
+ },
605
+ "updated_at": {
606
+ "name": "updated_at",
607
+ "type": "timestamp with time zone",
608
+ "primaryKey": false,
609
+ "notNull": true,
610
+ "default": "now()"
611
+ }
612
+ },
613
+ "indexes": {},
614
+ "foreignKeys": {
615
+ "account_user_id_users_id_fk": {
616
+ "name": "account_user_id_users_id_fk",
617
+ "tableFrom": "account",
618
+ "tableTo": "users",
619
+ "columnsFrom": [
620
+ "user_id"
621
+ ],
622
+ "columnsTo": [
623
+ "id"
624
+ ],
625
+ "onDelete": "cascade",
626
+ "onUpdate": "no action"
627
+ }
628
+ },
629
+ "compositePrimaryKeys": {},
630
+ "uniqueConstraints": {},
631
+ "policies": {},
632
+ "checkConstraints": {},
633
+ "isRLSEnabled": false
634
+ },
635
+ "public.projects": {
636
+ "name": "projects",
637
+ "schema": "",
638
+ "columns": {
639
+ "id": {
640
+ "name": "id",
641
+ "type": "uuid",
642
+ "primaryKey": true,
643
+ "notNull": true,
644
+ "default": "gen_random_uuid()"
645
+ },
646
+ "team_id": {
647
+ "name": "team_id",
648
+ "type": "uuid",
649
+ "primaryKey": false,
650
+ "notNull": true
651
+ },
652
+ "name": {
653
+ "name": "name",
654
+ "type": "varchar(100)",
655
+ "primaryKey": false,
656
+ "notNull": true
657
+ },
658
+ "key": {
659
+ "name": "key",
660
+ "type": "varchar(10)",
661
+ "primaryKey": false,
662
+ "notNull": true
663
+ },
664
+ "slug": {
665
+ "name": "slug",
666
+ "type": "varchar(120)",
667
+ "primaryKey": false,
668
+ "notNull": true
669
+ },
670
+ "description": {
671
+ "name": "description",
672
+ "type": "text",
673
+ "primaryKey": false,
674
+ "notNull": false
675
+ },
676
+ "icon": {
677
+ "name": "icon",
678
+ "type": "varchar(255)",
679
+ "primaryKey": false,
680
+ "notNull": false
681
+ },
682
+ "visibility": {
683
+ "name": "visibility",
684
+ "type": "varchar(10)",
685
+ "primaryKey": false,
686
+ "notNull": true,
687
+ "default": "'private'"
688
+ },
689
+ "status": {
690
+ "name": "status",
691
+ "type": "varchar(10)",
692
+ "primaryKey": false,
693
+ "notNull": true,
694
+ "default": "'active'"
695
+ },
696
+ "created_at": {
697
+ "name": "created_at",
698
+ "type": "timestamp with time zone",
699
+ "primaryKey": false,
700
+ "notNull": true,
701
+ "default": "now()"
702
+ },
703
+ "updated_at": {
704
+ "name": "updated_at",
705
+ "type": "timestamp with time zone",
706
+ "primaryKey": false,
707
+ "notNull": true,
708
+ "default": "now()"
709
+ },
710
+ "deleted_at": {
711
+ "name": "deleted_at",
712
+ "type": "timestamp with time zone",
713
+ "primaryKey": false,
714
+ "notNull": false
715
+ }
716
+ },
717
+ "indexes": {
718
+ "projects_team_id_idx": {
719
+ "name": "projects_team_id_idx",
720
+ "columns": [
721
+ {
722
+ "expression": "team_id",
723
+ "isExpression": false,
724
+ "asc": true,
725
+ "nulls": "last"
726
+ }
727
+ ],
728
+ "isUnique": false,
729
+ "concurrently": false,
730
+ "method": "btree",
731
+ "with": {}
732
+ },
733
+ "projects_status_idx": {
734
+ "name": "projects_status_idx",
735
+ "columns": [
736
+ {
737
+ "expression": "status",
738
+ "isExpression": false,
739
+ "asc": true,
740
+ "nulls": "last"
741
+ }
742
+ ],
743
+ "isUnique": false,
744
+ "concurrently": false,
745
+ "method": "btree",
746
+ "with": {}
747
+ },
748
+ "projects_visibility_idx": {
749
+ "name": "projects_visibility_idx",
750
+ "columns": [
751
+ {
752
+ "expression": "visibility",
753
+ "isExpression": false,
754
+ "asc": true,
755
+ "nulls": "last"
756
+ }
757
+ ],
758
+ "isUnique": false,
759
+ "concurrently": false,
760
+ "method": "btree",
761
+ "with": {}
762
+ },
763
+ "projects_team_filters_idx": {
764
+ "name": "projects_team_filters_idx",
765
+ "columns": [
766
+ {
767
+ "expression": "team_id",
768
+ "isExpression": false,
769
+ "asc": true,
770
+ "nulls": "last"
771
+ },
772
+ {
773
+ "expression": "status",
774
+ "isExpression": false,
775
+ "asc": true,
776
+ "nulls": "last"
777
+ },
778
+ {
779
+ "expression": "visibility",
780
+ "isExpression": false,
781
+ "asc": true,
782
+ "nulls": "last"
783
+ }
784
+ ],
785
+ "isUnique": false,
786
+ "concurrently": false,
787
+ "method": "btree",
788
+ "with": {}
789
+ },
790
+ "projects_team_key_unique": {
791
+ "name": "projects_team_key_unique",
792
+ "columns": [
793
+ {
794
+ "expression": "team_id",
795
+ "isExpression": false,
796
+ "asc": true,
797
+ "nulls": "last"
798
+ },
799
+ {
800
+ "expression": "key",
801
+ "isExpression": false,
802
+ "asc": true,
803
+ "nulls": "last"
804
+ }
805
+ ],
806
+ "isUnique": true,
807
+ "where": "deleted_at IS NULL",
808
+ "concurrently": false,
809
+ "method": "btree",
810
+ "with": {}
811
+ },
812
+ "projects_team_slug_unique": {
813
+ "name": "projects_team_slug_unique",
814
+ "columns": [
815
+ {
816
+ "expression": "team_id",
817
+ "isExpression": false,
818
+ "asc": true,
819
+ "nulls": "last"
820
+ },
821
+ {
822
+ "expression": "slug",
823
+ "isExpression": false,
824
+ "asc": true,
825
+ "nulls": "last"
826
+ }
827
+ ],
828
+ "isUnique": true,
829
+ "where": "deleted_at IS NULL",
830
+ "concurrently": false,
831
+ "method": "btree",
832
+ "with": {}
833
+ }
834
+ },
835
+ "foreignKeys": {
836
+ "projects_team_id_teams_id_fk": {
837
+ "name": "projects_team_id_teams_id_fk",
838
+ "tableFrom": "projects",
839
+ "tableTo": "teams",
840
+ "columnsFrom": [
841
+ "team_id"
842
+ ],
843
+ "columnsTo": [
844
+ "id"
845
+ ],
846
+ "onDelete": "cascade",
847
+ "onUpdate": "no action"
848
+ }
849
+ },
850
+ "compositePrimaryKeys": {},
851
+ "uniqueConstraints": {},
852
+ "policies": {},
853
+ "checkConstraints": {},
854
+ "isRLSEnabled": false
855
+ },
856
+ "public.project_members": {
857
+ "name": "project_members",
858
+ "schema": "",
859
+ "columns": {
860
+ "id": {
861
+ "name": "id",
862
+ "type": "uuid",
863
+ "primaryKey": true,
864
+ "notNull": true,
865
+ "default": "gen_random_uuid()"
866
+ },
867
+ "project_id": {
868
+ "name": "project_id",
869
+ "type": "uuid",
870
+ "primaryKey": false,
871
+ "notNull": true
872
+ },
873
+ "user_id": {
874
+ "name": "user_id",
875
+ "type": "uuid",
876
+ "primaryKey": false,
877
+ "notNull": true
878
+ },
879
+ "role": {
880
+ "name": "role",
881
+ "type": "varchar(50)",
882
+ "primaryKey": false,
883
+ "notNull": true
884
+ },
885
+ "joined_at": {
886
+ "name": "joined_at",
887
+ "type": "timestamp with time zone",
888
+ "primaryKey": false,
889
+ "notNull": true,
890
+ "default": "now()"
891
+ }
892
+ },
893
+ "indexes": {
894
+ "project_members_project_id_idx": {
895
+ "name": "project_members_project_id_idx",
896
+ "columns": [
897
+ {
898
+ "expression": "project_id",
899
+ "isExpression": false,
900
+ "asc": true,
901
+ "nulls": "last"
902
+ }
903
+ ],
904
+ "isUnique": false,
905
+ "concurrently": false,
906
+ "method": "btree",
907
+ "with": {}
908
+ },
909
+ "project_members_user_id_idx": {
910
+ "name": "project_members_user_id_idx",
911
+ "columns": [
912
+ {
913
+ "expression": "user_id",
914
+ "isExpression": false,
915
+ "asc": true,
916
+ "nulls": "last"
917
+ }
918
+ ],
919
+ "isUnique": false,
920
+ "concurrently": false,
921
+ "method": "btree",
922
+ "with": {}
923
+ },
924
+ "project_members_project_user_unique": {
925
+ "name": "project_members_project_user_unique",
926
+ "columns": [
927
+ {
928
+ "expression": "project_id",
929
+ "isExpression": false,
930
+ "asc": true,
931
+ "nulls": "last"
932
+ },
933
+ {
934
+ "expression": "user_id",
935
+ "isExpression": false,
936
+ "asc": true,
937
+ "nulls": "last"
938
+ }
939
+ ],
940
+ "isUnique": true,
941
+ "concurrently": false,
942
+ "method": "btree",
943
+ "with": {}
944
+ }
945
+ },
946
+ "foreignKeys": {
947
+ "project_members_project_id_projects_id_fk": {
948
+ "name": "project_members_project_id_projects_id_fk",
949
+ "tableFrom": "project_members",
950
+ "tableTo": "projects",
951
+ "columnsFrom": [
952
+ "project_id"
953
+ ],
954
+ "columnsTo": [
955
+ "id"
956
+ ],
957
+ "onDelete": "cascade",
958
+ "onUpdate": "no action"
959
+ },
960
+ "project_members_user_id_users_id_fk": {
961
+ "name": "project_members_user_id_users_id_fk",
962
+ "tableFrom": "project_members",
963
+ "tableTo": "users",
964
+ "columnsFrom": [
965
+ "user_id"
966
+ ],
967
+ "columnsTo": [
968
+ "id"
969
+ ],
970
+ "onDelete": "cascade",
971
+ "onUpdate": "no action"
972
+ }
973
+ },
974
+ "compositePrimaryKeys": {},
975
+ "uniqueConstraints": {},
976
+ "policies": {},
977
+ "checkConstraints": {},
978
+ "isRLSEnabled": false
979
+ },
980
+ "public.project_invitations": {
981
+ "name": "project_invitations",
982
+ "schema": "",
983
+ "columns": {
984
+ "id": {
985
+ "name": "id",
986
+ "type": "uuid",
987
+ "primaryKey": true,
988
+ "notNull": true,
989
+ "default": "gen_random_uuid()"
990
+ },
991
+ "project_id": {
992
+ "name": "project_id",
993
+ "type": "uuid",
994
+ "primaryKey": false,
995
+ "notNull": true
996
+ },
997
+ "email": {
998
+ "name": "email",
999
+ "type": "varchar(320)",
1000
+ "primaryKey": false,
1001
+ "notNull": true
1002
+ },
1003
+ "token_hash": {
1004
+ "name": "token_hash",
1005
+ "type": "varchar(64)",
1006
+ "primaryKey": false,
1007
+ "notNull": true
1008
+ },
1009
+ "role": {
1010
+ "name": "role",
1011
+ "type": "varchar(20)",
1012
+ "primaryKey": false,
1013
+ "notNull": true
1014
+ },
1015
+ "invited_by": {
1016
+ "name": "invited_by",
1017
+ "type": "uuid",
1018
+ "primaryKey": false,
1019
+ "notNull": true
1020
+ },
1021
+ "expires_at": {
1022
+ "name": "expires_at",
1023
+ "type": "timestamp with time zone",
1024
+ "primaryKey": false,
1025
+ "notNull": true
1026
+ },
1027
+ "used_at": {
1028
+ "name": "used_at",
1029
+ "type": "timestamp with time zone",
1030
+ "primaryKey": false,
1031
+ "notNull": false
1032
+ },
1033
+ "cancelled_at": {
1034
+ "name": "cancelled_at",
1035
+ "type": "timestamp with time zone",
1036
+ "primaryKey": false,
1037
+ "notNull": false
1038
+ },
1039
+ "email_delivery_failed": {
1040
+ "name": "email_delivery_failed",
1041
+ "type": "boolean",
1042
+ "primaryKey": false,
1043
+ "notNull": true,
1044
+ "default": false
1045
+ },
1046
+ "email_failure_reason": {
1047
+ "name": "email_failure_reason",
1048
+ "type": "text",
1049
+ "primaryKey": false,
1050
+ "notNull": false
1051
+ },
1052
+ "email_last_attempt_at": {
1053
+ "name": "email_last_attempt_at",
1054
+ "type": "timestamp with time zone",
1055
+ "primaryKey": false,
1056
+ "notNull": false
1057
+ },
1058
+ "created_at": {
1059
+ "name": "created_at",
1060
+ "type": "timestamp with time zone",
1061
+ "primaryKey": false,
1062
+ "notNull": true,
1063
+ "default": "now()"
1064
+ }
1065
+ },
1066
+ "indexes": {
1067
+ "project_invitations_token_hash_idx": {
1068
+ "name": "project_invitations_token_hash_idx",
1069
+ "columns": [
1070
+ {
1071
+ "expression": "token_hash",
1072
+ "isExpression": false,
1073
+ "asc": true,
1074
+ "nulls": "last"
1075
+ }
1076
+ ],
1077
+ "isUnique": true,
1078
+ "concurrently": false,
1079
+ "method": "btree",
1080
+ "with": {}
1081
+ },
1082
+ "project_invitations_project_email_idx": {
1083
+ "name": "project_invitations_project_email_idx",
1084
+ "columns": [
1085
+ {
1086
+ "expression": "project_id",
1087
+ "isExpression": false,
1088
+ "asc": true,
1089
+ "nulls": "last"
1090
+ },
1091
+ {
1092
+ "expression": "email",
1093
+ "isExpression": false,
1094
+ "asc": true,
1095
+ "nulls": "last"
1096
+ }
1097
+ ],
1098
+ "isUnique": false,
1099
+ "concurrently": false,
1100
+ "method": "btree",
1101
+ "with": {}
1102
+ },
1103
+ "project_invitations_expires_idx": {
1104
+ "name": "project_invitations_expires_idx",
1105
+ "columns": [
1106
+ {
1107
+ "expression": "expires_at",
1108
+ "isExpression": false,
1109
+ "asc": true,
1110
+ "nulls": "last"
1111
+ }
1112
+ ],
1113
+ "isUnique": false,
1114
+ "concurrently": false,
1115
+ "method": "btree",
1116
+ "with": {}
1117
+ },
1118
+ "project_invitations_email_failed_idx": {
1119
+ "name": "project_invitations_email_failed_idx",
1120
+ "columns": [
1121
+ {
1122
+ "expression": "email_delivery_failed",
1123
+ "isExpression": false,
1124
+ "asc": true,
1125
+ "nulls": "last"
1126
+ },
1127
+ {
1128
+ "expression": "email_last_attempt_at",
1129
+ "isExpression": false,
1130
+ "asc": true,
1131
+ "nulls": "last"
1132
+ }
1133
+ ],
1134
+ "isUnique": false,
1135
+ "where": "\"project_invitations\".\"email_delivery_failed\" = true",
1136
+ "concurrently": false,
1137
+ "method": "btree",
1138
+ "with": {}
1139
+ }
1140
+ },
1141
+ "foreignKeys": {
1142
+ "project_invitations_project_id_projects_id_fk": {
1143
+ "name": "project_invitations_project_id_projects_id_fk",
1144
+ "tableFrom": "project_invitations",
1145
+ "tableTo": "projects",
1146
+ "columnsFrom": [
1147
+ "project_id"
1148
+ ],
1149
+ "columnsTo": [
1150
+ "id"
1151
+ ],
1152
+ "onDelete": "cascade",
1153
+ "onUpdate": "no action"
1154
+ },
1155
+ "project_invitations_invited_by_users_id_fk": {
1156
+ "name": "project_invitations_invited_by_users_id_fk",
1157
+ "tableFrom": "project_invitations",
1158
+ "tableTo": "users",
1159
+ "columnsFrom": [
1160
+ "invited_by"
1161
+ ],
1162
+ "columnsTo": [
1163
+ "id"
1164
+ ],
1165
+ "onDelete": "no action",
1166
+ "onUpdate": "no action"
1167
+ }
1168
+ },
1169
+ "compositePrimaryKeys": {},
1170
+ "uniqueConstraints": {
1171
+ "project_invitations_token_hash_unique": {
1172
+ "name": "project_invitations_token_hash_unique",
1173
+ "nullsNotDistinct": false,
1174
+ "columns": [
1175
+ "token_hash"
1176
+ ]
1177
+ }
1178
+ },
1179
+ "policies": {},
1180
+ "checkConstraints": {},
1181
+ "isRLSEnabled": false
1182
+ },
1183
+ "public.teams": {
1184
+ "name": "teams",
1185
+ "schema": "",
1186
+ "columns": {
1187
+ "id": {
1188
+ "name": "id",
1189
+ "type": "uuid",
1190
+ "primaryKey": true,
1191
+ "notNull": true,
1192
+ "default": "gen_random_uuid()"
1193
+ },
1194
+ "name": {
1195
+ "name": "name",
1196
+ "type": "varchar(50)",
1197
+ "primaryKey": false,
1198
+ "notNull": true
1199
+ },
1200
+ "slug": {
1201
+ "name": "slug",
1202
+ "type": "varchar(60)",
1203
+ "primaryKey": false,
1204
+ "notNull": true
1205
+ },
1206
+ "description": {
1207
+ "name": "description",
1208
+ "type": "text",
1209
+ "primaryKey": false,
1210
+ "notNull": false
1211
+ },
1212
+ "image": {
1213
+ "name": "image",
1214
+ "type": "text",
1215
+ "primaryKey": false,
1216
+ "notNull": false
1217
+ },
1218
+ "created_at": {
1219
+ "name": "created_at",
1220
+ "type": "timestamp with time zone",
1221
+ "primaryKey": false,
1222
+ "notNull": true,
1223
+ "default": "now()"
1224
+ },
1225
+ "updated_at": {
1226
+ "name": "updated_at",
1227
+ "type": "timestamp with time zone",
1228
+ "primaryKey": false,
1229
+ "notNull": true,
1230
+ "default": "now()"
1231
+ },
1232
+ "deleted_at": {
1233
+ "name": "deleted_at",
1234
+ "type": "timestamp with time zone",
1235
+ "primaryKey": false,
1236
+ "notNull": false
1237
+ }
1238
+ },
1239
+ "indexes": {
1240
+ "teams_slug_idx": {
1241
+ "name": "teams_slug_idx",
1242
+ "columns": [
1243
+ {
1244
+ "expression": "slug",
1245
+ "isExpression": false,
1246
+ "asc": true,
1247
+ "nulls": "last"
1248
+ }
1249
+ ],
1250
+ "isUnique": false,
1251
+ "concurrently": false,
1252
+ "method": "btree",
1253
+ "with": {}
1254
+ }
1255
+ },
1256
+ "foreignKeys": {},
1257
+ "compositePrimaryKeys": {},
1258
+ "uniqueConstraints": {
1259
+ "teams_slug_unique": {
1260
+ "name": "teams_slug_unique",
1261
+ "nullsNotDistinct": false,
1262
+ "columns": [
1263
+ "slug"
1264
+ ]
1265
+ }
1266
+ },
1267
+ "policies": {},
1268
+ "checkConstraints": {},
1269
+ "isRLSEnabled": false
1270
+ },
1271
+ "public.team_members": {
1272
+ "name": "team_members",
1273
+ "schema": "",
1274
+ "columns": {
1275
+ "id": {
1276
+ "name": "id",
1277
+ "type": "uuid",
1278
+ "primaryKey": true,
1279
+ "notNull": true,
1280
+ "default": "gen_random_uuid()"
1281
+ },
1282
+ "team_id": {
1283
+ "name": "team_id",
1284
+ "type": "uuid",
1285
+ "primaryKey": false,
1286
+ "notNull": true
1287
+ },
1288
+ "user_id": {
1289
+ "name": "user_id",
1290
+ "type": "uuid",
1291
+ "primaryKey": false,
1292
+ "notNull": true
1293
+ },
1294
+ "management_role": {
1295
+ "name": "management_role",
1296
+ "type": "varchar(20)",
1297
+ "primaryKey": false,
1298
+ "notNull": false
1299
+ },
1300
+ "operational_role": {
1301
+ "name": "operational_role",
1302
+ "type": "varchar(20)",
1303
+ "primaryKey": false,
1304
+ "notNull": true
1305
+ },
1306
+ "joined_at": {
1307
+ "name": "joined_at",
1308
+ "type": "timestamp with time zone",
1309
+ "primaryKey": false,
1310
+ "notNull": true,
1311
+ "default": "now()"
1312
+ },
1313
+ "invited_by": {
1314
+ "name": "invited_by",
1315
+ "type": "uuid",
1316
+ "primaryKey": false,
1317
+ "notNull": false
1318
+ }
1319
+ },
1320
+ "indexes": {
1321
+ "team_members_team_user_idx": {
1322
+ "name": "team_members_team_user_idx",
1323
+ "columns": [
1324
+ {
1325
+ "expression": "team_id",
1326
+ "isExpression": false,
1327
+ "asc": true,
1328
+ "nulls": "last"
1329
+ },
1330
+ {
1331
+ "expression": "user_id",
1332
+ "isExpression": false,
1333
+ "asc": true,
1334
+ "nulls": "last"
1335
+ }
1336
+ ],
1337
+ "isUnique": true,
1338
+ "concurrently": false,
1339
+ "method": "btree",
1340
+ "with": {}
1341
+ },
1342
+ "team_members_user_idx": {
1343
+ "name": "team_members_user_idx",
1344
+ "columns": [
1345
+ {
1346
+ "expression": "user_id",
1347
+ "isExpression": false,
1348
+ "asc": true,
1349
+ "nulls": "last"
1350
+ }
1351
+ ],
1352
+ "isUnique": false,
1353
+ "concurrently": false,
1354
+ "method": "btree",
1355
+ "with": {}
1356
+ },
1357
+ "team_members_team_idx": {
1358
+ "name": "team_members_team_idx",
1359
+ "columns": [
1360
+ {
1361
+ "expression": "team_id",
1362
+ "isExpression": false,
1363
+ "asc": true,
1364
+ "nulls": "last"
1365
+ }
1366
+ ],
1367
+ "isUnique": false,
1368
+ "concurrently": false,
1369
+ "method": "btree",
1370
+ "with": {}
1371
+ }
1372
+ },
1373
+ "foreignKeys": {
1374
+ "team_members_team_id_teams_id_fk": {
1375
+ "name": "team_members_team_id_teams_id_fk",
1376
+ "tableFrom": "team_members",
1377
+ "tableTo": "teams",
1378
+ "columnsFrom": [
1379
+ "team_id"
1380
+ ],
1381
+ "columnsTo": [
1382
+ "id"
1383
+ ],
1384
+ "onDelete": "cascade",
1385
+ "onUpdate": "no action"
1386
+ },
1387
+ "team_members_user_id_users_id_fk": {
1388
+ "name": "team_members_user_id_users_id_fk",
1389
+ "tableFrom": "team_members",
1390
+ "tableTo": "users",
1391
+ "columnsFrom": [
1392
+ "user_id"
1393
+ ],
1394
+ "columnsTo": [
1395
+ "id"
1396
+ ],
1397
+ "onDelete": "cascade",
1398
+ "onUpdate": "no action"
1399
+ },
1400
+ "team_members_invited_by_users_id_fk": {
1401
+ "name": "team_members_invited_by_users_id_fk",
1402
+ "tableFrom": "team_members",
1403
+ "tableTo": "users",
1404
+ "columnsFrom": [
1405
+ "invited_by"
1406
+ ],
1407
+ "columnsTo": [
1408
+ "id"
1409
+ ],
1410
+ "onDelete": "no action",
1411
+ "onUpdate": "no action"
1412
+ }
1413
+ },
1414
+ "compositePrimaryKeys": {},
1415
+ "uniqueConstraints": {},
1416
+ "policies": {},
1417
+ "checkConstraints": {},
1418
+ "isRLSEnabled": false
1419
+ },
1420
+ "public.team_invitations": {
1421
+ "name": "team_invitations",
1422
+ "schema": "",
1423
+ "columns": {
1424
+ "id": {
1425
+ "name": "id",
1426
+ "type": "uuid",
1427
+ "primaryKey": true,
1428
+ "notNull": true,
1429
+ "default": "gen_random_uuid()"
1430
+ },
1431
+ "team_id": {
1432
+ "name": "team_id",
1433
+ "type": "uuid",
1434
+ "primaryKey": false,
1435
+ "notNull": true
1436
+ },
1437
+ "email": {
1438
+ "name": "email",
1439
+ "type": "varchar(320)",
1440
+ "primaryKey": false,
1441
+ "notNull": true
1442
+ },
1443
+ "token_hash": {
1444
+ "name": "token_hash",
1445
+ "type": "varchar(64)",
1446
+ "primaryKey": false,
1447
+ "notNull": true
1448
+ },
1449
+ "management_role": {
1450
+ "name": "management_role",
1451
+ "type": "varchar(20)",
1452
+ "primaryKey": false,
1453
+ "notNull": false
1454
+ },
1455
+ "operational_role": {
1456
+ "name": "operational_role",
1457
+ "type": "varchar(20)",
1458
+ "primaryKey": false,
1459
+ "notNull": true
1460
+ },
1461
+ "invited_by": {
1462
+ "name": "invited_by",
1463
+ "type": "uuid",
1464
+ "primaryKey": false,
1465
+ "notNull": true
1466
+ },
1467
+ "expires_at": {
1468
+ "name": "expires_at",
1469
+ "type": "timestamp with time zone",
1470
+ "primaryKey": false,
1471
+ "notNull": true
1472
+ },
1473
+ "used_at": {
1474
+ "name": "used_at",
1475
+ "type": "timestamp with time zone",
1476
+ "primaryKey": false,
1477
+ "notNull": false
1478
+ },
1479
+ "cancelled_at": {
1480
+ "name": "cancelled_at",
1481
+ "type": "timestamp with time zone",
1482
+ "primaryKey": false,
1483
+ "notNull": false
1484
+ },
1485
+ "created_at": {
1486
+ "name": "created_at",
1487
+ "type": "timestamp with time zone",
1488
+ "primaryKey": false,
1489
+ "notNull": true,
1490
+ "default": "now()"
1491
+ }
1492
+ },
1493
+ "indexes": {
1494
+ "team_invitations_token_hash_idx": {
1495
+ "name": "team_invitations_token_hash_idx",
1496
+ "columns": [
1497
+ {
1498
+ "expression": "token_hash",
1499
+ "isExpression": false,
1500
+ "asc": true,
1501
+ "nulls": "last"
1502
+ }
1503
+ ],
1504
+ "isUnique": true,
1505
+ "concurrently": false,
1506
+ "method": "btree",
1507
+ "with": {}
1508
+ },
1509
+ "team_invitations_team_email_idx": {
1510
+ "name": "team_invitations_team_email_idx",
1511
+ "columns": [
1512
+ {
1513
+ "expression": "team_id",
1514
+ "isExpression": false,
1515
+ "asc": true,
1516
+ "nulls": "last"
1517
+ },
1518
+ {
1519
+ "expression": "email",
1520
+ "isExpression": false,
1521
+ "asc": true,
1522
+ "nulls": "last"
1523
+ }
1524
+ ],
1525
+ "isUnique": false,
1526
+ "concurrently": false,
1527
+ "method": "btree",
1528
+ "with": {}
1529
+ },
1530
+ "team_invitations_expires_idx": {
1531
+ "name": "team_invitations_expires_idx",
1532
+ "columns": [
1533
+ {
1534
+ "expression": "expires_at",
1535
+ "isExpression": false,
1536
+ "asc": true,
1537
+ "nulls": "last"
1538
+ }
1539
+ ],
1540
+ "isUnique": false,
1541
+ "concurrently": false,
1542
+ "method": "btree",
1543
+ "with": {}
1544
+ }
1545
+ },
1546
+ "foreignKeys": {
1547
+ "team_invitations_team_id_teams_id_fk": {
1548
+ "name": "team_invitations_team_id_teams_id_fk",
1549
+ "tableFrom": "team_invitations",
1550
+ "tableTo": "teams",
1551
+ "columnsFrom": [
1552
+ "team_id"
1553
+ ],
1554
+ "columnsTo": [
1555
+ "id"
1556
+ ],
1557
+ "onDelete": "cascade",
1558
+ "onUpdate": "no action"
1559
+ },
1560
+ "team_invitations_invited_by_users_id_fk": {
1561
+ "name": "team_invitations_invited_by_users_id_fk",
1562
+ "tableFrom": "team_invitations",
1563
+ "tableTo": "users",
1564
+ "columnsFrom": [
1565
+ "invited_by"
1566
+ ],
1567
+ "columnsTo": [
1568
+ "id"
1569
+ ],
1570
+ "onDelete": "no action",
1571
+ "onUpdate": "no action"
1572
+ }
1573
+ },
1574
+ "compositePrimaryKeys": {},
1575
+ "uniqueConstraints": {
1576
+ "team_invitations_token_hash_unique": {
1577
+ "name": "team_invitations_token_hash_unique",
1578
+ "nullsNotDistinct": false,
1579
+ "columns": [
1580
+ "token_hash"
1581
+ ]
1582
+ }
1583
+ },
1584
+ "policies": {},
1585
+ "checkConstraints": {},
1586
+ "isRLSEnabled": false
1587
+ },
1588
+ "public.issues": {
1589
+ "name": "issues",
1590
+ "schema": "",
1591
+ "columns": {
1592
+ "id": {
1593
+ "name": "id",
1594
+ "type": "uuid",
1595
+ "primaryKey": true,
1596
+ "notNull": true,
1597
+ "default": "gen_random_uuid()"
1598
+ },
1599
+ "team_id": {
1600
+ "name": "team_id",
1601
+ "type": "uuid",
1602
+ "primaryKey": false,
1603
+ "notNull": true
1604
+ },
1605
+ "project_id": {
1606
+ "name": "project_id",
1607
+ "type": "uuid",
1608
+ "primaryKey": false,
1609
+ "notNull": true
1610
+ },
1611
+ "issue_key": {
1612
+ "name": "issue_key",
1613
+ "type": "varchar(50)",
1614
+ "primaryKey": false,
1615
+ "notNull": true
1616
+ },
1617
+ "issue_number": {
1618
+ "name": "issue_number",
1619
+ "type": "integer",
1620
+ "primaryKey": false,
1621
+ "notNull": true
1622
+ },
1623
+ "title": {
1624
+ "name": "title",
1625
+ "type": "varchar(255)",
1626
+ "primaryKey": false,
1627
+ "notNull": true
1628
+ },
1629
+ "description": {
1630
+ "name": "description",
1631
+ "type": "text",
1632
+ "primaryKey": false,
1633
+ "notNull": false
1634
+ },
1635
+ "type": {
1636
+ "name": "type",
1637
+ "type": "issue_type",
1638
+ "typeSchema": "public",
1639
+ "primaryKey": false,
1640
+ "notNull": true,
1641
+ "default": "'bug'"
1642
+ },
1643
+ "priority": {
1644
+ "name": "priority",
1645
+ "type": "issue_priority",
1646
+ "typeSchema": "public",
1647
+ "primaryKey": false,
1648
+ "notNull": true,
1649
+ "default": "'medium'"
1650
+ },
1651
+ "status": {
1652
+ "name": "status",
1653
+ "type": "issue_status",
1654
+ "typeSchema": "public",
1655
+ "primaryKey": false,
1656
+ "notNull": true,
1657
+ "default": "'open'"
1658
+ },
1659
+ "assignee_id": {
1660
+ "name": "assignee_id",
1661
+ "type": "uuid",
1662
+ "primaryKey": false,
1663
+ "notNull": false
1664
+ },
1665
+ "reporter_id": {
1666
+ "name": "reporter_id",
1667
+ "type": "uuid",
1668
+ "primaryKey": false,
1669
+ "notNull": true
1670
+ },
1671
+ "cover_image_url": {
1672
+ "name": "cover_image_url",
1673
+ "type": "text",
1674
+ "primaryKey": false,
1675
+ "notNull": false
1676
+ },
1677
+ "page": {
1678
+ "name": "page",
1679
+ "type": "varchar(255)",
1680
+ "primaryKey": false,
1681
+ "notNull": false
1682
+ },
1683
+ "figma_link": {
1684
+ "name": "figma_link",
1685
+ "type": "text",
1686
+ "primaryKey": false,
1687
+ "notNull": false
1688
+ },
1689
+ "jira_link": {
1690
+ "name": "jira_link",
1691
+ "type": "text",
1692
+ "primaryKey": false,
1693
+ "notNull": false
1694
+ },
1695
+ "created_at": {
1696
+ "name": "created_at",
1697
+ "type": "timestamp with time zone",
1698
+ "primaryKey": false,
1699
+ "notNull": true,
1700
+ "default": "now()"
1701
+ },
1702
+ "updated_at": {
1703
+ "name": "updated_at",
1704
+ "type": "timestamp with time zone",
1705
+ "primaryKey": false,
1706
+ "notNull": true,
1707
+ "default": "now()"
1708
+ },
1709
+ "deleted_at": {
1710
+ "name": "deleted_at",
1711
+ "type": "timestamp with time zone",
1712
+ "primaryKey": false,
1713
+ "notNull": false
1714
+ },
1715
+ "created_by": {
1716
+ "name": "created_by",
1717
+ "type": "uuid",
1718
+ "primaryKey": false,
1719
+ "notNull": false
1720
+ },
1721
+ "updated_by": {
1722
+ "name": "updated_by",
1723
+ "type": "uuid",
1724
+ "primaryKey": false,
1725
+ "notNull": false
1726
+ }
1727
+ },
1728
+ "indexes": {
1729
+ "issues_project_id_idx": {
1730
+ "name": "issues_project_id_idx",
1731
+ "columns": [
1732
+ {
1733
+ "expression": "project_id",
1734
+ "isExpression": false,
1735
+ "asc": true,
1736
+ "nulls": "last"
1737
+ }
1738
+ ],
1739
+ "isUnique": false,
1740
+ "concurrently": false,
1741
+ "method": "btree",
1742
+ "with": {}
1743
+ },
1744
+ "issues_status_idx": {
1745
+ "name": "issues_status_idx",
1746
+ "columns": [
1747
+ {
1748
+ "expression": "status",
1749
+ "isExpression": false,
1750
+ "asc": true,
1751
+ "nulls": "last"
1752
+ }
1753
+ ],
1754
+ "isUnique": false,
1755
+ "concurrently": false,
1756
+ "method": "btree",
1757
+ "with": {}
1758
+ },
1759
+ "issues_assignee_id_idx": {
1760
+ "name": "issues_assignee_id_idx",
1761
+ "columns": [
1762
+ {
1763
+ "expression": "assignee_id",
1764
+ "isExpression": false,
1765
+ "asc": true,
1766
+ "nulls": "last"
1767
+ }
1768
+ ],
1769
+ "isUnique": false,
1770
+ "concurrently": false,
1771
+ "method": "btree",
1772
+ "with": {}
1773
+ },
1774
+ "issues_project_status_idx": {
1775
+ "name": "issues_project_status_idx",
1776
+ "columns": [
1777
+ {
1778
+ "expression": "project_id",
1779
+ "isExpression": false,
1780
+ "asc": true,
1781
+ "nulls": "last"
1782
+ },
1783
+ {
1784
+ "expression": "status",
1785
+ "isExpression": false,
1786
+ "asc": true,
1787
+ "nulls": "last"
1788
+ }
1789
+ ],
1790
+ "isUnique": false,
1791
+ "concurrently": false,
1792
+ "method": "btree",
1793
+ "with": {}
1794
+ },
1795
+ "issues_team_id_idx": {
1796
+ "name": "issues_team_id_idx",
1797
+ "columns": [
1798
+ {
1799
+ "expression": "team_id",
1800
+ "isExpression": false,
1801
+ "asc": true,
1802
+ "nulls": "last"
1803
+ }
1804
+ ],
1805
+ "isUnique": false,
1806
+ "concurrently": false,
1807
+ "method": "btree",
1808
+ "with": {}
1809
+ },
1810
+ "issues_team_project_idx": {
1811
+ "name": "issues_team_project_idx",
1812
+ "columns": [
1813
+ {
1814
+ "expression": "team_id",
1815
+ "isExpression": false,
1816
+ "asc": true,
1817
+ "nulls": "last"
1818
+ },
1819
+ {
1820
+ "expression": "project_id",
1821
+ "isExpression": false,
1822
+ "asc": true,
1823
+ "nulls": "last"
1824
+ }
1825
+ ],
1826
+ "isUnique": false,
1827
+ "concurrently": false,
1828
+ "method": "btree",
1829
+ "with": {}
1830
+ },
1831
+ "issues_project_issue_number_unique": {
1832
+ "name": "issues_project_issue_number_unique",
1833
+ "columns": [
1834
+ {
1835
+ "expression": "project_id",
1836
+ "isExpression": false,
1837
+ "asc": true,
1838
+ "nulls": "last"
1839
+ },
1840
+ {
1841
+ "expression": "issue_number",
1842
+ "isExpression": false,
1843
+ "asc": true,
1844
+ "nulls": "last"
1845
+ }
1846
+ ],
1847
+ "isUnique": true,
1848
+ "concurrently": false,
1849
+ "method": "btree",
1850
+ "with": {}
1851
+ },
1852
+ "issues_project_issue_key_unique": {
1853
+ "name": "issues_project_issue_key_unique",
1854
+ "columns": [
1855
+ {
1856
+ "expression": "project_id",
1857
+ "isExpression": false,
1858
+ "asc": true,
1859
+ "nulls": "last"
1860
+ },
1861
+ {
1862
+ "expression": "issue_key",
1863
+ "isExpression": false,
1864
+ "asc": true,
1865
+ "nulls": "last"
1866
+ }
1867
+ ],
1868
+ "isUnique": true,
1869
+ "concurrently": false,
1870
+ "method": "btree",
1871
+ "with": {}
1872
+ }
1873
+ },
1874
+ "foreignKeys": {
1875
+ "issues_team_id_teams_id_fk": {
1876
+ "name": "issues_team_id_teams_id_fk",
1877
+ "tableFrom": "issues",
1878
+ "tableTo": "teams",
1879
+ "columnsFrom": [
1880
+ "team_id"
1881
+ ],
1882
+ "columnsTo": [
1883
+ "id"
1884
+ ],
1885
+ "onDelete": "cascade",
1886
+ "onUpdate": "no action"
1887
+ },
1888
+ "issues_project_id_projects_id_fk": {
1889
+ "name": "issues_project_id_projects_id_fk",
1890
+ "tableFrom": "issues",
1891
+ "tableTo": "projects",
1892
+ "columnsFrom": [
1893
+ "project_id"
1894
+ ],
1895
+ "columnsTo": [
1896
+ "id"
1897
+ ],
1898
+ "onDelete": "cascade",
1899
+ "onUpdate": "no action"
1900
+ },
1901
+ "issues_assignee_id_users_id_fk": {
1902
+ "name": "issues_assignee_id_users_id_fk",
1903
+ "tableFrom": "issues",
1904
+ "tableTo": "users",
1905
+ "columnsFrom": [
1906
+ "assignee_id"
1907
+ ],
1908
+ "columnsTo": [
1909
+ "id"
1910
+ ],
1911
+ "onDelete": "set null",
1912
+ "onUpdate": "no action"
1913
+ },
1914
+ "issues_reporter_id_users_id_fk": {
1915
+ "name": "issues_reporter_id_users_id_fk",
1916
+ "tableFrom": "issues",
1917
+ "tableTo": "users",
1918
+ "columnsFrom": [
1919
+ "reporter_id"
1920
+ ],
1921
+ "columnsTo": [
1922
+ "id"
1923
+ ],
1924
+ "onDelete": "cascade",
1925
+ "onUpdate": "no action"
1926
+ },
1927
+ "issues_created_by_users_id_fk": {
1928
+ "name": "issues_created_by_users_id_fk",
1929
+ "tableFrom": "issues",
1930
+ "tableTo": "users",
1931
+ "columnsFrom": [
1932
+ "created_by"
1933
+ ],
1934
+ "columnsTo": [
1935
+ "id"
1936
+ ],
1937
+ "onDelete": "set null",
1938
+ "onUpdate": "no action"
1939
+ },
1940
+ "issues_updated_by_users_id_fk": {
1941
+ "name": "issues_updated_by_users_id_fk",
1942
+ "tableFrom": "issues",
1943
+ "tableTo": "users",
1944
+ "columnsFrom": [
1945
+ "updated_by"
1946
+ ],
1947
+ "columnsTo": [
1948
+ "id"
1949
+ ],
1950
+ "onDelete": "set null",
1951
+ "onUpdate": "no action"
1952
+ }
1953
+ },
1954
+ "compositePrimaryKeys": {},
1955
+ "uniqueConstraints": {},
1956
+ "policies": {},
1957
+ "checkConstraints": {},
1958
+ "isRLSEnabled": false
1959
+ },
1960
+ "public.issue_attachments": {
1961
+ "name": "issue_attachments",
1962
+ "schema": "",
1963
+ "columns": {
1964
+ "id": {
1965
+ "name": "id",
1966
+ "type": "uuid",
1967
+ "primaryKey": true,
1968
+ "notNull": true,
1969
+ "default": "gen_random_uuid()"
1970
+ },
1971
+ "team_id": {
1972
+ "name": "team_id",
1973
+ "type": "uuid",
1974
+ "primaryKey": false,
1975
+ "notNull": true
1976
+ },
1977
+ "project_id": {
1978
+ "name": "project_id",
1979
+ "type": "uuid",
1980
+ "primaryKey": false,
1981
+ "notNull": true
1982
+ },
1983
+ "issue_id": {
1984
+ "name": "issue_id",
1985
+ "type": "uuid",
1986
+ "primaryKey": false,
1987
+ "notNull": true
1988
+ },
1989
+ "file_name": {
1990
+ "name": "file_name",
1991
+ "type": "varchar(255)",
1992
+ "primaryKey": false,
1993
+ "notNull": true
1994
+ },
1995
+ "file_size": {
1996
+ "name": "file_size",
1997
+ "type": "integer",
1998
+ "primaryKey": false,
1999
+ "notNull": true
2000
+ },
2001
+ "file_type": {
2002
+ "name": "file_type",
2003
+ "type": "varchar(100)",
2004
+ "primaryKey": false,
2005
+ "notNull": true
2006
+ },
2007
+ "url": {
2008
+ "name": "url",
2009
+ "type": "text",
2010
+ "primaryKey": false,
2011
+ "notNull": true
2012
+ },
2013
+ "thumbnail_url": {
2014
+ "name": "thumbnail_url",
2015
+ "type": "text",
2016
+ "primaryKey": false,
2017
+ "notNull": false
2018
+ },
2019
+ "width": {
2020
+ "name": "width",
2021
+ "type": "integer",
2022
+ "primaryKey": false,
2023
+ "notNull": false
2024
+ },
2025
+ "height": {
2026
+ "name": "height",
2027
+ "type": "integer",
2028
+ "primaryKey": false,
2029
+ "notNull": false
2030
+ },
2031
+ "review_variant": {
2032
+ "name": "review_variant",
2033
+ "type": "attachment_review_variant",
2034
+ "typeSchema": "public",
2035
+ "primaryKey": false,
2036
+ "notNull": false,
2037
+ "default": "'as_is'"
2038
+ },
2039
+ "annotations": {
2040
+ "name": "annotations",
2041
+ "type": "jsonb",
2042
+ "primaryKey": false,
2043
+ "notNull": false,
2044
+ "default": "'[]'::jsonb"
2045
+ },
2046
+ "uploaded_by_id": {
2047
+ "name": "uploaded_by_id",
2048
+ "type": "uuid",
2049
+ "primaryKey": false,
2050
+ "notNull": true
2051
+ },
2052
+ "created_at": {
2053
+ "name": "created_at",
2054
+ "type": "timestamp with time zone",
2055
+ "primaryKey": false,
2056
+ "notNull": true,
2057
+ "default": "now()"
2058
+ }
2059
+ },
2060
+ "indexes": {
2061
+ "issue_attachments_issue_id_idx": {
2062
+ "name": "issue_attachments_issue_id_idx",
2063
+ "columns": [
2064
+ {
2065
+ "expression": "issue_id",
2066
+ "isExpression": false,
2067
+ "asc": true,
2068
+ "nulls": "last"
2069
+ }
2070
+ ],
2071
+ "isUnique": false,
2072
+ "concurrently": false,
2073
+ "method": "btree",
2074
+ "with": {}
2075
+ },
2076
+ "issue_attachments_team_id_idx": {
2077
+ "name": "issue_attachments_team_id_idx",
2078
+ "columns": [
2079
+ {
2080
+ "expression": "team_id",
2081
+ "isExpression": false,
2082
+ "asc": true,
2083
+ "nulls": "last"
2084
+ }
2085
+ ],
2086
+ "isUnique": false,
2087
+ "concurrently": false,
2088
+ "method": "btree",
2089
+ "with": {}
2090
+ }
2091
+ },
2092
+ "foreignKeys": {
2093
+ "issue_attachments_team_id_teams_id_fk": {
2094
+ "name": "issue_attachments_team_id_teams_id_fk",
2095
+ "tableFrom": "issue_attachments",
2096
+ "tableTo": "teams",
2097
+ "columnsFrom": [
2098
+ "team_id"
2099
+ ],
2100
+ "columnsTo": [
2101
+ "id"
2102
+ ],
2103
+ "onDelete": "cascade",
2104
+ "onUpdate": "no action"
2105
+ },
2106
+ "issue_attachments_project_id_projects_id_fk": {
2107
+ "name": "issue_attachments_project_id_projects_id_fk",
2108
+ "tableFrom": "issue_attachments",
2109
+ "tableTo": "projects",
2110
+ "columnsFrom": [
2111
+ "project_id"
2112
+ ],
2113
+ "columnsTo": [
2114
+ "id"
2115
+ ],
2116
+ "onDelete": "cascade",
2117
+ "onUpdate": "no action"
2118
+ },
2119
+ "issue_attachments_issue_id_issues_id_fk": {
2120
+ "name": "issue_attachments_issue_id_issues_id_fk",
2121
+ "tableFrom": "issue_attachments",
2122
+ "tableTo": "issues",
2123
+ "columnsFrom": [
2124
+ "issue_id"
2125
+ ],
2126
+ "columnsTo": [
2127
+ "id"
2128
+ ],
2129
+ "onDelete": "cascade",
2130
+ "onUpdate": "no action"
2131
+ },
2132
+ "issue_attachments_uploaded_by_id_users_id_fk": {
2133
+ "name": "issue_attachments_uploaded_by_id_users_id_fk",
2134
+ "tableFrom": "issue_attachments",
2135
+ "tableTo": "users",
2136
+ "columnsFrom": [
2137
+ "uploaded_by_id"
2138
+ ],
2139
+ "columnsTo": [
2140
+ "id"
2141
+ ],
2142
+ "onDelete": "cascade",
2143
+ "onUpdate": "no action"
2144
+ }
2145
+ },
2146
+ "compositePrimaryKeys": {},
2147
+ "uniqueConstraints": {},
2148
+ "policies": {},
2149
+ "checkConstraints": {
2150
+ "issue_attachments_file_size_check": {
2151
+ "name": "issue_attachments_file_size_check",
2152
+ "value": "\"issue_attachments\".\"file_size\" > 0 AND \"issue_attachments\".\"file_size\" <= 10485760"
2153
+ },
2154
+ "issue_attachments_max_annotations_check": {
2155
+ "name": "issue_attachments_max_annotations_check",
2156
+ "value": "jsonb_array_length(\"issue_attachments\".\"annotations\") <= 50"
2157
+ }
2158
+ },
2159
+ "isRLSEnabled": false
2160
+ },
2161
+ "public.issue_activities": {
2162
+ "name": "issue_activities",
2163
+ "schema": "",
2164
+ "columns": {
2165
+ "id": {
2166
+ "name": "id",
2167
+ "type": "uuid",
2168
+ "primaryKey": true,
2169
+ "notNull": true,
2170
+ "default": "gen_random_uuid()"
2171
+ },
2172
+ "team_id": {
2173
+ "name": "team_id",
2174
+ "type": "uuid",
2175
+ "primaryKey": false,
2176
+ "notNull": true
2177
+ },
2178
+ "project_id": {
2179
+ "name": "project_id",
2180
+ "type": "uuid",
2181
+ "primaryKey": false,
2182
+ "notNull": true
2183
+ },
2184
+ "issue_id": {
2185
+ "name": "issue_id",
2186
+ "type": "uuid",
2187
+ "primaryKey": false,
2188
+ "notNull": true
2189
+ },
2190
+ "actor_id": {
2191
+ "name": "actor_id",
2192
+ "type": "uuid",
2193
+ "primaryKey": false,
2194
+ "notNull": true
2195
+ },
2196
+ "type": {
2197
+ "name": "type",
2198
+ "type": "issue_activity_type",
2199
+ "typeSchema": "public",
2200
+ "primaryKey": false,
2201
+ "notNull": true
2202
+ },
2203
+ "changes": {
2204
+ "name": "changes",
2205
+ "type": "jsonb",
2206
+ "primaryKey": false,
2207
+ "notNull": false,
2208
+ "default": "'[]'::jsonb"
2209
+ },
2210
+ "comment": {
2211
+ "name": "comment",
2212
+ "type": "text",
2213
+ "primaryKey": false,
2214
+ "notNull": false
2215
+ },
2216
+ "created_at": {
2217
+ "name": "created_at",
2218
+ "type": "timestamp with time zone",
2219
+ "primaryKey": false,
2220
+ "notNull": true,
2221
+ "default": "now()"
2222
+ }
2223
+ },
2224
+ "indexes": {
2225
+ "issue_activities_issue_id_idx": {
2226
+ "name": "issue_activities_issue_id_idx",
2227
+ "columns": [
2228
+ {
2229
+ "expression": "issue_id",
2230
+ "isExpression": false,
2231
+ "asc": true,
2232
+ "nulls": "last"
2233
+ }
2234
+ ],
2235
+ "isUnique": false,
2236
+ "concurrently": false,
2237
+ "method": "btree",
2238
+ "with": {}
2239
+ },
2240
+ "issue_activities_created_at_idx": {
2241
+ "name": "issue_activities_created_at_idx",
2242
+ "columns": [
2243
+ {
2244
+ "expression": "created_at",
2245
+ "isExpression": false,
2246
+ "asc": true,
2247
+ "nulls": "last"
2248
+ }
2249
+ ],
2250
+ "isUnique": false,
2251
+ "concurrently": false,
2252
+ "method": "btree",
2253
+ "with": {}
2254
+ },
2255
+ "issue_activities_issue_created_idx": {
2256
+ "name": "issue_activities_issue_created_idx",
2257
+ "columns": [
2258
+ {
2259
+ "expression": "issue_id",
2260
+ "isExpression": false,
2261
+ "asc": true,
2262
+ "nulls": "last"
2263
+ },
2264
+ {
2265
+ "expression": "created_at",
2266
+ "isExpression": false,
2267
+ "asc": true,
2268
+ "nulls": "last"
2269
+ }
2270
+ ],
2271
+ "isUnique": false,
2272
+ "concurrently": false,
2273
+ "method": "btree",
2274
+ "with": {}
2275
+ },
2276
+ "issue_activities_team_id_idx": {
2277
+ "name": "issue_activities_team_id_idx",
2278
+ "columns": [
2279
+ {
2280
+ "expression": "team_id",
2281
+ "isExpression": false,
2282
+ "asc": true,
2283
+ "nulls": "last"
2284
+ }
2285
+ ],
2286
+ "isUnique": false,
2287
+ "concurrently": false,
2288
+ "method": "btree",
2289
+ "with": {}
2290
+ }
2291
+ },
2292
+ "foreignKeys": {
2293
+ "issue_activities_team_id_teams_id_fk": {
2294
+ "name": "issue_activities_team_id_teams_id_fk",
2295
+ "tableFrom": "issue_activities",
2296
+ "tableTo": "teams",
2297
+ "columnsFrom": [
2298
+ "team_id"
2299
+ ],
2300
+ "columnsTo": [
2301
+ "id"
2302
+ ],
2303
+ "onDelete": "cascade",
2304
+ "onUpdate": "no action"
2305
+ },
2306
+ "issue_activities_project_id_projects_id_fk": {
2307
+ "name": "issue_activities_project_id_projects_id_fk",
2308
+ "tableFrom": "issue_activities",
2309
+ "tableTo": "projects",
2310
+ "columnsFrom": [
2311
+ "project_id"
2312
+ ],
2313
+ "columnsTo": [
2314
+ "id"
2315
+ ],
2316
+ "onDelete": "cascade",
2317
+ "onUpdate": "no action"
2318
+ },
2319
+ "issue_activities_issue_id_issues_id_fk": {
2320
+ "name": "issue_activities_issue_id_issues_id_fk",
2321
+ "tableFrom": "issue_activities",
2322
+ "tableTo": "issues",
2323
+ "columnsFrom": [
2324
+ "issue_id"
2325
+ ],
2326
+ "columnsTo": [
2327
+ "id"
2328
+ ],
2329
+ "onDelete": "cascade",
2330
+ "onUpdate": "no action"
2331
+ },
2332
+ "issue_activities_actor_id_users_id_fk": {
2333
+ "name": "issue_activities_actor_id_users_id_fk",
2334
+ "tableFrom": "issue_activities",
2335
+ "tableTo": "users",
2336
+ "columnsFrom": [
2337
+ "actor_id"
2338
+ ],
2339
+ "columnsTo": [
2340
+ "id"
2341
+ ],
2342
+ "onDelete": "cascade",
2343
+ "onUpdate": "no action"
2344
+ }
2345
+ },
2346
+ "compositePrimaryKeys": {},
2347
+ "uniqueConstraints": {},
2348
+ "policies": {},
2349
+ "checkConstraints": {},
2350
+ "isRLSEnabled": false
2351
+ },
2352
+ "public.project_activities": {
2353
+ "name": "project_activities",
2354
+ "schema": "",
2355
+ "columns": {
2356
+ "id": {
2357
+ "name": "id",
2358
+ "type": "uuid",
2359
+ "primaryKey": true,
2360
+ "notNull": true,
2361
+ "default": "gen_random_uuid()"
2362
+ },
2363
+ "team_id": {
2364
+ "name": "team_id",
2365
+ "type": "uuid",
2366
+ "primaryKey": false,
2367
+ "notNull": true
2368
+ },
2369
+ "project_id": {
2370
+ "name": "project_id",
2371
+ "type": "uuid",
2372
+ "primaryKey": false,
2373
+ "notNull": true
2374
+ },
2375
+ "actor_id": {
2376
+ "name": "actor_id",
2377
+ "type": "uuid",
2378
+ "primaryKey": false,
2379
+ "notNull": false
2380
+ },
2381
+ "type": {
2382
+ "name": "type",
2383
+ "type": "project_activity_type",
2384
+ "typeSchema": "public",
2385
+ "primaryKey": false,
2386
+ "notNull": true
2387
+ },
2388
+ "metadata": {
2389
+ "name": "metadata",
2390
+ "type": "jsonb",
2391
+ "primaryKey": false,
2392
+ "notNull": false,
2393
+ "default": "'{}'::jsonb"
2394
+ },
2395
+ "created_at": {
2396
+ "name": "created_at",
2397
+ "type": "timestamp with time zone",
2398
+ "primaryKey": false,
2399
+ "notNull": true,
2400
+ "default": "now()"
2401
+ }
2402
+ },
2403
+ "indexes": {
2404
+ "project_activities_project_id_idx": {
2405
+ "name": "project_activities_project_id_idx",
2406
+ "columns": [
2407
+ {
2408
+ "expression": "project_id",
2409
+ "isExpression": false,
2410
+ "asc": true,
2411
+ "nulls": "last"
2412
+ }
2413
+ ],
2414
+ "isUnique": false,
2415
+ "concurrently": false,
2416
+ "method": "btree",
2417
+ "with": {}
2418
+ },
2419
+ "project_activities_created_at_idx": {
2420
+ "name": "project_activities_created_at_idx",
2421
+ "columns": [
2422
+ {
2423
+ "expression": "created_at",
2424
+ "isExpression": false,
2425
+ "asc": true,
2426
+ "nulls": "last"
2427
+ }
2428
+ ],
2429
+ "isUnique": false,
2430
+ "concurrently": false,
2431
+ "method": "btree",
2432
+ "with": {}
2433
+ },
2434
+ "project_activities_project_created_idx": {
2435
+ "name": "project_activities_project_created_idx",
2436
+ "columns": [
2437
+ {
2438
+ "expression": "project_id",
2439
+ "isExpression": false,
2440
+ "asc": true,
2441
+ "nulls": "last"
2442
+ },
2443
+ {
2444
+ "expression": "created_at",
2445
+ "isExpression": false,
2446
+ "asc": true,
2447
+ "nulls": "last"
2448
+ }
2449
+ ],
2450
+ "isUnique": false,
2451
+ "concurrently": false,
2452
+ "method": "btree",
2453
+ "with": {}
2454
+ },
2455
+ "project_activities_team_id_idx": {
2456
+ "name": "project_activities_team_id_idx",
2457
+ "columns": [
2458
+ {
2459
+ "expression": "team_id",
2460
+ "isExpression": false,
2461
+ "asc": true,
2462
+ "nulls": "last"
2463
+ }
2464
+ ],
2465
+ "isUnique": false,
2466
+ "concurrently": false,
2467
+ "method": "btree",
2468
+ "with": {}
2469
+ },
2470
+ "project_activities_project_type_created_idx": {
2471
+ "name": "project_activities_project_type_created_idx",
2472
+ "columns": [
2473
+ {
2474
+ "expression": "project_id",
2475
+ "isExpression": false,
2476
+ "asc": true,
2477
+ "nulls": "last"
2478
+ },
2479
+ {
2480
+ "expression": "type",
2481
+ "isExpression": false,
2482
+ "asc": true,
2483
+ "nulls": "last"
2484
+ },
2485
+ {
2486
+ "expression": "created_at",
2487
+ "isExpression": false,
2488
+ "asc": true,
2489
+ "nulls": "last"
2490
+ }
2491
+ ],
2492
+ "isUnique": false,
2493
+ "concurrently": false,
2494
+ "method": "btree",
2495
+ "with": {}
2496
+ }
2497
+ },
2498
+ "foreignKeys": {
2499
+ "project_activities_team_id_teams_id_fk": {
2500
+ "name": "project_activities_team_id_teams_id_fk",
2501
+ "tableFrom": "project_activities",
2502
+ "tableTo": "teams",
2503
+ "columnsFrom": [
2504
+ "team_id"
2505
+ ],
2506
+ "columnsTo": [
2507
+ "id"
2508
+ ],
2509
+ "onDelete": "cascade",
2510
+ "onUpdate": "no action"
2511
+ },
2512
+ "project_activities_project_id_projects_id_fk": {
2513
+ "name": "project_activities_project_id_projects_id_fk",
2514
+ "tableFrom": "project_activities",
2515
+ "tableTo": "projects",
2516
+ "columnsFrom": [
2517
+ "project_id"
2518
+ ],
2519
+ "columnsTo": [
2520
+ "id"
2521
+ ],
2522
+ "onDelete": "cascade",
2523
+ "onUpdate": "no action"
2524
+ },
2525
+ "project_activities_actor_id_users_id_fk": {
2526
+ "name": "project_activities_actor_id_users_id_fk",
2527
+ "tableFrom": "project_activities",
2528
+ "tableTo": "users",
2529
+ "columnsFrom": [
2530
+ "actor_id"
2531
+ ],
2532
+ "columnsTo": [
2533
+ "id"
2534
+ ],
2535
+ "onDelete": "set null",
2536
+ "onUpdate": "no action"
2537
+ }
2538
+ },
2539
+ "compositePrimaryKeys": {},
2540
+ "uniqueConstraints": {},
2541
+ "policies": {},
2542
+ "checkConstraints": {},
2543
+ "isRLSEnabled": false
2544
+ },
2545
+ "public.annotation_read_status": {
2546
+ "name": "annotation_read_status",
2547
+ "schema": "",
2548
+ "columns": {
2549
+ "user_id": {
2550
+ "name": "user_id",
2551
+ "type": "uuid",
2552
+ "primaryKey": false,
2553
+ "notNull": true
2554
+ },
2555
+ "attachment_id": {
2556
+ "name": "attachment_id",
2557
+ "type": "uuid",
2558
+ "primaryKey": false,
2559
+ "notNull": true
2560
+ },
2561
+ "annotation_id": {
2562
+ "name": "annotation_id",
2563
+ "type": "uuid",
2564
+ "primaryKey": false,
2565
+ "notNull": true
2566
+ },
2567
+ "last_read_at": {
2568
+ "name": "last_read_at",
2569
+ "type": "timestamp with time zone",
2570
+ "primaryKey": false,
2571
+ "notNull": true,
2572
+ "default": "now()"
2573
+ }
2574
+ },
2575
+ "indexes": {
2576
+ "annotation_read_status_user_id_idx": {
2577
+ "name": "annotation_read_status_user_id_idx",
2578
+ "columns": [
2579
+ {
2580
+ "expression": "user_id",
2581
+ "isExpression": false,
2582
+ "asc": true,
2583
+ "nulls": "last"
2584
+ }
2585
+ ],
2586
+ "isUnique": false,
2587
+ "concurrently": false,
2588
+ "method": "btree",
2589
+ "with": {}
2590
+ },
2591
+ "annotation_read_status_attachment_id_idx": {
2592
+ "name": "annotation_read_status_attachment_id_idx",
2593
+ "columns": [
2594
+ {
2595
+ "expression": "attachment_id",
2596
+ "isExpression": false,
2597
+ "asc": true,
2598
+ "nulls": "last"
2599
+ }
2600
+ ],
2601
+ "isUnique": false,
2602
+ "concurrently": false,
2603
+ "method": "btree",
2604
+ "with": {}
2605
+ }
2606
+ },
2607
+ "foreignKeys": {
2608
+ "annotation_read_status_user_id_users_id_fk": {
2609
+ "name": "annotation_read_status_user_id_users_id_fk",
2610
+ "tableFrom": "annotation_read_status",
2611
+ "tableTo": "users",
2612
+ "columnsFrom": [
2613
+ "user_id"
2614
+ ],
2615
+ "columnsTo": [
2616
+ "id"
2617
+ ],
2618
+ "onDelete": "cascade",
2619
+ "onUpdate": "no action"
2620
+ },
2621
+ "annotation_read_status_attachment_id_issue_attachments_id_fk": {
2622
+ "name": "annotation_read_status_attachment_id_issue_attachments_id_fk",
2623
+ "tableFrom": "annotation_read_status",
2624
+ "tableTo": "issue_attachments",
2625
+ "columnsFrom": [
2626
+ "attachment_id"
2627
+ ],
2628
+ "columnsTo": [
2629
+ "id"
2630
+ ],
2631
+ "onDelete": "cascade",
2632
+ "onUpdate": "no action"
2633
+ }
2634
+ },
2635
+ "compositePrimaryKeys": {
2636
+ "annotation_read_status_user_id_attachment_id_annotation_id_pk": {
2637
+ "name": "annotation_read_status_user_id_attachment_id_annotation_id_pk",
2638
+ "columns": [
2639
+ "user_id",
2640
+ "attachment_id",
2641
+ "annotation_id"
2642
+ ]
2643
+ }
2644
+ },
2645
+ "uniqueConstraints": {},
2646
+ "policies": {},
2647
+ "checkConstraints": {},
2648
+ "isRLSEnabled": false
2649
+ },
2650
+ "public.notifications": {
2651
+ "name": "notifications",
2652
+ "schema": "",
2653
+ "columns": {
2654
+ "id": {
2655
+ "name": "id",
2656
+ "type": "uuid",
2657
+ "primaryKey": true,
2658
+ "notNull": true,
2659
+ "default": "gen_random_uuid()"
2660
+ },
2661
+ "recipient_id": {
2662
+ "name": "recipient_id",
2663
+ "type": "uuid",
2664
+ "primaryKey": false,
2665
+ "notNull": true
2666
+ },
2667
+ "actor_id": {
2668
+ "name": "actor_id",
2669
+ "type": "uuid",
2670
+ "primaryKey": false,
2671
+ "notNull": false
2672
+ },
2673
+ "type": {
2674
+ "name": "type",
2675
+ "type": "notification_type",
2676
+ "typeSchema": "public",
2677
+ "primaryKey": false,
2678
+ "notNull": true
2679
+ },
2680
+ "entity_type": {
2681
+ "name": "entity_type",
2682
+ "type": "text",
2683
+ "primaryKey": false,
2684
+ "notNull": true
2685
+ },
2686
+ "entity_id": {
2687
+ "name": "entity_id",
2688
+ "type": "uuid",
2689
+ "primaryKey": false,
2690
+ "notNull": true
2691
+ },
2692
+ "metadata": {
2693
+ "name": "metadata",
2694
+ "type": "jsonb",
2695
+ "primaryKey": false,
2696
+ "notNull": false,
2697
+ "default": "'{}'::jsonb"
2698
+ },
2699
+ "read_at": {
2700
+ "name": "read_at",
2701
+ "type": "timestamp with time zone",
2702
+ "primaryKey": false,
2703
+ "notNull": false
2704
+ },
2705
+ "created_at": {
2706
+ "name": "created_at",
2707
+ "type": "timestamp with time zone",
2708
+ "primaryKey": false,
2709
+ "notNull": true,
2710
+ "default": "now()"
2711
+ }
2712
+ },
2713
+ "indexes": {
2714
+ "idx_notifications_recipient_unread": {
2715
+ "name": "idx_notifications_recipient_unread",
2716
+ "columns": [
2717
+ {
2718
+ "expression": "recipient_id",
2719
+ "isExpression": false,
2720
+ "asc": true,
2721
+ "nulls": "last"
2722
+ },
2723
+ {
2724
+ "expression": "created_at",
2725
+ "isExpression": false,
2726
+ "asc": true,
2727
+ "nulls": "last"
2728
+ }
2729
+ ],
2730
+ "isUnique": false,
2731
+ "concurrently": false,
2732
+ "method": "btree",
2733
+ "with": {}
2734
+ },
2735
+ "idx_notifications_entity": {
2736
+ "name": "idx_notifications_entity",
2737
+ "columns": [
2738
+ {
2739
+ "expression": "entity_type",
2740
+ "isExpression": false,
2741
+ "asc": true,
2742
+ "nulls": "last"
2743
+ },
2744
+ {
2745
+ "expression": "entity_id",
2746
+ "isExpression": false,
2747
+ "asc": true,
2748
+ "nulls": "last"
2749
+ }
2750
+ ],
2751
+ "isUnique": false,
2752
+ "concurrently": false,
2753
+ "method": "btree",
2754
+ "with": {}
2755
+ },
2756
+ "idx_notifications_grouping": {
2757
+ "name": "idx_notifications_grouping",
2758
+ "columns": [
2759
+ {
2760
+ "expression": "recipient_id",
2761
+ "isExpression": false,
2762
+ "asc": true,
2763
+ "nulls": "last"
2764
+ },
2765
+ {
2766
+ "expression": "type",
2767
+ "isExpression": false,
2768
+ "asc": true,
2769
+ "nulls": "last"
2770
+ },
2771
+ {
2772
+ "expression": "entity_type",
2773
+ "isExpression": false,
2774
+ "asc": true,
2775
+ "nulls": "last"
2776
+ },
2777
+ {
2778
+ "expression": "entity_id",
2779
+ "isExpression": false,
2780
+ "asc": true,
2781
+ "nulls": "last"
2782
+ },
2783
+ {
2784
+ "expression": "created_at",
2785
+ "isExpression": false,
2786
+ "asc": true,
2787
+ "nulls": "last"
2788
+ }
2789
+ ],
2790
+ "isUnique": false,
2791
+ "concurrently": false,
2792
+ "method": "btree",
2793
+ "with": {}
2794
+ },
2795
+ "idx_notifications_dedup": {
2796
+ "name": "idx_notifications_dedup",
2797
+ "columns": [
2798
+ {
2799
+ "expression": "recipient_id",
2800
+ "isExpression": false,
2801
+ "asc": true,
2802
+ "nulls": "last"
2803
+ },
2804
+ {
2805
+ "expression": "actor_id",
2806
+ "isExpression": false,
2807
+ "asc": true,
2808
+ "nulls": "last"
2809
+ },
2810
+ {
2811
+ "expression": "type",
2812
+ "isExpression": false,
2813
+ "asc": true,
2814
+ "nulls": "last"
2815
+ },
2816
+ {
2817
+ "expression": "entity_type",
2818
+ "isExpression": false,
2819
+ "asc": true,
2820
+ "nulls": "last"
2821
+ },
2822
+ {
2823
+ "expression": "entity_id",
2824
+ "isExpression": false,
2825
+ "asc": true,
2826
+ "nulls": "last"
2827
+ },
2828
+ {
2829
+ "expression": "created_at",
2830
+ "isExpression": false,
2831
+ "asc": true,
2832
+ "nulls": "last"
2833
+ }
2834
+ ],
2835
+ "isUnique": false,
2836
+ "concurrently": false,
2837
+ "method": "btree",
2838
+ "with": {}
2839
+ }
2840
+ },
2841
+ "foreignKeys": {
2842
+ "notifications_recipient_id_users_id_fk": {
2843
+ "name": "notifications_recipient_id_users_id_fk",
2844
+ "tableFrom": "notifications",
2845
+ "tableTo": "users",
2846
+ "columnsFrom": [
2847
+ "recipient_id"
2848
+ ],
2849
+ "columnsTo": [
2850
+ "id"
2851
+ ],
2852
+ "onDelete": "cascade",
2853
+ "onUpdate": "no action"
2854
+ },
2855
+ "notifications_actor_id_users_id_fk": {
2856
+ "name": "notifications_actor_id_users_id_fk",
2857
+ "tableFrom": "notifications",
2858
+ "tableTo": "users",
2859
+ "columnsFrom": [
2860
+ "actor_id"
2861
+ ],
2862
+ "columnsTo": [
2863
+ "id"
2864
+ ],
2865
+ "onDelete": "set null",
2866
+ "onUpdate": "no action"
2867
+ }
2868
+ },
2869
+ "compositePrimaryKeys": {},
2870
+ "uniqueConstraints": {},
2871
+ "policies": {},
2872
+ "checkConstraints": {},
2873
+ "isRLSEnabled": false
2874
+ },
2875
+ "public.instance_settings": {
2876
+ "name": "instance_settings",
2877
+ "schema": "",
2878
+ "columns": {
2879
+ "id": {
2880
+ "name": "id",
2881
+ "type": "uuid",
2882
+ "primaryKey": true,
2883
+ "notNull": true,
2884
+ "default": "gen_random_uuid()"
2885
+ },
2886
+ "instance_name": {
2887
+ "name": "instance_name",
2888
+ "type": "varchar(100)",
2889
+ "primaryKey": false,
2890
+ "notNull": true,
2891
+ "default": "'UI SyncUp'"
2892
+ },
2893
+ "public_url": {
2894
+ "name": "public_url",
2895
+ "type": "varchar(255)",
2896
+ "primaryKey": false,
2897
+ "notNull": false
2898
+ },
2899
+ "default_workspace_id": {
2900
+ "name": "default_workspace_id",
2901
+ "type": "uuid",
2902
+ "primaryKey": false,
2903
+ "notNull": false
2904
+ },
2905
+ "default_member_role": {
2906
+ "name": "default_member_role",
2907
+ "type": "varchar(50)",
2908
+ "primaryKey": false,
2909
+ "notNull": true,
2910
+ "default": "'WORKSPACE_MEMBER'"
2911
+ },
2912
+ "setup_completed_at": {
2913
+ "name": "setup_completed_at",
2914
+ "type": "timestamp with time zone",
2915
+ "primaryKey": false,
2916
+ "notNull": false
2917
+ },
2918
+ "admin_user_id": {
2919
+ "name": "admin_user_id",
2920
+ "type": "uuid",
2921
+ "primaryKey": false,
2922
+ "notNull": false
2923
+ },
2924
+ "created_at": {
2925
+ "name": "created_at",
2926
+ "type": "timestamp with time zone",
2927
+ "primaryKey": false,
2928
+ "notNull": true,
2929
+ "default": "now()"
2930
+ },
2931
+ "updated_at": {
2932
+ "name": "updated_at",
2933
+ "type": "timestamp with time zone",
2934
+ "primaryKey": false,
2935
+ "notNull": true,
2936
+ "default": "now()"
2937
+ }
2938
+ },
2939
+ "indexes": {
2940
+ "instance_settings_singleton": {
2941
+ "name": "instance_settings_singleton",
2942
+ "columns": [
2943
+ {
2944
+ "expression": "(TRUE)",
2945
+ "asc": true,
2946
+ "isExpression": true,
2947
+ "nulls": "last"
2948
+ }
2949
+ ],
2950
+ "isUnique": true,
2951
+ "concurrently": false,
2952
+ "method": "btree",
2953
+ "with": {}
2954
+ }
2955
+ },
2956
+ "foreignKeys": {
2957
+ "instance_settings_default_workspace_id_teams_id_fk": {
2958
+ "name": "instance_settings_default_workspace_id_teams_id_fk",
2959
+ "tableFrom": "instance_settings",
2960
+ "tableTo": "teams",
2961
+ "columnsFrom": [
2962
+ "default_workspace_id"
2963
+ ],
2964
+ "columnsTo": [
2965
+ "id"
2966
+ ],
2967
+ "onDelete": "set null",
2968
+ "onUpdate": "no action"
2969
+ },
2970
+ "instance_settings_admin_user_id_users_id_fk": {
2971
+ "name": "instance_settings_admin_user_id_users_id_fk",
2972
+ "tableFrom": "instance_settings",
2973
+ "tableTo": "users",
2974
+ "columnsFrom": [
2975
+ "admin_user_id"
2976
+ ],
2977
+ "columnsTo": [
2978
+ "id"
2979
+ ],
2980
+ "onDelete": "set null",
2981
+ "onUpdate": "no action"
2982
+ }
2983
+ },
2984
+ "compositePrimaryKeys": {},
2985
+ "uniqueConstraints": {},
2986
+ "policies": {},
2987
+ "checkConstraints": {},
2988
+ "isRLSEnabled": false
2989
+ }
2990
+ },
2991
+ "enums": {
2992
+ "public.project_status": {
2993
+ "name": "project_status",
2994
+ "schema": "public",
2995
+ "values": [
2996
+ "active",
2997
+ "archived"
2998
+ ]
2999
+ },
3000
+ "public.project_visibility": {
3001
+ "name": "project_visibility",
3002
+ "schema": "public",
3003
+ "values": [
3004
+ "public",
3005
+ "private"
3006
+ ]
3007
+ },
3008
+ "public.project_role": {
3009
+ "name": "project_role",
3010
+ "schema": "public",
3011
+ "values": [
3012
+ "owner",
3013
+ "editor",
3014
+ "member",
3015
+ "viewer"
3016
+ ]
3017
+ },
3018
+ "public.issue_priority": {
3019
+ "name": "issue_priority",
3020
+ "schema": "public",
3021
+ "values": [
3022
+ "low",
3023
+ "medium",
3024
+ "high",
3025
+ "critical"
3026
+ ]
3027
+ },
3028
+ "public.issue_status": {
3029
+ "name": "issue_status",
3030
+ "schema": "public",
3031
+ "values": [
3032
+ "open",
3033
+ "in_progress",
3034
+ "in_review",
3035
+ "resolved",
3036
+ "archived"
3037
+ ]
3038
+ },
3039
+ "public.issue_type": {
3040
+ "name": "issue_type",
3041
+ "schema": "public",
3042
+ "values": [
3043
+ "bug",
3044
+ "visual",
3045
+ "accessibility",
3046
+ "content",
3047
+ "other"
3048
+ ]
3049
+ },
3050
+ "public.attachment_review_variant": {
3051
+ "name": "attachment_review_variant",
3052
+ "schema": "public",
3053
+ "values": [
3054
+ "as_is",
3055
+ "to_be",
3056
+ "reference"
3057
+ ]
3058
+ },
3059
+ "public.issue_activity_type": {
3060
+ "name": "issue_activity_type",
3061
+ "schema": "public",
3062
+ "values": [
3063
+ "created",
3064
+ "status_changed",
3065
+ "priority_changed",
3066
+ "type_changed",
3067
+ "title_changed",
3068
+ "description_changed",
3069
+ "assignee_changed",
3070
+ "comment_added",
3071
+ "attachment_added",
3072
+ "attachment_removed",
3073
+ "annotation_created",
3074
+ "annotation_updated",
3075
+ "annotation_commented",
3076
+ "annotation_deleted"
3077
+ ]
3078
+ },
3079
+ "public.project_activity_type": {
3080
+ "name": "project_activity_type",
3081
+ "schema": "public",
3082
+ "values": [
3083
+ "invitation_sent",
3084
+ "invitation_accepted",
3085
+ "invitation_declined",
3086
+ "invitation_revoked",
3087
+ "invitation_email_failed",
3088
+ "member_role_changed",
3089
+ "member_added",
3090
+ "member_removed"
3091
+ ]
3092
+ },
3093
+ "public.notification_type": {
3094
+ "name": "notification_type",
3095
+ "schema": "public",
3096
+ "values": [
3097
+ "mention",
3098
+ "comment_created",
3099
+ "reply",
3100
+ "issue_assigned",
3101
+ "issue_status_changed",
3102
+ "project_invitation",
3103
+ "team_invitation",
3104
+ "role_updated"
3105
+ ]
3106
+ }
3107
+ },
3108
+ "schemas": {},
3109
+ "sequences": {},
3110
+ "roles": {},
3111
+ "policies": {},
3112
+ "views": {},
3113
+ "_meta": {
3114
+ "columns": {},
3115
+ "schemas": {},
3116
+ "tables": {}
3117
+ }
3118
+ }