Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

feat: added project backgrounds (#1654)

Tymeke9c8d79fa69f
diff --git a/apps/api/drizzle/0052_dear_beyonder.sql b/apps/api/drizzle/0052_dear_beyonder.sql
new file mode 100644
index 000000000..7b629c948
--- /dev/null
+++ b/apps/api/drizzle/0052_dear_beyonder.sql
@@ -0,0 +1,3 @@
+ALTER TABLE "project" ADD COLUMN "background_object_key" text;--> statement-breakpoint
+ALTER TABLE "project" ADD COLUMN "background_mime_type" text;--> statement-breakpoint
+ALTER TABLE "project" ADD COLUMN "background_version" text;
\ No newline at end of file
diff --git a/apps/api/drizzle/meta/0052_snapshot.json b/apps/api/drizzle/meta/0052_snapshot.json
new file mode 100644
index 000000000..5ab0382d6
--- /dev/null
+++ b/apps/api/drizzle/meta/0052_snapshot.json
@@ -0,0 +1,4798 @@
+{
+ "id": "1c0d3b45-514c-4937-80da-fee76b2f6d38",
+ "prevId": "de1aba3a-dd83-48d6-93a3-c53b2ff18aee",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "public.account": {
+ "name": "account",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "account_id": {
+ "name": "account_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "provider_id": {
+ "name": "provider_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "access_token": {
+ "name": "access_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refresh_token": {
+ "name": "refresh_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "id_token": {
+ "name": "id_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_token_expires_at": {
+ "name": "access_token_expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refresh_token_expires_at": {
+ "name": "refresh_token_expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scope": {
+ "name": "scope",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {
+ "account_userId_idx": {
+ "name": "account_userId_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "account_user_id_user_id_fk": {
+ "name": "account_user_id_user_id_fk",
+ "tableFrom": "account",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.activity": {
+ "name": "activity",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "task_id": {
+ "name": "task_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "event_data": {
+ "name": "event_data",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_user_name": {
+ "name": "external_user_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_user_avatar": {
+ "name": "external_user_avatar",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_source": {
+ "name": "external_source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "external_url": {
+ "name": "external_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "activity_task_id_idx": {
+ "name": "activity_task_id_idx",
+ "columns": [
+ {
+ "expression": "task_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "activity_userId_idx": {
+ "name": "activity_userId_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "activity_task_id_task_id_fk": {
+ "name": "activity_task_id_task_id_fk",
+ "tableFrom": "activity",
+ "tableTo": "task",
+ "columnsFrom": [
+ "task_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ },
+ "activity_user_id_user_id_fk": {
+ "name": "activity_user_id_user_id_fk",
+ "tableFrom": "activity",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "activity_task_external_source_external_url_unique": {
+ "name": "activity_task_external_source_external_url_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "task_id",
+ "external_source",
+ "external_url"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.apikey": {
+ "name": "apikey",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "config_id": {
+ "name": "config_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'default'"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "start": {
+ "name": "start",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reference_id": {
+ "name": "reference_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refill_interval": {
+ "name": "refill_interval",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refill_amount": {
+ "name": "refill_amount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_refill_at": {
+ "name": "last_refill_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "rate_limit_enabled": {
+ "name": "rate_limit_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "rate_limit_time_window": {
+ "name": "rate_limit_time_window",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 86400000
+ },
+ "rate_limit_max": {
+ "name": "rate_limit_max",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 10
+ },
+ "request_count": {
+ "name": "request_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "remaining": {
+ "name": "remaining",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_request": {
+ "name": "last_request",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "apikey_configId_idx": {
+ "name": "apikey_configId_idx",
+ "columns": [
+ {
+ "expression": "config_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "apikey_key_idx": {
+ "name": "apikey_key_idx",
+ "columns": [
+ {
+ "expression": "key",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "apikey_referenceId_idx": {
+ "name": "apikey_referenceId_idx",
+ "columns": [
+ {
+ "expression": "reference_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "apikey_userId_idx": {
+ "name": "apikey_userId_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "apikey_reference_id_user_id_fk": {
+ "name": "apikey_reference_id_user_id_fk",
+ "tableFrom": "apikey",
+ "tableTo": "user",
+ "columnsFrom": [
+ "reference_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "apikey_user_id_user_id_fk": {
+ "name": "apikey_user_id_user_id_fk",
+ "tableFrom": "apikey",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.asset": {
+ "name": "asset",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "workspace_id": {
+ "name": "workspace_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "task_id": {
+ "name": "task_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "activity_id": {
+ "name": "activity_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "object_key": {
+ "name": "object_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "filename": {
+ "name": "filename",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "size": {
+ "name": "size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'image'"
+ },
+ "surface": {
+ "name": "surface",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'description'"
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "asset_workspaceId_idx": {
+ "name": "asset_workspaceId_idx",
+ "columns": [
+ {
+ "expression": "workspace_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "asset_projectId_idx": {
+ "name": "asset_projectId_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "asset_taskId_idx": {
+ "name": "asset_taskId_idx",
+ "columns": [
+ {
+ "expression": "task_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "asset_activityId_idx": {
+ "name": "asset_activityId_idx",
+ "columns": [
+ {
+ "expression": "activity_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "asset_createdBy_idx": {
+ "name": "asset_createdBy_idx",
+ "columns": [
+ {
+ "expression": "created_by",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "asset_workspace_id_workspace_id_fk": {
+ "name": "asset_workspace_id_workspace_id_fk",
+ "tableFrom": "asset",
+ "tableTo": "workspace",
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ },
+ "asset_project_id_project_id_fk": {
+ "name": "asset_project_id_project_id_fk",
+ "tableFrom": "asset",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ },
+ "asset_task_id_task_id_fk": {
+ "name": "asset_task_id_task_id_fk",
+ "tableFrom": "asset",
+ "tableTo": "task",
+ "columnsFrom": [
+ "task_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ },
+ "asset_activity_id_activity_id_fk": {
+ "name": "asset_activity_id_activity_id_fk",
+ "tableFrom": "asset",
+ "tableTo": "activity",
+ "columnsFrom": [
+ "activity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ },
+ "asset_created_by_user_id_fk": {
+ "name": "asset_created_by_user_id_fk",
+ "tableFrom": "asset",
+ "tableTo": "user",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "asset_object_key_unique": {
+ "name": "asset_object_key_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "object_key"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.billing_event": {
+ "name": "billing_event",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "event_type": {
+ "name": "event_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "processed_at": {
+ "name": "processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.billing_reminder_sent": {
+ "name": "billing_reminder_sent",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "workspace_id": {
+ "name": "workspace_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reminder_type": {
+ "name": "reminder_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "trial_ends_at": {
+ "name": "trial_ends_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "billing_reminder_sent_workspaceId_idx": {
+ "name": "billing_reminder_sent_workspaceId_idx",
+ "columns": [
+ {
+ "expression": "workspace_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "billing_reminder_sent_userId_idx": {
+ "name": "billing_reminder_sent_userId_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "billing_reminder_sent_user_id_user_id_fk": {
+ "name": "billing_reminder_sent_user_id_user_id_fk",
+ "tableFrom": "billing_reminder_sent",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ },
+ "billing_reminder_sent_workspace_id_workspace_id_fk": {
+ "name": "billing_reminder_sent_workspace_id_workspace_id_fk",
+ "tableFrom": "billing_reminder_sent",
+ "tableTo": "workspace",
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "billing_reminder_sent_user_type_unique": {
+ "name": "billing_reminder_sent_user_type_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "reminder_type"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.column": {
+ "name": "column",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slug": {
+ "name": "slug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "position": {
+ "name": "position",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_final": {
+ "name": "is_final",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "column_projectId_idx": {
+ "name": "column_projectId_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "column_project_id_project_id_fk": {
+ "name": "column_project_id_project_id_fk",
+ "tableFrom": "column",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.comment": {
+ "name": "comment",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "task_id": {
+ "name": "task_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "comment_task_idx": {
+ "name": "comment_task_idx",
+ "columns": [
+ {
+ "expression": "task_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "comment_user_idx": {
+ "name": "comment_user_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "comment_task_id_task_id_fk": {
+ "name": "comment_task_id_task_id_fk",
+ "tableFrom": "comment",
+ "tableTo": "task",
+ "columnsFrom": [
+ "task_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ },
+ "comment_user_id_user_id_fk": {
+ "name": "comment_user_id_user_id_fk",
+ "tableFrom": "comment",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.custom_field_definition": {
+ "name": "custom_field_definition",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "required": {
+ "name": "required",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "default_value": {
+ "name": "default_value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "options": {
+ "name": "options",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "position": {
+ "name": "position",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "custom_field_def_projectId_idx": {
+ "name": "custom_field_def_projectId_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "custom_field_definition_project_id_project_id_fk": {
+ "name": "custom_field_definition_project_id_project_id_fk",
+ "tableFrom": "custom_field_definition",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.custom_field_value": {
+ "name": "custom_field_value",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "task_id": {
+ "name": "task_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "field_id": {
+ "name": "field_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "custom_field_value_taskId_idx": {
+ "name": "custom_field_value_taskId_idx",
+ "columns": [
+ {
+ "expression": "task_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "custom_field_value_fieldId_idx": {
+ "name": "custom_field_value_fieldId_idx",
+ "columns": [
+ {
+ "expression": "field_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "custom_field_value_task_id_task_id_fk": {
+ "name": "custom_field_value_task_id_task_id_fk",
+ "tableFrom": "custom_field_value",
+ "tableTo": "task",
+ "columnsFrom": [
+ "task_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ },
+ "custom_field_value_field_id_custom_field_definition_id_fk": {
+ "name": "custom_field_value_field_id_custom_field_definition_id_fk",
+ "tableFrom": "custom_field_value",
+ "tableTo": "custom_field_definition",
+ "columnsFrom": [
+ "field_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "custom_field_value_task_field_unique": {
+ "name": "custom_field_value_task_field_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "task_id",
+ "field_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.device_code": {
+ "name": "device_code",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "device_code": {
+ "name": "device_code",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_code": {
+ "name": "user_code",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_polled_at": {
+ "name": "last_polled_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "polling_interval": {
+ "name": "polling_interval",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scope": {
+ "name": "scope",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "device_code_device_code_uidx": {
+ "name": "device_code_device_code_uidx",
+ "columns": [
+ {
+ "expression": "device_code",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "device_code_user_code_uidx": {
+ "name": "device_code_user_code_uidx",
+ "columns": [
+ {
+ "expression": "user_code",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "device_code_user_id_idx": {
+ "name": "device_code_user_id_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "device_code_user_id_user_id_fk": {
+ "name": "device_code_user_id_user_id_fk",
+ "tableFrom": "device_code",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.external_link": {
+ "name": "external_link",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "task_id": {
+ "name": "task_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "integration_id": {
+ "name": "integration_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "external_id": {
+ "name": "external_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "external_link_taskId_idx": {
+ "name": "external_link_taskId_idx",
+ "columns": [
+ {
+ "expression": "task_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "external_link_integrationId_idx": {
+ "name": "external_link_integrationId_idx",
+ "columns": [
+ {
+ "expression": "integration_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "external_link_externalId_idx": {
+ "name": "external_link_externalId_idx",
+ "columns": [
+ {
+ "expression": "external_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "external_link_resourceType_idx": {
+ "name": "external_link_resourceType_idx",
+ "columns": [
+ {
+ "expression": "resource_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "external_link_task_id_task_id_fk": {
+ "name": "external_link_task_id_task_id_fk",
+ "tableFrom": "external_link",
+ "tableTo": "task",
+ "columnsFrom": [
+ "task_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ },
+ "external_link_integration_id_integration_id_fk": {
+ "name": "external_link_integration_id_integration_id_fk",
+ "tableFrom": "external_link",
+ "tableTo": "integration",
+ "columnsFrom": [
+ "integration_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.github_import": {
+ "name": "github_import",
+ "schema": "",
+ "columns": {
+ "integration_id": {
+ "name": "integration_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "run_id": {
+ "name": "run_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "github_import_integration_id_integration_id_fk": {
+ "name": "github_import_integration_id_integration_id_fk",
+ "tableFrom": "github_import",
+ "tableTo": "integration",
+ "columnsFrom": [
+ "integration_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.github_integration": {
+ "name": "github_integration",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "repository_owner": {
+ "name": "repository_owner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "repository_name": {
+ "name": "repository_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "installation_id": {
+ "name": "installation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "github_integration_project_id_project_id_fk": {
+ "name": "github_integration_project_id_project_id_fk",
+ "tableFrom": "github_integration",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "github_integration_project_id_unique": {
+ "name": "github_integration_project_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.integration": {
+ "name": "integration",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "integration_projectId_idx": {
+ "name": "integration_projectId_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "integration_type_idx": {
+ "name": "integration_type_idx",
+ "columns": [
+ {
+ "expression": "type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "integration_project_id_project_id_fk": {
+ "name": "integration_project_id_project_id_fk",
+ "tableFrom": "integration",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "integration_project_type_unique": {
+ "name": "integration_project_type_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "type"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.invitation": {
+ "name": "invitation",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "workspace_id": {
+ "name": "workspace_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "inviter_id": {
+ "name": "inviter_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {
+ "invitation_workspaceId_idx": {
+ "name": "invitation_workspaceId_idx",
+ "columns": [
+ {
+ "expression": "workspace_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "invitation_email_idx": {
+ "name": "invitation_email_idx",
+ "columns": [
+ {
+ "expression": "email",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "invitation_inviterId_idx": {
+ "name": "invitation_inviterId_idx",
+ "columns": [
+ {
+ "expression": "inviter_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "invitation_workspace_id_workspace_id_fk": {
+ "name": "invitation_workspace_id_workspace_id_fk",
+ "tableFrom": "invitation",
+ "tableTo": "workspace",
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "invitation_inviter_id_user_id_fk": {
+ "name": "invitation_inviter_id_user_id_fk",
+ "tableFrom": "invitation",
+ "tableTo": "user",
+ "columnsFrom": [
+ "inviter_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.job_lease": {
+ "name": "job_lease",
+ "schema": "",
+ "columns": {
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "owner": {
+ "name": "owner",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.label": {
+ "name": "label",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "deletion_started_at": {
+ "name": "deletion_started_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "task_id": {
+ "name": "task_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "workspace_id": {
+ "name": "workspace_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "label_task_id_idx": {
+ "name": "label_task_id_idx",
+ "columns": [
+ {
+ "expression": "task_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "label_workspace_id_idx": {
+ "name": "label_workspace_id_idx",
+ "columns": [
+ {
+ "expression": "workspace_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "label_workspace_cascade_idx": {
+ "name": "label_workspace_cascade_idx",
+ "columns": [
+ {
+ "expression": "workspace_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "name",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "where": "\"label\".\"task_id\" is not null",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "label_workspace_name_unique": {
+ "name": "label_workspace_name_unique",
+ "columns": [
+ {
+ "expression": "workspace_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "name",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"label\".\"task_id\" is null",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "label_task_id_task_id_fk": {
+ "name": "label_task_id_task_id_fk",
+ "tableFrom": "label",
+ "tableTo": "task",
+ "columnsFrom": [
+ "task_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ },
+ "label_workspace_id_workspace_id_fk": {
+ "name": "label_workspace_id_workspace_id_fk",
+ "tableFrom": "label",
+ "tableTo": "workspace",
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "label_task_name_unique": {
+ "name": "label_task_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "task_id",
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.mcp_oauth_state": {
+ "name": "mcp_oauth_state",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "mcp_oauth_state_kind_key_uidx": {
+ "name": "mcp_oauth_state_kind_key_uidx",
+ "columns": [
+ {
+ "expression": "kind",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "key",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "mcp_oauth_state_expiresAt_idx": {
+ "name": "mcp_oauth_state_expiresAt_idx",
+ "columns": [
+ {
+ "expression": "expires_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notification": {
+ "name": "notification",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'info'"
+ },
+ "event_data": {
+ "name": "event_data",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "notification_userId_idx": {
+ "name": "notification_userId_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "notification_user_id_user_id_fk": {
+ "name": "notification_user_id_user_id_fk",
+ "tableFrom": "notification",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.workspace_role": {
+ "name": "workspace_role",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "workspace_id": {
+ "name": "workspace_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission": {
+ "name": "permission",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "workspace_role_workspaceId_idx": {
+ "name": "workspace_role_workspaceId_idx",
+ "columns": [
+ {
+ "expression": "workspace_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "workspace_role_role_idx": {
+ "name": "workspace_role_role_idx",
+ "columns": [
+ {
+ "expression": "role",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "workspace_role_workspace_id_workspace_id_fk": {
+ "name": "workspace_role_workspace_id_workspace_id_fk",
+ "tableFrom": "workspace_role",
+ "tableTo": "workspace",
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project": {
+ "name": "project",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "workspace_id": {
+ "name": "workspace_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slug": {
+ "name": "slug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'Layout'"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "is_public": {
+ "name": "is_public",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "archived_at": {
+ "name": "archived_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_task_number": {
+ "name": "last_task_number",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "position": {
+ "name": "position",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "background_object_key": {
+ "name": "background_object_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "background_mime_type": {
+ "name": "background_mime_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "background_version": {
+ "name": "background_version",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "project_workspaceId_position_idx": {
+ "name": "project_workspaceId_position_idx",
+ "columns": [
+ {
+ "expression": "workspace_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "position",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "project_workspace_id_workspace_id_fk": {
+ "name": "project_workspace_id_workspace_id_fk",
+ "tableFrom": "project",
+ "tableTo": "workspace",
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "project_workspace_id_id_unique": {
+ "name": "project_workspace_id_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "workspace_id",
+ "id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session": {
+ "name": "session",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "active_organization_id": {
+ "name": "active_organization_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "active_team_id": {
+ "name": "active_team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "impersonated_by": {
+ "name": "impersonated_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "session_userId_idx": {
+ "name": "session_userId_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "session_user_id_user_id_fk": {
+ "name": "session_user_id_user_id_fk",
+ "tableFrom": "session",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "session_token_unique": {
+ "name": "session_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.task_relation": {
+ "name": "task_relation",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "source_task_id": {
+ "name": "source_task_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_task_id": {
+ "name": "target_task_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "relation_type": {
+ "name": "relation_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "task_relation_source_idx": {
+ "name": "task_relation_source_idx",
+ "columns": [
+ {
+ "expression": "source_task_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "task_relation_target_idx": {
+ "name": "task_relation_target_idx",
+ "columns": [
+ {
+ "expression": "target_task_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "task_relation_source_task_id_task_id_fk": {
+ "name": "task_relation_source_task_id_task_id_fk",
+ "tableFrom": "task_relation",
+ "tableTo": "task",
+ "columnsFrom": [
+ "source_task_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ },
+ "task_relation_target_task_id_task_id_fk": {
+ "name": "task_relation_target_task_id_task_id_fk",
+ "tableFrom": "task_relation",
+ "tableTo": "task",
+ "columnsFrom": [
+ "target_task_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.task_reminder_sent": {
+ "name": "task_reminder_sent",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "task_id": {
+ "name": "task_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reminder_type": {
+ "name": "reminder_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "task_reminder_sent_taskId_idx": {
+ "name": "task_reminder_sent_taskId_idx",
+ "columns": [
+ {
+ "expression": "task_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "task_reminder_sent_task_id_task_id_fk": {
+ "name": "task_reminder_sent_task_id_task_id_fk",
+ "tableFrom": "task_reminder_sent",
+ "tableTo": "task",
+ "columnsFrom": [
+ "task_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "task_reminder_sent_task_type_unique": {
+ "name": "task_reminder_sent_task_type_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "task_id",
+ "reminder_type"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.task": {
+ "name": "task",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "position": {
+ "name": "position",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "number": {
+ "name": "number",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 1
+ },
+ "assignee_id": {
+ "name": "assignee_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'to-do'"
+ },
+ "column_id": {
+ "name": "column_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "priority": {
+ "name": "priority",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'low'"
+ },
+ "start_date": {
+ "name": "start_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "task_projectId_idx": {
+ "name": "task_projectId_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "task_dueDate_idx": {
+ "name": "task_dueDate_idx",
+ "columns": [
+ {
+ "expression": "due_date",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "task_assigneeId_idx": {
+ "name": "task_assigneeId_idx",
+ "columns": [
+ {
+ "expression": "assignee_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "task_columnId_idx": {
+ "name": "task_columnId_idx",
+ "columns": [
+ {
+ "expression": "column_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "task_project_id_project_id_fk": {
+ "name": "task_project_id_project_id_fk",
+ "tableFrom": "task",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ },
+ "task_assignee_id_user_id_fk": {
+ "name": "task_assignee_id_user_id_fk",
+ "tableFrom": "task",
+ "tableTo": "user",
+ "columnsFrom": [
+ "assignee_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "cascade"
+ },
+ "task_column_id_column_id_fk": {
+ "name": "task_column_id_column_id_fk",
+ "tableFrom": "task",
+ "tableTo": "column",
+ "columnsFrom": [
+ "column_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "task_project_number_unique": {
+ "name": "task_project_number_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "number"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.team": {
+ "name": "team",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "workspace_id": {
+ "name": "workspace_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "team_workspaceId_idx": {
+ "name": "team_workspaceId_idx",
+ "columns": [
+ {
+ "expression": "workspace_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "team_workspace_id_workspace_id_fk": {
+ "name": "team_workspace_id_workspace_id_fk",
+ "tableFrom": "team",
+ "tableTo": "workspace",
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.team_member": {
+ "name": "team_member",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "team_id": {
+ "name": "team_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "teamMember_teamId_idx": {
+ "name": "teamMember_teamId_idx",
+ "columns": [
+ {
+ "expression": "team_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "teamMember_userId_idx": {
+ "name": "teamMember_userId_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "team_member_team_id_team_id_fk": {
+ "name": "team_member_team_id_team_id_fk",
+ "tableFrom": "team_member",
+ "tableTo": "team",
+ "columnsFrom": [
+ "team_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "team_member_user_id_user_id_fk": {
+ "name": "team_member_user_id_user_id_fk",
+ "tableFrom": "team_member",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.time_entry": {
+ "name": "time_entry",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "task_id": {
+ "name": "task_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "start_time": {
+ "name": "start_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "end_time": {
+ "name": "end_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "time_entry_taskId_idx": {
+ "name": "time_entry_taskId_idx",
+ "columns": [
+ {
+ "expression": "task_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "time_entry_userId_idx": {
+ "name": "time_entry_userId_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "time_entry_task_id_task_id_fk": {
+ "name": "time_entry_task_id_task_id_fk",
+ "tableFrom": "time_entry",
+ "tableTo": "task",
+ "columnsFrom": [
+ "task_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ },
+ "time_entry_user_id_user_id_fk": {
+ "name": "time_entry_user_id_user_id_fk",
+ "tableFrom": "time_entry",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.trial_grant": {
+ "name": "trial_grant",
+ "schema": "",
+ "columns": {
+ "email_hash": {
+ "name": "email_hash",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "trial_ends_at": {
+ "name": "trial_ends_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user": {
+ "name": "user",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email_verified": {
+ "name": "email_verified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image": {
+ "name": "image",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "locale": {
+ "name": "locale",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "is_anonymous": {
+ "name": "is_anonymous",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "banned": {
+ "name": "banned",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "ban_reason": {
+ "name": "ban_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ban_expires": {
+ "name": "ban_expires",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_email_unique": {
+ "name": "user_email_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_avatar": {
+ "name": "user_avatar",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "mime_type": {
+ "name": "mime_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "size": {
+ "name": "size",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "bytea",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "user_avatar_userId_idx": {
+ "name": "user_avatar_userId_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "user_avatar_user_id_user_id_fk": {
+ "name": "user_avatar_user_id_user_id_fk",
+ "tableFrom": "user_avatar",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_avatar_user_id_unique": {
+ "name": "user_avatar_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_notification_preference": {
+ "name": "user_notification_preference",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email_enabled": {
+ "name": "email_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "ntfy_enabled": {
+ "name": "ntfy_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "ntfy_server_url": {
+ "name": "ntfy_server_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ntfy_topic": {
+ "name": "ntfy_topic",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ntfy_token": {
+ "name": "ntfy_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gotify_enabled": {
+ "name": "gotify_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "gotify_server_url": {
+ "name": "gotify_server_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gotify_token": {
+ "name": "gotify_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "webhook_enabled": {
+ "name": "webhook_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "webhook_url": {
+ "name": "webhook_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "webhook_secret": {
+ "name": "webhook_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "task_assignment_enabled": {
+ "name": "task_assignment_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "task_comment_enabled": {
+ "name": "task_comment_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "task_status_change_enabled": {
+ "name": "task_status_change_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "due_date_reminder_enabled": {
+ "name": "due_date_reminder_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "due_date_reminder_lead_time_minutes": {
+ "name": "due_date_reminder_lead_time_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1440
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_notification_preference_user_id_user_id_fk": {
+ "name": "user_notification_preference_user_id_user_id_fk",
+ "tableFrom": "user_notification_preference",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_notification_preference_user_id_unique": {
+ "name": "user_notification_preference_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_notification_workspace_project": {
+ "name": "user_notification_workspace_project",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "workspace_id": {
+ "name": "workspace_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "workspace_rule_id": {
+ "name": "workspace_rule_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "user_notification_workspace_project_ruleId_idx": {
+ "name": "user_notification_workspace_project_ruleId_idx",
+ "columns": [
+ {
+ "expression": "workspace_rule_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "user_notification_workspace_project_projectId_idx": {
+ "name": "user_notification_workspace_project_projectId_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "user_notification_workspace_project_workspaceId_projectId_idx": {
+ "name": "user_notification_workspace_project_workspaceId_projectId_idx",
+ "columns": [
+ {
+ "expression": "workspace_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "unwp_workspaceId_workspaceRuleId_idx": {
+ "name": "unwp_workspaceId_workspaceRuleId_idx",
+ "columns": [
+ {
+ "expression": "workspace_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "workspace_rule_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "user_notification_workspace_project_workspace_id_workspace_id_fk": {
+ "name": "user_notification_workspace_project_workspace_id_workspace_id_fk",
+ "tableFrom": "user_notification_workspace_project",
+ "tableTo": "workspace",
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ },
+ "user_notification_workspace_project_workspace_id_workspace_rule_id_user_notification_workspace_rule_workspace_id_id_fk": {
+ "name": "user_notification_workspace_project_workspace_id_workspace_rule_id_user_notification_workspace_rule_workspace_id_id_fk",
+ "tableFrom": "user_notification_workspace_project",
+ "tableTo": "user_notification_workspace_rule",
+ "columnsFrom": [
+ "workspace_id",
+ "workspace_rule_id"
+ ],
+ "columnsTo": [
+ "workspace_id",
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ },
+ "user_notification_workspace_project_workspace_id_project_id_project_workspace_id_id_fk": {
+ "name": "user_notification_workspace_project_workspace_id_project_id_project_workspace_id_id_fk",
+ "tableFrom": "user_notification_workspace_project",
+ "tableTo": "project",
+ "columnsFrom": [
+ "workspace_id",
+ "project_id"
+ ],
+ "columnsTo": [
+ "workspace_id",
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_notification_workspace_project_rule_project_unique": {
+ "name": "user_notification_workspace_project_rule_project_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "workspace_rule_id",
+ "project_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_notification_workspace_rule": {
+ "name": "user_notification_workspace_rule",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "workspace_id": {
+ "name": "workspace_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "email_enabled": {
+ "name": "email_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "ntfy_enabled": {
+ "name": "ntfy_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "gotify_enabled": {
+ "name": "gotify_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "webhook_enabled": {
+ "name": "webhook_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "project_mode": {
+ "name": "project_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'all'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "user_notification_workspace_rule_userId_idx": {
+ "name": "user_notification_workspace_rule_userId_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "user_notification_workspace_rule_workspaceId_idx": {
+ "name": "user_notification_workspace_rule_workspaceId_idx",
+ "columns": [
+ {
+ "expression": "workspace_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "user_notification_workspace_rule_user_id_user_id_fk": {
+ "name": "user_notification_workspace_rule_user_id_user_id_fk",
+ "tableFrom": "user_notification_workspace_rule",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ },
+ "user_notification_workspace_rule_workspace_id_workspace_id_fk": {
+ "name": "user_notification_workspace_rule_workspace_id_workspace_id_fk",
+ "tableFrom": "user_notification_workspace_rule",
+ "tableTo": "workspace",
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_notification_workspace_rule_user_workspace_unique": {
+ "name": "user_notification_workspace_rule_user_workspace_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "workspace_id"
+ ]
+ },
+ "user_notification_workspace_rule_workspace_id_id_unique": {
+ "name": "user_notification_workspace_rule_workspace_id_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "workspace_id",
+ "id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.verification": {
+ "name": "verification",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identifier": {
+ "name": "identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "verification_identifier_idx": {
+ "name": "verification_identifier_idx",
+ "columns": [
+ {
+ "expression": "identifier",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.workflow_rule": {
+ "name": "workflow_rule",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "integration_type": {
+ "name": "integration_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "event_type": {
+ "name": "event_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "column_id": {
+ "name": "column_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "workflow_rule_projectId_idx": {
+ "name": "workflow_rule_projectId_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "workflow_rule_columnId_idx": {
+ "name": "workflow_rule_columnId_idx",
+ "columns": [
+ {
+ "expression": "column_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "workflow_rule_project_id_project_id_fk": {
+ "name": "workflow_rule_project_id_project_id_fk",
+ "tableFrom": "workflow_rule",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ },
+ "workflow_rule_column_id_column_id_fk": {
+ "name": "workflow_rule_column_id_column_id_fk",
+ "tableFrom": "workflow_rule",
+ "tableTo": "column",
+ "columnsFrom": [
+ "column_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.workspace": {
+ "name": "workspace",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slug": {
+ "name": "slug",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "logo": {
+ "name": "logo",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "workspace_slug_unique": {
+ "name": "workspace_slug_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "slug"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.workspace_billing": {
+ "name": "workspace_billing",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "workspace_id": {
+ "name": "workspace_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "founding_free": {
+ "name": "founding_free",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "trial_ends_at": {
+ "name": "trial_ends_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "creem_customer_id": {
+ "name": "creem_customer_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "creem_subscription_id": {
+ "name": "creem_subscription_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "creem_product_id": {
+ "name": "creem_product_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "plan": {
+ "name": "plan",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "billing_interval": {
+ "name": "billing_interval",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "seats": {
+ "name": "seats",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "current_period_end": {
+ "name": "current_period_end",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "canceled_at": {
+ "name": "canceled_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "workspace_billing_workspaceId_idx": {
+ "name": "workspace_billing_workspaceId_idx",
+ "columns": [
+ {
+ "expression": "workspace_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "workspace_billing_workspace_id_workspace_id_fk": {
+ "name": "workspace_billing_workspace_id_workspace_id_fk",
+ "tableFrom": "workspace_billing",
+ "tableTo": "workspace",
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "cascade"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "workspace_billing_workspace_id_unique": {
+ "name": "workspace_billing_workspace_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "workspace_id"
+ ]
+ },
+ "workspace_billing_creem_subscription_id_unique": {
+ "name": "workspace_billing_creem_subscription_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "creem_subscription_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.workspace_member": {
+ "name": "workspace_member",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "workspace_id": {
+ "name": "workspace_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'member'"
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {
+ "workspace_member_workspaceId_idx": {
+ "name": "workspace_member_workspaceId_idx",
+ "columns": [
+ {
+ "expression": "workspace_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "workspace_member_userId_idx": {
+ "name": "workspace_member_userId_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "workspace_member_workspace_id_workspace_id_fk": {
+ "name": "workspace_member_workspace_id_workspace_id_fk",
+ "tableFrom": "workspace_member",
+ "tableTo": "workspace",
+ "columnsFrom": [
+ "workspace_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "workspace_member_user_id_user_id_fk": {
+ "name": "workspace_member_user_id_user_id_fk",
+ "tableFrom": "workspace_member",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/apps/api/drizzle/meta/_journal.json b/apps/api/drizzle/meta/_journal.json
index ca4224a72..572a1ed82 100644
--- a/apps/api/drizzle/meta/_journal.json
+++ b/apps/api/drizzle/meta/_journal.json
@@ -365,6 +365,13 @@
"when": 1790370789562,
"tag": "0051_modern_corsair",
"breakpoints": true
+ },
+ {
+ "idx": 52,
+ "version": "7",
+ "when": 1790405156847,
+ "tag": "0052_dear_beyonder",
+ "breakpoints": true
}
]
}
diff --git a/apps/api/src/database/schema.ts b/apps/api/src/database/schema.ts
index c5ae1901e..2ed391936 100644
--- a/apps/api/src/database/schema.ts
+++ b/apps/api/src/database/schema.ts
@@ -330,6 +330,9 @@ export const projectTable = pgTable(
archivedAt: timestamp("archived_at", { mode: "date" }),
lastTaskNumber: integer("last_task_number").notNull().default(0),
position: integer("position").notNull().default(0),
+ backgroundObjectKey: text("background_object_key"),
+ backgroundMimeType: text("background_mime_type"),
+ backgroundVersion: text("background_version"),
},
(table) => [
unique("project_workspace_id_id_unique").on(table.workspaceId, table.id),
diff --git a/apps/api/src/project/controllers/delete-project.ts b/apps/api/src/project/controllers/delete-project.ts
index 701730fd1..96dcc2cda 100644
--- a/apps/api/src/project/controllers/delete-project.ts
+++ b/apps/api/src/project/controllers/delete-project.ts
@@ -2,6 +2,7 @@ import { eq } from "drizzle-orm";
import { HTTPException } from "hono/http-exception";
import db from "../../database";
import { projectTable } from "../../database/schema";
+import { deleteS3Object } from "../../storage/s3";
import getProject from "./get-project";
async function deleteProject(id: string, workspaceId: string) {
@@ -18,6 +19,10 @@ async function deleteProject(id: string, workspaceId: string) {
});
}
+ if (deletedProject.backgroundObjectKey) {
+ deleteS3Object(deletedProject.backgroundObjectKey).catch(() => {});
+ }
+
return existingProject;
}
diff --git a/apps/api/src/project/index.ts b/apps/api/src/project/index.ts
index 6ed8746e7..6dd385c7d 100644
--- a/apps/api/src/project/index.ts
+++ b/apps/api/src/project/index.ts
@@ -1,6 +1,10 @@
+import { eq } from "drizzle-orm";
import { HTTPException } from "hono/http-exception";
import { requireWorkspaceEntitlement } from "../billing/controllers/require-entitlement";
import { requireEntitlement } from "../billing/require-entitlement-middleware";
+import db from "../database";
+import { projectTable } from "../database/schema";
+import { publishEvent } from "../events";
import {
apiRouter,
type BaseVariables,
@@ -9,6 +13,15 @@ import {
jsonResponse,
z,
} from "../openapi";
+import {
+ assertProjectBackgroundKeyMatchesContext,
+ createProjectBackgroundUploadUrl,
+ deleteS3Object,
+ getPrivateObject,
+ isImageContentType,
+ validateProjectBackgroundUploadInput,
+} from "../storage/s3";
+import { normalizeApiServerUrl } from "../utils/openapi-spec";
import {
hasWorkspacePermission,
requireWorkspacePermission,
@@ -26,16 +39,21 @@ import unarchiveProjectCtrl from "./controllers/unarchive-project";
import updateProjectCtrl from "./controllers/update-project";
import {
movedProjectSchema,
+ projectBackgroundFinalizeSchema,
+ projectBackgroundUploadSchema,
projectListSchema,
projectSchema,
+ toPublicProject,
} from "./response";
import {
createProjectBody,
+ finalizeProjectBackgroundBody,
listProjectsQuery,
moveProjectBody,
projectParam,
reorderProjectsBody,
updateProjectBody,
+ uploadProjectBackgroundBody,
workspaceIdQuery,
} from "./schema";
@@ -263,6 +281,124 @@ const unarchiveProjectRoute = createRoute({
},
});
+const getProjectBackgroundRoute = createRoute({
+ method: "get",
+ operationId: "getProjectBackground",
+ path: "/{id}/background",
+ tags: ["Projects"],
+ summary: "Download project background",
+ description: "Download the current project board background image.",
+ middleware: [workspaceAccess.fromProject()] as const,
+ request: { params: projectParam },
+ responses: {
+ 200: {
+ description: "The project background image",
+ content: {
+ "image/*": { schema: { type: "string", format: "binary" } },
+ },
+ },
+ 304: { description: "Not modified" },
+ 400: errorResponse(
+ "Unknown project, or its workspace could not be determined",
+ ),
+ 403: errorResponse("No access to the project's workspace"),
+ 404: errorResponse("Project background not found"),
+ },
+});
+
+const uploadProjectBackgroundRoute = createRoute({
+ method: "put",
+ operationId: "uploadProjectBackground",
+ path: "/{id}/background-upload",
+ tags: ["Projects"],
+ summary: "Prepare project background upload",
+ description: "Create a presigned background image upload URL for a project.",
+ middleware: [
+ workspaceAccess.fromProject(),
+ requireWorkspacePermission({ project: ["update"] }),
+ requireEntitlement,
+ ] as const,
+ request: {
+ params: projectParam,
+ body: {
+ required: true,
+ content: {
+ "application/json": { schema: uploadProjectBackgroundBody },
+ },
+ },
+ },
+ responses: {
+ 200: jsonResponse(
+ "Background image upload URL",
+ projectBackgroundUploadSchema,
+ ),
+ 400: errorResponse("Invalid image upload request, or unknown project"),
+ 403: errorResponse(
+ "No workspace access, or missing project:update permission",
+ ),
+ 404: errorResponse("Project not found"),
+ 503: errorResponse("Image uploads are not configured"),
+ },
+});
+
+const finalizeProjectBackgroundRoute = createRoute({
+ method: "post",
+ operationId: "finalizeProjectBackgroundUpload",
+ path: "/{id}/background-upload/finalize",
+ tags: ["Projects"],
+ summary: "Finalize project background upload",
+ description: "Save an uploaded image as the project's board background.",
+ middleware: [
+ workspaceAccess.fromProject(),
+ requireWorkspacePermission({ project: ["update"] }),
+ requireEntitlement,
+ ] as const,
+ request: {
+ params: projectParam,
+ body: {
+ required: true,
+ content: {
+ "application/json": { schema: finalizeProjectBackgroundBody },
+ },
+ },
+ },
+ responses: {
+ 200: jsonResponse(
+ "Finalized project background",
+ projectBackgroundFinalizeSchema,
+ ),
+ 400: errorResponse("Invalid image upload request, or unknown project"),
+ 403: errorResponse(
+ "No workspace access, or missing project:update permission",
+ ),
+ 404: errorResponse("Project not found"),
+ 500: errorResponse("Failed to save the project background"),
+ },
+});
+
+const deleteProjectBackgroundRoute = createRoute({
+ method: "delete",
+ operationId: "deleteProjectBackground",
+ path: "/{id}/background",
+ tags: ["Projects"],
+ summary: "Delete project background",
+ description: "Remove the current project board background image.",
+ middleware: [
+ workspaceAccess.fromProject(),
+ requireWorkspacePermission({ project: ["update"] }),
+ ] as const,
+ request: { params: projectParam },
+ responses: {
+ 204: { description: "Project background removed" },
+ 400: errorResponse(
+ "Unknown project, or its workspace could not be determined",
+ ),
+ 403: errorResponse(
+ "No workspace access, or missing project:update permission",
+ ),
+ },
+});
+
const project = apiRouter<BaseVariables & { workspaceId: string }>()
.openapi(moveProjectRoute, async (c) => {
const { id } = c.req.valid("param");
@@ -286,7 +422,9 @@ const project = apiRouter<BaseVariables & { workspaceId: string }>()
});
await requireWorkspaceEntitlement(targetWorkspaceId);
return c.json(
- await moveProjectCtrl(id, sourceWorkspaceId, targetWorkspaceId, userId),
+ toPublicProject(
+ await moveProjectCtrl(id, sourceWorkspaceId, targetWorkspaceId, userId),
+ ),
200,
);
})
@@ -297,25 +435,90 @@ const project = apiRouter<BaseVariables & { workspaceId: string }>()
workspaceId,
includeArchived === "true",
);
- return c.json(projects, 200);
+ return c.json(projects.map(toPublicProject), 200);
})
.openapi(createProjectRoute, async (c) => {
const { name, icon, slug } = c.req.valid("json");
const workspaceId = c.get("workspaceId");
const newProject = await createProjectCtrl(workspaceId, name, icon, slug);
- return c.json(newProject, 200);
+ return c.json(toPublicProject(newProject), 200);
})
.openapi(getProjectRoute, async (c) => {
const { id } = c.req.valid("param");
const workspaceId = c.get("workspaceId");
const projectData = await getProjectCtrl(id, workspaceId);
- return c.json(projectData, 200);
+ return c.json(toPublicProject(projectData), 200);
+ })
+ .openapi(getProjectBackgroundRoute, async (c) => {
+ const { id } = c.req.valid("param");
+ const [projectData] = await db
+ .select({
+ backgroundObjectKey: projectTable.backgroundObjectKey,
+ backgroundMimeType: projectTable.backgroundMimeType,
+ backgroundVersion: projectTable.backgroundVersion,
+ })
+ .from(projectTable)
+ .where(eq(projectTable.id, id))
+ .limit(1);
+
+ if (!projectData?.backgroundObjectKey) {
+ throw new HTTPException(404, {
+ message: "Project background not found",
+ });
+ }
+
+ try {
+ const object = await getPrivateObject(projectData.backgroundObjectKey);
+ const contentType = (
+ object.contentType ||
+ projectData.backgroundMimeType ||
+ ""
+ )
+ .toLowerCase()
+ .split(";")[0]
+ ?.trim();
+
+ if (!contentType || !isImageContentType(contentType)) {
+ await (object.body as ReadableStream).cancel();
+ throw new HTTPException(404, {
+ message: "Project background not found",
+ });
+ }
+
+ const etag = object.etag || `"${projectData.backgroundVersion}"`;
+ const headers: Record<string, string> = {
+ "Cache-Control": "private, max-age=300, must-revalidate",
+ "Content-Type": contentType,
+ ETag: etag,
+ Vary: "Cookie, Authorization",
+ "X-Content-Type-Options": "nosniff",
+ };
+ if (object.contentLength !== undefined) {
+ headers["Content-Length"] = object.contentLength.toString();
+ }
+ if (object.lastModified) {
+ headers["Last-Modified"] = object.lastModified.toUTCString();
+ }
+
+ if (c.req.header("If-None-Match") === etag) {
+ await (object.body as ReadableStream).cancel();
+ return new Response(null, { status: 304, headers });
+ }
+
+ return new Response(object.body as BodyInit, { headers });
+ } catch (error) {
+ if (error instanceof HTTPException) throw error;
+ console.error("Failed to stream project background:", error);
+ throw new HTTPException(404, {
+ message: "Project background not found",
+ });
+ }
})
.openapi(reorderProjectsRoute, async (c) => {
const workspaceId = c.get("workspaceId");
const { projects } = c.req.valid("json");
const reordered = await reorderProjectsCtrl(workspaceId, projects);
- return c.json(reordered, 200);
+ return c.json(reordered.map(toPublicProject), 200);
})
.openapi(updateProjectRoute, async (c) => {
const { id } = c.req.valid("param");
@@ -331,25 +534,180 @@ const project = apiRouter<BaseVariables & { workspaceId: string }>()
workspaceId,
await hasWorkspacePermission(c, { project: ["share"] }),
);
- return c.json(updatedProject, 200);
+ return c.json(toPublicProject(updatedProject), 200);
})
.openapi(deleteProjectRoute, async (c) => {
const { id } = c.req.valid("param");
const workspaceId = c.get("workspaceId");
const deletedProject = await deleteProjectCtrl(id, workspaceId);
- return c.json(deletedProject, 200);
+ return c.json(toPublicProject(deletedProject), 200);
})
.openapi(archiveProjectRoute, async (c) => {
const { id } = c.req.valid("param");
const workspaceId = c.get("workspaceId");
const archivedProject = await archiveProjectCtrl(id, workspaceId);
- return c.json(archivedProject, 200);
+ return c.json(toPublicProject(archivedProject), 200);
})
.openapi(unarchiveProjectRoute, async (c) => {
const { id } = c.req.valid("param");
const workspaceId = c.get("workspaceId");
const unarchivedProject = await unarchiveProjectCtrl(id, workspaceId);
- return c.json(unarchivedProject, 200);
+ return c.json(toPublicProject(unarchivedProject), 200);
+ })
+ .openapi(uploadProjectBackgroundRoute, async (c) => {
+ const { id } = c.req.valid("param");
+ const { contentType, size } = c.req.valid("json");
+
+ try {
+ validateProjectBackgroundUploadInput(contentType, size);
+ } catch (error) {
+ throw new HTTPException(400, {
+ message:
+ error instanceof Error
+ ? error.message
+ : "Invalid image upload request",
+ });
+ }
+
+ const [projectContext] = await db
+ .select({
+ projectId: projectTable.id,
+ workspaceId: projectTable.workspaceId,
+ })
+ .from(projectTable)
+ .where(eq(projectTable.id, id))
+ .limit(1);
+
+ if (!projectContext) {
+ throw new HTTPException(404, { message: "Project not found" });
+ }
+
+ try {
+ const upload = await createProjectBackgroundUploadUrl({
+ workspaceId: projectContext.workspaceId,
+ projectId: projectContext.projectId,
+ contentType,
+ size,
+ });
+ return c.json(upload, 200);
+ } catch (error) {
+ throw new HTTPException(503, {
+ message:
+ error instanceof Error
+ ? error.message
+ : "Image uploads are not configured",
+ });
+ }
+ })
+ .openapi(finalizeProjectBackgroundRoute, async (c) => {
+ const { id } = c.req.valid("param");
+ const { key, contentType, size, version } = c.req.valid("json");
+
+ try {
+ validateProjectBackgroundUploadInput(contentType, size);
+ } catch (error) {
+ throw new HTTPException(400, {
+ message:
+ error instanceof Error
+ ? error.message
+ : "Invalid image upload request",
+ });
+ }
+
+ const [projectContext] = await db
+ .select({
+ projectId: projectTable.id,
+ workspaceId: projectTable.workspaceId,
+ })
+ .from(projectTable)
+ .where(eq(projectTable.id, id))
+ .limit(1);
+
+ if (!projectContext) {
+ throw new HTTPException(404, { message: "Project not found" });
+ }
+
+ const normalizedKey = key.trim();
+ if (
+ !assertProjectBackgroundKeyMatchesContext(normalizedKey, {
+ workspaceId: projectContext.workspaceId,
+ projectId: projectContext.projectId,
+ version,
+ })
+ ) {
+ throw new HTTPException(400, {
+ message: "Image upload key does not match the project context.",
+ });
+ }
+
+ const [currentProject] = await db
+ .select({ backgroundObjectKey: projectTable.backgroundObjectKey })
+ .from(projectTable)
+ .where(eq(projectTable.id, id))
+ .limit(1);
+
+ const [updatedProject] = await db
+ .update(projectTable)
+ .set({
+ backgroundObjectKey: normalizedKey,
+ backgroundMimeType: contentType,
+ backgroundVersion: version,
+ })
+ .where(eq(projectTable.id, id))
+ .returning({ id: projectTable.id });
+
+ if (!updatedProject) {
+ throw new HTTPException(500, { message: "Failed to save background" });
+ }
+
+ if (
+ currentProject?.backgroundObjectKey &&
+ currentProject.backgroundObjectKey !== normalizedKey
+ ) {
+ deleteS3Object(currentProject.backgroundObjectKey).catch((error) => {
+ console.warn(`S3 cleanup error: ${error}`);
+ });
+ }
+
+ await publishEvent("project.updated", { projectId: id });
+
+ const apiBaseUrl = normalizeApiServerUrl(
+ process.env.KANEO_API_URL || new URL(c.req.url).origin,
+ );
+ return c.json(
+ {
+ url: `${apiBaseUrl}/project/${updatedProject.id}/background?v=${encodeURIComponent(version)}`,
+ },
+ 200,
+ );
+ })
+ .openapi(deleteProjectBackgroundRoute, async (c) => {
+ const { id } = c.req.valid("param");
+ const [currentProject] = await db
+ .select({ backgroundObjectKey: projectTable.backgroundObjectKey })
+ .from(projectTable)
+ .where(eq(projectTable.id, id))
+ .limit(1);
+
+ const [updatedProject] = await db
+ .update(projectTable)
+ .set({
+ backgroundObjectKey: null,
+ backgroundMimeType: null,
+ backgroundVersion: null,
+ })
+ .where(eq(projectTable.id, id))
+ .returning({ id: projectTable.id });
+
+ if (updatedProject && currentProject?.backgroundObjectKey) {
+ deleteS3Object(currentProject.backgroundObjectKey).catch(() => {});
+ }
+
+ if (updatedProject) {
+ await publishEvent("project.updated", { projectId: id });
+ }
+
+ return c.body(null, 204);
});
export default project;
diff --git a/apps/api/src/project/response.ts b/apps/api/src/project/response.ts
index 01ee1372a..2ef913c88 100644
--- a/apps/api/src/project/response.ts
+++ b/apps/api/src/project/response.ts
@@ -1,3 +1,4 @@
+import { HTTPException } from "hono/http-exception";
import { nullableResponseTimestamp, responseTimestamp, z } from "../openapi";
import { boardColumnSchema, boardTaskSchema } from "../task/response";
@@ -5,6 +6,7 @@ export const projectSchema = z
.object({
id: z.string(),
workspaceId: z.string(),
+ backgroundVersion: z.string().nullable(),
slug: z.string().openapi({
description: "Short prefix used in task identifiers, e.g. KAN-12.",
}),
@@ -56,6 +58,38 @@ export const projectListItemSchema = projectSchema
export const projectListSchema = z.array(projectListItemSchema);
+export const projectBackgroundUploadSchema = z
+ .object({
+ key: z.string(),
+ uploadUrl: z.string(),
+ version: z.string(),
+ headers: z.record(z.string(), z.string()),
+ })
+ .openapi("ProjectBackgroundUpload");
+
+export const projectBackgroundFinalizeSchema = z
+ .object({ url: z.string() })
+ .openapi("ProjectBackgroundFinalize");
export const movedProjectSchema = projectSchema
.extend({ unassignedTaskCount: z.number() })
.openapi("MovedProject");
+
+// Storage coordinates are private implementation details, even on mutations
+// that return a full database row. Preserve each endpoint's other fields.
+export function toPublicProject<
+ T extends {
+ backgroundObjectKey: string | null;
+ backgroundMimeType: string | null;
+ },
+>(project: T | undefined) {
+ if (!project)
+ throw new HTTPException(500, {
+ message: "Project mutation returned no result",
+ });
+ const {
+ backgroundObjectKey: _key,
+ backgroundMimeType: _mime,
+ ...publicProject
+ } = project;
+ return publicProject;
+}
diff --git a/apps/api/src/project/schema.ts b/apps/api/src/project/schema.ts
index 2422f1776..cb21d86ea 100644
--- a/apps/api/src/project/schema.ts
+++ b/apps/api/src/project/schema.ts
@@ -34,4 +34,15 @@ export const reorderProjectsBody = z.object({
.min(1),
});
+export const uploadProjectBackgroundBody = z.object({
+ contentType: z.string(),
+ size: z.number(),
+});
+
+export const finalizeProjectBackgroundBody = z.object({
+ key: z.string(),
+ contentType: z.string(),
+ version: z.string(),
+ size: z.number(),
+});
export const moveProjectBody = z.object({ workspaceId: z.string().min(1) });
diff --git a/apps/api/src/storage/s3.ts b/apps/api/src/storage/s3.ts
index f3a451b9e..7cd02558c 100644
--- a/apps/api/src/storage/s3.ts
+++ b/apps/api/src/storage/s3.ts
@@ -64,6 +64,20 @@ type TaskImageUploadUrl = {
headers: Record<string, string>;
};
+type ProjectBackgroundUploadContext = {
+ workspaceId: string;
+ projectId: string;
+ contentType: string;
+ size: number;
+};
+
+type ProjectBackgroundUploadUrl = {
+ key: string;
+ uploadUrl: string;
+ version: string;
+ headers: Record<string, string>;
+};
+
type AssetObject = {
body: unknown;
contentType: string | undefined;
@@ -262,6 +276,32 @@ export function buildObjectKey(context: TaskImageUploadContext) {
return `${objectKeyPrefix}/${fileName}`;
}
+export function buildProjectBackgroundObjectKey(
+ context: Pick<ProjectBackgroundUploadContext, "workspaceId" | "projectId">,
+) {
+ const objectKeyPrefix = buildProjectBackgroundObjectKeyPrefix(context);
+ const version = createId();
+
+ const fileName = `background-${version}`;
+
+ return {
+ rawKey: `${objectKeyPrefix}/${fileName}`,
+ version,
+ };
+}
+
+export function buildProjectBackgroundObjectKeyPrefix(
+ context: Pick<ProjectBackgroundUploadContext, "workspaceId" | "projectId">,
+) {
+ return [
+ "workspace",
+ sanitizePathSegment(context.workspaceId),
+ "project",
+ sanitizePathSegment(context.projectId),
+ "backgrounds",
+ ].join("/");
+}
+
export function applyKeyPrefix(prefix: string, key: string) {
if (!prefix) return key;
const trimmed = prefix.replace(/\/+$/, "");
@@ -289,6 +329,33 @@ export function validateTaskAssetUploadInput(
}
}
+export function validateProjectBackgroundUploadInput(
+ contentType: string,
+ size: number,
+) {
+ const maxImageUploadBytes = getMaxImageUploadBytes();
+
+ if (!contentType.trim()) {
+ throw new Error("A valid content type is required.");
+ }
+
+ if (!isImageContentType(contentType)) {
+ throw new Error(
+ `Unsupported content type "${contentType}". Upload a supported image.`,
+ );
+ }
+
+ if (size <= 0) {
+ throw new Error("Upload size must be greater than zero.");
+ }
+
+ if (size > maxImageUploadBytes) {
+ throw new Error(
+ `Upload exceeds the maximum upload size of ${Math.floor(maxImageUploadBytes / (1024 * 1024))}MB.`,
+ );
+ }
+}
+
export async function createTaskImageUploadUrl(
context: TaskImageUploadContext & { size: number },
): Promise<TaskImageUploadUrl> {
@@ -321,6 +388,37 @@ export async function createTaskImageUploadUrl(
};
}
+export async function createProjectBackgroundUploadUrl(
+ context: ProjectBackgroundUploadContext,
+): Promise<ProjectBackgroundUploadUrl> {
+ validateProjectBackgroundUploadInput(context.contentType, context.size);
+ const config = getStorageConfig();
+ const client = getClient(config);
+ const { rawKey, version } = buildProjectBackgroundObjectKey(context);
+ const key = applyKeyPrefix(config.keyPrefix, rawKey);
+
+ const command = new PutObjectCommand({
+ Bucket: config.bucket,
+ Key: key,
+ ContentType: context.contentType,
+ ContentLength: context.size,
+ });
+
+ const uploadUrl = await getSignedUrl(client, command, {
+ expiresIn: config.presignTtlSeconds,
+ signableHeaders: new Set(["content-length", "content-type"]),
+ });
+
+ return {
+ key,
+ uploadUrl,
+ version,
+ headers: {
+ "Content-Type": context.contentType,
+ },
+ };
+}
+
export class InvalidUploadedAssetError extends Error {}
/** Call only after checking the object's task/workspace key prefix. */
@@ -404,6 +502,29 @@ export function assertTaskImageKeyMatchesContext(
return /^[A-Za-z0-9._-]+$/.test(suffix) && !suffix.startsWith(".");
}
+export function assertProjectBackgroundKeyMatchesContext(
+ key: string,
+ context: Pick<ProjectBackgroundUploadContext, "workspaceId" | "projectId"> & {
+ version: string;
+ },
+) {
+ const config = getStorageConfig();
+ const objectPrefix = buildProjectBackgroundObjectKeyPrefix(context);
+ const fullPrefix = `${applyKeyPrefix(config.keyPrefix, objectPrefix)}/`;
+
+ if (!key.startsWith(fullPrefix)) {
+ return false;
+ }
+
+ // The prefix alone is not enough: gateways that normalize paths would let
+ // a traversal suffix walk back out into another workspace's objects.
+ if (!/^[A-Za-z0-9_-]+$/.test(context.version)) {
+ return false;
+ }
+ const suffix = key.slice(fullPrefix.length);
+ return suffix === `background-${context.version}`;
+}
+
export async function getPrivateObject(key: string): Promise<AssetObject> {
const config = getStorageConfig();
const client = getClient(config);
diff --git a/apps/api/src/task/controllers/get-tasks.ts b/apps/api/src/task/controllers/get-tasks.ts
index 5b796f5e4..8f364db4c 100644
--- a/apps/api/src/task/controllers/get-tasks.ts
+++ b/apps/api/src/task/controllers/get-tasks.ts
@@ -338,6 +338,7 @@ async function getTasksPage(
descriptionDeferred: project.descriptionDeferred,
isPublic: project.isPublic,
workspaceId: project.workspaceId,
+ backgroundVersion: project.backgroundVersion,
columns,
archivedTasks,
plannedTasks,
diff --git a/apps/api/src/task/response.ts b/apps/api/src/task/response.ts
index 1688b2b4c..ecd0c4cad 100644
--- a/apps/api/src/task/response.ts
+++ b/apps/api/src/task/response.ts
@@ -117,6 +117,7 @@ export const boardSchema = z
}),
isPublic: z.boolean().nullable(),
workspaceId: z.string(),
+ backgroundVersion: z.string().nullable(),
columns: z.array(boardColumnSchema),
archivedTasks: z.array(boardTaskSchema),
plannedTasks: z.array(boardTaskSchema),
diff --git a/apps/api/src/ws/index.ts b/apps/api/src/ws/index.ts
index 399a84a36..252859154 100644
--- a/apps/api/src/ws/index.ts
+++ b/apps/api/src/ws/index.ts
@@ -436,6 +436,20 @@ subscribeToEvent<{ notificationId: string; userId: string }>(
},
);
+subscribeToEvent<{
+ projectId: string;
+ initiatorId?: string;
+}>("project.updated", async (data) => {
+ const { projectId, initiatorId } = data;
+ if (!projectId) return;
+
+ broadcastToProject(
+ projectId,
+ { type: "PROJECT_UPDATED", projectId },
+ initiatorId,
+ );
+});
+
for (const eventName of taskUpdateEvents) {
subscribeToEvent<TaskEvent>(eventName, async (data) => {
const { projectId, initiatorId } = data;
diff --git a/apps/docs/openapi.json b/apps/docs/openapi.json
index 96781dbe1..9c404d5cb 100644
--- a/apps/docs/openapi.json
+++ b/apps/docs/openapi.json
@@ -367,6 +367,12 @@
"workspaceId": {
"type": "string"
},
+ "backgroundVersion": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
"columns": {
"type": "array",
"items": {
@@ -394,6 +400,7 @@
"description",
"isPublic",
"workspaceId",
+ "backgroundVersion",
"columns",
"archivedTasks",
"plannedTasks"
@@ -626,6 +633,12 @@
"workspaceId": {
"type": "string"
},
+ "backgroundVersion": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
"slug": {
"type": "string",
"description": "Short prefix used in task identifiers, e.g. KAN-12."
@@ -676,6 +689,7 @@
"required": [
"id",
"workspaceId",
+ "backgroundVersion",
"slug",
"icon",
"name",
@@ -753,6 +767,43 @@
"dueDate"
]
},
+ "ProjectBackgroundUpload": {
+ "type": "object",
+ "properties": {
+ "key": {
+ "type": "string"
+ },
+ "uploadUrl": {
+ "type": "string"
+ },
+ "version": {
+ "type": "string"
+ },
+ "headers": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ }
+ },
+ "required": [
+ "key",
+ "uploadUrl",
+ "version",
+ "headers"
+ ]
+ },
+ "ProjectBackgroundFinalize": {
+ "type": "object",
+ "properties": {
+ "url": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "url"
+ ]
+ },
"TaskDescriptionMatches": {
"type": "object",
"properties": {
@@ -6835,6 +6886,121 @@
}
}
},
+ "/project/{id}/background": {
+ "get": {
+ "operationId": "getProjectBackground",
+ "tags": [
+ "Projects"
+ ],
+ "summary": "Download project background",
+ "description": "Download the current project board background image.",
+ "parameters": [
+ {
+ "schema": {
+ "type": "string"
+ },
+ "required": true,
+ "name": "id",
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The project background image",
+ "content": {
+ "image/*": {
+ "schema": {
+ "type": "string",
+ "format": "binary"
+ }
+ }
+ }
+ },
+ "304": {
+ "description": "Not modified"
+ },
+ "400": {
+ "description": "Unknown project, or its workspace could not be determined",
+ "content": {
+ "text/plain": {
+ "schema": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Missing or invalid credentials"
+ },
+ "403": {
+ "description": "No access to the project's workspace",
+ "content": {
+ "text/plain": {
+ "schema": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Project background not found",
+ "content": {
+ "text/plain": {
+ "schema": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "delete": {
+ "operationId": "deleteProjectBackground",
+ "tags": [
+ "Projects"
+ ],
+ "summary": "Delete project background",
+ "description": "Remove the current project board background image.",
+ "parameters": [
+ {
+ "schema": {
+ "type": "string"
+ },
+ "required": true,
+ "name": "id",
+ "in": "path"
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "Project background removed"
+ },
+ "400": {
+ "description": "Unknown project, or its workspace could not be determined",
+ "content": {
+ "text/plain": {
+ "schema": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Missing or invalid credentials"
+ },
+ "403": {
+ "description": "No workspace access, or missing project:update permission",
+ "content": {
+ "text/plain": {
+ "schema": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"/project/reorder": {
"put": {
"operationId": "reorderProjects",
@@ -7038,6 +7204,208 @@
}
}
},
+ "/project/{id}/background-upload": {
+ "put": {
+ "operationId": "uploadProjectBackground",
+ "tags": [
+ "Projects"
+ ],
+ "summary": "Prepare project background upload",
+ "description": "Create a presigned background image upload URL for a project.",
+ "parameters": [
+ {
+ "schema": {
+ "type": "string"
+ },
+ "required": true,
+ "name": "id",
+ "in": "path"
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "contentType": {
+ "type": "string"
+ },
+ "size": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "contentType",
+ "size"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Background image upload URL",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProjectBackgroundUpload"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid image upload request, or unknown project",
+ "content": {
+ "text/plain": {
+ "schema": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Missing or invalid credentials"
+ },
+ "403": {
+ "description": "No workspace access, or missing project:update permission",
+ "content": {
+ "text/plain": {
+ "schema": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Project not found",
+ "content": {
+ "text/plain": {
+ "schema": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "503": {
+ "description": "Image uploads are not configured",
+ "content": {
+ "text/plain": {
+ "schema": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/project/{id}/background-upload/finalize": {
+ "post": {
+ "operationId": "finalizeProjectBackgroundUpload",
+ "tags": [
+ "Projects"
+ ],
+ "summary": "Finalize project background upload",
+ "description": "Save an uploaded image as the project's board background.",
+ "parameters": [
+ {
+ "schema": {
+ "type": "string"
+ },
+ "required": true,
+ "name": "id",
+ "in": "path"
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "key": {
+ "type": "string"
+ },
+ "contentType": {
+ "type": "string"
+ },
+ "version": {
+ "type": "string"
+ },
+ "size": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "key",
+ "contentType",
+ "version",
+ "size"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Finalized project background",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProjectBackgroundFinalize"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid image upload request, or unknown project",
+ "content": {
+ "text/plain": {
+ "schema": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Missing or invalid credentials"
+ },
+ "403": {
+ "description": "No workspace access, or missing project:update permission",
+ "content": {
+ "text/plain": {
+ "schema": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Project not found",
+ "content": {
+ "text/plain": {
+ "schema": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Failed to save the project background",
+ "content": {
+ "text/plain": {
+ "schema": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"/task/{id}/description": {
"get": {
"operationId": "getTaskDescriptionPage",
diff --git a/apps/web/src/components/board/board-toolbar.tsx b/apps/web/src/components/board/board-toolbar.tsx
index 76a32b5cc..0a835d80f 100644
--- a/apps/web/src/components/board/board-toolbar.tsx
+++ b/apps/web/src/components/board/board-toolbar.tsx
@@ -20,12 +20,14 @@ import {
type BoardFilters,
DUE_DATE_FILTER_VALUES,
} from "@/hooks/use-task-filters";
+import { cn } from "@/lib/cn";
import { getColumnIcon } from "@/lib/column";
import { getInitials } from "@/lib/get-initials";
import { getPriorityLabel } from "@/lib/i18n/domain";
import { resolveLabelColor } from "@/lib/label-color";
import { getPriorityIcon } from "@/lib/priority";
import type { SortConfig } from "@/lib/sort-tasks";
+import { useBackgroundStore } from "@/store/background";
import type { ProjectWithTasks } from "@/types/project";
type WorkspaceLabel = {
@@ -92,8 +94,16 @@ function ActiveFilterChip({
value,
onClear,
}: ActiveFilterChipProps) {
+ const { background } = useBackgroundStore();
return (
- <div className="inline-flex h-7 items-center rounded-md border border-border bg-background text-xs shadow-xs">
+ <div
+ className={cn(
+ "inline-flex h-7 items-center rounded-md border border-border bg-background text-xs shadow-xs",
+ {
+ "bg-accent": !!background,
+ },
+ )}
+ >
<span className="px-2 font-medium text-foreground">{subject}</span>
<span className="h-full w-px bg-border" />
<span className="px-2 text-foreground/80">{operator}</span>
@@ -158,6 +168,7 @@ export default function BoardToolbar({
const selectedPriorityIds = filters.priority ?? [];
const selectedAssigneeIds = filters.assignee ?? [];
const selectedDueDateFilters = filters.dueDate ?? [];
+ const { background } = useBackgroundStore();
const filterableCustomFields = customFieldDefinitions;
@@ -293,7 +304,12 @@ export default function BoardToolbar({
render={
<button
type="button"
- className="inline-flex h-7 items-center gap-1.5 rounded-md border border-border bg-background px-2.5 text-foreground text-xs font-medium outline-none ring-0 hover:bg-accent/60"
+ className={cn(
+ "inline-flex h-7 items-center gap-1.5 rounded-md border border-border bg-background px-2.5 text-foreground text-xs font-medium outline-none ring-0 hover:bg-accent/60",
+ {
+ "bg-accent hover:bg-input": !!background,
+ },
+ )}
/>
}
>
diff --git a/apps/web/src/components/common/layout.tsx b/apps/web/src/components/common/layout.tsx
index 3bfd8898a..77125892b 100644
--- a/apps/web/src/components/common/layout.tsx
+++ b/apps/web/src/components/common/layout.tsx
@@ -6,6 +6,7 @@ import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar";
import { isDemoMode } from "@/constants/urls";
import { useUserPreferencesEffects } from "@/hooks/use-user-preferences-effects";
import { cn } from "@/lib/cn";
+import { useBackgroundStore } from "@/store/background";
import { useUserPreferencesStore } from "@/store/user-preferences";
type LayoutProps = {
@@ -46,6 +47,7 @@ function LayoutContent({ children, className }: ContentProps) {
function Layout({ children, className }: LayoutProps) {
const { sidebarDefaultOpen } = useUserPreferencesStore();
+ const { background } = useBackgroundStore();
useUserPreferencesEffects();
@@ -64,8 +66,17 @@ function Layout({ children, className }: LayoutProps) {
<SidebarInset
className={cn(
"m-2 flex flex-1 flex-col overflow-auto rounded-xl border border-border/80 bg-background shadow-sm/5",
+ "md:peer-data-[variant=inset]:peer-data-[state=collapsed]:border-0",
+ {
+ "before:content-[''] before:absolute before:inset-0 before:bg-cover before:bg-center before:bg-(image:--bg) before:pointer-events-none":
+ background,
+ },
className,
)}
+ style={{
+ // @ts-expect-error variables are not typed by React
+ "--bg": `url(${background})`,
+ }}
>
{isDemoMode && <DemoAlert />}
{children}
diff --git a/apps/web/src/components/common/project-layout.tsx b/apps/web/src/components/common/project-layout.tsx
index e7304fa41..0d9a410df 100644
--- a/apps/web/src/components/common/project-layout.tsx
+++ b/apps/web/src/components/common/project-layout.tsx
@@ -25,6 +25,7 @@ import { shortcuts } from "@/constants/shortcuts";
import useGetProject from "@/hooks/queries/project/use-get-project";
import { useProjectWebSocket } from "@/hooks/use-project-websocket";
import { cn } from "@/lib/cn";
+import { useBackgroundStore } from "@/store/background";
type ProjectLayoutProps = {
projectId: string;
@@ -49,6 +50,7 @@ export default function ProjectLayout({
const { data: project } = useGetProject({ id: projectId, workspaceId });
const [isCreateProjectModalOpen, setIsCreateProjectModalOpen] =
useState(false);
+ const { background } = useBackgroundStore();
useProjectWebSocket(projectId);
@@ -109,7 +111,11 @@ export default function ProjectLayout({
return (
<Layout>
- <Layout.Header className="h-11 border-border/80 px-2">
+ <Layout.Header
+ className={cn("h-11 border-border/80 px-2", {
+ "bg-card/90 backdrop-blur": !!background,
+ })}
+ >
<div className="flex w-full items-center justify-between gap-2">
<div className="flex min-w-0 items-center gap-2">
<TooltipProvider>
diff --git a/apps/web/src/components/common/sort-control.tsx b/apps/web/src/components/common/sort-control.tsx
index 390d36ba5..5d68823c7 100644
--- a/apps/web/src/components/common/sort-control.tsx
+++ b/apps/web/src/components/common/sort-control.tsx
@@ -1,3 +1,4 @@
+import { cva } from "class-variance-authority";
import { ArrowDownAZ, ArrowUpAZ } from "lucide-react";
import { useTranslation } from "react-i18next";
import {
@@ -9,7 +10,9 @@ import {
DropdownMenuSeparator,
DropdownMenuTrigger,
} from "@/components/ui/menu";
+import { cn } from "@/lib/cn";
import type { SortConfig, SortDirection, SortField } from "@/lib/sort-tasks";
+import { useBackgroundStore } from "@/store/background";
type SortControlProps = {
sort: SortConfig;
@@ -30,8 +33,46 @@ function CheckSlot({ checked }: { checked: boolean }) {
);
}
+const sortControlVariants = cva(
+ "inline-flex h-7 items-center gap-1.5 rounded-md border px-2.5 text-xs font-medium outline-none ring-0",
+ {
+ variants: {
+ isActive: {
+ true: "text-primary",
+ false: "text-foreground",
+ },
+ backgroundImage: {
+ true: "",
+ },
+ },
+ compoundVariants: [
+ {
+ isActive: false,
+ backgroundImage: false,
+ class: "border-border bg-background hover:bg-accent/60",
+ },
+ {
+ isActive: true,
+ backgroundImage: false,
+ class: "border-primary/30 bg-primary/10 hover:bg-primary/15",
+ },
+ {
+ isActive: false,
+ backgroundImage: true,
+ class: "border-border bg-accent hover:bg-input",
+ },
+ {
+ isActive: true,
+ backgroundImage: true,
+ class: "border-primary/30 bg-primary/15 hover:bg-primary/20",
+ },
+ ],
+ },
+);
+
export default function SortControl({ sort, onSortChange }: SortControlProps) {
const { t } = useTranslation();
+ const { background } = useBackgroundStore();
const sortFields: { field: SortField; label: string }[] = [
{ field: "position", label: t("tasks:sort.fields.position") },
{ field: "createdAt", label: t("tasks:sort.fields.createdAt") },
@@ -67,11 +108,10 @@ export default function SortControl({ sort, onSortChange }: SortControlProps) {
render={
<button
type="button"
- className={`inline-flex h-7 items-center gap-1.5 rounded-md border px-2.5 text-xs font-medium outline-none ring-0 ${
- isActive
- ? "border-primary/30 bg-primary/10 text-primary hover:bg-primary/15"
- : "border-border bg-background text-foreground hover:bg-accent/60"
- }`}
+ className={sortControlVariants({
+ isActive,
+ backgroundImage: !!background,
+ })}
/>
}
>
@@ -131,7 +171,12 @@ export default function SortControl({ sort, onSortChange }: SortControlProps) {
<button
type="button"
onClick={toggleDirection}
- className="inline-flex h-7 w-7 items-center justify-center rounded-md border border-border bg-background text-foreground hover:bg-accent/60"
+ className={cn(
+ "inline-flex h-7 w-7 items-center justify-center rounded-md border border-border bg-background text-foreground hover:bg-accent/60",
+ {
+ "bg-accent hover:bg-input": !!background,
+ },
+ )}
title={
sort.direction === "asc"
? t("tasks:sort.ascending")
diff --git a/apps/web/src/components/kanban-board/column/index.tsx b/apps/web/src/components/kanban-board/column/index.tsx
index 0a5b9de24..6f6bd40d9 100644
--- a/apps/web/src/components/kanban-board/column/index.tsx
+++ b/apps/web/src/components/kanban-board/column/index.tsx
@@ -1,4 +1,6 @@
+import { cva } from "class-variance-authority";
import { useState } from "react";
+import { useBackgroundStore } from "@/store/background";
import type { ProjectWithTasks } from "@/types/project";
import { ColumnDropzone } from "./column-dropzone";
import { ColumnHeader } from "./column-header";
@@ -8,21 +10,63 @@ type ColumnProps = {
disableDragDrop?: boolean;
};
+export const columnVariants = cva(
+ "group relative flex h-full min-h-0 w-full flex-col rounded-xl transition-colors duration-150",
+ {
+ defaultVariants: {
+ isDropzoneOver: false,
+ backgroundImage: false,
+ },
+ variants: {
+ isDropzoneOver: {
+ true: "shadow-md",
+ false: "border-border/70 hover:border-border/90",
+ },
+ backgroundImage: {
+ true: "before:content-[''] before:absolute before:inset-0 before:rounded-[calc(var(--radius-xl)-1px)] before:pointer-events-none",
+ false: "",
+ },
+ },
+ compoundVariants: [
+ {
+ isDropzoneOver: false,
+ backgroundImage: false,
+ class: "border bg-muted/40 shadow-xs/5 dark:bg-card/90",
+ },
+ {
+ isDropzoneOver: true,
+ backgroundImage: false,
+ class: "border bg-accent/60 border-ring/40 ring-2 ring-ring/30",
+ },
+ {
+ isDropzoneOver: false,
+ backgroundImage: true,
+ class: "bg-background before:bg-muted before:dark:bg-card shadow-md",
+ },
+ {
+ isDropzoneOver: true,
+ backgroundImage: true,
+ class: "bg-background ring-2 ring-focus/60 before:bg-accent/60",
+ },
+ ],
+ },
+);
+
function Column({ column, disableDragDrop = false }: ColumnProps) {
const [isDropzoneOver, setIsDropzoneOver] = useState(false);
+ const { background } = useBackgroundStore();
return (
<div
- className={`group relative flex h-full min-h-0 w-full flex-col rounded-xl border transition-colors duration-150 ${
- isDropzoneOver
- ? "border-ring/40 bg-accent/60 shadow-md ring-2 ring-ring/30"
- : "border-border/70 bg-muted/40 shadow-xs/5 hover:border-border/90 dark:bg-card/90"
- }`}
+ className={columnVariants({
+ isDropzoneOver,
+ backgroundImage: !!background,
+ })}
>
<div className="shrink-0 border-b border-border/60 px-3 py-2">
<ColumnHeader column={column} />
</div>
- <div className="min-h-0 flex-1 overflow-y-auto overflow-x-hidden px-2 py-1 [-webkit-overflow-scrolling:touch]">
+ <div className="min-h-0 flex-1 overflow-y-auto overflow-x-hidden px-2 pt-1 pb-2 [-webkit-overflow-scrolling:touch]">
<ColumnDropzone
column={column}
disableDragDrop={disableDragDrop}
diff --git a/apps/web/src/components/kanban-board/index.tsx b/apps/web/src/components/kanban-board/index.tsx
index 80f877574..1146c855c 100644
--- a/apps/web/src/components/kanban-board/index.tsx
+++ b/apps/web/src/components/kanban-board/index.tsx
@@ -19,6 +19,9 @@ import { produce } from "immer";
import { useEffect, useState } from "react";
import { useUpdateTask } from "@/hooks/mutations/task/use-update-task";
import { useRegisterShortcuts } from "@/hooks/use-keyboard-shortcuts";
+import { useProjectBackground } from "@/hooks/use-project-background";
+import { cn } from "@/lib/cn";
+import { useBackgroundStore } from "@/store/background";
import useBulkSelectionStore from "@/store/bulk-selection";
import useProjectStore from "@/store/project";
import type { ProjectWithTasks } from "@/types/project";
@@ -43,8 +46,22 @@ function KanbanBoard({ project, disableDragDrop = false }: KanbanBoardProps) {
} = useBulkSelectionStore();
const [activeId, setActiveId] = useState<UniqueIdentifier | null>(null);
const { mutate: updateTask } = useUpdateTask();
+ const background = useProjectBackground({
+ backgroundVersion: project.backgroundVersion,
+ projectId: project.id,
+ viewMode: "board",
+ });
+ const backgroundStore = useBackgroundStore();
const navigate = useNavigate();
+ useEffect(() => {
+ backgroundStore.setBackground(background);
+ }, [background, backgroundStore.setBackground]);
+
+ useEffect(() => {
+ return () => backgroundStore.setBackground(null);
+ }, [backgroundStore.setBackground]);
+
useEffect(() => {
if (project?.columns) {
const allTaskIds = project.columns.flatMap((column) =>
@@ -248,13 +265,19 @@ function KanbanBoard({ project, disableDragDrop = false }: KanbanBoardProps) {
onDragStart={handleDragStart}
onDragEnd={handleDragEnd}
>
- <div className="flex h-full w-full flex-col bg-linear-to-b from-muted/20 to-background">
+ <div
+ className={cn("flex h-full w-full flex-col", {
+ "bg-linear-to-b from-muted/20 to-background": !background,
+ })}
+ >
<div className="min-h-0 flex-1 overflow-x-auto [-webkit-overflow-scrolling:touch]">
<div className="flex h-full min-w-max gap-4 px-4 py-4 md:px-5">
{project.columns?.map((column) => (
<div
key={column.id}
- className="h-full max-w-96 min-w-80 shrink-0 flex-1"
+ className={cn("h-full max-w-96 min-w-80 shrink-0 flex-1", {
+ "h-fit": !!background,
+ })}
>
<Column column={column} disableDragDrop={disableDragDrop} />
</div>
diff --git a/apps/web/src/components/ui/sidebar.tsx b/apps/web/src/components/ui/sidebar.tsx
index 34f55c2c0..63f32f45e 100644
--- a/apps/web/src/components/ui/sidebar.tsx
+++ b/apps/web/src/components/ui/sidebar.tsx
@@ -332,7 +332,8 @@ function SidebarInset({ className, ...props }: React.ComponentProps<"main">) {
<main
className={cn(
"relative flex w-full flex-1 flex-col bg-background",
- "md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ms-2 md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ms-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm/5",
+ "transition-[margin,border-radius,border-width] duration-200 ease-in-out",
+ "md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ms-2 md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:peer-data-[state=collapsed]:m-0 md:peer-data-[variant=inset]:ms-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:peer-data-[state=collapsed]:rounded-none md:peer-data-[variant=inset]:shadow-sm/5",
className,
)}
data-slot="sidebar-inset"
diff --git a/apps/web/src/fetchers/project/background.test.ts b/apps/web/src/fetchers/project/background.test.ts
new file mode 100644
index 000000000..478761098
--- /dev/null
+++ b/apps/web/src/fetchers/project/background.test.ts
@@ -0,0 +1,110 @@
+import { beforeEach, describe, expect, it, vi } from "vitest";
+import { removeProjectBackground, uploadProjectBackground } from "./background";
+
+const mocks = vi.hoisted(() => ({
+ createUpload: vi.fn(),
+ finalizeUpload: vi.fn(),
+ remove: vi.fn(),
+}));
+
+vi.mock("@kaneo/libs", () => ({
+ client: {
+ project: {
+ ":id": {
+ "background-upload": {
+ $put: mocks.createUpload,
+ finalize: { $post: mocks.finalizeUpload },
+ },
+ background: { $delete: mocks.remove },
+ },
+ },
+ },
+}));
+
+describe("project background fetchers", () => {
+ beforeEach(() => {
+ vi.restoreAllMocks();
+ mocks.createUpload.mockReset();
+ mocks.finalizeUpload.mockReset();
+ mocks.remove.mockReset();
+ });
+
+ it("uploads the file with the signed headers before finalizing it", async () => {
+ const file = new File(["image bytes"], "board.png", {
+ type: "image/png",
+ });
+ mocks.createUpload.mockResolvedValue({
+ ok: true,
+ json: async () => ({
+ key: "workspace/ws/project/project-1/backgrounds/background-v1",
+ uploadUrl: "https://storage.example.test/upload",
+ version: "v1",
+ headers: { "Content-Type": "image/png" },
+ }),
+ });
+ const storageFetch = vi
+ .spyOn(globalThis, "fetch")
+ .mockResolvedValue(new Response(null, { status: 200 }));
+ mocks.finalizeUpload.mockResolvedValue({
+ ok: true,
+ json: async () => ({ url: "/api/project/project-1/background?v=v1" }),
+ });
+
+ await expect(uploadProjectBackground("project-1", file)).resolves.toEqual({
+ url: "/api/project/project-1/background?v=v1",
+ });
+
+ expect(mocks.createUpload).toHaveBeenCalledWith({
+ param: { id: "project-1" },
+ json: { contentType: "image/png", size: file.size },
+ });
+ expect(storageFetch).toHaveBeenCalledWith(
+ "https://storage.example.test/upload",
+ {
+ method: "PUT",
+ headers: { "Content-Type": "image/png" },
+ body: file,
+ },
+ );
+ expect(mocks.finalizeUpload).toHaveBeenCalledWith({
+ param: { id: "project-1" },
+ json: {
+ key: "workspace/ws/project/project-1/backgrounds/background-v1",
+ contentType: "image/png",
+ size: file.size,
+ version: "v1",
+ },
+ });
+ });
+
+ it("does not finalize when object storage rejects the upload", async () => {
+ const file = new File(["image bytes"], "board.png", {
+ type: "image/png",
+ });
+ mocks.createUpload.mockResolvedValue({
+ ok: true,
+ json: async () => ({
+ key: "background-v1",
+ uploadUrl: "https://storage.example.test/upload",
+ version: "v1",
+ headers: { "Content-Type": "image/png" },
+ }),
+ });
+ vi.spyOn(globalThis, "fetch").mockResolvedValue(
+ new Response(null, { status: 413 }),
+ );
+
+ await expect(uploadProjectBackground("project-1", file)).rejects.toThrow();
+ expect(mocks.finalizeUpload).not.toHaveBeenCalled();
+ });
+
+ it("removes the project background", async () => {
+ mocks.remove.mockResolvedValue({ ok: true });
+
+ await removeProjectBackground("project-1");
+
+ expect(mocks.remove).toHaveBeenCalledWith({
+ param: { id: "project-1" },
+ });
+ });
+});
diff --git a/apps/web/src/fetchers/project/background.ts b/apps/web/src/fetchers/project/background.ts
new file mode 100644
index 000000000..472e4e180
--- /dev/null
+++ b/apps/web/src/fetchers/project/background.ts
@@ -0,0 +1,40 @@
+import { client } from "@kaneo/libs";
+
+export async function uploadProjectBackground(projectId: string, file: File) {
+ const uploadResponse = await client.project[":id"]["background-upload"].$put({
+ param: { id: projectId },
+ json: { contentType: file.type, size: file.size },
+ });
+
+ if (!uploadResponse.ok) throw new Error(await uploadResponse.text());
+ const upload = await uploadResponse.json();
+
+ const storageResponse = await fetch(upload.uploadUrl, {
+ method: "PUT",
+ headers: upload.headers,
+ body: file,
+ });
+ if (!storageResponse.ok) throw new Error();
+
+ const finalizeResponse = await client.project[":id"][
+ "background-upload"
+ ].finalize.$post({
+ param: { id: projectId },
+ json: {
+ key: upload.key,
+ contentType: file.type,
+ size: file.size,
+ version: upload.version,
+ },
+ });
+ if (!finalizeResponse.ok) throw new Error(await finalizeResponse.text());
+
+ return finalizeResponse.json();
+}
+
+export async function removeProjectBackground(projectId: string) {
+ const response = await client.project[":id"].background.$delete({
+ param: { id: projectId },
+ });
+ if (!response.ok) throw new Error(await response.text());
+}
diff --git a/apps/web/src/hooks/mutations/project/use-remove-project-background.ts b/apps/web/src/hooks/mutations/project/use-remove-project-background.ts
new file mode 100644
index 000000000..61ccd1da3
--- /dev/null
+++ b/apps/web/src/hooks/mutations/project/use-remove-project-background.ts
@@ -0,0 +1,25 @@
+import { useMutation, useQueryClient } from "@tanstack/react-query";
+import { useTranslation } from "react-i18next";
+import { removeProjectBackground } from "@/fetchers/project/background";
+import { toast } from "@/lib/toast";
+
+function useRemoveProjectBackground() {
+ const { t } = useTranslation();
+ const queryClient = useQueryClient();
+
+ return useMutation({
+ mutationFn: removeProjectBackground,
+ onSuccess: async (_data, projectId) => {
+ await Promise.all([
+ queryClient.invalidateQueries({ queryKey: ["tasks", projectId] }),
+ queryClient.invalidateQueries({ queryKey: ["projects"] }),
+ ]);
+ toast.success(t("settings:projectGeneral.backgroundRemoveSuccess"));
+ },
+ onError: () => {
+ toast.error(t("settings:projectGeneral.backgroundRemoveError"));
+ },
+ });
+}
+
+export default useRemoveProjectBackground;
diff --git a/apps/web/src/hooks/mutations/project/use-upload-project-background.ts b/apps/web/src/hooks/mutations/project/use-upload-project-background.ts
new file mode 100644
index 000000000..61fb62582
--- /dev/null
+++ b/apps/web/src/hooks/mutations/project/use-upload-project-background.ts
@@ -0,0 +1,31 @@
+import { useMutation, useQueryClient } from "@tanstack/react-query";
+import { useTranslation } from "react-i18next";
+import { uploadProjectBackground } from "@/fetchers/project/background";
+import { toast } from "@/lib/toast";
+
+type UploadProjectBackgroundVariables = {
+ projectId: string;
+ file: File;
+};
+
+function useUploadProjectBackground() {
+ const { t } = useTranslation();
+ const queryClient = useQueryClient();
+
+ return useMutation({
+ mutationFn: ({ projectId, file }: UploadProjectBackgroundVariables) =>
+ uploadProjectBackground(projectId, file),
+ onSuccess: async (_data, { projectId }) => {
+ await Promise.all([
+ queryClient.invalidateQueries({ queryKey: ["tasks", projectId] }),
+ queryClient.invalidateQueries({ queryKey: ["projects"] }),
+ ]);
+ toast.success(t("settings:projectGeneral.backgroundUploadSuccess"));
+ },
+ onError: () => {
+ toast.error(t("settings:projectGeneral.backgroundUploadError"));
+ },
+ });
+}
+
+export default useUploadProjectBackground;
diff --git a/apps/web/src/hooks/use-project-background.test.tsx b/apps/web/src/hooks/use-project-background.test.tsx
new file mode 100644
index 000000000..d2dfc81f2
--- /dev/null
+++ b/apps/web/src/hooks/use-project-background.test.tsx
@@ -0,0 +1,59 @@
+import { renderHook } from "@testing-library/react";
+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
+import { useProjectBackground } from "./use-project-background";
+
+const preferences = vi.hoisted(() => ({ showProjectBackgrounds: true }));
+
+vi.mock("@/store/user-preferences", () => ({
+ useUserPreferencesStore: () => preferences,
+}));
+
+describe("useProjectBackground", () => {
+ beforeEach(() => {
+ vi.stubEnv("VITE_API_URL", "https://api.example.test");
+ preferences.showProjectBackgrounds = true;
+ });
+
+ afterEach(() => {
+ vi.unstubAllEnvs();
+ });
+
+ it("returns a versioned API URL for board backgrounds", () => {
+ const { result } = renderHook(() =>
+ useProjectBackground({
+ projectId: "project-1",
+ backgroundVersion: "version with spaces",
+ viewMode: "board",
+ }),
+ );
+
+ expect(result.current).toBe(
+ "https://api.example.test/api/project/project-1/background?v=version%20with%20spaces",
+ );
+ });
+
+ it.each([
+ { projectId: undefined, backgroundVersion: "v1", viewMode: "board" },
+ { projectId: "project-1", backgroundVersion: null, viewMode: "board" },
+ { projectId: "project-1", backgroundVersion: "v1", viewMode: "list" },
+ ] as const)("returns null when the background is not applicable", (props) => {
+ const { result } = renderHook(() => useProjectBackground(props));
+
+ expect(result.current).toBeNull();
+ });
+
+ it("reacts to the background visibility preference", () => {
+ const { result, rerender } = renderHook(() =>
+ useProjectBackground({
+ projectId: "project-1",
+ backgroundVersion: "v1",
+ viewMode: "board",
+ }),
+ );
+
+ preferences.showProjectBackgrounds = false;
+ rerender();
+
+ expect(result.current).toBeNull();
+ });
+});
diff --git a/apps/web/src/hooks/use-project-background.ts b/apps/web/src/hooks/use-project-background.ts
new file mode 100644
index 000000000..ab07c97fe
--- /dev/null
+++ b/apps/web/src/hooks/use-project-background.ts
@@ -0,0 +1,31 @@
+import { useMemo } from "react";
+import { getApiUrl } from "@/fetchers/get-api-url";
+import { useUserPreferencesStore } from "@/store/user-preferences";
+
+export type UseProjectBackground = {
+ backgroundVersion?: string | null;
+ projectId?: string;
+ viewMode?: "list" | "board";
+};
+
+export function useProjectBackground({
+ backgroundVersion,
+ viewMode,
+ projectId,
+}: UseProjectBackground): string | null {
+ const { showProjectBackgrounds } = useUserPreferencesStore();
+ const shouldShowBackground =
+ showProjectBackgrounds &&
+ backgroundVersion &&
+ viewMode === "board" &&
+ projectId;
+
+ const backgroundUrl = useMemo(() => {
+ if (!shouldShowBackground) return null;
+ return getApiUrl(
+ `project/${projectId}/background?v=${encodeURIComponent(backgroundVersion)}`,
+ );
+ }, [shouldShowBackground, backgroundVersion, projectId]);
+
+ return backgroundUrl;
+}
diff --git a/apps/web/src/hooks/use-project-websocket.ts b/apps/web/src/hooks/use-project-websocket.ts
index 6fd803d5a..82033e8b9 100644
--- a/apps/web/src/hooks/use-project-websocket.ts
+++ b/apps/web/src/hooks/use-project-websocket.ts
@@ -81,12 +81,18 @@ export function useProjectWebSocket(projectId: string) {
message.type === "TASK_LABEL_UPDATED" ||
message.type === "TASK_MOVED" ||
message.type === "TASK_RELATION_UPDATED" ||
- message.type === "COMMENT_UPDATED"
+ message.type === "COMMENT_UPDATED" ||
+ message.type === "PROJECT_UPDATED"
) {
queryClient.invalidateQueries({
queryKey: ["tasks", message.projectId],
});
+ if (message.type === "PROJECT_UPDATED") {
+ queryClient.invalidateQueries({ queryKey: ["projects"] });
+ return;
+ }
+
if (message.type === "TASK_RELATION_UPDATED") {
if (message.sourceTaskId) {
queryClient.invalidateQueries({
diff --git a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/account/preferences.tsx b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/account/preferences.tsx
index 0e3defd41..e6de0b44c 100644
--- a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/account/preferences.tsx
+++ b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/account/preferences.tsx
@@ -63,6 +63,8 @@ function RouteComponent() {
setShowLabels,
showPriority,
setShowPriority,
+ showProjectBackgrounds,
+ setShowProjectBackgrounds,
resetDisplayPreferences,
sidebarDefaultOpen,
setSidebarDefaultOpen,
@@ -259,7 +261,31 @@ function RouteComponent() {
<div className="flex items-center justify-between">
<div className="space-y-0.5">
- <Label className="text-sm font-medium">
+ <Label
+ className="text-sm font-medium"
+ htmlFor="show-project-backgrounds"
+ >
+ {t("settings:preferencesPage.projectBackgrounds")}
+ </Label>
+ <p className="text-xs text-muted-foreground">
+ {t("settings:preferencesPage.projectBackgroundsDescription")}
+ </p>
+ </div>
+ <Switch
+ id="show-project-backgrounds"
+ checked={showProjectBackgrounds}
+ onCheckedChange={setShowProjectBackgrounds}
+ />
+ </div>
+
+ <Separator />
+
+ <div className="flex items-center justify-between">
+ <div className="space-y-0.5">
+ <Label
+ className="text-sm font-medium"
+ htmlFor="sidebar-default-open"
+ >
{t("settings:preferencesPage.sidebarDefault")}
</Label>
<p className="text-xs text-muted-foreground">
@@ -267,6 +293,7 @@ function RouteComponent() {
</p>
</div>
<Switch
+ id="sidebar-default-open"
checked={sidebarDefaultOpen}
onCheckedChange={setSidebarDefaultOpen}
/>
@@ -298,7 +325,10 @@ function RouteComponent() {
<div className="space-y-4 border border-border rounded-md p-4 bg-sidebar">
<div className="flex items-center justify-between">
<div className="space-y-0.5">
- <Label className="text-sm font-medium">
+ <Label
+ className="text-sm font-medium"
+ htmlFor="show-task-numbers"
+ >
{t("settings:preferencesPage.taskNumbers")}
</Label>
<p className="text-xs text-muted-foreground">
@@ -306,6 +336,7 @@ function RouteComponent() {
</p>
</div>
<Switch
+ id="show-task-numbers"
checked={showTaskNumbers}
onCheckedChange={setShowTaskNumbers}
/>
@@ -315,7 +346,7 @@ function RouteComponent() {
<div className="flex items-center justify-between">
<div className="space-y-0.5">
- <Label className="text-sm font-medium">
+ <Label className="text-sm font-medium" htmlFor="show-asignees">
{t("settings:preferencesPage.assignees")}
</Label>
<p className="text-xs text-muted-foreground">
@@ -323,6 +354,7 @@ function RouteComponent() {
</p>
</div>
<Switch
+ id="show-asignees"
checked={showAssignees}
onCheckedChange={setShowAssignees}
/>
@@ -332,42 +364,54 @@ function RouteComponent() {
<div className="flex items-center justify-between">
<div className="space-y-0.5">
- <Label className="text-sm font-medium">
+ <Label className="text-sm font-medium" htmlFor="show-due-dates">
{t("settings:preferencesPage.dueDates")}
</Label>
<p className="text-xs text-muted-foreground">
{t("settings:preferencesPage.dueDatesDescription")}
</p>
</div>
- <Switch checked={showDueDates} onCheckedChange={setShowDueDates} />
+ <Switch
+ id="show-due-dates"
+ checked={showDueDates}
+ onCheckedChange={setShowDueDates}
+ />
</div>
<Separator />
<div className="flex items-center justify-between">
<div className="space-y-0.5">
- <Label className="text-sm font-medium">
+ <Label className="text-sm font-medium" htmlFor="show-labels">
{t("settings:preferencesPage.labels")}
</Label>
<p className="text-xs text-muted-foreground">
{t("settings:preferencesPage.labelsDescription")}
</p>
</div>
- <Switch checked={showLabels} onCheckedChange={setShowLabels} />
+ <Switch
+ id="show-labels"
+ checked={showLabels}
+ onCheckedChange={setShowLabels}
+ />
</div>
<Separator />
<div className="flex items-center justify-between">
<div className="space-y-0.5">
- <Label className="text-sm font-medium">
+ <Label className="text-sm font-medium" htmlFor="show-priority">
{t("settings:preferencesPage.priority")}
</Label>
<p className="text-xs text-muted-foreground">
{t("settings:preferencesPage.priorityDescription")}
</p>
</div>
- <Switch checked={showPriority} onCheckedChange={setShowPriority} />
+ <Switch
+ id="show-priority"
+ checked={showPriority}
+ onCheckedChange={setShowPriority}
+ />
</div>
</div>
</div>
diff --git a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/projects/$projectId/general.tsx b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/projects/$projectId/general.tsx
index b4e1a1125..cfc4c42ec 100644
--- a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/projects/$projectId/general.tsx
+++ b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/projects/$projectId/general.tsx
@@ -5,7 +5,15 @@ import {
useNavigate,
useParams,
} from "@tanstack/react-router";
-import { useCallback, useEffect, useMemo, useRef, useState } from "react";
+import { ImageUp, Trash2 } from "lucide-react";
+import {
+ type ChangeEvent,
+ useCallback,
+ useEffect,
+ useMemo,
+ useRef,
+ useState,
+} from "react";
import { useForm } from "react-hook-form";
import { useTranslation } from "react-i18next";
import { z } from "zod";
@@ -44,9 +52,12 @@ import {
} from "@/components/ui/select";
import { Separator } from "@/components/ui/separator";
import icons from "@/constants/project-icons";
+import { getApiUrl } from "@/fetchers/get-api-url";
import useDeleteProject from "@/hooks/mutations/project/use-delete-project";
import useMoveProject from "@/hooks/mutations/project/use-move-project";
+import useRemoveProjectBackground from "@/hooks/mutations/project/use-remove-project-background";
import useUpdateProject from "@/hooks/mutations/project/use-update-project";
+import useUploadProjectBackground from "@/hooks/mutations/project/use-upload-project-background";
import { useGetTasks } from "@/hooks/queries/task/use-get-tasks";
import useActiveWorkspace from "@/hooks/queries/workspace/use-active-workspace";
import useGetWorkspaces from "@/hooks/queries/workspace/use-get-workspaces";
@@ -126,6 +137,7 @@ function RouteComponent() {
const [isDeleteModalOpen, setIsDeleteModalOpen] = useState(false);
const [iconPopoverOpen, setIconPopoverOpen] = useState(false);
const [iconSearch, setIconSearch] = useState("");
+ const backgroundInputRef = useRef<HTMLInputElement>(null);
// Deliberately outside `projectForm`: the form auto-saves on every change,
// and the target workspace must only be applied from the confirm dialog.
const [targetWorkspaceId, setTargetWorkspaceId] = useState("");
@@ -149,6 +161,11 @@ function RouteComponent() {
const { mutateAsync: updateProject } = useUpdateProject();
const { mutateAsync: deleteProject, isPending: isDeleting } =
useDeleteProject();
+ const { mutate: uploadProjectBackground, isPending: isUploadingBackground } =
+ useUploadProjectBackground();
+ const { mutate: removeProjectBackground, isPending: isRemovingBackground } =
+ useRemoveProjectBackground();
+ const isUpdatingBackground = isUploadingBackground || isRemovingBackground;
const { mutateAsync: moveProject, isPending: isMoving } = useMoveProject();
const { data: workspaces } = useGetWorkspaces();
// Filtered against the project's own workspace rather than the active one:
@@ -478,6 +495,23 @@ function RouteComponent() {
t,
]);
+ const handleBackgroundChange = useCallback(
+ (event: ChangeEvent<HTMLInputElement>) => {
+ const file = event.target.files?.[0];
+ event.target.value = "";
+ if (!file || !project?.id) return;
+
+ uploadProjectBackground({ projectId: project.id, file });
+ },
+ [project?.id, uploadProjectBackground],
+ );
+
+ const handleRemoveBackground = useCallback(() => {
+ if (!project?.id) return;
+
+ removeProjectBackground(project.id);
+ }, [project?.id, removeProjectBackground]);
+
return (
<>
<PageTitle title={t("settings:projectGeneral.pageTitle")} />
@@ -696,6 +730,60 @@ function RouteComponent() {
/>
</form>
</Form>
+ <Separator />
+ <div className="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between sm:gap-4">
+ <div className="space-y-0.5">
+ <p className="text-sm font-medium">
+ {t("settings:projectGeneral.backgroundLabel")}
+ </p>
+ <p className="text-xs text-muted-foreground">
+ {t("settings:projectGeneral.backgroundHint")}
+ </p>
+ </div>
+ <div className="flex items-center gap-2">
+ {project?.backgroundVersion && (
+ <img
+ src={getApiUrl(
+ `project/${project.id}/background?v=${encodeURIComponent(project.backgroundVersion)}`,
+ )}
+ alt=""
+ className="h-9 w-16 rounded border border-border object-cover"
+ />
+ )}
+ <input
+ ref={backgroundInputRef}
+ type="file"
+ accept="image/apng,image/avif,image/gif,image/heic,image/heif,image/jpeg,image/jpg,image/png,image/webp"
+ className="hidden"
+ onChange={handleBackgroundChange}
+ />
+ <Button
+ type="button"
+ variant="outline"
+ size="sm"
+ disabled={!canEdit || isUpdatingBackground}
+ onClick={() => backgroundInputRef.current?.click()}
+ >
+ <ImageUp className="size-4" />
+ {project?.backgroundVersion
+ ? t("settings:projectGeneral.backgroundReplace")
+ : t("settings:projectGeneral.backgroundUpload")}
+ </Button>
+ {project?.backgroundVersion && (
+ <Button
+ type="button"
+ variant="ghost"
+ size="sm"
+ disabled={!canEdit || isUpdatingBackground}
+ onClick={handleRemoveBackground}
+ aria-label={t("settings:projectGeneral.backgroundRemove")}
+ >
+ <Trash2 className="size-4" />
+ </Button>
+ )}
+ </div>
+ </div>
+
<Separator />
<div className="flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between sm:gap-4">
<div className="space-y-0.5">
diff --git a/apps/web/src/routes/_layout/_authenticated/dashboard/workspace/$workspaceId/project/$projectId/board.tsx b/apps/web/src/routes/_layout/_authenticated/dashboard/workspace/$workspaceId/project/$projectId/board.tsx
index e96c46286..34b22d965 100644
--- a/apps/web/src/routes/_layout/_authenticated/dashboard/workspace/$workspaceId/project/$projectId/board.tsx
+++ b/apps/web/src/routes/_layout/_authenticated/dashboard/workspace/$workspaceId/project/$projectId/board.tsx
@@ -21,7 +21,9 @@ import { useGetActiveWorkspaceUsers } from "@/hooks/queries/workspace-users/use-
import { useBoardSort } from "@/hooks/use-board-sort";
import { useRegisterShortcuts } from "@/hooks/use-keyboard-shortcuts";
import { useTaskFiltersWithLabelsSupport } from "@/hooks/use-task-filters-with-labels-support";
+import { cn } from "@/lib/cn";
import { sortTasks } from "@/lib/sort-tasks";
+import { useBackgroundStore } from "@/store/background";
import useProjectStore from "@/store/project";
import { useUserPreferencesStore } from "@/store/user-preferences";
@@ -93,6 +95,7 @@ function RouteComponent() {
const [boardSearchInput, setBoardSearchInput] =
useState<HTMLInputElement | null>(null);
const { sort, setSort } = useBoardSort(projectId);
+ const { background } = useBackgroundStore();
const { data: users } = useGetActiveWorkspaceUsers(workspaceId);
const { data: workspaceLabels = [] } = useGetLabelsByWorkspace(workspaceId);
@@ -297,7 +300,11 @@ function RouteComponent() {
</p>
)}
- <div className="flex h-full flex-1 overflow-hidden bg-background">
+ <div
+ className={cn("flex h-full flex-1 overflow-hidden", {
+ "bg-background": !background,
+ })}
+ >
{sortedProject ? (
viewMode === "board" ? (
<KanbanBoard
diff --git a/apps/web/src/store/background.ts b/apps/web/src/store/background.ts
new file mode 100644
index 000000000..8ad83b744
--- /dev/null
+++ b/apps/web/src/store/background.ts
@@ -0,0 +1,11 @@
+import { create } from "zustand";
+
+type BackgroundStore = {
+ background: string | null;
+ setBackground: (background: string | null) => void;
+};
+
+export const useBackgroundStore = create<BackgroundStore>((set) => ({
+ background: null,
+ setBackground: (background) => set({ background }),
+}));
diff --git a/apps/web/src/store/user-preferences.ts b/apps/web/src/store/user-preferences.ts
index 36a83c7ee..c81949fc2 100644
--- a/apps/web/src/store/user-preferences.ts
+++ b/apps/web/src/store/user-preferences.ts
@@ -36,6 +36,8 @@ type UserPreferencesStore = {
showPriority: boolean;
setShowPriority: (show: boolean) => void;
togglePriority: () => void;
+ showProjectBackgrounds: boolean;
+ setShowProjectBackgrounds: (show: boolean) => void;
showTaskItemCounts: boolean;
setShowTaskItemCounts: (show: boolean) => void;
toggleTaskItemCounts: () => void;
@@ -104,6 +106,9 @@ export const useUserPreferencesStore = create<UserPreferencesStore>()(
setShowPriority: (show) => set({ showPriority: show }),
togglePriority: () =>
set((state) => ({ showPriority: !state.showPriority })),
+ showProjectBackgrounds: true,
+ setShowProjectBackgrounds: (show) =>
+ set({ showProjectBackgrounds: show }),
showTaskItemCounts: true,
setShowTaskItemCounts: (show) => set({ showTaskItemCounts: show }),
toggleTaskItemCounts: () =>
diff --git a/apps/web/src/test/setup.ts b/apps/web/src/test/setup.ts
index f149f27ae..262195016 100644
--- a/apps/web/src/test/setup.ts
+++ b/apps/web/src/test/setup.ts
@@ -1 +1,25 @@
import "@testing-library/jest-dom/vitest";
+
+// Node can expose an incomplete global localStorage when it is launched with
+// --localstorage-file but no usable path. Because that property takes
+// precedence over jsdom's implementation, tests then receive an object without
+// the Storage methods. Install a small in-memory implementation only in that
+// broken environment.
+if (typeof globalThis.localStorage?.clear !== "function") {
+ const values = new Map<string, string>();
+ const localStorage: Storage = {
+ get length() {
+ return values.size;
+ },
+ clear: () => values.clear(),
+ getItem: (key) => values.get(key) ?? null,
+ key: (index) => [...values.keys()][index] ?? null,
+ removeItem: (key) => values.delete(key),
+ setItem: (key, value) => values.set(key, String(value)),
+ };
+
+ Object.defineProperty(globalThis, "localStorage", {
+ configurable: true,
+ value: localStorage,
+ });
+}
diff --git a/apps/web/src/types/project/index.ts b/apps/web/src/types/project/index.ts
index 70c553bcd..b8158b5ab 100644
--- a/apps/web/src/types/project/index.ts
+++ b/apps/web/src/types/project/index.ts
@@ -16,8 +16,10 @@ type ProjectWithTasksRaw = TasksApiResponse["data"];
export type ProjectWithTasks = Omit<
ProjectWithTasksRaw,
- "archivedTasks" | "columns" | "plannedTasks"
+ "archivedTasks" | "backgroundVersion" | "columns" | "plannedTasks"
> & {
+ // Older cache fixtures and persisted query data predate board backgrounds.
+ backgroundVersion?: string | null;
archivedTasks: Task[];
columns: Array<
Omit<ProjectWithTasksRaw["columns"][number], "tasks"> & {
diff --git a/biome.json b/biome.json
index cc8a450c6..6614756b0 100644
--- a/biome.json
+++ b/biome.json
@@ -27,7 +27,8 @@
"!**/.claude",
"!**/.pi",
"!**/.pi-subagents",
- "!**/openapi.json"
+ "!**/openapi.json",
+ "!**/drizzle/meta/**"
]
},
"formatter": {
diff --git a/i18n/az-AZ.json b/i18n/az-AZ.json
index b4c6c5e94..02296b8fd 100644
--- a/i18n/az-AZ.json
+++ b/i18n/az-AZ.json
@@ -559,7 +559,9 @@
"labels": "Etiketlər",
"labelsDescription": "Tapşırıq etiketlərini göstər",
"priority": "Prioritet",
- "priorityDescription": "Prioritet göstəricilərini göstər"
+ "priorityDescription": "Prioritet göstəricilərini göstər",
+ "projectBackgrounds": "Project backgrounds",
+ "projectBackgroundsDescription": "Show project background images on boards"
},
"developerPage": {
"pageTitle": "Proqramçı parametrləri",
@@ -943,6 +945,15 @@
},
"importExportTasks": "İdxal/ixrac",
"importExportTasksDescription": "Tapşırıqları idxal və ixrac edin.",
+ "backgroundHint": "Choose an image shown behind this project's board.",
+ "backgroundLabel": "Board background",
+ "backgroundRemove": "Remove image",
+ "backgroundRemoveError": "Failed to remove project background",
+ "backgroundRemoveSuccess": "Project background removed",
+ "backgroundReplace": "Replace image",
+ "backgroundUpload": "Upload image",
+ "backgroundUploadError": "Failed to update project background",
+ "backgroundUploadSuccess": "Project background updated",
"moveModalConfirm": "Move Project",
"moveModalDescription": "This will move the project \"{{name}}\" and all of its tasks to \"{{workspace}}\". Tasks assigned to people who aren't members of that workspace will be unassigned, and notification subscriptions for this project will be cleared.",
"moveModalTitle": "Move Project?",
diff --git a/i18n/de-DE.json b/i18n/de-DE.json
index f10f631c6..d769af2eb 100644
--- a/i18n/de-DE.json
+++ b/i18n/de-DE.json
@@ -639,7 +639,9 @@
"labels": "Labels",
"labelsDescription": "Aufgabenlabels und Tags anzeigen",
"priority": "Priorität",
- "priorityDescription": "Prioritätsindikatoren anzeigen"
+ "priorityDescription": "Prioritätsindikatoren anzeigen",
+ "projectBackgrounds": "Project backgrounds",
+ "projectBackgroundsDescription": "Show project background images on boards"
},
"developerPage": {
"pageTitle": "Entwicklereinstellungen",
@@ -788,6 +790,15 @@
},
"importExportTasks": "Import/Export",
"importExportTasksDescription": "Importieren und Exportieren von Aufgaben.",
+ "backgroundHint": "Choose an image shown behind this project's board.",
+ "backgroundLabel": "Board background",
+ "backgroundRemove": "Remove image",
+ "backgroundRemoveError": "Failed to remove project background",
+ "backgroundRemoveSuccess": "Project background removed",
+ "backgroundReplace": "Replace image",
+ "backgroundUpload": "Upload image",
+ "backgroundUploadError": "Failed to update project background",
+ "backgroundUploadSuccess": "Project background updated",
"moveModalConfirm": "Projekt verschieben",
"moveModalDescription": "Dadurch werden das Projekt \"{{name}}\" und alle zugehörigen Aufgaben nach \"{{workspace}}\" verschoben. Bei Aufgaben, die Personen zugewiesen sind, die kein Mitglied dieses Workspaces sind, wird die Zuweisung aufgehoben, und Benachrichtigungs-Abonnements für dieses Projekt werden entfernt.",
"moveModalTitle": "Projekt verschieben?",
diff --git a/i18n/el-GR.json b/i18n/el-GR.json
index 9ed9c3996..5eb3e8704 100644
--- a/i18n/el-GR.json
+++ b/i18n/el-GR.json
@@ -559,7 +559,9 @@
"labels": "Ετικέτες",
"labelsDescription": "Εμφάνιση ετικετών και tags εργασιών",
"priority": "Προτεραιότητα",
- "priorityDescription": "Εμφάνιση ενδείξεων προτεραιότητας"
+ "priorityDescription": "Εμφάνιση ενδείξεων προτεραιότητας",
+ "projectBackgrounds": "Project backgrounds",
+ "projectBackgroundsDescription": "Show project background images on boards"
},
"developerPage": {
"pageTitle": "Ρυθμίσεις προγραμματιστή",
@@ -708,6 +710,15 @@
},
"importExportTasks": "Εισαγωγή/Εξαγωγή",
"importExportTasksDescription": "Εισαγωγή/Εξαγωγή Εργασιών",
+ "backgroundHint": "Choose an image shown behind this project's board.",
+ "backgroundLabel": "Board background",
+ "backgroundRemove": "Remove image",
+ "backgroundRemoveError": "Failed to remove project background",
+ "backgroundRemoveSuccess": "Project background removed",
+ "backgroundReplace": "Replace image",
+ "backgroundUpload": "Upload image",
+ "backgroundUploadError": "Failed to update project background",
+ "backgroundUploadSuccess": "Project background updated",
"moveModalConfirm": "Μετακίνηση έργου",
"moveModalDescription": "Αυτό θα μετακινήσει το έργο \"{{name}}\" και όλες τις εργασίες του στο \"{{workspace}}\". Οι εργασίες που έχουν ανατεθεί σε άτομα που δεν είναι μέλη αυτού του χώρου εργασίας θα αποδεσμευτούν και οι συνδρομές ειδοποιήσεων για αυτό το έργο θα διαγραφούν.",
"moveModalTitle": "Μετακίνηση έργου;",
diff --git a/i18n/en-US.json b/i18n/en-US.json
index e2565bdf0..bea6816ef 100644
--- a/i18n/en-US.json
+++ b/i18n/en-US.json
@@ -639,7 +639,9 @@
"labels": "Labels",
"labelsDescription": "Show task labels and tags",
"priority": "Priority",
- "priorityDescription": "Display priority indicators"
+ "priorityDescription": "Display priority indicators",
+ "projectBackgrounds": "Project backgrounds",
+ "projectBackgroundsDescription": "Show project background images on boards"
},
"developerPage": {
"pageTitle": "Developer Settings",
@@ -1004,6 +1006,15 @@
"descriptionLabel": "Description",
"descriptionHint": "A brief description of your project",
"descriptionPlaceholder": "Enter project description",
+ "backgroundLabel": "Board background",
+ "backgroundHint": "Choose an image shown behind this project's board.",
+ "backgroundUpload": "Upload image",
+ "backgroundReplace": "Replace image",
+ "backgroundRemove": "Remove image",
+ "backgroundUploadSuccess": "Project background updated",
+ "backgroundUploadError": "Failed to update project background",
+ "backgroundRemoveSuccess": "Project background removed",
+ "backgroundRemoveError": "Failed to remove project background",
"dangerZone": "Danger zone",
"dangerZoneSubtitle": "Irreversible and destructive actions.",
"deleteProject": "Delete project",
diff --git a/i18n/es-ES.json b/i18n/es-ES.json
index c4fa77bb8..2bd93d610 100644
--- a/i18n/es-ES.json
+++ b/i18n/es-ES.json
@@ -456,7 +456,9 @@
"labels": "Etiquetas",
"labelsDescription": "Mostrar descripción y etiquetas de las tareas",
"priority": "Prioridad",
- "priorityDescription": "Mostrar indicador de prioridad"
+ "priorityDescription": "Mostrar indicador de prioridad",
+ "projectBackgrounds": "Project backgrounds",
+ "projectBackgroundsDescription": "Show project background images on boards"
},
"developerPage": {
"pageTitle": "Ajustes de Desarrollador",
@@ -605,6 +607,15 @@
},
"importExportTasks": "Importar/Exportar",
"importExportTasksDescription": "Importar/Exportar Tareas",
+ "backgroundHint": "Choose an image shown behind this project's board.",
+ "backgroundLabel": "Board background",
+ "backgroundRemove": "Remove image",
+ "backgroundRemoveError": "Failed to remove project background",
+ "backgroundRemoveSuccess": "Project background removed",
+ "backgroundReplace": "Replace image",
+ "backgroundUpload": "Upload image",
+ "backgroundUploadError": "Failed to update project background",
+ "backgroundUploadSuccess": "Project background updated",
"moveModalConfirm": "Mover proyecto",
"moveModalDescription": "Esto moverá el proyecto \"{{name}}\" y todas sus tareas a \"{{workspace}}\". Las tareas asignadas a personas que no son miembros de ese espacio de trabajo quedarán sin asignar, y se eliminarán las suscripciones de notificaciones de este proyecto.",
"moveModalTitle": "¿Mover proyecto?",
diff --git a/i18n/fr-FR.json b/i18n/fr-FR.json
index c7ed16f79..7a25ff319 100644
--- a/i18n/fr-FR.json
+++ b/i18n/fr-FR.json
@@ -559,7 +559,9 @@
"labels": "Labels",
"labelsDescription": "Afficher les labels et tags des tâches",
"priority": "Priorité",
- "priorityDescription": "Afficher les indicateurs de priorité"
+ "priorityDescription": "Afficher les indicateurs de priorité",
+ "projectBackgrounds": "Project backgrounds",
+ "projectBackgroundsDescription": "Show project background images on boards"
},
"developerPage": {
"pageTitle": "Paramètres développeur",
@@ -708,6 +710,15 @@
},
"importExportTasks": "Importation/Exportation",
"importExportTasksDescription": "Importation/Exportation des Tâches",
+ "backgroundHint": "Choose an image shown behind this project's board.",
+ "backgroundLabel": "Board background",
+ "backgroundRemove": "Remove image",
+ "backgroundRemoveError": "Failed to remove project background",
+ "backgroundRemoveSuccess": "Project background removed",
+ "backgroundReplace": "Replace image",
+ "backgroundUpload": "Upload image",
+ "backgroundUploadError": "Failed to update project background",
+ "backgroundUploadSuccess": "Project background updated",
"moveModalConfirm": "Déplacer le projet",
"moveModalDescription": "Cette action déplacera le projet \"{{name}}\" et toutes ses tâches vers \"{{workspace}}\". Les tâches assignées à des personnes qui ne sont pas membres de cet espace de travail seront désassignées, et les abonnements aux notifications de ce projet seront supprimés.",
"moveModalTitle": "Déplacer le projet ?",
diff --git a/i18n/hi-IN.json b/i18n/hi-IN.json
index 9b98213e9..87e5bef47 100644
--- a/i18n/hi-IN.json
+++ b/i18n/hi-IN.json
@@ -559,7 +559,9 @@
"labels": "लेबल",
"labelsDescription": "कार्य लेबल और टैग दिखाएँ",
"priority": "प्राथमिकता",
- "priorityDescription": "प्राथमिकता संकेतक दिखाएँ"
+ "priorityDescription": "प्राथमिकता संकेतक दिखाएँ",
+ "projectBackgrounds": "Project backgrounds",
+ "projectBackgroundsDescription": "Show project background images on boards"
},
"developerPage": {
"pageTitle": "डेवलपर सेटिंग",
@@ -943,6 +945,15 @@
},
"importExportTasks": "आयात/निर्यात",
"importExportTasksDescription": "कार्यों को आयात और निर्यात करें।",
+ "backgroundHint": "Choose an image shown behind this project's board.",
+ "backgroundLabel": "Board background",
+ "backgroundRemove": "Remove image",
+ "backgroundRemoveError": "Failed to remove project background",
+ "backgroundRemoveSuccess": "Project background removed",
+ "backgroundReplace": "Replace image",
+ "backgroundUpload": "Upload image",
+ "backgroundUploadError": "Failed to update project background",
+ "backgroundUploadSuccess": "Project background updated",
"moveModalConfirm": "प्रोजेक्ट ले जाएँ",
"moveModalDescription": "इससे प्रोजेक्ट \"{{name}}\" और उसके सभी कार्य \"{{workspace}}\" में चले जाएँगे। जो कार्य उन लोगों को सौंपे गए हैं जो उस वर्कस्पेस के सदस्य नहीं हैं, उनका असाइनमेंट हटा दिया जाएगा, और इस प्रोजेक्ट की सूचना सदस्यताएँ हटा दी जाएँगी।",
"moveModalTitle": "प्रोजेक्ट ले जाएँ?",
diff --git a/i18n/id-ID.json b/i18n/id-ID.json
index 3030566c6..3d9ba83ea 100644
--- a/i18n/id-ID.json
+++ b/i18n/id-ID.json
@@ -559,7 +559,9 @@
"labels": "Label",
"labelsDescription": "Tampilkan label dan tag tugas",
"priority": "Prioritas",
- "priorityDescription": "Tampilkan indikator prioritas"
+ "priorityDescription": "Tampilkan indikator prioritas",
+ "projectBackgrounds": "Project backgrounds",
+ "projectBackgroundsDescription": "Show project background images on boards"
},
"developerPage": {
"pageTitle": "Pengaturan Pengembang",
@@ -708,6 +710,15 @@
},
"importExportTasks": "Impor/Ekspor",
"importExportTasksDescription": "Impor dan ekspor tugas.",
+ "backgroundHint": "Choose an image shown behind this project's board.",
+ "backgroundLabel": "Board background",
+ "backgroundRemove": "Remove image",
+ "backgroundRemoveError": "Failed to remove project background",
+ "backgroundRemoveSuccess": "Project background removed",
+ "backgroundReplace": "Replace image",
+ "backgroundUpload": "Upload image",
+ "backgroundUploadError": "Failed to update project background",
+ "backgroundUploadSuccess": "Project background updated",
"moveModalConfirm": "Pindahkan proyek",
"moveModalDescription": "Tindakan ini akan memindahkan proyek \"{{name}}\" beserta semua tugasnya ke \"{{workspace}}\". Tugas yang ditugaskan kepada orang yang bukan anggota ruang kerja tersebut akan dilepas penugasannya, dan langganan notifikasi untuk proyek ini akan dihapus.",
"moveModalTitle": "Pindahkan proyek?",
diff --git a/i18n/it-IT.json b/i18n/it-IT.json
index 0029d9278..bf3a79ccf 100644
--- a/i18n/it-IT.json
+++ b/i18n/it-IT.json
@@ -559,7 +559,9 @@
"labels": "Etichette",
"labelsDescription": "Mostra etichette e tag delle attività",
"priority": "Priorità",
- "priorityDescription": "Visualizza indicatori di priorità"
+ "priorityDescription": "Visualizza indicatori di priorità",
+ "projectBackgrounds": "Project backgrounds",
+ "projectBackgroundsDescription": "Show project background images on boards"
},
"developerPage": {
"pageTitle": "Impostazioni Sviluppatore",
@@ -944,6 +946,15 @@
},
"importExportTasks": "Importa/Esporta",
"importExportTasksDescription": "Importa ed esporta attività.",
+ "backgroundHint": "Choose an image shown behind this project's board.",
+ "backgroundLabel": "Board background",
+ "backgroundRemove": "Remove image",
+ "backgroundRemoveError": "Failed to remove project background",
+ "backgroundRemoveSuccess": "Project background removed",
+ "backgroundReplace": "Replace image",
+ "backgroundUpload": "Upload image",
+ "backgroundUploadError": "Failed to update project background",
+ "backgroundUploadSuccess": "Project background updated",
"moveModalConfirm": "Sposta progetto",
"moveModalDescription": "Questa azione sposterà il progetto \"{{name}}\" e tutte le sue attività in \"{{workspace}}\". Le attività assegnate a persone che non sono membri di quel workspace resteranno senza assegnatario e le iscrizioni alle notifiche per questo progetto verranno eliminate.",
"moveModalTitle": "Spostare il progetto?",
diff --git a/i18n/ja-JP.json b/i18n/ja-JP.json
index b95ec7de0..239ad0d3b 100644
--- a/i18n/ja-JP.json
+++ b/i18n/ja-JP.json
@@ -559,7 +559,9 @@
"labels": "ラベル",
"labelsDescription": "タスクのラベルとタグを表示します",
"priority": "優先度",
- "priorityDescription": "優先度インジケーターを表示します"
+ "priorityDescription": "優先度インジケーターを表示します",
+ "projectBackgrounds": "Project backgrounds",
+ "projectBackgroundsDescription": "Show project background images on boards"
},
"developerPage": {
"pageTitle": "開発者設定",
@@ -942,6 +944,15 @@
},
"importExportTasks": "インポート/エクスポート",
"importExportTasksDescription": "タスクのインポートとエクスポートを行います。",
+ "backgroundHint": "Choose an image shown behind this project's board.",
+ "backgroundLabel": "Board background",
+ "backgroundRemove": "Remove image",
+ "backgroundRemoveError": "Failed to remove project background",
+ "backgroundRemoveSuccess": "Project background removed",
+ "backgroundReplace": "Replace image",
+ "backgroundUpload": "Upload image",
+ "backgroundUploadError": "Failed to update project background",
+ "backgroundUploadSuccess": "Project background updated",
"moveModalConfirm": "Move Project",
"moveModalDescription": "This will move the project \"{{name}}\" and all of its tasks to \"{{workspace}}\". Tasks assigned to people who aren't members of that workspace will be unassigned, and notification subscriptions for this project will be cleared.",
"moveModalTitle": "Move Project?",
diff --git a/i18n/ko-KR.json b/i18n/ko-KR.json
index 548f66f32..a42f728c1 100644
--- a/i18n/ko-KR.json
+++ b/i18n/ko-KR.json
@@ -559,7 +559,9 @@
"labels": "라벨",
"labelsDescription": "작업 라벨과 태그를 표시합니다",
"priority": "우선순위",
- "priorityDescription": "우선순위 표시기를 표시합니다"
+ "priorityDescription": "우선순위 표시기를 표시합니다",
+ "projectBackgrounds": "Project backgrounds",
+ "projectBackgroundsDescription": "Show project background images on boards"
},
"developerPage": {
"pageTitle": "개발자 설정",
@@ -708,6 +710,15 @@
},
"importExportTasks": "가져오기/내보내기",
"importExportTasksDescription": "작업을 가져오고 내보냅니다.",
+ "backgroundHint": "Choose an image shown behind this project's board.",
+ "backgroundLabel": "Board background",
+ "backgroundRemove": "Remove image",
+ "backgroundRemoveError": "Failed to remove project background",
+ "backgroundRemoveSuccess": "Project background removed",
+ "backgroundReplace": "Replace image",
+ "backgroundUpload": "Upload image",
+ "backgroundUploadError": "Failed to update project background",
+ "backgroundUploadSuccess": "Project background updated",
"moveModalConfirm": "프로젝트 이동",
"moveModalDescription": "프로젝트 \"{{name}}\"과(와) 모든 작업이 \"{{workspace}}\"(으)로 이동됩니다. 해당 워크스페이스의 멤버가 아닌 사람에게 할당된 작업은 할당이 해제되며, 이 프로젝트의 알림 구독도 삭제됩니다.",
"moveModalTitle": "프로젝트를 이동할까요?",
diff --git a/i18n/mk-MK.json b/i18n/mk-MK.json
index fd0314a99..453c6db43 100644
--- a/i18n/mk-MK.json
+++ b/i18n/mk-MK.json
@@ -559,7 +559,9 @@
"labels": "Етикети",
"labelsDescription": "Прикажи етикети и тагови на задачите",
"priority": "Приоритет",
- "priorityDescription": "Прикажи индикатори за приоритет"
+ "priorityDescription": "Прикажи индикатори за приоритет",
+ "projectBackgrounds": "Project backgrounds",
+ "projectBackgroundsDescription": "Show project background images on boards"
},
"developerPage": {
"pageTitle": "Програмерски поставки",
@@ -708,6 +710,15 @@
},
"importExportTasks": "Импортирање/Експортирање",
"importExportTasksDescription": "Импортирање/Експортирање на задачи",
+ "backgroundHint": "Choose an image shown behind this project's board.",
+ "backgroundLabel": "Board background",
+ "backgroundRemove": "Remove image",
+ "backgroundRemoveError": "Failed to remove project background",
+ "backgroundRemoveSuccess": "Project background removed",
+ "backgroundReplace": "Replace image",
+ "backgroundUpload": "Upload image",
+ "backgroundUploadError": "Failed to update project background",
+ "backgroundUploadSuccess": "Project background updated",
"moveModalConfirm": "Премести проект",
"moveModalDescription": "Ова ќе го премести проектот \"{{name}}\" и сите негови задачи во \"{{workspace}}\". Задачите доделени на луѓе што не се членови на тој работен простор ќе останат недоделени, а претплатите на известувања за овој проект ќе бидат отстранети.",
"moveModalTitle": "Премести проект?",
diff --git a/i18n/nl-NL.json b/i18n/nl-NL.json
index 80c53f43b..0d7f23b14 100644
--- a/i18n/nl-NL.json
+++ b/i18n/nl-NL.json
@@ -456,7 +456,9 @@
"labels": "Labels",
"labelsDescription": "Toon taaklabels en tags",
"priority": "Prioriteit",
- "priorityDescription": "Toon prioriteitsindicatoren"
+ "priorityDescription": "Toon prioriteitsindicatoren",
+ "projectBackgrounds": "Project backgrounds",
+ "projectBackgroundsDescription": "Show project background images on boards"
},
"developerPage": {
"pageTitle": "Ontwikkelaarsinstellingen",
@@ -605,6 +607,15 @@
},
"importExportTasks": "Importeren/Exporteren",
"importExportTasksDescription": "Importeren/Exporteren taken",
+ "backgroundHint": "Choose an image shown behind this project's board.",
+ "backgroundLabel": "Board background",
+ "backgroundRemove": "Remove image",
+ "backgroundRemoveError": "Failed to remove project background",
+ "backgroundRemoveSuccess": "Project background removed",
+ "backgroundReplace": "Replace image",
+ "backgroundUpload": "Upload image",
+ "backgroundUploadError": "Failed to update project background",
+ "backgroundUploadSuccess": "Project background updated",
"moveModalConfirm": "Project verplaatsen",
"moveModalDescription": "Hiermee worden het project \"{{name}}\" en al zijn taken verplaatst naar \"{{workspace}}\". Taken die zijn toegewezen aan personen die geen lid zijn van die werkruimte worden niet langer toegewezen, en meldingsabonnementen voor dit project worden verwijderd.",
"moveModalTitle": "Project verplaatsen?",
diff --git a/i18n/pl-PL.json b/i18n/pl-PL.json
index 20158b26b..b561471b4 100644
--- a/i18n/pl-PL.json
+++ b/i18n/pl-PL.json
@@ -1367,7 +1367,9 @@
"title": "Preferencje",
"weekStartsOnMonday": "Poniedziałek",
"weekStartsOnSaturday": "Sobota",
- "weekStartsOnSunday": "Niedziela"
+ "weekStartsOnSunday": "Niedziela",
+ "projectBackgrounds": "Project backgrounds",
+ "projectBackgroundsDescription": "Show project background images on boards"
},
"projectGeneral": {
"dangerZone": "Strefa niebezpieczna",
@@ -1407,6 +1409,15 @@
"keyRequired": "Klucz jest wymagany",
"nameRequired": "Nazwa projektu jest wymagana"
},
+ "backgroundHint": "Choose an image shown behind this project's board.",
+ "backgroundLabel": "Board background",
+ "backgroundRemove": "Remove image",
+ "backgroundRemoveError": "Failed to remove project background",
+ "backgroundRemoveSuccess": "Project background removed",
+ "backgroundReplace": "Replace image",
+ "backgroundUpload": "Upload image",
+ "backgroundUploadError": "Failed to update project background",
+ "backgroundUploadSuccess": "Project background updated",
"moveModalConfirm": "Move Project",
"moveModalDescription": "This will move the project \"{{name}}\" and all of its tasks to \"{{workspace}}\". Tasks assigned to people who aren't members of that workspace will be unassigned, and notification subscriptions for this project will be cleared.",
"moveModalTitle": "Move Project?",
diff --git a/i18n/pt-BR.json b/i18n/pt-BR.json
index 07a41ab6e..cb0b917a5 100644
--- a/i18n/pt-BR.json
+++ b/i18n/pt-BR.json
@@ -559,7 +559,9 @@
"labels": "Etiquetas",
"labelsDescription": "Mostrar etiquetas e marcadores das tarefas",
"priority": "Prioridade",
- "priorityDescription": "Exibir indicadores de prioridade"
+ "priorityDescription": "Exibir indicadores de prioridade",
+ "projectBackgrounds": "Project backgrounds",
+ "projectBackgroundsDescription": "Show project background images on boards"
},
"developerPage": {
"pageTitle": "Configurações de desenvolvedor",
@@ -944,6 +946,15 @@
},
"importExportTasks": "Importar/Exportar",
"importExportTasksDescription": "Importe e exporte tarefas.",
+ "backgroundHint": "Choose an image shown behind this project's board.",
+ "backgroundLabel": "Board background",
+ "backgroundRemove": "Remove image",
+ "backgroundRemoveError": "Failed to remove project background",
+ "backgroundRemoveSuccess": "Project background removed",
+ "backgroundReplace": "Replace image",
+ "backgroundUpload": "Upload image",
+ "backgroundUploadError": "Failed to update project background",
+ "backgroundUploadSuccess": "Project background updated",
"moveModalConfirm": "Mover projeto",
"moveModalDescription": "Isso moverá o projeto \"{{name}}\" e todas as suas tarefas para \"{{workspace}}\". As tarefas atribuídas a pessoas que não são membros desse espaço de trabalho ficarão sem responsável, e as inscrições de notificação deste projeto serão removidas.",
"moveModalTitle": "Mover projeto?",
diff --git a/i18n/ru-RU.json b/i18n/ru-RU.json
index c3260dc09..94d201aed 100644
--- a/i18n/ru-RU.json
+++ b/i18n/ru-RU.json
@@ -559,7 +559,9 @@
"labels": "Метки",
"labelsDescription": "Показывать метки и теги задач",
"priority": "Приоритет",
- "priorityDescription": "Показывать индикаторы приоритета"
+ "priorityDescription": "Показывать индикаторы приоритета",
+ "projectBackgrounds": "Project backgrounds",
+ "projectBackgroundsDescription": "Show project background images on boards"
},
"developerPage": {
"pageTitle": "Настройки разработчика",
@@ -708,6 +710,15 @@
},
"importExportTasks": "Импорт/Экспорт",
"importExportTasksDescription": "Импортируйте и экспортируйте задачи.",
+ "backgroundHint": "Choose an image shown behind this project's board.",
+ "backgroundLabel": "Board background",
+ "backgroundRemove": "Remove image",
+ "backgroundRemoveError": "Failed to remove project background",
+ "backgroundRemoveSuccess": "Project background removed",
+ "backgroundReplace": "Replace image",
+ "backgroundUpload": "Upload image",
+ "backgroundUploadError": "Failed to update project background",
+ "backgroundUploadSuccess": "Project background updated",
"moveModalConfirm": "Переместить проект",
"moveModalDescription": "Проект «{{name}}» и все его задачи будут перемещены в «{{workspace}}». С задач, назначенных пользователям, которые не состоят в этой рабочей области, назначение будет снято, а подписки на уведомления по этому проекту будут удалены.",
"moveModalTitle": "Переместить проект?",
diff --git a/i18n/schema.json b/i18n/schema.json
index 0ab120235..c699cfa9b 100644
--- a/i18n/schema.json
+++ b/i18n/schema.json
@@ -2501,6 +2501,12 @@
},
"priorityDescription": {
"type": "string"
+ },
+ "projectBackgrounds": {
+ "type": "string"
+ },
+ "projectBackgroundsDescription": {
+ "type": "string"
}
},
"required": [
@@ -2542,7 +2548,9 @@
"labels",
"labelsDescription",
"priority",
- "priorityDescription"
+ "priorityDescription",
+ "projectBackgrounds",
+ "projectBackgroundsDescription"
]
},
"developerPage": {
@@ -3887,6 +3895,33 @@
"descriptionPlaceholder": {
"type": "string"
},
+ "backgroundLabel": {
+ "type": "string"
+ },
+ "backgroundHint": {
+ "type": "string"
+ },
+ "backgroundUpload": {
+ "type": "string"
+ },
+ "backgroundReplace": {
+ "type": "string"
+ },
+ "backgroundRemove": {
+ "type": "string"
+ },
+ "backgroundUploadSuccess": {
+ "type": "string"
+ },
+ "backgroundUploadError": {
+ "type": "string"
+ },
+ "backgroundRemoveSuccess": {
+ "type": "string"
+ },
+ "backgroundRemoveError": {
+ "type": "string"
+ },
"dangerZone": {
"type": "string"
},
@@ -4003,6 +4038,15 @@
"descriptionLabel",
"descriptionHint",
"descriptionPlaceholder",
+ "backgroundLabel",
+ "backgroundHint",
+ "backgroundUpload",
+ "backgroundReplace",
+ "backgroundRemove",
+ "backgroundUploadSuccess",
+ "backgroundUploadError",
+ "backgroundRemoveSuccess",
+ "backgroundRemoveError",
"dangerZone",
"dangerZoneSubtitle",
"deleteProject",
diff --git a/i18n/tr-TR.json b/i18n/tr-TR.json
index ea7b8b4e1..e0794982a 100644
--- a/i18n/tr-TR.json
+++ b/i18n/tr-TR.json
@@ -559,7 +559,9 @@
"labels": "Etiketler",
"labelsDescription": "Talep etiketlerini ve etiketleri göster",
"priority": "Öncelik",
- "priorityDescription": "Öncelik göstergelerini görüntüle"
+ "priorityDescription": "Öncelik göstergelerini görüntüle",
+ "projectBackgrounds": "Project backgrounds",
+ "projectBackgroundsDescription": "Show project background images on boards"
},
"developerPage": {
"pageTitle": "Geliştirici Ayarları",
@@ -708,6 +710,15 @@
},
"importExportTasks": "İçe/Dışa Aktar",
"importExportTasksDescription": "Talepleri içe ve dışa aktarın.",
+ "backgroundHint": "Choose an image shown behind this project's board.",
+ "backgroundLabel": "Board background",
+ "backgroundRemove": "Remove image",
+ "backgroundRemoveError": "Failed to remove project background",
+ "backgroundRemoveSuccess": "Project background removed",
+ "backgroundReplace": "Replace image",
+ "backgroundUpload": "Upload image",
+ "backgroundUploadError": "Failed to update project background",
+ "backgroundUploadSuccess": "Project background updated",
"moveModalConfirm": "Projeyi taşı",
"moveModalDescription": "Bu işlem \"{{name}}\" projesini ve tüm görevlerini \"{{workspace}}\" alanına taşır. O çalışma alanının üyesi olmayan kişilere atanmış görevlerin ataması kaldırılır ve bu projeye ait bildirim abonelikleri silinir.",
"moveModalTitle": "Proje taşınsın mı?",
diff --git a/i18n/uk-UA.json b/i18n/uk-UA.json
index 48c7dd17d..b63d71cc8 100644
--- a/i18n/uk-UA.json
+++ b/i18n/uk-UA.json
@@ -559,7 +559,9 @@
"labels": "Мітки",
"labelsDescription": "Показувати мітки та теґи завдань",
"priority": "Пріоритет",
- "priorityDescription": "Відображати індикатори пріоритету"
+ "priorityDescription": "Відображати індикатори пріоритету",
+ "projectBackgrounds": "Project backgrounds",
+ "projectBackgroundsDescription": "Show project background images on boards"
},
"developerPage": {
"pageTitle": "Налаштування розробника",
@@ -708,6 +710,15 @@
},
"importExportTasks": "Імпорт/Експорт",
"importExportTasksDescription": "Імпортуйте та експортуйте завдання.",
+ "backgroundHint": "Choose an image shown behind this project's board.",
+ "backgroundLabel": "Board background",
+ "backgroundRemove": "Remove image",
+ "backgroundRemoveError": "Failed to remove project background",
+ "backgroundRemoveSuccess": "Project background removed",
+ "backgroundReplace": "Replace image",
+ "backgroundUpload": "Upload image",
+ "backgroundUploadError": "Failed to update project background",
+ "backgroundUploadSuccess": "Project background updated",
"moveModalConfirm": "Перемістити проєкт",
"moveModalDescription": "Проєкт «{{name}}» і всі його завдання буде переміщено до «{{workspace}}». Із завдань, призначених людям, які не є учасниками цього робочого простору, буде знято призначення, а підписки на сповіщення для цього проєкту буде видалено.",
"moveModalTitle": "Перемістити проєкт?",
diff --git a/i18n/vi-VN.json b/i18n/vi-VN.json
index fb6a001d4..ebc646436 100644
--- a/i18n/vi-VN.json
+++ b/i18n/vi-VN.json
@@ -559,7 +559,9 @@
"labels": "Nhãn",
"labelsDescription": "Hiển thị nhãn và thẻ của công việc",
"priority": "Mức ưu tiên",
- "priorityDescription": "Hiển thị chỉ báo mức ưu tiên"
+ "priorityDescription": "Hiển thị chỉ báo mức ưu tiên",
+ "projectBackgrounds": "Project backgrounds",
+ "projectBackgroundsDescription": "Show project background images on boards"
},
"developerPage": {
"pageTitle": "Cài đặt nhà phát triển",
@@ -942,6 +944,15 @@
},
"importExportTasks": "Nhập/Xuất",
"importExportTasksDescription": "Nhập và xuất công việc.",
+ "backgroundHint": "Choose an image shown behind this project's board.",
+ "backgroundLabel": "Board background",
+ "backgroundRemove": "Remove image",
+ "backgroundRemoveError": "Failed to remove project background",
+ "backgroundRemoveSuccess": "Project background removed",
+ "backgroundReplace": "Replace image",
+ "backgroundUpload": "Upload image",
+ "backgroundUploadError": "Failed to update project background",
+ "backgroundUploadSuccess": "Project background updated",
"moveModalConfirm": "Chuyển dự án",
"moveModalDescription": "Thao tác này sẽ chuyển dự án \"{{name}}\" và tất cả công việc của nó sang \"{{workspace}}\". Những công việc được giao cho người không phải là thành viên của không gian làm việc đó sẽ bị hủy phân công, và các đăng ký thông báo cho dự án này sẽ bị xóa.",
"moveModalTitle": "Chuyển dự án?",
diff --git a/i18n/zh-CN.json b/i18n/zh-CN.json
index a0be88c9e..d240bc4c1 100644
--- a/i18n/zh-CN.json
+++ b/i18n/zh-CN.json
@@ -559,7 +559,9 @@
"labels": "标签",
"labelsDescription": "显示任务的标签和标记",
"priority": "优先级",
- "priorityDescription": "显示优先级指示"
+ "priorityDescription": "显示优先级指示",
+ "projectBackgrounds": "Project backgrounds",
+ "projectBackgroundsDescription": "Show project background images on boards"
},
"developerPage": {
"pageTitle": "开发者设置",
@@ -942,6 +944,15 @@
},
"importExportTasks": "导入/导出",
"importExportTasksDescription": "导入和导出任务。",
+ "backgroundHint": "Choose an image shown behind this project's board.",
+ "backgroundLabel": "Board background",
+ "backgroundRemove": "Remove image",
+ "backgroundRemoveError": "Failed to remove project background",
+ "backgroundRemoveSuccess": "Project background removed",
+ "backgroundReplace": "Replace image",
+ "backgroundUpload": "Upload image",
+ "backgroundUploadError": "Failed to update project background",
+ "backgroundUploadSuccess": "Project background updated",
"moveModalConfirm": "移动项目",
"moveModalDescription": "这将把项目 \"{{name}}\" 及其所有任务移动到 \"{{workspace}}\"。分配给非该工作区成员的任务将被取消分配,此项目的通知订阅也会被清除。",
"moveModalTitle": "移动项目?",
diff --git a/tests/api-integration/project-background.test.ts b/tests/api-integration/project-background.test.ts
new file mode 100644
index 000000000..5fd8cf1a6
--- /dev/null
+++ b/tests/api-integration/project-background.test.ts
@@ -0,0 +1,153 @@
+import { eq } from "drizzle-orm";
+import type { WSContext } from "hono/ws";
+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
+import db, { schema } from "../../apps/api/src/database";
+import { createApp } from "../../apps/api/src/index";
+import {
+ addConnection,
+ initializeWebSocketAdapter,
+ removeConnection,
+ shutdownWebSocketAdapter,
+} from "../../apps/api/src/ws";
+import { mockAuthenticatedSession } from "./helpers/auth";
+import { resetTestDatabase } from "./helpers/database";
+import {
+ createProjectFixture,
+ createWorkspaceMember,
+} from "./helpers/fixtures";
+
+vi.mock("../../apps/api/src/storage/s3", async (importOriginal) => ({
+ ...(await importOriginal<typeof import("../../apps/api/src/storage/s3")>()),
+ deleteS3Object: vi.fn().mockResolvedValue(undefined),
+}));
+
+function jsonRequest(method: string, body: unknown) {
+ return {
+ method,
+ headers: { "content-type": "application/json" },
+ body: JSON.stringify(body),
+ };
+}
+
+describe("API integration: project backgrounds", () => {
+ beforeEach(async () => {
+ await resetTestDatabase();
+ await initializeWebSocketAdapter();
+ vi.stubEnv("S3_ENDPOINT", "https://storage.example.test");
+ vi.stubEnv("S3_BUCKET", "test-backgrounds");
+ vi.stubEnv("S3_ACCESS_KEY_ID", "test-key");
+ vi.stubEnv("S3_SECRET_ACCESS_KEY", "test-secret");
+ vi.stubEnv("S3_KEY_PREFIX", "");
+ });
+ afterEach(async () => {
+ await shutdownWebSocketAdapter();
+ vi.unstubAllEnvs();
+ });
+
+ it("publishes upload and removal to another connected session without leaking storage fields", async () => {
+ const owner = await createWorkspaceMember({ role: "owner" });
+ const { project } = await createProjectFixture({
+ workspaceId: owner.workspace.id,
+ });
+ mockAuthenticatedSession(owner.user);
+ const { app } = createApp();
+ const socket = { send: vi.fn(), close: vi.fn(), readyState: 1 };
+ const connection = addConnection(
+ project.id,
+ socket as unknown as WSContext,
+ owner.user.id,
+ "other-session",
+ owner.workspace.id,
+ );
+ const key = `workspace/${owner.workspace.id}/project/${project.id}/backgrounds/background-v1`;
+ try {
+ const finalized = await app.request(
+ `/api/project/${project.id}/background-upload/finalize`,
+ jsonRequest("POST", {
+ key,
+ version: "v1",
+ contentType: "image/png",
+ size: 12,
+ }),
+ );
+ expect(finalized.status).toBe(200);
+ await vi.waitFor(() =>
+ expect(socket.send).toHaveBeenCalledWith(
+ JSON.stringify({ type: "PROJECT_UPDATED", projectId: project.id }),
+ ),
+ );
+ socket.send.mockClear();
+ for (const path of [
+ `/api/project/${project.id}?workspaceId=${owner.workspace.id}`,
+ `/api/project?workspaceId=${owner.workspace.id}`,
+ `/api/task/tasks/${project.id}`,
+ ]) {
+ const response = await app.request(path);
+ expect(response.status).toBe(200);
+ const body = await response.json();
+ const data = Array.isArray(body) ? body[0] : (body.data ?? body);
+ expect(data.backgroundVersion).toBe("v1");
+ expect(data).not.toHaveProperty("backgroundObjectKey");
+ expect(data).not.toHaveProperty("backgroundMimeType");
+ }
+ const updated = await app.request(
+ `/api/project/${project.id}`,
+ jsonRequest("PUT", {
+ name: project.name,
+ icon: "Folder",
+ slug: project.slug,
+ description: "",
+ isPublic: false,
+ }),
+ );
+ expect(updated.status).toBe(200);
+ expect(await updated.json()).not.toHaveProperty("backgroundObjectKey");
+ const removed = await app.request(
+ `/api/project/${project.id}/background`,
+ { method: "DELETE" },
+ );
+ expect(removed.status).toBe(204);
+ await vi.waitFor(() =>
+ expect(socket.send).toHaveBeenCalledWith(
+ JSON.stringify({ type: "PROJECT_UPDATED", projectId: project.id }),
+ ),
+ );
+ const row = await db.query.projectTable.findFirst({
+ where: eq(schema.projectTable.id, project.id),
+ });
+ expect(row).toMatchObject({
+ backgroundVersion: null,
+ backgroundObjectKey: null,
+ backgroundMimeType: null,
+ });
+ } finally {
+ removeConnection(project.id, connection);
+ }
+ });
+
+ it("rejects background mutations without project update permission", async () => {
+ const viewer = await createWorkspaceMember({ role: "viewer" });
+ const { project } = await createProjectFixture({
+ workspaceId: viewer.workspace.id,
+ });
+ mockAuthenticatedSession(viewer.user);
+ const { app } = createApp();
+ for (const [path, init] of [
+ [
+ `/api/project/${project.id}/background-upload`,
+ jsonRequest("PUT", { contentType: "image/png", size: 12 }),
+ ],
+ [
+ `/api/project/${project.id}/background-upload/finalize`,
+ jsonRequest("POST", {
+ key: "key",
+ version: "v1",
+ contentType: "image/png",
+ size: 12,
+ }),
+ ],
+ [`/api/project/${project.id}/background`, { method: "DELETE" }],
+ ] as const)
+ expect((await app.request(path, init)).status).toBe(403);
+ });
+});
diff --git a/tests/api/project/delete-project.test.ts b/tests/api/project/delete-project.test.ts
new file mode 100644
index 000000000..6e2ef3585
--- /dev/null
+++ b/tests/api/project/delete-project.test.ts
@@ -0,0 +1,69 @@
+import { beforeEach, describe, expect, it, vi } from "vitest";
+
+const mocks = vi.hoisted(() => ({
+ findFirst: vi.fn(),
+ delete: vi.fn(),
+ deleteS3Object: vi.fn(),
+}));
+
+vi.mock("../../../apps/api/src/database", () => ({
+ default: {
+ query: { projectTable: { findFirst: mocks.findFirst } },
+ delete: mocks.delete,
+ },
+}));
+
+vi.mock("../../../apps/api/src/storage/s3", () => ({
+ deleteS3Object: mocks.deleteS3Object,
+}));
+
+import deleteProject from "../../../apps/api/src/project/controllers/delete-project";
+
+function mockDeletedProject(backgroundObjectKey: string | null) {
+ const returning = vi
+ .fn()
+ .mockResolvedValue([{ id: "project-1", backgroundObjectKey }]);
+ const where = vi.fn(() => ({ returning }));
+ mocks.delete.mockReturnValue({ where });
+}
+
+describe("deleteProject", () => {
+ beforeEach(() => {
+ vi.clearAllMocks();
+ mocks.findFirst.mockResolvedValue({
+ id: "project-1",
+ workspaceId: "workspace-1",
+ tasks: [],
+ });
+ mocks.deleteS3Object.mockResolvedValue(undefined);
+ });
+
+ it("deletes the background object after deleting its project", async () => {
+ mockDeletedProject(
+ "workspace/ws/project/project-1/backgrounds/background-v1",
+ );
+
+ await deleteProject("project-1", "workspace-1");
+
+ expect(mocks.deleteS3Object).toHaveBeenCalledWith(
+ "workspace/ws/project/project-1/backgrounds/background-v1",
+ );
+ });
+
+ it("does not call object storage when the project has no background", async () => {
+ mockDeletedProject(null);
+
+ await deleteProject("project-1", "workspace-1");
+
+ expect(mocks.deleteS3Object).not.toHaveBeenCalled();
+ });
+
+ it("does not fail project deletion when object cleanup fails", async () => {
+ mockDeletedProject("background-v1");
+ mocks.deleteS3Object.mockRejectedValue(new Error("storage unavailable"));
+
+ await expect(
+ deleteProject("project-1", "workspace-1"),
+ ).resolves.toMatchObject({ id: "project-1" });
+ });
+});
diff --git a/tests/api/storage/s3.test.ts b/tests/api/storage/s3.test.ts
index a3e1438d2..0756a08a4 100644
--- a/tests/api/storage/s3.test.ts
+++ b/tests/api/storage/s3.test.ts
@@ -2,11 +2,15 @@ import { S3Client } from "@aws-sdk/client-s3";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import {
applyKeyPrefix,
+ assertProjectBackgroundKeyMatchesContext,
assertStorageConfigured,
assertTaskImageKeyMatchesContext,
buildObjectKey,
buildObjectKeyPrefix,
+ buildProjectBackgroundObjectKey,
+ buildProjectBackgroundObjectKeyPrefix,
copyTaskAssetObject,
+ createProjectBackgroundUploadUrl,
createTaskImageUploadUrl,
getFileExtension,
isImageContentType,
@@ -14,10 +18,106 @@ import {
parsePositiveInt,
resolveS3Credentials,
sanitizePathSegment,
+ validateProjectBackgroundUploadInput,
validateTaskAssetUploadInput,
} from "../../../apps/api/src/storage/s3";
describe("S3 helpers", () => {
+ it("binds project background upload URLs to the declared content length", async () => {
+ process.env.S3_ENDPOINT = "https://storage.example.test";
+ process.env.S3_BUCKET = "kaneo";
+ process.env.S3_ACCESS_KEY_ID = "test-access-key";
+ process.env.S3_SECRET_ACCESS_KEY = "test-secret-key";
+ process.env.S3_REGION = "us-east-1";
+ process.env.S3_FORCE_PATH_STYLE = "true";
+ process.env.S3_KEY_PREFIX = "uploads";
+
+ const upload = await createProjectBackgroundUploadUrl({
+ workspaceId: "workspace-1",
+ projectId: "project-1",
+ contentType: "image/png",
+ size: 12345,
+ });
+
+ expect(upload.key).toBe(
+ `uploads/workspace/workspace-1/project/project-1/backgrounds/background-${upload.version}`,
+ );
+ expect(upload.headers).toEqual({ "Content-Type": "image/png" });
+ expect(
+ new URL(upload.uploadUrl).searchParams.get("X-Amz-SignedHeaders"),
+ ).toContain("content-length");
+ });
+ it("validates project background type and size", () => {
+ process.env.S3_MAX_IMAGE_UPLOAD_BYTES = "1048576";
+
+ expect(() => validateProjectBackgroundUploadInput("", 10)).toThrow(
+ "A valid content type is required.",
+ );
+ expect(() =>
+ validateProjectBackgroundUploadInput("application/pdf", 10),
+ ).toThrow('Unsupported content type "application/pdf"');
+ expect(() => validateProjectBackgroundUploadInput("image/webp", 0)).toThrow(
+ "Upload size must be greater than zero.",
+ );
+ expect(() =>
+ validateProjectBackgroundUploadInput("image/webp", 1048577),
+ ).toThrow("Upload exceeds the maximum upload size of 1MB.");
+ expect(() =>
+ validateProjectBackgroundUploadInput("image/webp", 1048576),
+ ).not.toThrow();
+ });
+ it("only accepts the exact project background key and version", () => {
+ process.env.S3_ENDPOINT = "https://storage.example.test";
+ process.env.S3_BUCKET = "kaneo";
+ process.env.S3_ACCESS_KEY_ID = "test-access-key";
+ process.env.S3_SECRET_ACCESS_KEY = "test-secret-key";
+ process.env.S3_KEY_PREFIX = "staging";
+
+ const context = {
+ workspaceId: "workspace-1",
+ projectId: "project-1",
+ version: "version-1",
+ };
+ const validKey =
+ "staging/workspace/workspace-1/project/project-1/backgrounds/background-version-1";
+
+ expect(assertProjectBackgroundKeyMatchesContext(validKey, context)).toBe(
+ true,
+ );
+ expect(
+ assertProjectBackgroundKeyMatchesContext(
+ validKey.replace("project-1", "project-2"),
+ context,
+ ),
+ ).toBe(false);
+ expect(
+ assertProjectBackgroundKeyMatchesContext(
+ `${validKey}/../../project-2/background`,
+ context,
+ ),
+ ).toBe(false);
+ expect(
+ assertProjectBackgroundKeyMatchesContext(
+ validKey.replace("version-1", "version-2"),
+ context,
+ ),
+ ).toBe(false);
+ });
+ it("builds project background keys inside the project scope", () => {
+ const context = {
+ workspaceId: "Workspace 1",
+ projectId: "Project 2",
+ };
+ const { rawKey, version } = buildProjectBackgroundObjectKey(context);
+
+ expect(buildProjectBackgroundObjectKeyPrefix(context)).toBe(
+ "workspace/workspace-1/project/project-2/backgrounds",
+ );
+ expect(rawKey).toBe(
+ `workspace/workspace-1/project/project-2/backgrounds/background-${version}`,
+ );
+ expect(version).toMatch(/^[a-z0-9]+$/);
+ });
const originalMaxSize = process.env.S3_MAX_IMAGE_UPLOAD_BYTES;
const originalEndpoint = process.env.S3_ENDPOINT;
const originalBucket = process.env.S3_BUCKET;
diff --git a/tests/api/ws/broadcast.test.ts b/tests/api/ws/broadcast.test.ts
index 6e5810d06..f428ad820 100644
--- a/tests/api/ws/broadcast.test.ts
+++ b/tests/api/ws/broadcast.test.ts
@@ -6,6 +6,7 @@ vi.mock("../../../apps/api/src/events", () => ({
publishEvent: vi.fn(),
}));
+import { subscribeToEvent } from "../../../apps/api/src/events";
import {
addConnection,
broadcastToProject,
@@ -14,6 +15,12 @@ import {
shutdownWebSocketAdapter,
} from "../../../apps/api/src/ws/index";
+const projectUpdateHandler = vi
+ .mocked(subscribeToEvent)
+ .mock.calls.find(
+ ([eventName]: [string]) => eventName === "project.updated",
+ )?.[1];
+
function makeFakeWs() {
return {
send: vi.fn(),
@@ -144,6 +151,33 @@ describe("broadcastToProject", () => {
removeConnection("proj-1", conn);
});
+ it("broadcasts project updates to connected clients", async () => {
+ const ws = makeFakeWs();
+ const conn = addConnection("proj-1", ws, "user-1", "init-1", "workspace");
+
+ expect(projectUpdateHandler).toBeDefined();
+ await projectUpdateHandler?.({ projectId: "proj-1" });
+
+ await vi.waitFor(
+ () => {
+ expect(
+ (ws as { send: ReturnType<typeof vi.fn> }).send,
+ ).toHaveBeenCalled();
+ },
+ { timeout: 300 },
+ );
+
+ const sent = JSON.parse(
+ (ws as { send: ReturnType<typeof vi.fn> }).send.mock.calls[0][0],
+ );
+ expect(sent).toMatchObject({
+ type: "PROJECT_UPDATED",
+ projectId: "proj-1",
+ });
+
+ removeConnection("proj-1", conn);
+ });
+
it("does not deliver to connections on a different project", async () => {
const ws = makeFakeWs();
const conn = addConnection("proj-2", ws, "user-1", "init-1", "workspace");