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: :sparkles: adding crud for workspaces

Andrejfaad3a49a327
diff --git a/apps/api/src/workspace/controllers/delete-workspace.ts b/apps/api/src/workspace/controllers/delete-workspace.ts
new file mode 100644
index 000000000..20be756f6
--- /dev/null
+++ b/apps/api/src/workspace/controllers/delete-workspace.ts
@@ -0,0 +1,44 @@
+import { and, eq } from "drizzle-orm";
+import workspace from "..";
+import db from "../../database";
+import { workspaceTable } from "../../database/schema";
+import type { DeleteWorkspacePayload } from "../db/queries";
+
+async function deleteWorkspace({
+ userId,
+ workspaceId,
+}: DeleteWorkspacePayload) {
+ const workspace = await db
+ .select({
+ id: workspaceTable.id,
+ ownerId: workspaceTable.ownerId,
+ })
+ .from(workspaceTable)
+ .where(
+ and(
+ eq(workspaceTable.id, workspaceId),
+ eq(workspaceTable.ownerId, userId),
+ ),
+ )
+ .limit(1);
+
+ const isWorkspaceExisting = Boolean(workspace.at(0));
+
+ if (!isWorkspaceExisting) {
+ throw new Error("Workspace not found or access denied");
+ }
+
+ const deletedWorkspace = await db
+ .delete(workspaceTable)
+ .where(eq(workspaceTable.id, workspaceId))
+ .returning({
+ id: workspaceTable.id,
+ name: workspaceTable.name,
+ ownerId: workspaceTable.ownerId,
+ createdAt: workspaceTable.createdAt,
+ });
+
+ return deletedWorkspace.at(0);
+}
+
+export default deleteWorkspace;
diff --git a/apps/api/src/workspace/controllers/get-workspace.ts b/apps/api/src/workspace/controllers/get-workspace.ts
new file mode 100644
index 000000000..0c45b9352
--- /dev/null
+++ b/apps/api/src/workspace/controllers/get-workspace.ts
@@ -0,0 +1,36 @@
+import { and, eq, or } from "drizzle-orm";
+import db from "../../database";
+import { workspaceTable, workspaceUserTable } from "../../database/schema";
+
+// TODO: Unify this type
+async function getWorkspace({
+ userId,
+ workspaceId,
+}: { userId: string; workspaceId: string }) {
+ const workspace = await db
+ .select({
+ id: workspaceTable.id,
+ name: workspaceTable.name,
+ ownerId: workspaceTable.ownerId,
+ createdAt: workspaceTable.createdAt,
+ })
+ .from(workspaceTable)
+ .leftJoin(
+ workspaceUserTable,
+ eq(workspaceTable.id, workspaceUserTable.workspaceId),
+ )
+ .where(
+ and(
+ eq(workspaceTable.id, workspaceId),
+ or(
+ eq(workspaceTable.ownerId, userId),
+ eq(workspaceUserTable.userId, userId),
+ ),
+ ),
+ )
+ .limit(1);
+
+ return workspace.at(0);
+}
+
+export default getWorkspace;
diff --git a/apps/api/src/workspace/controllers/get-workspaces.ts b/apps/api/src/workspace/controllers/get-workspaces.ts
index 1d237c41f..74dcff6df 100644
--- a/apps/api/src/workspace/controllers/get-workspaces.ts
+++ b/apps/api/src/workspace/controllers/get-workspaces.ts
@@ -1,8 +1,26 @@
+import { eq, or } from "drizzle-orm";
import db from "../../database";
-import { workspaceTable } from "../../database/schema";
+import { workspaceTable, workspaceUserTable } from "../../database/schema";
-async function getWorkspaces() {
- return db.select().from(workspaceTable);
+// TODO: Unify this type
+async function getWorkspaces({ userId }: { userId: string }) {
+ return await db
+ .select({
+ id: workspaceTable.id,
+ name: workspaceTable.name,
+ ownerId: workspaceTable.ownerId,
+ })
+ .from(workspaceTable)
+ .leftJoin(
+ workspaceUserTable,
+ eq(workspaceTable.id, workspaceUserTable.workspaceId),
+ )
+ .where(
+ or(
+ eq(workspaceTable.ownerId, userId),
+ eq(workspaceUserTable.userId, userId),
+ ),
+ );
}
export default getWorkspaces;
diff --git a/apps/api/src/workspace/controllers/update-workspace.ts b/apps/api/src/workspace/controllers/update-workspace.ts
new file mode 100644
index 000000000..f5db2290d
--- /dev/null
+++ b/apps/api/src/workspace/controllers/update-workspace.ts
@@ -0,0 +1,47 @@
+import { and, eq, or } from "drizzle-orm";
+import db from "../../database";
+import { workspaceTable } from "../../database/schema";
+import type { UpdateWorkspacePayload } from "../db/queries";
+
+async function updateWorkspace({
+ userId,
+ workspaceId,
+ body,
+}: { userId: string; workspaceId: string; body: UpdateWorkspacePayload }) {
+ const workspace = await db
+ .select({
+ id: workspaceTable.id,
+ ownerId: workspaceTable.ownerId,
+ })
+ .from(workspaceTable)
+ .where(
+ and(
+ eq(workspaceTable.id, workspaceId),
+ eq(workspaceTable.ownerId, userId),
+ ),
+ )
+ .limit(1);
+
+ const isWorkspaceExisting = Boolean(workspace.at(0));
+
+ if (!isWorkspaceExisting) {
+ throw new Error("TODO");
+ }
+
+ const updatedWorkspace = await db
+ .update(workspaceTable)
+ .set({
+ ...body,
+ })
+ .where(eq(workspaceTable.id, workspaceId))
+ .returning({
+ id: workspaceTable.id,
+ name: workspaceTable.name,
+ ownerId: workspaceTable.ownerId,
+ createdAt: workspaceTable.createdAt,
+ });
+
+ return updatedWorkspace.at(0);
+}
+
+export default updateWorkspace;
diff --git a/apps/api/src/workspace/db/queries.ts b/apps/api/src/workspace/db/queries.ts
index a0e8c3299..0dd5a9e4c 100644
--- a/apps/api/src/workspace/db/queries.ts
+++ b/apps/api/src/workspace/db/queries.ts
@@ -1,7 +1,20 @@
import { createInsertSchema } from "drizzle-typebox";
-import { t } from "elysia";
+import { type Static, t } from "elysia";
import { workspaceTable } from "../../database/schema";
export const createWorkspaceSchema = createInsertSchema(workspaceTable, {
name: t.String(),
});
+
+export const updateWorkspaceSchema = t.Object({
+ name: t.Optional(t.String()),
+ description: t.Optional(t.String()),
+});
+
+export const deleteWorkspaceSchema = t.Object({
+ userId: t.String(),
+ workspaceId: t.String(),
+});
+
+export type UpdateWorkspacePayload = Static<typeof updateWorkspaceSchema>;
+export type DeleteWorkspacePayload = Static<typeof deleteWorkspaceSchema>;
diff --git a/apps/api/src/workspace/index.ts b/apps/api/src/workspace/index.ts
index 2516a46be..390b9ae9a 100644
--- a/apps/api/src/workspace/index.ts
+++ b/apps/api/src/workspace/index.ts
@@ -1,43 +1,69 @@
-import { eq, or } from "drizzle-orm";
-import Elysia from "elysia";
-import db from "../database";
-import { workspaceTable, workspaceUserTable } from "../database/schema";
+import Elysia, { t } from "elysia";
import createWorkspace from "./controllers/create-workspace";
-import { createWorkspaceSchema } from "./db/queries";
+import deleteWorkspace from "./controllers/delete-workspace";
+import getWorkspace from "./controllers/get-workspace";
+import getWorkspaces from "./controllers/get-workspaces";
+import updateWorkspace from "./controllers/update-workspace";
+import { updateWorkspaceSchema } from "./db/queries";
const workspace = new Elysia({ prefix: "/workspace" })
.state("userId", "")
.post(
- "/",
- async ({ body }) => {
- const createdWorkspace = await createWorkspace(body);
+ "/create",
+ async ({ body, store }) => {
+ const userId = store.userId;
+
+ const createdWorkspace = await createWorkspace({
+ ...body,
+ ownerId: userId,
+ });
return createdWorkspace;
},
{
- body: createWorkspaceSchema,
+ body: t.Object({
+ name: t.String(),
+ }),
},
)
- .get("/workspaces", async ({ store }) => {
+ .get("/list", async ({ store }) => {
const userId = store.userId;
- const workspaces = await db
- .select()
- .from(workspaceTable)
- .leftJoin(
- workspaceUserTable,
- eq(workspaceTable.id, workspaceUserTable.workspaceId),
- )
- .where(
- or(
- eq(workspaceTable.ownerId, userId),
- eq(workspaceUserTable.userId, userId),
- ),
- );
+ const workspaces = await getWorkspaces({ userId });
return workspaces;
})
- .put("/:id", () => {})
- .delete("/:id", () => {});
+ .get("/:id", async ({ store, params }) => {
+ const userId = store.userId;
+ const workspaceId = params.id;
+
+ const workspace = await getWorkspace({ userId, workspaceId });
+
+ return workspace;
+ })
+ .put(
+ "/:id",
+ async ({ store, params, body }) => {
+ const userId = store.userId;
+ const workspaceId = params.id;
+
+ const updatedWorkspace = await updateWorkspace({
+ userId,
+ workspaceId,
+ body,
+ });
+
+ return updatedWorkspace;
+ },
+ { body: updateWorkspaceSchema },
+ )
+ .delete("/:id", async ({ store, params }) => {
+ const userId = store.userId;
+ const workspaceId = params.id;
+
+ const deletedWorkspace = await deleteWorkspace({ userId, workspaceId });
+
+ return deletedWorkspace;
+ });
export default workspace;
diff --git a/apps/web/package.json b/apps/web/package.json
index f86cfa12b..3a014b5f5 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -11,6 +11,7 @@
"dependencies": {
"@hookform/resolvers": "^3.9.1",
"@radix-ui/react-avatar": "^1.1.2",
+ "@radix-ui/react-dialog": "^1.1.4",
"@radix-ui/react-label": "^2.1.1",
"@radix-ui/react-slot": "^1.1.1",
"@tanstack/react-query": "^5.62.12",
diff --git a/apps/web/src/components/common/sidebar/sections/workspaces/add-workspace-modal.tsx b/apps/web/src/components/common/sidebar/sections/workspaces/add-workspace-modal.tsx
new file mode 100644
index 000000000..5affbd926
--- /dev/null
+++ b/apps/web/src/components/common/sidebar/sections/workspaces/add-workspace-modal.tsx
@@ -0,0 +1,88 @@
+import { Button } from "@/components/ui/button";
+import { Input } from "@/components/ui/input";
+import useCreateWorkspace from "@/hooks/queries/workspace/use-create-workspace";
+import * as Dialog from "@radix-ui/react-dialog";
+import { useQueryClient } from "@tanstack/react-query";
+import { X } from "lucide-react";
+import { useState } from "react";
+
+interface CreateWorkspaceModalProps {
+ open: boolean;
+ onClose: () => void;
+}
+
+export function CreateWorkspaceModal({
+ open,
+ onClose,
+}: CreateWorkspaceModalProps) {
+ const [name, setName] = useState("");
+ const queryClient = useQueryClient();
+ const { mutateAsync } = useCreateWorkspace({ name });
+
+ const handleSubmit = async (e: React.FormEvent) => {
+ e.preventDefault();
+ if (!name.trim()) return;
+
+ await mutateAsync();
+ await queryClient.invalidateQueries({ queryKey: ["workspaces"] });
+
+ setName("");
+ onClose();
+ };
+
+ return (
+ <Dialog.Root open={open} onOpenChange={onClose}>
+ <Dialog.Portal>
+ <Dialog.Overlay className="fixed inset-0 bg-black/40 backdrop-blur-sm" />
+ <Dialog.Content className="fixed left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-full max-w-md">
+ <div className="bg-white dark:bg-zinc-900 rounded-lg shadow-xl">
+ <div className="flex items-center justify-between p-4 border-b border-zinc-200 dark:border-zinc-800">
+ <Dialog.Title className="text-lg font-semibold text-zinc-900 dark:text-zinc-100">
+ New Workspace
+ </Dialog.Title>
+ <Dialog.Close className="text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300">
+ <X size={20} />
+ </Dialog.Close>
+ </div>
+
+ <form onSubmit={handleSubmit} className="p-4">
+ <div className="mb-4">
+ <label
+ htmlFor="workspaceName"
+ aria-label="Workspace name"
+ className="block text-sm font-medium text-zinc-900 dark:text-zinc-300 mb-1"
+ >
+ Workspace Name
+ </label>
+ <Input
+ value={name}
+ onChange={(e) => setName(e.target.value)}
+ placeholder="My Workspace"
+ className="bg-white dark:bg-zinc-800/50"
+ required
+ />
+ </div>
+
+ <div className="flex justify-end gap-2">
+ <Dialog.Close asChild>
+ <Button
+ type="button"
+ className="bg-zinc-100 text-zinc-900 hover:bg-zinc-200 dark:bg-zinc-800 dark:text-zinc-100 dark:hover:bg-zinc-700"
+ >
+ Cancel
+ </Button>
+ </Dialog.Close>
+ <Button
+ type="submit"
+ className="bg-indigo-600 text-white hover:bg-indigo-500 dark:bg-indigo-500 dark:hover:bg-indigo-400"
+ >
+ Create Workspace
+ </Button>
+ </div>
+ </form>
+ </div>
+ </Dialog.Content>
+ </Dialog.Portal>
+ </Dialog.Root>
+ );
+}
diff --git a/apps/web/src/components/common/sidebar/sections/workspaces/add-workspace.tsx b/apps/web/src/components/common/sidebar/sections/workspaces/add-workspace.tsx
index bebacca42..91195204f 100644
--- a/apps/web/src/components/common/sidebar/sections/workspaces/add-workspace.tsx
+++ b/apps/web/src/components/common/sidebar/sections/workspaces/add-workspace.tsx
@@ -1,14 +1,25 @@
import { Plus } from "lucide-react";
+import { useState } from "react";
+import { CreateWorkspaceModal } from "./add-workspace-modal";
function AddWorkspace() {
+ const [isDialogOpen, setIsDialogOpen] = useState<boolean>(false);
+
return (
- <button
- type="button"
- className="w-full text-left px-3 py-2 text-zinc-700 hover:bg-zinc-100 dark:text-zinc-300 dark:hover:bg-zinc-800 rounded-lg flex items-center transition-colors"
- >
- <Plus className="w-4 h-4 mr-2 text-zinc-500 dark:text-zinc-400" />
- Add Workspace
- </button>
+ <>
+ <button
+ type="button"
+ onClick={() => setIsDialogOpen(true)}
+ className="w-full text-left px-3 py-2 text-zinc-700 hover:bg-zinc-100 dark:text-zinc-300 dark:hover:bg-zinc-800 rounded-lg flex items-center transition-colors"
+ >
+ <Plus className="w-4 h-4 mr-2 text-zinc-500 dark:text-zinc-400" />
+ Add Workspace
+ </button>
+ <CreateWorkspaceModal
+ open={isDialogOpen}
+ onClose={() => setIsDialogOpen(false)}
+ />
+ </>
);
}
diff --git a/apps/web/src/components/common/sidebar/sections/workspaces/index.tsx b/apps/web/src/components/common/sidebar/sections/workspaces/index.tsx
index 56c9ec243..8a2cf2b32 100644
--- a/apps/web/src/components/common/sidebar/sections/workspaces/index.tsx
+++ b/apps/web/src/components/common/sidebar/sections/workspaces/index.tsx
@@ -1,22 +1,18 @@
+import useGetWorkspaces from "@/hooks/queries/workspace/use-get-workspace";
import AddWorkspace from "./add-workspace";
import WorkspaceItemButton from "./workspace-item-button";
-const workspaces = [
- {
- id: "1",
- name: "Personal Workspace",
- },
- {
- id: "2",
- name: "Uni Workspace",
- },
-];
+const selectedWorkspace = {
+ id: "1",
+};
function Workspaces() {
- const selectedWorkspace = {
- id: "1",
- name: "Personal Workspace",
- };
+ const { data } = useGetWorkspaces();
+ const workspaces = data?.data;
+
+ if (!workspaces || !workspaces?.length) {
+ return <div>You don't have any workspaces</div>;
+ }
return (
<div>
diff --git a/apps/web/src/components/ui/dialog.tsx b/apps/web/src/components/ui/dialog.tsx
new file mode 100644
index 000000000..d5e85a5bb
--- /dev/null
+++ b/apps/web/src/components/ui/dialog.tsx
@@ -0,0 +1,120 @@
+import * as DialogPrimitive from "@radix-ui/react-dialog";
+import { X } from "lucide-react";
+import * as React from "react";
+
+import { cn } from "@/lib/utils";
+
+const Dialog = DialogPrimitive.Root;
+
+const DialogTrigger = DialogPrimitive.Trigger;
+
+const DialogPortal = DialogPrimitive.Portal;
+
+const DialogClose = DialogPrimitive.Close;
+
+const DialogOverlay = React.forwardRef<
+ React.ElementRef<typeof DialogPrimitive.Overlay>,
+ React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>
+>(({ className, ...props }, ref) => (
+ <DialogPrimitive.Overlay
+ ref={ref}
+ className={cn(
+ "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
+ className,
+ )}
+ {...props}
+ />
+));
+DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
+
+const DialogContent = React.forwardRef<
+ React.ElementRef<typeof DialogPrimitive.Content>,
+ React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>
+>(({ className, children, ...props }, ref) => (
+ <DialogPortal>
+ <DialogOverlay />
+ <DialogPrimitive.Content
+ ref={ref}
+ className={cn(
+ "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
+ className,
+ )}
+ {...props}
+ >
+ {children}
+ <DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground">
+ <X className="h-4 w-4" />
+ <span className="sr-only">Close</span>
+ </DialogPrimitive.Close>
+ </DialogPrimitive.Content>
+ </DialogPortal>
+));
+DialogContent.displayName = DialogPrimitive.Content.displayName;
+
+const DialogHeader = ({
+ className,
+ ...props
+}: React.HTMLAttributes<HTMLDivElement>) => (
+ <div
+ className={cn(
+ "flex flex-col space-y-1.5 text-center sm:text-left",
+ className,
+ )}
+ {...props}
+ />
+);
+DialogHeader.displayName = "DialogHeader";
+
+const DialogFooter = ({
+ className,
+ ...props
+}: React.HTMLAttributes<HTMLDivElement>) => (
+ <div
+ className={cn(
+ "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
+ className,
+ )}
+ {...props}
+ />
+);
+DialogFooter.displayName = "DialogFooter";
+
+const DialogTitle = React.forwardRef<
+ React.ElementRef<typeof DialogPrimitive.Title>,
+ React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>
+>(({ className, ...props }, ref) => (
+ <DialogPrimitive.Title
+ ref={ref}
+ className={cn(
+ "text-lg font-semibold leading-none tracking-tight",
+ className,
+ )}
+ {...props}
+ />
+));
+DialogTitle.displayName = DialogPrimitive.Title.displayName;
+
+const DialogDescription = React.forwardRef<
+ React.ElementRef<typeof DialogPrimitive.Description>,
+ React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>
+>(({ className, ...props }, ref) => (
+ <DialogPrimitive.Description
+ ref={ref}
+ className={cn("text-sm text-muted-foreground", className)}
+ {...props}
+ />
+));
+DialogDescription.displayName = DialogPrimitive.Description.displayName;
+
+export {
+ Dialog,
+ DialogPortal,
+ DialogOverlay,
+ DialogTrigger,
+ DialogClose,
+ DialogContent,
+ DialogHeader,
+ DialogFooter,
+ DialogTitle,
+ DialogDescription,
+};
diff --git a/apps/web/src/fetchers/workspace/create-workspace.ts b/apps/web/src/fetchers/workspace/create-workspace.ts
new file mode 100644
index 000000000..57f566054
--- /dev/null
+++ b/apps/web/src/fetchers/workspace/create-workspace.ts
@@ -0,0 +1,13 @@
+import { api } from "@kaneo/libs";
+
+const createWorkspace = async ({ name }: { name: string }) => {
+ const response = await api.workspace.create.post({ name });
+
+ if (response.error) {
+ throw new Error(response.error.value.message);
+ }
+
+ return response;
+};
+
+export default createWorkspace;
diff --git a/apps/web/src/fetchers/workspace/get-workspaces.ts b/apps/web/src/fetchers/workspace/get-workspaces.ts
new file mode 100644
index 000000000..abe81d5a5
--- /dev/null
+++ b/apps/web/src/fetchers/workspace/get-workspaces.ts
@@ -0,0 +1,9 @@
+import { api } from "@kaneo/libs";
+
+const getWorkspaces = async () => {
+ const response = await api.workspace.list.get();
+
+ return response;
+};
+
+export default getWorkspaces;
diff --git a/apps/web/src/hooks/queries/workspace/use-create-workspace.ts b/apps/web/src/hooks/queries/workspace/use-create-workspace.ts
new file mode 100644
index 000000000..3695f8ca8
--- /dev/null
+++ b/apps/web/src/hooks/queries/workspace/use-create-workspace.ts
@@ -0,0 +1,10 @@
+import createWorkspace from "@/fetchers/workspace/create-workspace";
+import { useMutation } from "@tanstack/react-query";
+
+function useCreateWorkspace({ name }: { name: string }) {
+ return useMutation({
+ mutationFn: () => createWorkspace({ name }),
+ });
+}
+
+export default useCreateWorkspace;
diff --git a/apps/web/src/hooks/queries/workspace/use-get-workspace.ts b/apps/web/src/hooks/queries/workspace/use-get-workspace.ts
new file mode 100644
index 000000000..5414b9a56
--- /dev/null
+++ b/apps/web/src/hooks/queries/workspace/use-get-workspace.ts
@@ -0,0 +1,11 @@
+import getWorkspaces from "@/fetchers/workspace/get-workspaces";
+import { useQuery } from "@tanstack/react-query";
+
+function useGetWorkspaces() {
+ return useQuery({
+ queryFn: () => getWorkspaces(),
+ queryKey: ["workspaces"],
+ });
+}
+
+export default useGetWorkspaces;
diff --git a/apps/web/src/index.css b/apps/web/src/index.css
index 44c7efde0..2431a66f5 100644
--- a/apps/web/src/index.css
+++ b/apps/web/src/index.css
@@ -49,6 +49,18 @@
}
}
+@layer base {
+ body {
+ @apply text-zinc-900
+ }
+
+ .dark {
+ body {
+ @apply text-zinc-300
+ }
+ }
+}
+
/* Custom scrollbar styles */
@layer utilities {
.scrollbar-thin {
diff --git a/biome.json b/biome.json
index b3a2a7496..de34197ea 100644
--- a/biome.json
+++ b/biome.json
@@ -7,7 +7,13 @@
},
"files": {
"ignoreUnknown": false,
- "ignore": ["**/tsconfig*.json", "routeTree.gen.ts", "dist", "cache"]
+ "ignore": [
+ "**/tsconfig*.json",
+ "routeTree.gen.ts",
+ "dist",
+ "cache",
+ "*.css"
+ ]
},
"formatter": {
"enabled": true,
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index f6ea38c46..4fe5c55fe 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -71,17 +71,17 @@ importers:
version: 0.30.1
drizzle-orm:
specifier: ^0.38.3
drizzle-typebox:
specifier: ^0.2.1
elysia:
specifier: 1.2.9
version: 1.2.9(@sinclair/[email protected])([email protected])
devDependencies:
bun-types:
specifier: latest
- version: 1.1.42
+ version: 1.1.43
apps/web:
dependencies:
@@ -91,6 +91,9 @@ importers:
'@radix-ui/react-avatar':
specifier: ^1.1.2
+ '@radix-ui/react-dialog':
+ specifier: ^1.1.4
'@radix-ui/react-label':
specifier: ^2.1.1
@@ -1075,6 +1078,9 @@ packages:
resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==}
engines: {node: '>=14'}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-SJ31y+Q/zAyShtXJc8x83i9TYdbAfHZ++tUZnvjJJqFjzsdUnKsxPL6IEtBlxKkU7yzer//GQtZSV4GbldL3YA==}
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-GaC7bXQZ5VgZvVvsJ5mu/AEbjYLnhhkoidOboC50Z6FFlLA03wG2ianUoH+zgDQ31/9gCF59bE4+2bBgTyMiig==}
peerDependencies:
@@ -1106,6 +1112,63 @@ packages:
'@types/react':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-Ur7EV1IwQGCyaAuyDRiOLA5JIUZxELJljF+MbM/2NC0BYwfuRrbpS30BiQBJrVruscgUkieKkqXYDOoByaxIoA==}
+ peerDependencies:
+ '@types/react': '*'
+ '@types/react-dom': '*'
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
+
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-onrWn/72lQoEucDmJnr8uczSNTujT0vJnA/X5+3AkChVPowr8n1yvIKIabhWyMQeMvvmdpsvcyDqx3X1LEXCPg==}
+ peerDependencies:
+ '@types/react': '*'
+ '@types/react-dom': '*'
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
+
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-pSIwfrT1a6sIoDASCSpFwOasEwKTZWDw/iBdtnqKO7v6FeOzYJ7U53cPzYFVR3geGGXgVHaH+CdngrrAzqUGxg==}
+ peerDependencies:
+ '@types/react': '*'
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-01omzJAYRxXdG2/he/+xy+c8a8gCydoQ1yOxnWNcRhrrBW5W+RQJ22EK1SaO8tb3WoUsuEw7mJjBozPzihDFjA==}
+ peerDependencies:
+ '@types/react': '*'
+ '@types/react-dom': '*'
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
+
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-EJUrI8yYh7WOjNOqpoJaf1jlFIH2LvtgAl+YcFqNCa+4hj64ZXmPkAKOFs/ukjz3byN6bdb/AVUqHkI8/uWWMA==}
+ peerDependencies:
+ '@types/react': '*'
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-UUw5E4e/2+4kFMH7+YxORXGWggtY6sM8WIwh5RZchhLuUg2H1hc98Py+pr8HMz6rdaYrK2t296ZEjYLOCO5uUw==}
peerDependencies:
@@ -1119,6 +1182,32 @@ packages:
'@types/react-dom':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-NciRqhXnGojhT93RPyDaMPfLH3ZSl4jjIFbZQ1b/vxvZEdHsBZ49wP9w8L3HzUQwep01LcWtkUvm0OVB5JAHTw==}
+ peerDependencies:
+ '@types/react': '*'
+ '@types/react-dom': '*'
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
+
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-18TFr80t5EVgL9x1SwF/YGtfG+l0BS0PRAlCWBDoBEiDQjeKgnNZRVJp/oVBl24sr3Gbfwc/Qpj4OcWTQMsAEg==}
+ peerDependencies:
+ '@types/react': '*'
+ '@types/react-dom': '*'
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-sHCWTtxwNn3L3fH8qAfnF3WbUZycW93SM1j3NFDzXBiz8D6F5UTTy8G1+WFEaiCdvCVRJWj6N2R4Xq6HdiHmDg==}
peerDependencies:
@@ -1150,6 +1239,24 @@ packages:
'@types/react':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-MtfMVJiSr2NjzS0Aa90NPTnvTSg6C/JLCV7ma0W6+OMV78vd8OyRpID+Ng9LxzsPbLeuBnWBA1Nq30AtBIDChw==}
+ peerDependencies:
+ '@types/react': '*'
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-L7vwWlR1kTTQ3oh7g1O0CBF3YCyyTj8NmhLR+phShpyA50HCfBFKVJTpshm9PzLiKmehsrQzTYTpX9HvmC9rhw==}
+ peerDependencies:
+ '@types/react': '*'
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-+FPE0rOdziWSrH9athwI1R0HDVbWlEhd+FR+aSDk4uWGmSJ9Z54sdZVDQPZAinJhJXwfT+qnj969mCsT2gfm5w==}
peerDependencies:
@@ -1492,6 +1599,10 @@ packages:
resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==}
+ resolution: {integrity: sha512-y+CcFFwelSXpLZk/7fMB2mUbGtX9lKycf1MWJ7CaTIERyitVlyQx6C+sxcROU2BAJ24OiZyK+8wj2i8AlBoS3A==}
+ engines: {node: '>=10'}
+
resolution: {integrity: sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==}
@@ -1545,8 +1656,8 @@ packages:
resolution: {integrity: sha512-C65lv6eBr3LPJWFZ2gswyrGZ82ljnH8flVE03xeXxKhi2ZGtFiO4isRKTKnitbSqtRAcaqYSR6djt1whI66AbA==}
- resolution: {integrity: sha512-beMbnFqWbbBQHll/bn3phSwmoOQmnX2nt8NI9iOQKFbgR5Z6rlH3YuaMdlid8vp5XGct3/W4QVQBmhoOEoe4nw==}
+ resolution: {integrity: sha512-W0wCtVH+bwFp7p3Zgs03CqxEDmXxEvmmUM/FBKgWIv9T8gyeotvIjIbHzuDScc2DphhRNtr7hJLCR5PspYL5qw==}
resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==}
@@ -1669,6 +1780,9 @@ packages:
resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==}
engines: {node: '>=8'}
+ resolution: {integrity: sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==}
+
resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==}
@@ -1915,6 +2029,10 @@ packages:
resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==}
engines: {node: 6.* || 8.* || >= 10.*}
+ resolution: {integrity: sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==}
+ engines: {node: '>=6'}
+
resolution: {integrity: sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==}
@@ -2324,6 +2442,36 @@ packages:
peerDependencies:
react: ^16.8.0 || ^17 || ^18 || ^19
+ resolution: {integrity: sha512-9r+yi9+mgU33AKcj6IbT9oRCO78WriSj6t/cF8DWBZJ9aOGPOTEDvdUDz1FwKim7QXWwmHqtdHnRJfhAxEG46Q==}
+ engines: {node: '>=10'}
+ peerDependencies:
+ '@types/react': '*'
+ react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
+ resolution: {integrity: sha512-KmONPx5fnlXYJQqC62Q+lwIeAk64ws/cUw6omIumRzMRPqgnYqhSSti99nbj0Ry13bv7dF+BKn7NB+OqkdZGTw==}
+ engines: {node: '>=10'}
+ peerDependencies:
+ '@types/react': '*'
+ react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
+ resolution: {integrity: sha512-b6jSvxvVnyptAiLjbkWLE/lOnR4lfTtDAl+eUC7RZy+QQWc6wRzIV2CE6xBuMmDxc2qIihtDCZD5NPOFl7fRBQ==}
+ engines: {node: '>=10'}
+ peerDependencies:
+ '@types/react': '*'
+ react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==}
engines: {node: '>=0.10.0'}
@@ -2580,6 +2728,26 @@ packages:
peerDependencies:
browserslist: '>= 4.21.0'
+ resolution: {integrity: sha512-jQL3lRnocaFtu3V00JToYz/4QkNWswxijDaCVNZRiRTO3HQDLsdu1ZtmIUvV4yPp+rvWm5j0y0TG/S61cuijTg==}
+ engines: {node: '>=10'}
+ peerDependencies:
+ '@types/react': '*'
+ react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
+ resolution: {integrity: sha512-Fedw0aZvkhynoPYlA5WXrMCAMm+nSWdZt6lzJQ7Ok8S6Q+VsHmHpRWndVRJ8Be0ZbkfPc5LRYH+5XrzXcEeLRQ==}
+ engines: {node: '>=10'}
+ peerDependencies:
+ '@types/react': '*'
+ react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
resolution: {integrity: sha512-9WXSPC5fMv61vaupRkCKCxsPxBocVnwakBEkMIHHpkTTg6icbJtg6jzgtLDm4bl3cSHAca52rYWih0k4K3PfHw==}
peerDependencies:
@@ -3333,6 +3501,8 @@ snapshots:
optional: true
+ '@radix-ui/[email protected]': {}
+
dependencies:
'@radix-ui/react-context': 1.1.1(@types/[email protected])([email protected])
@@ -3357,6 +3527,65 @@ snapshots:
optionalDependencies:
'@types/react': 18.3.18
+ dependencies:
+ '@radix-ui/primitive': 1.1.1
+ '@radix-ui/react-compose-refs': 1.1.1(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.1.1(@types/[email protected])([email protected])
+ '@radix-ui/react-dismissable-layer': 1.1.3(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
+ '@radix-ui/react-focus-guards': 1.1.1(@types/[email protected])([email protected])
+ '@radix-ui/react-id': 1.1.0(@types/[email protected])([email protected])
+ '@radix-ui/react-slot': 1.1.1(@types/[email protected])([email protected])
+ '@radix-ui/react-use-controllable-state': 1.1.0(@types/[email protected])([email protected])
+ aria-hidden: 1.2.4
+ react: 18.3.1
+ react-dom: 18.3.1([email protected])
+ react-remove-scroll: 2.6.2(@types/[email protected])([email protected])
+ optionalDependencies:
+ '@types/react': 18.3.18
+ '@types/react-dom': 18.3.5(@types/[email protected])
+
+ dependencies:
+ '@radix-ui/primitive': 1.1.1
+ '@radix-ui/react-compose-refs': 1.1.1(@types/[email protected])([email protected])
+ '@radix-ui/react-use-callback-ref': 1.1.0(@types/[email protected])([email protected])
+ '@radix-ui/react-use-escape-keydown': 1.1.0(@types/[email protected])([email protected])
+ react: 18.3.1
+ react-dom: 18.3.1([email protected])
+ optionalDependencies:
+ '@types/react': 18.3.18
+ '@types/react-dom': 18.3.5(@types/[email protected])
+
+ dependencies:
+ react: 18.3.1
+ optionalDependencies:
+ '@types/react': 18.3.18
+
+ dependencies:
+ '@radix-ui/react-compose-refs': 1.1.1(@types/[email protected])([email protected])
+ '@radix-ui/react-use-callback-ref': 1.1.0(@types/[email protected])([email protected])
+ react: 18.3.1
+ react-dom: 18.3.1([email protected])
+ optionalDependencies:
+ '@types/react': 18.3.18
+ '@types/react-dom': 18.3.5(@types/[email protected])
+
+ dependencies:
+ '@radix-ui/react-use-layout-effect': 1.1.0(@types/[email protected])([email protected])
+ react: 18.3.1
+ optionalDependencies:
+ '@types/react': 18.3.18
+
dependencies:
@@ -3366,6 +3595,26 @@ snapshots:
'@types/react': 18.3.18
'@types/react-dom': 18.3.5(@types/[email protected])
+ dependencies:
+ '@radix-ui/react-use-layout-effect': 1.1.0(@types/[email protected])([email protected])
+ react: 18.3.1
+ react-dom: 18.3.1([email protected])
+ optionalDependencies:
+ '@types/react': 18.3.18
+ '@types/react-dom': 18.3.5(@types/[email protected])
+
+ dependencies:
+ '@radix-ui/react-compose-refs': 1.1.1(@types/[email protected])([email protected])
+ '@radix-ui/react-use-layout-effect': 1.1.0(@types/[email protected])([email protected])
+ react: 18.3.1
+ react-dom: 18.3.1([email protected])
+ optionalDependencies:
+ '@types/react': 18.3.18
+ '@types/react-dom': 18.3.5(@types/[email protected])
+
dependencies:
'@radix-ui/react-slot': 1.1.1(@types/[email protected])([email protected])
@@ -3388,6 +3637,20 @@ snapshots:
optionalDependencies:
'@types/react': 18.3.18
+ dependencies:
+ '@radix-ui/react-use-callback-ref': 1.1.0(@types/[email protected])([email protected])
+ react: 18.3.1
+ optionalDependencies:
+ '@types/react': 18.3.18
+
+ dependencies:
+ '@radix-ui/react-use-callback-ref': 1.1.0(@types/[email protected])([email protected])
+ react: 18.3.1
+ optionalDependencies:
+ '@types/react': 18.3.18
+
dependencies:
react: 18.3.1
@@ -3684,6 +3947,10 @@ snapshots:
+ dependencies:
+ tslib: 2.8.1
+
@@ -3753,7 +4020,7 @@ snapshots:
'@types/node': 20.12.14
'@types/ws': 8.5.13
dependencies:
'@types/node': 20.12.14
'@types/ws': 8.5.13
@@ -3864,6 +4131,8 @@ snapshots:
+
@@ -3881,17 +4150,17 @@ snapshots:
transitivePeerDependencies:
- supports-color
optionalDependencies:
'@types/react': 18.3.18
better-sqlite3: 11.7.0
- bun-types: 1.1.42
+ bun-types: 1.1.43
react: 18.3.1
dependencies:
'@sinclair/typebox': 0.34.13
@@ -4094,6 +4363,8 @@ snapshots:
+
dependencies:
resolve-pkg-maps: 1.0.0
@@ -4431,6 +4702,33 @@ snapshots:
dependencies:
react: 18.3.1
+ dependencies:
+ react: 18.3.1
+ react-style-singleton: 2.2.3(@types/[email protected])([email protected])
+ tslib: 2.8.1
+ optionalDependencies:
+ '@types/react': 18.3.18
+
+ dependencies:
+ react: 18.3.1
+ react-remove-scroll-bar: 2.3.8(@types/[email protected])([email protected])
+ react-style-singleton: 2.2.3(@types/[email protected])([email protected])
+ tslib: 2.8.1
+ use-callback-ref: 1.3.3(@types/[email protected])([email protected])
+ use-sidecar: 1.1.3(@types/[email protected])([email protected])
+ optionalDependencies:
+ '@types/react': 18.3.18
+
+ dependencies:
+ get-nonce: 1.0.1
+ react: 18.3.1
+ tslib: 2.8.1
+ optionalDependencies:
+ '@types/react': 18.3.18
+
dependencies:
loose-envify: 1.4.0
@@ -4704,6 +5002,21 @@ snapshots:
escalade: 3.2.0
picocolors: 1.1.1
+ dependencies:
+ react: 18.3.1
+ tslib: 2.8.1
+ optionalDependencies:
+ '@types/react': 18.3.18
+
+ dependencies:
+ detect-node-es: 1.1.0
+ react: 18.3.1
+ tslib: 2.8.1
+ optionalDependencies:
+ '@types/react': 18.3.18
+
dependencies:
react: 18.3.1