diff --git a/docker-compose.yaml b/docker-compose.yaml index 9bead98..90544ad 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,4 +1,14 @@ services: + web-development: + build: + context: . + dockerfile: ./src/Dockerfile + target: development + ports: + - "3001:3000" + volumes: + - "./src:/app/src:ro" + - "./public:/app/public:ro" web: build: context: . diff --git a/package-lock.json b/package-lock.json index 7e9bd5a..6b5fc01 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "1.0.0", "dependencies": { "@hookform/resolvers": "^5.1.1", + "@radix-ui/react-aspect-ratio": "^1.1.7", "@radix-ui/react-dialog": "^1.1.14", "@radix-ui/react-label": "^2.1.7", "@radix-ui/react-separator": "^1.1.7", @@ -1063,6 +1064,29 @@ } } }, + "node_modules/@radix-ui/react-aspect-ratio": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/@radix-ui/react-aspect-ratio/-/react-aspect-ratio-1.1.7.tgz", + "integrity": "sha512-Yq6lvO9HQyPwev1onK1daHCHqXVLzPhSVjmsNjCa2Zcxy2f7uJD2itDtxknv6FzAKCwD1qQkeVDmX/cev13n/g==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-primitive": "2.1.3" + }, + "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 + } + } + }, "node_modules/@radix-ui/react-compose-refs": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.2.tgz", diff --git a/package.json b/package.json index 12e39a6..8a95947 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ }, "dependencies": { "@hookform/resolvers": "^5.1.1", + "@radix-ui/react-aspect-ratio": "^1.1.7", "@radix-ui/react-dialog": "^1.1.14", "@radix-ui/react-label": "^2.1.7", "@radix-ui/react-separator": "^1.1.7", diff --git a/src/Dockerfile b/src/Dockerfile index b153901..af50048 100644 --- a/src/Dockerfile +++ b/src/Dockerfile @@ -6,11 +6,27 @@ WORKDIR /app COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* .npmrc* ./ RUN \ - if [ -f yarn.lock ]; then yarn --frozen-lockfile; \ - elif [ -f package-lock.json ]; then npm ci; \ - elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm i --frozen-lockfile; \ - else echo "Lockfile not found." && exit 1; \ - fi + if [ -f yarn.lock ]; then yarn --frozen-lockfile; \ + elif [ -f package-lock.json ]; then npm ci; \ + elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm i --frozen-lockfile; \ + else echo "Lockfile not found." && exit 1; \ + fi + +FROM base AS development +WORKDIR /app +COPY --from=deps /app/node_modules ./node_modules +COPY . . + +ENV NEXT_TELEMETRY_DISABLED=1 + +CMD ["/bin/sh", "-c", "\ + if [ -f yarn.lock ]; then yarn run dev; \ + elif [ -f package-lock.json ]; then npm run dev; \ + elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run dev; \ + else echo \"Lockfile not found.\" && exit 1; \ + fi \ +"] + FROM base AS builder WORKDIR /app @@ -20,11 +36,11 @@ COPY . . ENV NEXT_TELEMETRY_DISABLED=1 RUN \ - if [ -f yarn.lock ]; then yarn run build; \ - elif [ -f package-lock.json ]; then npm run build; \ - elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run build; \ - else echo "Lockfile not found." && exit 1; \ - fi + if [ -f yarn.lock ]; then yarn run build; \ + elif [ -f package-lock.json ]; then npm run build; \ + elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run build; \ + else echo "Lockfile not found." && exit 1; \ + fi FROM base AS runner WORKDIR /app diff --git a/src/app/layout.tsx b/src/app/layout.tsx index f4d9af5..6145ebf 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -34,7 +34,7 @@ export default function RootLayout({ -
+
{children}
diff --git a/src/app/page.tsx b/src/app/page.tsx index f59358a..9110092 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -4,19 +4,60 @@ import { ReactNode } from "react"; import { useLiveQuery } from "dexie-react-hooks"; import { db } from "@/lib/db"; import { Label } from "@/components/ui/label"; +import { Button } from "@/components/ui/button"; +import { ListIcon, PlusIcon } from "lucide-react"; +import { Toggle } from "@/components/ui/toggle"; +import Search from "@/components/search"; +import { useIsMobile } from "@/hooks/use-mobile"; +import { AspectRatio } from "@/components/ui/aspect-ratio"; +import { Card } from "@/components/ui/card"; + +const Project = (): ReactNode => { + return ( + + +

Project Title

+

Project description goes here.

+
+
+ ) +}; export default function Home(): ReactNode { + const isMobile = useIsMobile(); + const projectsCount = useLiveQuery(() => { return db.projects.count(); }); return ( -
+
-

Project Library

+

Project Library

+
+
+ +
+
+ + {!isMobile && "Select Projects"} + + +
+
+
+ + + + + + +
); }; diff --git a/src/app/settings/page.tsx b/src/app/settings/page.tsx index ac9c0b3..f1885b3 100644 --- a/src/app/settings/page.tsx +++ b/src/app/settings/page.tsx @@ -6,7 +6,7 @@ export default function Settings(): ReactNode {
-

Settings

+

Settings

); diff --git a/src/components/dashboard/Dashboard.tsx b/src/components/dashboard/Dashboard.tsx index e24d860..00ec6b5 100644 --- a/src/components/dashboard/Dashboard.tsx +++ b/src/components/dashboard/Dashboard.tsx @@ -30,7 +30,7 @@ const items: DashboardItem[] = [ export const Dashboard = (): ReactNode => { return ( - +

Community

diff --git a/src/components/ui/aspect-ratio.tsx b/src/components/ui/aspect-ratio.tsx new file mode 100644 index 0000000..3df3fd0 --- /dev/null +++ b/src/components/ui/aspect-ratio.tsx @@ -0,0 +1,11 @@ +"use client" + +import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio" + +function AspectRatio({ + ...props +}: React.ComponentProps) { + return +} + +export { AspectRatio } diff --git a/src/components/ui/card.tsx b/src/components/ui/card.tsx new file mode 100644 index 0000000..d05bbc6 --- /dev/null +++ b/src/components/ui/card.tsx @@ -0,0 +1,92 @@ +import * as React from "react" + +import { cn } from "@/lib/utils" + +function Card({ className, ...props }: React.ComponentProps<"div">) { + return ( +
+ ) +} + +function CardHeader({ className, ...props }: React.ComponentProps<"div">) { + return ( +
+ ) +} + +function CardTitle({ className, ...props }: React.ComponentProps<"div">) { + return ( +
+ ) +} + +function CardDescription({ className, ...props }: React.ComponentProps<"div">) { + return ( +
+ ) +} + +function CardAction({ className, ...props }: React.ComponentProps<"div">) { + return ( +
+ ) +} + +function CardContent({ className, ...props }: React.ComponentProps<"div">) { + return ( +
+ ) +} + +function CardFooter({ className, ...props }: React.ComponentProps<"div">) { + return ( +
+ ) +} + +export { + Card, + CardHeader, + CardFooter, + CardTitle, + CardAction, + CardDescription, + CardContent, +}