diff --git a/app/components/ui/icons/name.d.ts b/app/components/ui/icons/name.d.ts index ede060f..caf2fcd 100644 --- a/app/components/ui/icons/name.d.ts +++ b/app/components/ui/icons/name.d.ts @@ -4,6 +4,7 @@ export type IconName = | 'arrow-left' | 'arrow-right' | 'avatar' + | 'bookmark' | 'camera' | 'chat-bubble' | 'check' diff --git a/app/components/ui/icons/sprite.svg b/app/components/ui/icons/sprite.svg index f322345..b120555 100644 --- a/app/components/ui/icons/sprite.svg +++ b/app/components/ui/icons/sprite.svg @@ -23,6 +23,13 @@ fill="currentColor" > + + + Dashboard

+ return

Library page

} diff --git a/app/routes/$groupId+/members.tsx b/app/routes/$groupId+/members.tsx index 5cb3c66..4e9dda7 100644 --- a/app/routes/$groupId+/members.tsx +++ b/app/routes/$groupId+/members.tsx @@ -8,9 +8,8 @@ import { } from '@remix-run/node' import { Form, json, useActionData, useLoaderData } from '@remix-run/react' import { useEffect, useState, type Dispatch, type SetStateAction } from 'react' -import { toast } from 'sonner' import { z } from 'zod' -import { Button, ButtonGroup } from '#app/components/catalyst/button.js' +import { Button } from '#app/components/catalyst/button.js' import { Dialog, DialogActions, @@ -185,15 +184,10 @@ export default function Screen() {

Members

- - - - - + + diff --git a/app/routes/$groupId+/milestones.tsx b/app/routes/$groupId+/milestones.tsx new file mode 100644 index 0000000..7a1d72a --- /dev/null +++ b/app/routes/$groupId+/milestones.tsx @@ -0,0 +1,3 @@ +export default function Screen() { + return

Milestones page

+} diff --git a/app/routes/$groupId+/objectives.tsx b/app/routes/$groupId+/objectives.tsx new file mode 100644 index 0000000..68ac2f0 --- /dev/null +++ b/app/routes/$groupId+/objectives.tsx @@ -0,0 +1,3 @@ +export default function Screen() { + return

Objectives page

+} diff --git a/app/routes/$groupId+/signals.tsx b/app/routes/$groupId+/signals.tsx new file mode 100644 index 0000000..7c990e0 --- /dev/null +++ b/app/routes/$groupId+/signals.tsx @@ -0,0 +1,3 @@ +export default function Screen() { + return

Signals page

+} diff --git a/app/routes/$groupId+/threads.tsx b/app/routes/$groupId+/threads.tsx new file mode 100644 index 0000000..4533fc7 --- /dev/null +++ b/app/routes/$groupId+/threads.tsx @@ -0,0 +1,3 @@ +export default function Screen() { + return

Threads page

+} diff --git a/app/routes/$groupId+/welcome.tsx b/app/routes/$groupId+/welcome.tsx new file mode 100644 index 0000000..8e3687d --- /dev/null +++ b/app/routes/$groupId+/welcome.tsx @@ -0,0 +1,3 @@ +export default function Screen() { + return

Welcome page

+} diff --git a/app/routes/$groupId.tsx b/app/routes/$groupId.tsx index 12936e5..da23928 100644 --- a/app/routes/$groupId.tsx +++ b/app/routes/$groupId.tsx @@ -63,39 +63,138 @@ export default function Screen() {
+ clsx( + isActive + ? 'bg-primary/5 text-primary' + : 'text-primary/60 hover:bg-primary/5', + 'group flex items-center gap-2 rounded p-2 text-sm font-medium', + ) + } > - - - - Objectives + {({ isActive }) => ( + <> + + + + Objectives + + )} + clsx( + isActive + ? 'bg-primary/5 text-primary' + : 'text-primary/60 hover:bg-primary/5', + 'group flex items-center gap-2 rounded p-2 text-sm font-medium', + ) + } > - - - - Milestones + {({ isActive }) => ( + <> + + + + Milestones + + )} + clsx( + isActive + ? 'bg-primary/5 text-primary' + : 'text-primary/60 hover:bg-primary/5', + 'group flex items-center gap-2 rounded p-2 text-sm font-medium', + ) + } > - - - - Signals + {({ isActive }) => ( + <> + + + + Signals + + )} + clsx( + isActive + ? 'bg-primary/5 text-primary' + : 'text-primary/60 hover:bg-primary/5', + 'group flex items-center gap-2 rounded p-2 text-sm font-medium', + ) + } + > + {({ isActive }) => ( + <> + + + + Threads + + )} + + + clsx( + isActive + ? 'bg-primary/5 text-primary' + : 'text-primary/60 hover:bg-primary/5', + 'group flex items-center gap-2 rounded p-2 text-sm font-medium', + ) + } > - - - - Threads + {({ isActive }) => ( + <> + + + + Library + + )} diff --git a/app/routes/_auth+/login.server.ts b/app/routes/_auth+/login.server.ts index 47e9528..4ebb7d9 100644 --- a/app/routes/_auth+/login.server.ts +++ b/app/routes/_auth+/login.server.ts @@ -69,7 +69,7 @@ export async function handleNewSession( return redirect( safeRedirect( redirectTo, - generatePath('/:groupId/dashboard', { groupId: group.id }), + generatePath('/:groupId/objectives', { groupId: group.id }), ), combineResponseInits( { diff --git a/app/routes/dashboard.tsx b/app/routes/dashboard.tsx index 6cee92c..66b8a1e 100644 --- a/app/routes/dashboard.tsx +++ b/app/routes/dashboard.tsx @@ -3,5 +3,5 @@ import { prisma } from '#app/utils/db.server.js' export async function loader() { const group = await prisma.group.findFirstOrThrow() - return redirect(generatePath('/:groupId/dashboard', { groupId: group.id })) + return redirect(generatePath('/:groupId/objectives', { groupId: group.id })) } diff --git a/other/svg-icons/bookmark.svg b/other/svg-icons/bookmark.svg new file mode 100644 index 0000000..f35af86 --- /dev/null +++ b/other/svg-icons/bookmark.svg @@ -0,0 +1,13 @@ + + + + + + + + diff --git a/prisma/migrations/20240414195335_init/migration.sql b/prisma/migrations/20240414195335_init/migration.sql new file mode 100644 index 0000000..3f1bf78 --- /dev/null +++ b/prisma/migrations/20240414195335_init/migration.sql @@ -0,0 +1,159 @@ +-- CreateTable +CREATE TABLE "WaitlistMember" ( + "id" TEXT NOT NULL PRIMARY KEY, + "email" TEXT NOT NULL, + "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" DATETIME NOT NULL +); + +-- CreateTable +CREATE TABLE "Account" ( + "id" TEXT NOT NULL PRIMARY KEY, + "email" TEXT NOT NULL, + "handle" TEXT NOT NULL, + "name" TEXT NOT NULL, + "roleId" TEXT, + CONSTRAINT "Account_roleId_fkey" FOREIGN KEY ("roleId") REFERENCES "Role" ("id") ON DELETE SET NULL ON UPDATE CASCADE +); + +-- CreateTable +CREATE TABLE "Group" ( + "id" TEXT NOT NULL PRIMARY KEY, + "name" TEXT NOT NULL, + "accountId" TEXT NOT NULL, + CONSTRAINT "Group_accountId_fkey" FOREIGN KEY ("accountId") REFERENCES "Account" ("id") ON DELETE RESTRICT ON UPDATE CASCADE +); + +-- CreateTable +CREATE TABLE "Member" ( + "id" TEXT NOT NULL PRIMARY KEY, + "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" DATETIME NOT NULL, + "accountId" TEXT NOT NULL, + "groupId" TEXT NOT NULL, + CONSTRAINT "Member_accountId_fkey" FOREIGN KEY ("accountId") REFERENCES "Account" ("id") ON DELETE RESTRICT ON UPDATE CASCADE, + CONSTRAINT "Member_groupId_fkey" FOREIGN KEY ("groupId") REFERENCES "Group" ("id") ON DELETE RESTRICT ON UPDATE CASCADE +); + +-- CreateTable +CREATE TABLE "AccountImage" ( + "id" TEXT NOT NULL PRIMARY KEY, + "altText" TEXT, + "contentType" TEXT NOT NULL, + "blob" BLOB NOT NULL, + "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" DATETIME NOT NULL, + "accountId" TEXT NOT NULL, + CONSTRAINT "AccountImage_accountId_fkey" FOREIGN KEY ("accountId") REFERENCES "Account" ("id") ON DELETE CASCADE ON UPDATE CASCADE +); + +-- CreateTable +CREATE TABLE "Password" ( + "hash" TEXT NOT NULL, + "accountId" TEXT NOT NULL, + CONSTRAINT "Password_accountId_fkey" FOREIGN KEY ("accountId") REFERENCES "Account" ("id") ON DELETE CASCADE ON UPDATE CASCADE +); + +-- CreateTable +CREATE TABLE "Session" ( + "id" TEXT NOT NULL PRIMARY KEY, + "expirationDate" DATETIME NOT NULL, + "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" DATETIME NOT NULL, + "accountId" TEXT NOT NULL, + CONSTRAINT "Session_accountId_fkey" FOREIGN KEY ("accountId") REFERENCES "Account" ("id") ON DELETE CASCADE ON UPDATE CASCADE +); + +-- CreateTable +CREATE TABLE "Permission" ( + "id" TEXT NOT NULL PRIMARY KEY, + "action" TEXT NOT NULL, + "entity" TEXT NOT NULL, + "access" TEXT NOT NULL, + "description" TEXT NOT NULL DEFAULT '', + "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" DATETIME NOT NULL +); + +-- CreateTable +CREATE TABLE "Role" ( + "id" TEXT NOT NULL PRIMARY KEY, + "name" TEXT NOT NULL, + "description" TEXT NOT NULL DEFAULT '', + "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" DATETIME NOT NULL, + "memberId" TEXT, + CONSTRAINT "Role_memberId_fkey" FOREIGN KEY ("memberId") REFERENCES "Member" ("id") ON DELETE SET NULL ON UPDATE CASCADE +); + +-- CreateTable +CREATE TABLE "Verification" ( + "id" TEXT NOT NULL PRIMARY KEY, + "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + "type" TEXT NOT NULL, + "target" TEXT NOT NULL, + "secret" TEXT NOT NULL, + "algorithm" TEXT NOT NULL, + "digits" INTEGER NOT NULL, + "period" INTEGER NOT NULL, + "charSet" TEXT NOT NULL, + "expiresAt" DATETIME +); + +-- CreateTable +CREATE TABLE "Connection" ( + "id" TEXT NOT NULL PRIMARY KEY, + "providerName" TEXT NOT NULL, + "providerId" TEXT NOT NULL, + "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" DATETIME NOT NULL, + "accountId" TEXT NOT NULL, + CONSTRAINT "Connection_accountId_fkey" FOREIGN KEY ("accountId") REFERENCES "Account" ("id") ON DELETE CASCADE ON UPDATE CASCADE +); + +-- CreateTable +CREATE TABLE "_PermissionToRole" ( + "A" TEXT NOT NULL, + "B" TEXT NOT NULL, + CONSTRAINT "_PermissionToRole_A_fkey" FOREIGN KEY ("A") REFERENCES "Permission" ("id") ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT "_PermissionToRole_B_fkey" FOREIGN KEY ("B") REFERENCES "Role" ("id") ON DELETE CASCADE ON UPDATE CASCADE +); + +-- CreateIndex +CREATE UNIQUE INDEX "WaitlistMember_email_key" ON "WaitlistMember"("email"); + +-- CreateIndex +CREATE UNIQUE INDEX "Account_email_key" ON "Account"("email"); + +-- CreateIndex +CREATE UNIQUE INDEX "Account_handle_key" ON "Account"("handle"); + +-- CreateIndex +CREATE UNIQUE INDEX "Member_accountId_groupId_key" ON "Member"("accountId", "groupId"); + +-- CreateIndex +CREATE UNIQUE INDEX "AccountImage_accountId_key" ON "AccountImage"("accountId"); + +-- CreateIndex +CREATE UNIQUE INDEX "Password_accountId_key" ON "Password"("accountId"); + +-- CreateIndex +CREATE INDEX "Session_accountId_idx" ON "Session"("accountId"); + +-- CreateIndex +CREATE UNIQUE INDEX "Permission_action_entity_access_key" ON "Permission"("action", "entity", "access"); + +-- CreateIndex +CREATE UNIQUE INDEX "Role_name_key" ON "Role"("name"); + +-- CreateIndex +CREATE UNIQUE INDEX "Verification_target_type_key" ON "Verification"("target", "type"); + +-- CreateIndex +CREATE UNIQUE INDEX "Connection_providerName_providerId_key" ON "Connection"("providerName", "providerId"); + +-- CreateIndex +CREATE UNIQUE INDEX "_PermissionToRole_AB_unique" ON "_PermissionToRole"("A", "B"); + +-- CreateIndex +CREATE INDEX "_PermissionToRole_B_index" ON "_PermissionToRole"("B"); diff --git a/prisma/migrations/migration_lock.toml b/prisma/migrations/migration_lock.toml new file mode 100644 index 0000000..e5e5c47 --- /dev/null +++ b/prisma/migrations/migration_lock.toml @@ -0,0 +1,3 @@ +# Please do not edit this file manually +# It should be added in your version-control system (i.e. Git) +provider = "sqlite" \ No newline at end of file