⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.
TypeScript honoissue-managementissue-trackerjira-alternativekanbanlinear-alternativemcpproject-managementreactself-hostedtypescript
feat: implement time tracking feature for tasks (#172)
Andrej2c4e4ca921cc
diff --git a/apps/api/drizzle/0003_daffy_amazoness.sql b/apps/api/drizzle/0003_daffy_amazoness.sqlnew file mode 100644index 000000000..4e4d51878--- /dev/null+++ b/apps/api/drizzle/0003_daffy_amazoness.sql@@ -0,0 +1,99 @@+CREATE TABLE `time_entry` (+ `id` text PRIMARY KEY NOT NULL,+ `task_id` text NOT NULL,+ `user_email` text,+ `description` text,+ `start_time` integer NOT NULL,+ `end_time` integer,+ `duration` integer DEFAULT 0,+ `created_at` integer DEFAULT '"2025-04-21T21:14:02.512Z"' NOT NULL,+ FOREIGN KEY (`task_id`) REFERENCES `task`(`id`) ON UPDATE cascade ON DELETE cascade,+ FOREIGN KEY (`user_email`) REFERENCES `user`(`email`) ON UPDATE cascade ON DELETE cascade+);+--> statement-breakpoint+PRAGMA foreign_keys=OFF;--> statement-breakpoint+CREATE TABLE `__new_activity` (+ `id` text PRIMARY KEY NOT NULL,+ `task_id` text NOT NULL,+ `type` text NOT NULL,+ `created_at` integer DEFAULT '"2025-04-21T21:14:02.512Z"' NOT NULL,+ `user_email` text NOT NULL,+ `content` text,+ FOREIGN KEY (`task_id`) REFERENCES `task`(`id`) ON UPDATE cascade ON DELETE cascade,+ FOREIGN KEY (`user_email`) REFERENCES `user`(`email`) ON UPDATE cascade ON DELETE cascade+);+--> statement-breakpoint+INSERT INTO `__new_activity`("id", "task_id", "type", "created_at", "user_email", "content") SELECT "id", "task_id", "type", "created_at", "user_email", "content" FROM `activity`;--> statement-breakpoint+DROP TABLE `activity`;--> statement-breakpoint+ALTER TABLE `__new_activity` RENAME TO `activity`;--> statement-breakpoint+PRAGMA foreign_keys=ON;--> statement-breakpoint+CREATE TABLE `__new_project` (+ `id` text PRIMARY KEY NOT NULL,+ `workspace_id` text NOT NULL,+ `slug` text NOT NULL,+ `icon` text DEFAULT 'Layout',+ `name` text NOT NULL,+ `description` text,+ `created_at` integer DEFAULT '"2025-04-21T21:14:02.511Z"' NOT NULL,+ FOREIGN KEY (`workspace_id`) REFERENCES `workspace`(`id`) ON UPDATE cascade ON DELETE cascade+);+--> statement-breakpoint+INSERT INTO `__new_project`("id", "workspace_id", "slug", "icon", "name", "description", "created_at") SELECT "id", "workspace_id", "slug", "icon", "name", "description", "created_at" FROM `project`;--> statement-breakpoint+DROP TABLE `project`;--> statement-breakpoint+ALTER TABLE `__new_project` RENAME TO `project`;--> statement-breakpoint+CREATE TABLE `__new_task` (+ `id` text PRIMARY KEY NOT NULL,+ `project_id` text NOT NULL,+ `position` integer DEFAULT 0,+ `number` integer DEFAULT 1,+ `assignee_email` text,+ `title` text NOT NULL,+ `description` text,+ `status` text DEFAULT 'to-do' NOT NULL,+ `priority` text DEFAULT 'low',+ `due_date` integer,+ `created_at` integer DEFAULT '"2025-04-21T21:14:02.512Z"' NOT NULL,+ FOREIGN KEY (`project_id`) REFERENCES `project`(`id`) ON UPDATE cascade ON DELETE cascade,+ FOREIGN KEY (`assignee_email`) REFERENCES `user`(`email`) ON UPDATE cascade ON DELETE cascade+);+--> statement-breakpoint+INSERT INTO `__new_task`("id", "project_id", "position", "number", "assignee_email", "title", "description", "status", "priority", "due_date", "created_at") SELECT "id", "project_id", "position", "number", "assignee_email", "title", "description", "status", "priority", "due_date", "created_at" FROM `task`;--> statement-breakpoint+DROP TABLE `task`;--> statement-breakpoint+ALTER TABLE `__new_task` RENAME TO `task`;--> statement-breakpoint+CREATE TABLE `__new_user` (+ `id` text PRIMARY KEY NOT NULL,+ `name` text NOT NULL,+ `password` text NOT NULL,+ `email` text NOT NULL,+ `created_at` integer DEFAULT '"2025-04-21T21:14:02.511Z"' NOT NULL+);+--> statement-breakpoint+INSERT INTO `__new_user`("id", "name", "password", "email", "created_at") SELECT "id", "name", "password", "email", "created_at" FROM `user`;--> statement-breakpoint+DROP TABLE `user`;--> statement-breakpoint+ALTER TABLE `__new_user` RENAME TO `user`;--> statement-breakpoint+CREATE UNIQUE INDEX `user_email_unique` ON `user` (`email`);--> statement-breakpoint+CREATE TABLE `__new_workspace` (+ `id` text PRIMARY KEY NOT NULL,+ `name` text NOT NULL,+ `description` text,+ `owner_email` text NOT NULL,+ `created_at` integer DEFAULT '"2025-04-21T21:14:02.511Z"' NOT NULL,+ FOREIGN KEY (`owner_email`) REFERENCES `user`(`email`) ON UPDATE cascade ON DELETE cascade+);+--> statement-breakpoint+INSERT INTO `__new_workspace`("id", "name", "description", "owner_email", "created_at") SELECT "id", "name", "description", "owner_email", "created_at" FROM `workspace`;--> statement-breakpoint+DROP TABLE `workspace`;--> statement-breakpoint+ALTER TABLE `__new_workspace` RENAME TO `workspace`;--> statement-breakpoint+CREATE TABLE `__new_workspace_member` (+ `id` text PRIMARY KEY NOT NULL,+ `workspace_id` text NOT NULL,+ `user_email` text,+ `role` text DEFAULT 'member' NOT NULL,+ `joined_at` integer DEFAULT '"2025-04-21T21:14:02.511Z"' NOT NULL,+ `status` text DEFAULT 'pending' NOT NULL,+ FOREIGN KEY (`workspace_id`) REFERENCES `workspace`(`id`) ON UPDATE cascade ON DELETE cascade+);+--> statement-breakpoint+INSERT INTO `__new_workspace_member`("id", "workspace_id", "user_email", "role", "joined_at", "status") SELECT "id", "workspace_id", "user_email", "role", "joined_at", "status" FROM `workspace_member`;--> statement-breakpoint+DROP TABLE `workspace_member`;--> statement-breakpoint+ALTER TABLE `__new_workspace_member` RENAME TO `workspace_member`;\ No newline at end of filediff --git a/apps/api/drizzle/meta/0003_snapshot.json b/apps/api/drizzle/meta/0003_snapshot.jsonnew file mode 100644index 000000000..e67cfbd5c--- /dev/null+++ b/apps/api/drizzle/meta/0003_snapshot.json@@ -0,0 +1,573 @@+{+ "version": "6",+ "dialect": "sqlite",+ "id": "9fc96e44-b13b-4ba1-b184-a93eb6fa8c2d",+ "prevId": "0b01528e-2d71-498c-9ab6-1c16128a7c9b",+ "tables": {+ "activity": {+ "name": "activity",+ "columns": {+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true,+ "autoincrement": false+ },+ "task_id": {+ "name": "task_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "type": {+ "name": "type",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "created_at": {+ "name": "created_at",+ "type": "integer",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "'\"2025-04-21T21:14:02.512Z\"'"+ },+ "user_email": {+ "name": "user_email",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "content": {+ "name": "content",+ "type": "text",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ }+ },+ "indexes": {},+ "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_email_user_email_fk": {+ "name": "activity_user_email_user_email_fk",+ "tableFrom": "activity",+ "tableTo": "user",+ "columnsFrom": ["user_email"],+ "columnsTo": ["email"],+ "onDelete": "cascade",+ "onUpdate": "cascade"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "checkConstraints": {}+ },+ "project": {+ "name": "project",+ "columns": {+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true,+ "autoincrement": false+ },+ "workspace_id": {+ "name": "workspace_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "slug": {+ "name": "slug",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "icon": {+ "name": "icon",+ "type": "text",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false,+ "default": "'Layout'"+ },+ "name": {+ "name": "name",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "description": {+ "name": "description",+ "type": "text",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "created_at": {+ "name": "created_at",+ "type": "integer",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "'\"2025-04-21T21:14:02.511Z\"'"+ }+ },+ "indexes": {},+ "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": {},+ "checkConstraints": {}+ },+ "session": {+ "name": "session",+ "columns": {+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true,+ "autoincrement": false+ },+ "user_id": {+ "name": "user_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "expires_at": {+ "name": "expires_at",+ "type": "integer",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ }+ },+ "indexes": {},+ "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": "cascade"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "checkConstraints": {}+ },+ "task": {+ "name": "task",+ "columns": {+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true,+ "autoincrement": false+ },+ "project_id": {+ "name": "project_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "position": {+ "name": "position",+ "type": "integer",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false,+ "default": 0+ },+ "number": {+ "name": "number",+ "type": "integer",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false,+ "default": 1+ },+ "assignee_email": {+ "name": "assignee_email",+ "type": "text",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "title": {+ "name": "title",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "description": {+ "name": "description",+ "type": "text",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "status": {+ "name": "status",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "'to-do'"+ },+ "priority": {+ "name": "priority",+ "type": "text",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false,+ "default": "'low'"+ },+ "due_date": {+ "name": "due_date",+ "type": "integer",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "created_at": {+ "name": "created_at",+ "type": "integer",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "'\"2025-04-21T21:14:02.512Z\"'"+ }+ },+ "indexes": {},+ "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_email_user_email_fk": {+ "name": "task_assignee_email_user_email_fk",+ "tableFrom": "task",+ "tableTo": "user",+ "columnsFrom": ["assignee_email"],+ "columnsTo": ["email"],+ "onDelete": "cascade",+ "onUpdate": "cascade"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "checkConstraints": {}+ },+ "time_entry": {+ "name": "time_entry",+ "columns": {+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true,+ "autoincrement": false+ },+ "task_id": {+ "name": "task_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "user_email": {+ "name": "user_email",+ "type": "text",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "description": {+ "name": "description",+ "type": "text",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "start_time": {+ "name": "start_time",+ "type": "integer",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "end_time": {+ "name": "end_time",+ "type": "integer",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "duration": {+ "name": "duration",+ "type": "integer",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false,+ "default": 0+ },+ "created_at": {+ "name": "created_at",+ "type": "integer",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "'\"2025-04-21T21:14:02.512Z\"'"+ }+ },+ "indexes": {},+ "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_email_user_email_fk": {+ "name": "time_entry_user_email_user_email_fk",+ "tableFrom": "time_entry",+ "tableTo": "user",+ "columnsFrom": ["user_email"],+ "columnsTo": ["email"],+ "onDelete": "cascade",+ "onUpdate": "cascade"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "checkConstraints": {}+ },+ "user": {+ "name": "user",+ "columns": {+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true,+ "autoincrement": false+ },+ "name": {+ "name": "name",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "password": {+ "name": "password",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "email": {+ "name": "email",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "created_at": {+ "name": "created_at",+ "type": "integer",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "'\"2025-04-21T21:14:02.511Z\"'"+ }+ },+ "indexes": {+ "user_email_unique": {+ "name": "user_email_unique",+ "columns": ["email"],+ "isUnique": true+ }+ },+ "foreignKeys": {},+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "checkConstraints": {}+ },+ "workspace": {+ "name": "workspace",+ "columns": {+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true,+ "autoincrement": false+ },+ "name": {+ "name": "name",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "description": {+ "name": "description",+ "type": "text",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "owner_email": {+ "name": "owner_email",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "created_at": {+ "name": "created_at",+ "type": "integer",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "'\"2025-04-21T21:14:02.511Z\"'"+ }+ },+ "indexes": {},+ "foreignKeys": {+ "workspace_owner_email_user_email_fk": {+ "name": "workspace_owner_email_user_email_fk",+ "tableFrom": "workspace",+ "tableTo": "user",+ "columnsFrom": ["owner_email"],+ "columnsTo": ["email"],+ "onDelete": "cascade",+ "onUpdate": "cascade"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "checkConstraints": {}+ },+ "workspace_member": {+ "name": "workspace_member",+ "columns": {+ "id": {+ "name": "id",+ "type": "text",+ "primaryKey": true,+ "notNull": true,+ "autoincrement": false+ },+ "workspace_id": {+ "name": "workspace_id",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "user_email": {+ "name": "user_email",+ "type": "text",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "role": {+ "name": "role",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "'member'"+ },+ "joined_at": {+ "name": "joined_at",+ "type": "integer",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "'\"2025-04-21T21:14:02.511Z\"'"+ },+ "status": {+ "name": "status",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "'pending'"+ }+ },+ "indexes": {},+ "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": "cascade"+ }+ },+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "checkConstraints": {}+ }+ },+ "views": {},+ "enums": {},+ "_meta": {+ "schemas": {},+ "tables": {},+ "columns": {}+ },+ "internal": {+ "indexes": {}+ }+}diff --git a/apps/api/drizzle/meta/_journal.json b/apps/api/drizzle/meta/_journal.jsonindex 1655f0617..edaff2528 100644--- a/apps/api/drizzle/meta/_journal.json+++ b/apps/api/drizzle/meta/_journal.json@@ -22,6 +22,13 @@"when": 1745162073413,"tag": "0002_many_lake","breakpoints": true+ },+ {+ "idx": 3,+ "version": "6",+ "when": 1745270042523,+ "tag": "0003_daffy_amazoness",+ "breakpoints": true}]}diff --git a/apps/api/package.json b/apps/api/package.jsonindex a7e401bd2..294a1d80a 100644--- a/apps/api/package.json+++ b/apps/api/package.json@@ -15,16 +15,17 @@"bcrypt": "^5.1.1","better-sqlite3": "^11.9.1","dotenv": "^16.5.0",+ "drizzle-kit": "^0.31.0","drizzle-orm": "^0.42.0","hono": "^4.7.7","zod": "^3.24.3"},"devDependencies": {+ "@types/bcrypt": "^5.0.2",+ "@types/better-sqlite3": "^7.6.13","@types/node": "^22.14.1",- "tsx": "^4.19.3",- "typescript": "^5.8.3","esbuild": "^0.25.2",- "@types/bcrypt": "^5.0.2",- "@types/better-sqlite3": "^7.6.13"+ "tsx": "^4.19.3",+ "typescript": "^5.8.3"}}diff --git a/apps/api/src/database/schema.ts b/apps/api/src/database/schema.tsindex 9b0ebbd81..4cea393e1 100644--- a/apps/api/src/database/schema.ts+++ b/apps/api/src/database/schema.ts@@ -106,6 +106,29 @@ export const taskTable = sqliteTable("task", {.notNull(),});+export const timeEntryTable = sqliteTable("time_entry", {+ id: text("id")+ .$defaultFn(() => createId())+ .primaryKey(),+ taskId: text("task_id")+ .notNull()+ .references(() => taskTable.id, {+ onDelete: "cascade",+ onUpdate: "cascade",+ }),+ userEmail: text("user_email").references(() => userTable.email, {+ onDelete: "cascade",+ onUpdate: "cascade",+ }),+ description: text("description"),+ startTime: integer("start_time", { mode: "timestamp" }).notNull(),+ endTime: integer("end_time", { mode: "timestamp" }),+ duration: integer("duration").default(0), // Duration in seconds+ createdAt: integer("created_at", { mode: "timestamp" })+ .default(new Date())+ .notNull(),+});+export const activityTable = sqliteTable("activity", {id: text("id").$defaultFn(() => createId())diff --git a/apps/api/src/index.ts b/apps/api/src/index.tsindex dc2e29b21..4dfdbe432 100644--- a/apps/api/src/index.ts+++ b/apps/api/src/index.ts@@ -8,6 +8,7 @@ import db from "./database";import { auth } from "./middlewares/auth";import project from "./project";import task from "./task";+import timeEntry from "./time-entry";import user from "./user";import { validateSessionToken } from "./user/utils/validate-session-token";import setDemoUser from "./utils/set-demo-user";@@ -73,6 +74,7 @@ const workspaceUserRoute = app.route("/workspace-user", workspaceUser);const projectRoute = app.route("/project", project);const taskRoute = app.route("/task", task);const activityRoute = app.route("/activity", activity);+const timeEntryRoute = app.route("/time-entry", timeEntry);try {console.log("Migrating database...");@@ -100,4 +102,5 @@ export type AppType =| typeof projectRoute| typeof taskRoute| typeof activityRoute- | typeof meRoute;+ | typeof meRoute+ | typeof timeEntryRoute;diff --git a/apps/api/src/time-entry/controllers/create-time-entry.ts b/apps/api/src/time-entry/controllers/create-time-entry.tsnew file mode 100644index 000000000..5d89e5676--- /dev/null+++ b/apps/api/src/time-entry/controllers/create-time-entry.ts@@ -0,0 +1,52 @@+import { createId } from "@paralleldrive/cuid2";+import { HTTPException } from "hono/http-exception";+import db from "../../database";+import { timeEntryTable } from "../../database/schema";+import { publishEvent } from "../../events";++async function createTimeEntry({+ taskId,+ userEmail,+ description,+ startTime,+ endTime,+ duration,+}: {+ taskId: string;+ userEmail: string;+ description?: string;+ startTime: Date;+ endTime?: Date;+ duration?: number;+}) {+ const [createdTimeEntry] = await db+ .insert(timeEntryTable)+ .values({+ id: createId(),+ taskId,+ userEmail,+ description: description || "",+ startTime,+ endTime: endTime || null,+ duration: duration || 0,+ })+ .returning();++ if (!createdTimeEntry) {+ throw new HTTPException(500, {+ message: "Failed to create time entry",+ });+ }++ await publishEvent("time-entry.created", {+ timeEntryId: createdTimeEntry.id,+ taskId: createdTimeEntry.taskId,+ userEmail,+ type: "create",+ content: "started time tracking",+ });++ return createdTimeEntry;+}++export default createTimeEntry;diff --git a/apps/api/src/time-entry/controllers/get-time-entries.ts b/apps/api/src/time-entry/controllers/get-time-entries.tsnew file mode 100644index 000000000..d157052e1--- /dev/null+++ b/apps/api/src/time-entry/controllers/get-time-entries.ts@@ -0,0 +1,26 @@+import { eq } from "drizzle-orm";+import db from "../../database";+import { timeEntryTable, userTable } from "../../database/schema";++async function getTimeEntriesByTaskId(taskId: string) {+ const timeEntries = await db+ .select({+ id: timeEntryTable.id,+ taskId: timeEntryTable.taskId,+ userEmail: timeEntryTable.userEmail,+ userName: userTable.name,+ description: timeEntryTable.description,+ startTime: timeEntryTable.startTime,+ endTime: timeEntryTable.endTime,+ duration: timeEntryTable.duration,+ createdAt: timeEntryTable.createdAt,+ })+ .from(timeEntryTable)+ .leftJoin(userTable, eq(timeEntryTable.userEmail, userTable.email))+ .where(eq(timeEntryTable.taskId, taskId))+ .orderBy(timeEntryTable.startTime);++ return timeEntries;+}++export default getTimeEntriesByTaskId;diff --git a/apps/api/src/time-entry/controllers/get-time-entry.ts b/apps/api/src/time-entry/controllers/get-time-entry.tsnew file mode 100644index 000000000..13e75250b--- /dev/null+++ b/apps/api/src/time-entry/controllers/get-time-entry.ts@@ -0,0 +1,14 @@+import { eq } from "drizzle-orm";+import db from "../../database";+import { timeEntryTable } from "../../database/schema";++async function getTimeEntry(id: string) {+ const [timeEntry] = await db+ .select()+ .from(timeEntryTable)+ .where(eq(timeEntryTable.id, id));++ return timeEntry;+}++export default getTimeEntry;diff --git a/apps/api/src/time-entry/controllers/update-time-entry.ts b/apps/api/src/time-entry/controllers/update-time-entry.tsnew file mode 100644index 000000000..946957bb1--- /dev/null+++ b/apps/api/src/time-entry/controllers/update-time-entry.ts@@ -0,0 +1,35 @@+import { eq } from "drizzle-orm";+import { HTTPException } from "hono/http-exception";+import db from "../../database";+import { timeEntryTable } from "../../database/schema";++async function updateTimeEntry(+ timeEntryId: string,+ endTime: Date,+ duration: number,+ userEmail: string,+) {+ const [existingTimeEntry] = await db+ .select()+ .from(timeEntryTable)+ .where(eq(timeEntryTable.id, timeEntryId));++ if (!existingTimeEntry) {+ throw new HTTPException(404, {+ message: "Time entry not found",+ });+ }++ const [updatedTimeEntry] = await db+ .update(timeEntryTable)+ .set({+ endTime,+ duration,+ })+ .where(eq(timeEntryTable.id, timeEntryId))+ .returning();++ return updatedTimeEntry;+}++export default updateTimeEntry;diff --git a/apps/api/src/time-entry/index.ts b/apps/api/src/time-entry/index.tsnew file mode 100644index 000000000..7f8f5b68e--- /dev/null+++ b/apps/api/src/time-entry/index.ts@@ -0,0 +1,78 @@+import { zValidator } from "@hono/zod-validator";+import { Hono } from "hono";+import { z } from "zod";+import createTimeEntry from "./controllers/create-time-entry";+import getTimeEntriesByTaskId from "./controllers/get-time-entries";+import getTimeEntry from "./controllers/get-time-entry";+import updateTimeEntry from "./controllers/update-time-entry";++const timeEntry = new Hono<{+ Variables: {+ userEmail: string;+ };+}>()+ .get(+ "/task/:taskId",+ zValidator("param", z.object({ taskId: z.string() })),+ async (c) => {+ const { taskId } = c.req.valid("param");+ const timeEntries = await getTimeEntriesByTaskId(taskId);+ return c.json(timeEntries);+ },+ )+ .get("/:id", zValidator("param", z.object({ id: z.string() })), async (c) => {+ const { id } = c.req.valid("param");+ const timeEntry = await getTimeEntry(id);+ return c.json(timeEntry);+ })+ .post(+ "/",+ zValidator(+ "json",+ z.object({+ taskId: z.string(),+ description: z.string().optional(),+ startTime: z.string(),+ }),+ ),+ async (c) => {+ const { taskId, description, startTime } = c.req.valid("json");+ const userEmail = c.get("userEmail");++ const timeEntry = await createTimeEntry({+ taskId,+ userEmail,+ description,+ startTime: new Date(startTime),+ });++ return c.json(timeEntry);+ },+ )+ .put(+ "/:id",+ zValidator("param", z.object({ id: z.string() })),+ zValidator(+ "json",+ z.object({+ endTime: z.string(),+ duration: z.number(),+ }),+ ),+ async (c) => {+ const { id } = c.req.valid("param");+ const { endTime, duration } = c.req.valid("json");+ const userEmail = c.get("userEmail");++ const timeEntry = await updateTimeEntry(+ id,+ new Date(endTime),+ duration,+ userEmail,+ );++ return c.json(timeEntry);+ },+ );++export default timeEntry;diff --git a/apps/docs/content/docs/terminology/tasks.mdx b/apps/docs/content/docs/terminology/tasks.mdxindex 93fed439e..a4afd29af 100644--- a/apps/docs/content/docs/terminology/tasks.mdx+++ b/apps/docs/content/docs/terminology/tasks.mdx@@ -7,7 +7,7 @@ import { Step, Steps } from 'fumadocs-ui/components/steps';## What are Tasks?-Tasks are the fundamental work items in Kaneo. They represent specific actions that need to be completed within a project. Each task can have various attributes such as assignees, due dates, and status.+Tasks are the fundamental work items in Kaneo. They represent specific actions that need to be completed within a project. Each task can have various attributes such as assignees, due dates, status, and time tracking.## Creating Tasks@@ -44,6 +44,7 @@ Tasks in Kaneo have several properties that help you track and manage your work:- **Assignee**: The person responsible for completing the task- **Due Date**: When the task should be completed- **Priority**: The importance level of the task+- **Time Tracking**: Record time spent working on the task## Managing Tasks@@ -52,4 +53,5 @@ You can manage tasks in several ways:- **Edit**: Click on a task to open its details and make changes- **Change Status**: Drag tasks between columns in Board view or select a new status in List view- **Assign**: Assign or reassign tasks to team members-- **Comment**: Add comments to discuss the task with your team\ No newline at end of file+- **Comment**: Add comments to discuss the task with your team+- **Track Time**: Start and stop time tracking to record work duration\ No newline at end of filediff --git a/apps/web/index.html b/apps/web/index.htmlindex 29f39749d..7f7561fb9 100644--- a/apps/web/index.html+++ b/apps/web/index.html@@ -5,19 +5,22 @@<meta charset="UTF-8" /><title>Kaneo - Open Source Project Management</title><meta name="title" content="Kaneo - Open Source Project Management">- <meta name="description" content="An open source project management platform focused on simplicity and efficiency. Organize projects, collaborate with your team, and get work done.">+ <meta name="description"+ content="An open source project management platform focused on simplicity and efficiency. Organize projects, collaborate with your team, and get work done."><meta name="keywords" content="project management, open source, task management, team collaboration, kanban"><meta property="og:type" content="website"><meta property="og:url" content="https://kaneo.app"><meta property="og:title" content="Kaneo - Open Source Project Management">- <meta property="og:description" content="An open source project management platform focused on simplicity and efficiency. Organize projects, collaborate with your team, and get work done.">+ <meta property="og:description"+ content="An open source project management platform focused on simplicity and efficiency. Organize projects, collaborate with your team, and get work done."><meta property="og:image" content="https://assets.kaneo.app/readme-card.png"><meta property="twitter:card" content="summary_large_image"><meta property="twitter:url" content="https://kaneo.app"><meta property="twitter:title" content="Kaneo - Open Source Project Management">- <meta property="twitter:description" content="An open source project management platform focused on simplicity and efficiency. Organize projects, collaborate with your team, and get work done.">+ <meta property="twitter:description"+ content="An open source project management platform focused on simplicity and efficiency. Organize projects, collaborate with your team, and get work done."><meta property="twitter:image" content="https://assets.kaneo.app/readme-card.png"><link rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png">@@ -30,7 +33,7 @@<link rel="apple-touch-icon" sizes="152x152" href="/apple-icon-152x152.png"><link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180x180.png"><link rel="icon" type="image/png" sizes="192x192" href="/android-icon-192x192.png">- <link rel="icon" type="image/svg" sizes="96x96" href="/logo.svg">+ <link rel="icon" type="image/png" sizes="96x96" href="/favicon-96x96.png"><link rel="manifest" href="/manifest.json"><meta name="viewport" content="width=device-width, initial-scale=1.0" />diff --git a/apps/web/public/android-icon-144x144.png b/apps/web/public/android-icon-144x144.pngindex 29b7bd6c0..f5a2fac9e 100644Binary files a/apps/web/public/android-icon-144x144.png and b/apps/web/public/android-icon-144x144.png differdiff --git a/apps/web/public/android-icon-192x192.png b/apps/web/public/android-icon-192x192.pngindex b02ea99f7..2278a3267 100644Binary files a/apps/web/public/android-icon-192x192.png and b/apps/web/public/android-icon-192x192.png differdiff --git a/apps/web/public/android-icon-36x36.png b/apps/web/public/android-icon-36x36.pngindex 1fa0810be..5d8859cae 100644Binary files a/apps/web/public/android-icon-36x36.png and b/apps/web/public/android-icon-36x36.png differdiff --git a/apps/web/public/android-icon-48x48.png b/apps/web/public/android-icon-48x48.pngindex b4d49d025..210dc4a7a 100644Binary files a/apps/web/public/android-icon-48x48.png and b/apps/web/public/android-icon-48x48.png differdiff --git a/apps/web/public/android-icon-72x72.png b/apps/web/public/android-icon-72x72.pngindex d2092e9a4..0ec472ee0 100644Binary files a/apps/web/public/android-icon-72x72.png and b/apps/web/public/android-icon-72x72.png differdiff --git a/apps/web/public/android-icon-96x96.png b/apps/web/public/android-icon-96x96.pngindex c2edfb376..0f30b525e 100644Binary files a/apps/web/public/android-icon-96x96.png and b/apps/web/public/android-icon-96x96.png differdiff --git a/apps/web/public/apple-icon-114x114.png b/apps/web/public/apple-icon-114x114.pngindex b86c4fa3e..e2c78a4a1 100644Binary files a/apps/web/public/apple-icon-114x114.png and b/apps/web/public/apple-icon-114x114.png differdiff --git a/apps/web/public/apple-icon-120x120.png b/apps/web/public/apple-icon-120x120.pngindex 4c340e3c3..f3b661063 100644Binary files a/apps/web/public/apple-icon-120x120.png and b/apps/web/public/apple-icon-120x120.png differdiff --git a/apps/web/public/apple-icon-144x144.png b/apps/web/public/apple-icon-144x144.pngindex 29b7bd6c0..f5a2fac9e 100644Binary files a/apps/web/public/apple-icon-144x144.png and b/apps/web/public/apple-icon-144x144.png differdiff --git a/apps/web/public/apple-icon-152x152.png b/apps/web/public/apple-icon-152x152.pngindex ab997dc53..1bdc5c4dd 100644Binary files a/apps/web/public/apple-icon-152x152.png and b/apps/web/public/apple-icon-152x152.png differdiff --git a/apps/web/public/apple-icon-180x180.png b/apps/web/public/apple-icon-180x180.pngindex ca85675f1..b719dc3c7 100644Binary files a/apps/web/public/apple-icon-180x180.png and b/apps/web/public/apple-icon-180x180.png differdiff --git a/apps/web/public/apple-icon-57x57.png b/apps/web/public/apple-icon-57x57.pngindex b911751f8..242dc9d80 100644Binary files a/apps/web/public/apple-icon-57x57.png and b/apps/web/public/apple-icon-57x57.png differdiff --git a/apps/web/public/apple-icon-60x60.png b/apps/web/public/apple-icon-60x60.pngindex f3ebbdd30..773838bb1 100644Binary files a/apps/web/public/apple-icon-60x60.png and b/apps/web/public/apple-icon-60x60.png differdiff --git a/apps/web/public/apple-icon-72x72.png b/apps/web/public/apple-icon-72x72.pngindex d2092e9a4..0ec472ee0 100644Binary files a/apps/web/public/apple-icon-72x72.png and b/apps/web/public/apple-icon-72x72.png differdiff --git a/apps/web/public/apple-icon-76x76.png b/apps/web/public/apple-icon-76x76.pngindex 0f8b04d06..a5b99a8a0 100644Binary files a/apps/web/public/apple-icon-76x76.png and b/apps/web/public/apple-icon-76x76.png differdiff --git a/apps/web/public/apple-icon-precomposed.png b/apps/web/public/apple-icon-precomposed.pngindex 24e9f5931..498cf0fe2 100644Binary files a/apps/web/public/apple-icon-precomposed.png and b/apps/web/public/apple-icon-precomposed.png differdiff --git a/apps/web/public/apple-icon.png b/apps/web/public/apple-icon.pngindex 24e9f5931..498cf0fe2 100644Binary files a/apps/web/public/apple-icon.png and b/apps/web/public/apple-icon.png differdiff --git a/apps/web/public/favicon-16x16.png b/apps/web/public/favicon-16x16.pngindex d4e2700a6..edbf0fac2 100644Binary files a/apps/web/public/favicon-16x16.png and b/apps/web/public/favicon-16x16.png differdiff --git a/apps/web/public/favicon-32x32.png b/apps/web/public/favicon-32x32.pngindex 81332daeb..5a4e876c8 100644Binary files a/apps/web/public/favicon-32x32.png and b/apps/web/public/favicon-32x32.png differdiff --git a/apps/web/public/favicon-96x96.png b/apps/web/public/favicon-96x96.pngindex 26626c718..0f30b525e 100644Binary files a/apps/web/public/favicon-96x96.png and b/apps/web/public/favicon-96x96.png differdiff --git a/apps/web/public/favicon.ico b/apps/web/public/favicon.icoindex f1683992a..305854654 100644Binary files a/apps/web/public/favicon.ico and b/apps/web/public/favicon.ico differdiff --git a/apps/web/public/logo.svg b/apps/web/public/logo.svgdeleted file mode 100644index 133f00b37..000000000--- a/apps/web/public/logo.svg+++ /dev/null@@ -1,25 +0,0 @@-<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">-<g filter="url(#filter0_d_1_14)">-<rect x="2" y="1" width="32" height="32" rx="4" fill="url(#paint0_linear_1_14)"/>-<path d="M14.75 7.25H9.33333C8.73502 7.25 8.25 7.73502 8.25 8.33333V13.75C8.25 14.3483 8.73502 14.8333 9.33333 14.8333H14.75C15.3483 14.8333 15.8333 14.3483 15.8333 13.75V8.33333C15.8333 7.73502 15.3483 7.25 14.75 7.25Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>-<path d="M26.6667 7.25H21.25C20.6517 7.25 20.1667 7.73502 20.1667 8.33333V13.75C20.1667 14.3483 20.6517 14.8333 21.25 14.8333H26.6667C27.265 14.8333 27.75 14.3483 27.75 13.75V8.33333C27.75 7.73502 27.265 7.25 26.6667 7.25Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>-<path d="M26.6667 19.1667H21.25C20.6517 19.1667 20.1667 19.6517 20.1667 20.25V25.6667C20.1667 26.265 20.6517 26.75 21.25 26.75H26.6667C27.265 26.75 27.75 26.265 27.75 25.6667V20.25C27.75 19.6517 27.265 19.1667 26.6667 19.1667Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>-<path d="M14.75 19.1667H9.33333C8.73502 19.1667 8.25 19.6517 8.25 20.25V25.6667C8.25 26.265 8.73502 26.75 9.33333 26.75H14.75C15.3483 26.75 15.8333 26.265 15.8333 25.6667V20.25C15.8333 19.6517 15.3483 19.1667 14.75 19.1667Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>-</g>-<defs>-<filter id="filter0_d_1_14" x="0" y="0" width="36" height="36" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">-<feFlood flood-opacity="0" result="BackgroundImageFix"/>-<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>-<feOffset dy="1"/>-<feGaussianBlur stdDeviation="1"/>-<feComposite in2="hardAlpha" operator="out"/>-<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0"/>-<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1_14"/>-<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1_14" result="shape"/>-</filter>-<linearGradient id="paint0_linear_1_14" x1="18" y1="1" x2="18" y2="33" gradientUnits="userSpaceOnUse">-<stop stop-color="#6366F1"/>-<stop offset="1" stop-color="#A855F7"/>-</linearGradient>-</defs>-</svg>diff --git a/apps/web/public/ms-icon-144x144.png b/apps/web/public/ms-icon-144x144.pngindex 29b7bd6c0..f5a2fac9e 100644Binary files a/apps/web/public/ms-icon-144x144.png and b/apps/web/public/ms-icon-144x144.png differdiff --git a/apps/web/public/ms-icon-150x150.png b/apps/web/public/ms-icon-150x150.pngindex 82059809a..8fe516a6e 100644Binary files a/apps/web/public/ms-icon-150x150.png and b/apps/web/public/ms-icon-150x150.png differdiff --git a/apps/web/public/ms-icon-310x310.png b/apps/web/public/ms-icon-310x310.pngindex d3660aa0e..a0f9e43e8 100644Binary files a/apps/web/public/ms-icon-310x310.png and b/apps/web/public/ms-icon-310x310.png differdiff --git a/apps/web/public/ms-icon-70x70.png b/apps/web/public/ms-icon-70x70.pngindex d816282e9..67237c33d 100644Binary files a/apps/web/public/ms-icon-70x70.png and b/apps/web/public/ms-icon-70x70.png differdiff --git a/apps/web/src/components/task/task-time-tracking.tsx b/apps/web/src/components/task/task-time-tracking.tsxnew file mode 100644index 000000000..92e177284--- /dev/null+++ b/apps/web/src/components/task/task-time-tracking.tsx@@ -0,0 +1,174 @@+import { Button } from "@/components/ui/button";+import useCreateTimeEntry from "@/hooks/mutations/time-entry/use-create-time-entry";+import useUpdateTimeEntry from "@/hooks/mutations/time-entry/use-update-time-entry";+import useGetTimeEntriesByTaskId from "@/hooks/queries/time-entry/use-get-time-entries";+import { formatDuration } from "@/lib/format-duration";+import type { TimeEntry } from "@/types/time-entry";+import { format } from "date-fns";+import { Clock, Pause, Play } from "lucide-react";+import { useEffect, useState } from "react";+import { toast } from "sonner";++interface TaskTimeTrackingProps {+ taskId: string;+}++function TaskTimeTracking({ taskId }: TaskTimeTrackingProps) {+ const { data: timeEntries } = useGetTimeEntriesByTaskId(taskId);+ const { mutateAsync: createTimeEntry } = useCreateTimeEntry();+ const { mutateAsync: updateTimeEntry } = useUpdateTimeEntry(taskId);++ const [activeTimeEntry, setActiveTimeEntry] = useState<TimeEntry | null>(+ null,+ );+ const [elapsedTime, setElapsedTime] = useState(0);++ useEffect(() => {+ if (timeEntries) {+ const active = timeEntries.find((entry) => !entry.endTime);+ setActiveTimeEntry(active || null);++ if (active) {+ const startTime = new Date(active.startTime).getTime();+ const elapsed = Math.floor((Date.now() - startTime) / 1000);+ setElapsedTime(elapsed);+ }+ }+ }, [timeEntries]);++ useEffect(() => {+ if (!activeTimeEntry) return;++ const interval = setInterval(() => {+ const startTime = new Date(activeTimeEntry.startTime).getTime();+ const elapsed = Math.floor((Date.now() - startTime) / 1000);+ setElapsedTime(elapsed);+ }, 1000);++ return () => clearInterval(interval);+ }, [activeTimeEntry]);++ const startTracking = async () => {+ try {+ const newTimeEntry = await createTimeEntry({+ taskId,+ startTime: new Date().toISOString(),+ });++ setActiveTimeEntry(newTimeEntry);+ setElapsedTime(0);+ toast.success("Time tracking started");+ } catch (error) {+ toast.error("Failed to start time tracking");+ }+ };++ const stopTracking = async () => {+ if (!activeTimeEntry) return;++ try {+ await updateTimeEntry({+ id: activeTimeEntry.id,+ endTime: new Date().toISOString(),+ duration: elapsedTime,+ });++ setActiveTimeEntry(null);+ toast.success("Time tracking stopped");+ } catch (error) {+ toast.error("Failed to stop time tracking");+ }+ };++ // Calculate total time spent on task+ const totalTimeSpent =+ timeEntries?.reduce((total, entry) => {+ return total + (entry.duration || 0);+ }, 0) || 0;++ // Add active time to total+ const grandTotal = totalTimeSpent + (activeTimeEntry ? elapsedTime : 0);++ return (+ <div className="space-y-4">+ <div className="flex items-center justify-between">+ <h2 className="text-base font-medium text-zinc-900 dark:text-zinc-100">+ Time Tracking+ </h2>+ <div className="flex items-center gap-2">+ {activeTimeEntry ? (+ <Button+ size="sm"+ variant="outline"+ onClick={stopTracking}+ className="flex items-center gap-1"+ >+ <Pause className="w-3.5 h-3.5" />+ Stop+ </Button>+ ) : (+ <Button+ size="sm"+ variant="outline"+ onClick={startTracking}+ className="flex items-center gap-1"+ >+ <Play className="w-3.5 h-3.5" />+ Start+ </Button>+ )}+ </div>+ </div>++ <div className="flex items-center gap-3 p-3 bg-zinc-50 dark:bg-zinc-800 rounded-md">+ <Clock className="w-5 h-5 text-zinc-500 dark:text-zinc-400" />+ <div className="flex-1">+ <div className="text-sm font-medium text-zinc-900 dark:text-zinc-100">+ {formatDuration(grandTotal)}+ </div>+ <div className="text-xs text-zinc-500 dark:text-zinc-400">+ {activeTimeEntry ? "Currently tracking" : "Total time spent"}+ </div>+ </div>+ {activeTimeEntry && (+ <div className="text-sm font-medium text-zinc-900 dark:text-zinc-100">+ {formatDuration(elapsedTime)}+ </div>+ )}+ </div>++ {timeEntries && timeEntries.length > 0 && (+ <div className="space-y-2 mt-4">+ <h3 className="text-sm font-medium text-zinc-900 dark:text-zinc-100">+ Time Log+ </h3>+ <div className="space-y-2">+ {timeEntries.map((entry) => (+ <div+ key={entry.id}+ className="flex items-center justify-between p-2 text-sm border border-zinc-200 dark:border-zinc-800 rounded-md"+ >+ <div>+ <div className="font-medium">+ {entry.description || "Time entry"}+ </div>+ <div className="text-xs text-zinc-500 dark:text-zinc-400">+ {format(new Date(entry.startTime), "MMM d, yyyy h:mm a")}+ {entry.endTime && (+ <> - {format(new Date(entry.endTime), "h:mm a")}</>+ )}+ </div>+ </div>+ <div className="font-medium">+ {entry.duration ? formatDuration(entry.duration) : "00:00"}+ </div>+ </div>+ ))}+ </div>+ </div>+ )}+ </div>+ );+}++export default TaskTimeTracking;diff --git a/apps/web/src/fetchers/time-entry/create-time-entry.ts b/apps/web/src/fetchers/time-entry/create-time-entry.tsnew file mode 100644index 000000000..8e66eb973--- /dev/null+++ b/apps/web/src/fetchers/time-entry/create-time-entry.ts@@ -0,0 +1,25 @@+import { client } from "@kaneo/libs";+import type { InferRequestType } from "hono/client";++export type CreateTimeEntryRequest = InferRequestType<+ (typeof client)["time-entry"]["$post"]+>["json"];++async function createTimeEntry({+ taskId,+ description,+ startTime,+}: CreateTimeEntryRequest) {+ const response = await client["time-entry"].$post({+ json: {+ taskId,+ description,+ startTime,+ },+ });++ const data = await response.json();+ return data;+}++export default createTimeEntry;diff --git a/apps/web/src/fetchers/time-entry/get-time-entries.ts b/apps/web/src/fetchers/time-entry/get-time-entries.tsnew file mode 100644index 000000000..00c0b5d71--- /dev/null+++ b/apps/web/src/fetchers/time-entry/get-time-entries.ts@@ -0,0 +1,12 @@+import { client } from "@kaneo/libs";++async function getTimeEntriesByTaskId(taskId: string) {+ const response = await client["time-entry"].task[":taskId"].$get({+ param: { taskId },+ });++ const data = await response.json();+ return data;+}++export default getTimeEntriesByTaskId;diff --git a/apps/web/src/fetchers/time-entry/update-time-entry.ts b/apps/web/src/fetchers/time-entry/update-time-entry.tsnew file mode 100644index 000000000..3f61e86e5--- /dev/null+++ b/apps/web/src/fetchers/time-entry/update-time-entry.ts@@ -0,0 +1,27 @@+import { client } from "@kaneo/libs";+import type { InferRequestType } from "hono/client";++export type UpdateTimeEntryRequest = InferRequestType<+ (typeof client)["time-entry"][":id"]["$put"]+>["json"] & {+ id: string;+};++async function updateTimeEntry({+ id,+ endTime,+ duration,+}: UpdateTimeEntryRequest) {+ const response = await client["time-entry"][":id"].$put({+ param: { id },+ json: {+ endTime,+ duration,+ },+ });++ const data = await response.json();+ return data;+}++export default updateTimeEntry;diff --git a/apps/web/src/hooks/mutations/time-entry/use-create-time-entry.ts b/apps/web/src/hooks/mutations/time-entry/use-create-time-entry.tsnew file mode 100644index 000000000..dca8a26c0--- /dev/null+++ b/apps/web/src/hooks/mutations/time-entry/use-create-time-entry.ts@@ -0,0 +1,19 @@+import createTimeEntry, {+ type CreateTimeEntryRequest,+} from "@/fetchers/time-entry/create-time-entry";+import { useMutation, useQueryClient } from "@tanstack/react-query";++function useCreateTimeEntry() {+ const queryClient = useQueryClient();++ return useMutation({+ mutationFn: (data: CreateTimeEntryRequest) => createTimeEntry(data),+ onSuccess: (_, variables) => {+ queryClient.invalidateQueries({+ queryKey: ["time-entries", variables.taskId],+ });+ },+ });+}++export default useCreateTimeEntry;diff --git a/apps/web/src/hooks/mutations/time-entry/use-update-time-entry.ts b/apps/web/src/hooks/mutations/time-entry/use-update-time-entry.tsnew file mode 100644index 000000000..15640ca7c--- /dev/null+++ b/apps/web/src/hooks/mutations/time-entry/use-update-time-entry.ts@@ -0,0 +1,19 @@+import updateTimeEntry, {+ type UpdateTimeEntryRequest,+} from "@/fetchers/time-entry/update-time-entry";+import { useMutation, useQueryClient } from "@tanstack/react-query";++function useUpdateTimeEntry(taskId: string) {+ const queryClient = useQueryClient();++ return useMutation({+ mutationFn: (data: UpdateTimeEntryRequest) => updateTimeEntry(data),+ onSuccess: () => {+ queryClient.invalidateQueries({+ queryKey: ["time-entries", taskId],+ });+ },+ });+}++export default useUpdateTimeEntry;diff --git a/apps/web/src/hooks/queries/time-entry/use-get-time-entries.ts b/apps/web/src/hooks/queries/time-entry/use-get-time-entries.tsnew file mode 100644index 000000000..16afba16a--- /dev/null+++ b/apps/web/src/hooks/queries/time-entry/use-get-time-entries.ts@@ -0,0 +1,12 @@+import getTimeEntriesByTaskId from "@/fetchers/time-entry/get-time-entries";+import { useQuery } from "@tanstack/react-query";++function useGetTimeEntriesByTaskId(taskId: string) {+ return useQuery({+ queryKey: ["time-entries", taskId],+ queryFn: () => getTimeEntriesByTaskId(taskId),+ enabled: !!taskId,+ });+}++export default useGetTimeEntriesByTaskId;diff --git a/apps/web/src/lib/format-duration.ts b/apps/web/src/lib/format-duration.tsnew file mode 100644index 000000000..132747e03--- /dev/null+++ b/apps/web/src/lib/format-duration.ts@@ -0,0 +1,15 @@+export function formatDuration(seconds: number): string {+ const hours = Math.floor(seconds / 3600);+ const minutes = Math.floor((seconds % 3600) / 60);+ const remainingSeconds = seconds % 60;++ if (hours > 0) {+ return `${hours}h ${minutes}m ${remainingSeconds}s`;+ }++ if (minutes > 0) {+ return `${minutes}m ${remainingSeconds}s`;+ }++ return `${remainingSeconds}s`;+}diff --git a/apps/web/src/routes/dashboard/workspace/$workspaceId/project/$projectId/task/$taskId.tsx b/apps/web/src/routes/dashboard/workspace/$workspaceId/project/$projectId/task/$taskId.tsxindex b6c93e565..7199047b0 100644--- a/apps/web/src/routes/dashboard/workspace/$workspaceId/project/$projectId/task/$taskId.tsx+++ b/apps/web/src/routes/dashboard/workspace/$workspaceId/project/$projectId/task/$taskId.tsx@@ -3,6 +3,7 @@ import TaskActivities from "@/components/task/task-activities";import TaskComment from "@/components/task/task-comment";import TaskDescription from "@/components/task/task-description";import TaskInfo from "@/components/task/task-info";+import TaskTimeTracking from "@/components/task/task-time-tracking";import TaskTitle from "@/components/task/task-title";import useGetTask from "@/hooks/queries/task/use-get-task";import useProjectStore from "@/store/project";@@ -77,6 +78,7 @@ function TaskEditPage() {<div className="px-6 py-6 space-y-6 flex-1"><div className="space-y-8"><TaskDescription setIsSaving={setIsSaving} />+ <TaskTimeTracking taskId={taskId} /><div className="space-y-4"><div className="flex items-center justify-between">diff --git a/apps/web/src/types/time-entry/index.ts b/apps/web/src/types/time-entry/index.tsnew file mode 100644index 000000000..48e204060--- /dev/null+++ b/apps/web/src/types/time-entry/index.ts@@ -0,0 +1,10 @@+export type TimeEntry = {+ duration: number | null;+ id: string;+ createdAt: string;+ description: string | null;+ userEmail: string | null;+ taskId: string;+ startTime: string;+ endTime: string | null;+};diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex f05bb7bdf..921a84bdc 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -53,6 +53,9 @@ importers:dotenv:specifier: ^16.5.0version: 16.5.0+ drizzle-kit:+ specifier: ^0.31.0+ version: 0.31.0drizzle-orm:specifier: ^0.42.0@@ -583,105 +586,212 @@ packages:peerDependencies:react: '>=16.8.0'+ '@drizzle-team/[email protected]':+ resolution: {integrity: sha512-z33Il7l5dKjUgGULTqBsQBQwckHh5AbIuxhdsIxDDiZAzBOrZO6q9ogcWC65kU382AfynTfgNumVcNIjuIua6w==}+'@emnapi/[email protected]':resolution: {integrity: sha512-pBPWdu6MLKROBX05wSNKcNb++m5Er+KQ9QkB+WVM+pW2Kx9hoSrVTnu3BdkI5eBLZoKu/J6mW/B6i6bJB2ytXQ==}+ '@esbuild-kit/[email protected]':+ resolution: {integrity: sha512-sPRAnw9CdSsRmEtnsl2WXWdyquogVpB3yZ3dgwJfe8zrOzTsV7cJvmwrKVa+0ma5BoiGJ+BoqkMvawbayKUsqQ==}+ deprecated: 'Merged into tsx: https://tsx.is'++ '@esbuild-kit/[email protected]':+ resolution: {integrity: sha512-FxEMIkJKnodyA1OaCUoEvbYRkoZlLZ4d/eXFu9Fh8CbBBgP5EmZxrfTRyN0qpXZ4vOvqnE5YdRdcrmUUXuU+dA==}+ deprecated: 'Merged into tsx: https://tsx.is'+'@esbuild/[email protected]':resolution: {integrity: sha512-wCIboOL2yXZym2cgm6mlA742s9QeJ8DjGVaL39dLN4rRwrOgOyYSnOaFPhKZGLb2ngj4EyfAFjsNJwPXZvseag==}engines: {node: '>=18'}cpu: [ppc64]os: [aix]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==}+ engines: {node: '>=12'}+ cpu: [arm64]+ os: [android]+'@esbuild/[email protected]':resolution: {integrity: sha512-5ZAX5xOmTligeBaeNEPnPaeEuah53Id2tX4c2CVP3JaROTH+j4fnfHCkr1PjXMd78hMst+TlkfKcW/DlTq0i4w==}engines: {node: '>=18'}cpu: [arm64]os: [android]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==}+ engines: {node: '>=12'}+ cpu: [arm]+ os: [android]+'@esbuild/[email protected]':resolution: {integrity: sha512-NQhH7jFstVY5x8CKbcfa166GoV0EFkaPkCKBQkdPJFvo5u+nGXLEH/ooniLb3QI8Fk58YAx7nsPLozUWfCBOJA==}engines: {node: '>=18'}cpu: [arm]os: [android]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==}+ engines: {node: '>=12'}+ cpu: [x64]+ os: [android]+'@esbuild/[email protected]':resolution: {integrity: sha512-Ffcx+nnma8Sge4jzddPHCZVRvIfQ0kMsUsCMcJRHkGJ1cDmhe4SsrYIjLUKn1xpHZybmOqCWwB0zQvsjdEHtkg==}engines: {node: '>=18'}cpu: [x64]os: [android]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==}+ engines: {node: '>=12'}+ cpu: [arm64]+ os: [darwin]+'@esbuild/[email protected]':resolution: {integrity: sha512-MpM6LUVTXAzOvN4KbjzU/q5smzryuoNjlriAIx+06RpecwCkL9JpenNzpKd2YMzLJFOdPqBpuub6eVRP5IgiSA==}engines: {node: '>=18'}cpu: [arm64]os: [darwin]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==}+ engines: {node: '>=12'}+ cpu: [x64]+ os: [darwin]+'@esbuild/[email protected]':resolution: {integrity: sha512-5eRPrTX7wFyuWe8FqEFPG2cU0+butQQVNcT4sVipqjLYQjjh8a8+vUTfgBKM88ObB85ahsnTwF7PSIt6PG+QkA==}engines: {node: '>=18'}cpu: [x64]os: [darwin]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==}+ engines: {node: '>=12'}+ cpu: [arm64]+ os: [freebsd]+'@esbuild/[email protected]':resolution: {integrity: sha512-mLwm4vXKiQ2UTSX4+ImyiPdiHjiZhIaE9QvC7sw0tZ6HoNMjYAqQpGyui5VRIi5sGd+uWq940gdCbY3VLvsO1w==}engines: {node: '>=18'}cpu: [arm64]os: [freebsd]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==}+ engines: {node: '>=12'}+ cpu: [x64]+ os: [freebsd]+'@esbuild/[email protected]':resolution: {integrity: sha512-6qyyn6TjayJSwGpm8J9QYYGQcRgc90nmfdUb0O7pp1s4lTY+9D0H9O02v5JqGApUyiHOtkz6+1hZNvNtEhbwRQ==}engines: {node: '>=18'}cpu: [x64]os: [freebsd]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==}+ engines: {node: '>=12'}+ cpu: [arm64]+ os: [linux]+'@esbuild/[email protected]':resolution: {integrity: sha512-gq/sjLsOyMT19I8obBISvhoYiZIAaGF8JpeXu1u8yPv8BE5HlWYobmlsfijFIZ9hIVGYkbdFhEqC0NvM4kNO0g==}engines: {node: '>=18'}cpu: [arm64]os: [linux]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==}+ engines: {node: '>=12'}+ cpu: [arm]+ os: [linux]+'@esbuild/[email protected]':resolution: {integrity: sha512-UHBRgJcmjJv5oeQF8EpTRZs/1knq6loLxTsjc3nxO9eXAPDLcWW55flrMVc97qFPbmZP31ta1AZVUKQzKTzb0g==}engines: {node: '>=18'}cpu: [arm]os: [linux]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==}+ engines: {node: '>=12'}+ cpu: [ia32]+ os: [linux]+'@esbuild/[email protected]':resolution: {integrity: sha512-bBYCv9obgW2cBP+2ZWfjYTU+f5cxRoGGQ5SeDbYdFCAZpYWrfjjfYwvUpP8MlKbP0nwZ5gyOU/0aUzZ5HWPuvQ==}engines: {node: '>=18'}cpu: [ia32]os: [linux]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==}+ engines: {node: '>=12'}+ cpu: [loong64]+ os: [linux]+'@esbuild/[email protected]':resolution: {integrity: sha512-SHNGiKtvnU2dBlM5D8CXRFdd+6etgZ9dXfaPCeJtz+37PIUlixvlIhI23L5khKXs3DIzAn9V8v+qb1TRKrgT5w==}engines: {node: '>=18'}cpu: [loong64]os: [linux]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==}+ engines: {node: '>=12'}+ cpu: [mips64el]+ os: [linux]+'@esbuild/[email protected]':resolution: {integrity: sha512-hDDRlzE6rPeoj+5fsADqdUZl1OzqDYow4TB4Y/3PlKBD0ph1e6uPHzIQcv2Z65u2K0kpeByIyAjCmjn1hJgG0Q==}engines: {node: '>=18'}cpu: [mips64el]os: [linux]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==}+ engines: {node: '>=12'}+ cpu: [ppc64]+ os: [linux]+'@esbuild/[email protected]':resolution: {integrity: sha512-tsHu2RRSWzipmUi9UBDEzc0nLc4HtpZEI5Ba+Omms5456x5WaNuiG3u7xh5AO6sipnJ9r4cRWQB2tUjPyIkc6g==}engines: {node: '>=18'}cpu: [ppc64]os: [linux]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==}+ engines: {node: '>=12'}+ cpu: [riscv64]+ os: [linux]+'@esbuild/[email protected]':resolution: {integrity: sha512-k4LtpgV7NJQOml/10uPU0s4SAXGnowi5qBSjaLWMojNCUICNu7TshqHLAEbkBdAszL5TabfvQ48kK84hyFzjnw==}engines: {node: '>=18'}cpu: [riscv64]os: [linux]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==}+ engines: {node: '>=12'}+ cpu: [s390x]+ os: [linux]+'@esbuild/[email protected]':resolution: {integrity: sha512-GRa4IshOdvKY7M/rDpRR3gkiTNp34M0eLTaC1a08gNrh4u488aPhuZOCpkF6+2wl3zAN7L7XIpOFBhnaE3/Q8Q==}engines: {node: '>=18'}cpu: [s390x]os: [linux]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==}+ engines: {node: '>=12'}+ cpu: [x64]+ os: [linux]+'@esbuild/[email protected]':resolution: {integrity: sha512-QInHERlqpTTZ4FRB0fROQWXcYRD64lAoiegezDunLpalZMjcUcld3YzZmVJ2H/Cp0wJRZ8Xtjtj0cEHhYc/uUg==}engines: {node: '>=18'}@@ -694,6 +804,12 @@ packages:cpu: [arm64]os: [netbsd]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==}+ engines: {node: '>=12'}+ cpu: [x64]+ os: [netbsd]+'@esbuild/[email protected]':resolution: {integrity: sha512-voZT9Z+tpOxrvfKFyfDYPc4DO4rk06qamv1a/fkuzHpiVBMOhpjK+vBmWM8J1eiB3OLSMFYNaOaBNLXGChf5tg==}engines: {node: '>=18'}@@ -706,30 +822,60 @@ packages:cpu: [arm64]os: [openbsd]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==}+ engines: {node: '>=12'}+ cpu: [x64]+ os: [openbsd]+'@esbuild/[email protected]':resolution: {integrity: sha512-t/TkWwahkH0Tsgoq1Ju7QfgGhArkGLkF1uYz8nQS/PPFlXbP5YgRpqQR3ARRiC2iXoLTWFxc6DJMSK10dVXluw==}engines: {node: '>=18'}cpu: [x64]os: [openbsd]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==}+ engines: {node: '>=12'}+ cpu: [x64]+ os: [sunos]+'@esbuild/[email protected]':resolution: {integrity: sha512-cfZH1co2+imVdWCjd+D1gf9NjkchVhhdpgb1q5y6Hcv9TP6Zi9ZG/beI3ig8TvwT9lH9dlxLq5MQBBgwuj4xvA==}engines: {node: '>=18'}cpu: [x64]os: [sunos]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==}+ engines: {node: '>=12'}+ cpu: [arm64]+ os: [win32]+'@esbuild/[email protected]':resolution: {integrity: sha512-7Loyjh+D/Nx/sOTzV8vfbB3GJuHdOQyrOryFdZvPHLf42Tk9ivBU5Aedi7iyX+x6rbn2Mh68T4qq1SDqJBQO5Q==}engines: {node: '>=18'}cpu: [arm64]os: [win32]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==}+ engines: {node: '>=12'}+ cpu: [ia32]+ os: [win32]+'@esbuild/[email protected]':resolution: {integrity: sha512-WRJgsz9un0nqZJ4MfhabxaD9Ft8KioqU3JMinOTvobbX6MOSUigSBlogP8QB3uxpJDsFS6yN+3FDBdqE5lg9kg==}engines: {node: '>=18'}cpu: [ia32]os: [win32]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==}+ engines: {node: '>=12'}+ cpu: [x64]+ os: [win32]+'@esbuild/[email protected]':resolution: {integrity: sha512-kM3HKb16VIXZyIeVrM1ygYmZBKybX8N4p754bw390wGO3Tf2j4L2/WYL+4suWujpgf6GBYs3jv7TyUivdd05JA==}engines: {node: '>=18'}@@ -2552,6 +2698,9 @@ packages:engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}hasBin: true+ resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==}+resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==}@@ -2763,6 +2912,10 @@ packages:resolution: {integrity: sha512-m/C+AwOAr9/W1UOIZUo232ejMNnJAJtYQjUbHoNTBNTJSvqzzDh7vnrei3o3r3m9blf6ZoDkvcw0VmozNRFJxg==}engines: {node: '>=12'}+ resolution: {integrity: sha512-pcKVT+GbfPA+bUovPIilgVOoq+onNBo/YQBG86sf3/GFHkN6lRJPm1l7dKN0IMAk57RQoIm4GUllRrasLlcaSg==}+ hasBin: true+resolution: {integrity: sha512-pS8nNJm2kBNZwrOjTHJfdKkaU+KuUQmV/vk5D57NojDq4FG+0uAYGMulXtYT///HfgsMF0hnFFvu1ezI3OwOkg==}peerDependencies:@@ -2885,6 +3038,16 @@ packages:resolution: {integrity: sha512-8Ja+rNJ0Lt56Pcf3TAmpBZjmx8ZcK5Ts4cAzIOjsjevg9oSXJnl6SUQ2EevU8tv3h6ZLWmoKL5H4fgWvdvfETw==}+ resolution: {integrity: sha512-H2/S7Pm8a9CL1uhp9OvjwrBh5Pvx0H8qVOxNu8Wed9Y7qv56MPtq+GGM8RJpq6glYJn9Wspr8uw7l55uyinNeg==}+ peerDependencies:+ esbuild: '>=0.12 <1'++ resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==}+ engines: {node: '>=12'}+ hasBin: true+resolution: {integrity: sha512-16854zccKPnC+toMywC+uKNeYSv+/eXkevRAfwRD/G9Cleq66m8XFIrigkbvauLLlCfDL45Q2cWegSg53gGBnQ==}engines: {node: '>=18'}@@ -4094,6 +4257,13 @@ packages:resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==}engines: {node: '>=0.10.0'}+ resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==}++ resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==}+ engines: {node: '>=0.10.0'}+resolution: {integrity: sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==}engines: {node: '>= 8'}@@ -4770,83 +4940,161 @@ snapshots:react: 19.1.0tslib: 2.8.1+ '@drizzle-team/[email protected]': {}+'@emnapi/[email protected]':dependencies:tslib: 2.8.1optional: true+ '@esbuild-kit/[email protected]':+ dependencies:+ esbuild: 0.18.20+ source-map-support: 0.5.21++ '@esbuild-kit/[email protected]':+ dependencies:+ '@esbuild-kit/core-utils': 3.3.2+ get-tsconfig: 4.10.0+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true@@ -6805,6 +7053,8 @@ snapshots:node-releases: 2.0.19update-browserslist-db: 1.1.3([email protected])+ [email protected]: {}+dependencies:base64-js: 1.5.1@@ -7000,6 +7250,15 @@ snapshots:+ dependencies:+ '@drizzle-team/brocli': 0.10.2+ '@esbuild-kit/esm-loader': 2.6.5+ esbuild: 0.25.2+ esbuild-register: 3.6.0([email protected])+ transitivePeerDependencies:+ - supports-color+optionalDependencies:'@types/better-sqlite3': 7.6.13@@ -7043,6 +7302,38 @@ snapshots:esast-util-from-estree: 2.0.0vfile-message: 4.0.2+ dependencies:+ debug: 4.4.0+ esbuild: 0.25.2+ transitivePeerDependencies:+ - supports-color++ optionalDependencies:+ '@esbuild/android-arm': 0.18.20+ '@esbuild/android-arm64': 0.18.20+ '@esbuild/android-x64': 0.18.20+ '@esbuild/darwin-arm64': 0.18.20+ '@esbuild/darwin-x64': 0.18.20+ '@esbuild/freebsd-arm64': 0.18.20+ '@esbuild/freebsd-x64': 0.18.20+ '@esbuild/linux-arm': 0.18.20+ '@esbuild/linux-arm64': 0.18.20+ '@esbuild/linux-ia32': 0.18.20+ '@esbuild/linux-loong64': 0.18.20+ '@esbuild/linux-mips64el': 0.18.20+ '@esbuild/linux-ppc64': 0.18.20+ '@esbuild/linux-riscv64': 0.18.20+ '@esbuild/linux-s390x': 0.18.20+ '@esbuild/linux-x64': 0.18.20+ '@esbuild/netbsd-x64': 0.18.20+ '@esbuild/openbsd-x64': 0.18.20+ '@esbuild/sunos-x64': 0.18.20+ '@esbuild/win32-arm64': 0.18.20+ '@esbuild/win32-ia32': 0.18.20+ '@esbuild/win32-x64': 0.18.20+optionalDependencies:'@esbuild/aix-ppc64': 0.25.2@@ -8690,6 +8981,13 @@ snapshots:+ dependencies:+ buffer-from: 1.1.2+ source-map: 0.6.1++ [email protected]: {}+