Skip to content

Job application tracker and AI-powered job search assistant. Helps job seekers manage their search journey with AI resume review, job matching, task logging, and application analytics, all while keeping your data private.

add dashboard layout and pages

Khuram Niaz1108c566cc0c
diff --git a/package-lock.json b/package-lock.json
index efa544d..9057c18 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -8,8 +8,10 @@
"name": "jobsync",
"version": "0.1.0",
"dependencies": {
+ "@radix-ui/react-avatar": "^1.0.4",
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-dropdown-menu": "^2.0.6",
+ "@radix-ui/react-progress": "^1.0.3",
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-tooltip": "^1.0.7",
"class-variance-authority": "^0.7.0",
@@ -483,6 +485,32 @@
}
}
},
+ "node_modules/@radix-ui/react-avatar": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-avatar/-/react-avatar-1.0.4.tgz",
+ "integrity": "sha512-kVK2K7ZD3wwj3qhle0ElXhOjbezIgyl2hVvgwfIdexL3rN6zJmy5AqqIf+D31lxVppdzV8CjAfZ6PklkmInZLw==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-context": "1.0.1",
+ "@radix-ui/react-primitive": "1.0.3",
+ "@radix-ui/react-use-callback-ref": "1.0.1",
+ "@radix-ui/react-use-layout-effect": "1.0.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@radix-ui/react-collection": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.0.3.tgz",
@@ -854,6 +882,30 @@
}
}
},
+ "node_modules/@radix-ui/react-progress": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-progress/-/react-progress-1.0.3.tgz",
+ "integrity": "sha512-5G6Om/tYSxjSeEdrb1VfKkfZfn/1IlPWd731h2RfPuSbIfNUgfqAwbKfJCg/PP6nuUCTrYzalwHSpSinoWoCag==",
+ "dependencies": {
+ "@babel/runtime": "^7.13.10",
+ "@radix-ui/react-context": "1.0.1",
+ "@radix-ui/react-primitive": "1.0.3"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0",
+ "react-dom": "^16.8 || ^17.0 || ^18.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@radix-ui/react-roving-focus": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.0.4.tgz",
diff --git a/package.json b/package.json
index 04186fe..ca9ae5c 100644
--- a/package.json
+++ b/package.json
@@ -9,8 +9,10 @@
"lint": "next lint"
},
"dependencies": {
+ "@radix-ui/react-avatar": "^1.0.4",
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-dropdown-menu": "^2.0.6",
+ "@radix-ui/react-progress": "^1.0.3",
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-tooltip": "^1.0.7",
"class-variance-authority": "^0.7.0",
diff --git a/src/app/(dashboard)/activities/page.tsx b/src/app/(dashboard)/activities/page.tsx
new file mode 100644
index 0000000..ae79fdb
--- /dev/null
+++ b/src/app/(dashboard)/activities/page.tsx
@@ -0,0 +1,7 @@
+import React from "react";
+
+function Activities() {
+ return <div>Activities</div>;
+}
+
+export default Activities;
diff --git a/src/app/(root)/page.tsx b/src/app/(dashboard)/layout.tsx
similarity index 57%
rename from src/app/(root)/page.tsx
rename to src/app/(dashboard)/layout.tsx
index 28a3d45..1444680 100644
--- a/src/app/(root)/page.tsx
+++ b/src/app/(dashboard)/layout.tsx
@@ -1,13 +1,20 @@
import Header from "@/components/Header";
import Sidebar from "@/components/Sidebar";
-export default function Dashboard() {
+export default function RootLayout({
+ children,
+}: Readonly<{
+ children: React.ReactNode;
+}>) {
+ const loggedIn: User = { $id: "23", name: "JobSync", email: "[email protected]" };
return (
<div className="flex min-h-screen w-full flex-col bg-muted/40">
<Sidebar />
<div className="flex flex-col sm:gap-4 sm:py-4 sm:pl-14">
<Header />
- <main className="grid flex-1 items-start gap-4 p-4 sm:px-6 sm:py-0 md:gap-8 lg:grid-cols-3 xl:grid-cols-3"></main>
+ <main className="grid flex-1 items-start gap-4 p-4 sm:px-6 sm:py-0 md:gap-4 lg:grid-cols-3 xl:grid-cols-3">
+ {children}
+ </main>
</div>
</div>
);
diff --git a/src/app/(dashboard)/myjobs/page.tsx b/src/app/(dashboard)/myjobs/page.tsx
new file mode 100644
index 0000000..ea29285
--- /dev/null
+++ b/src/app/(dashboard)/myjobs/page.tsx
@@ -0,0 +1,7 @@
+import React from "react";
+
+function MyJobs() {
+ return <div>MyJobs</div>;
+}
+
+export default MyJobs;
diff --git a/src/app/(dashboard)/page.tsx b/src/app/(dashboard)/page.tsx
new file mode 100644
index 0000000..ba766c4
--- /dev/null
+++ b/src/app/(dashboard)/page.tsx
@@ -0,0 +1,21 @@
+import YourOrders from "@/components/JobsAppliedCard";
+import NumberCard from "@/components/NumberCard";
+import RecentJobsCard from "@/components/RecentJobsCard";
+
+export default function Dashboard() {
+ return (
+ <>
+ <div className="grid auto-rows-max items-start gap-2 md:gap-2 lg:col-span-2">
+ <div className="grid gap-2 sm:grid-cols-2 md:grid-cols-4 lg:grid-cols-4 xl:grid-cols-4">
+ <YourOrders />
+ <NumberCard label="This Week" num={14} desc="+35%" progress={45} />
+ <NumberCard label="This Month" num={54} desc="+20%" progress={25} />
+ </div>
+ <div className="flex justify-center">Bar Chart here</div>
+ </div>
+ <div>
+ <RecentJobsCard />
+ </div>
+ </>
+ );
+}
diff --git a/src/app/(dashboard)/profile/page.tsx b/src/app/(dashboard)/profile/page.tsx
new file mode 100644
index 0000000..40d0236
--- /dev/null
+++ b/src/app/(dashboard)/profile/page.tsx
@@ -0,0 +1,7 @@
+import React from "react";
+
+function Profile() {
+ return <div>Profile</div>;
+}
+
+export default Profile;
diff --git a/src/app/(root)/layout.tsx b/src/app/(root)/layout.tsx
deleted file mode 100644
index dfe3282..0000000
--- a/src/app/(root)/layout.tsx
+++ /dev/null
@@ -1,15 +0,0 @@
-import Sidebar from "@/components/Sidebar";
-
-export default function RootLayout({
- children,
-}: Readonly<{
- children: React.ReactNode;
-}>) {
- const loggedIn: User = { $id: "23", name: "JobSync", email: "[email protected]" };
- return (
- <main className="flex h-screen">
- <Sidebar user={loggedIn} />
- {children}
- </main>
- );
-}
diff --git a/src/components/JobsAppliedCard.tsx b/src/components/JobsAppliedCard.tsx
new file mode 100644
index 0000000..09991a3
--- /dev/null
+++ b/src/components/JobsAppliedCard.tsx
@@ -0,0 +1,24 @@
+import { Button } from "@/components/ui/button";
+import {
+ Card,
+ CardDescription,
+ CardFooter,
+ CardHeader,
+ CardTitle,
+} from "@/components/ui/card";
+
+export default function JobsAppliedCard() {
+ return (
+ <Card className="sm:col-span-2">
+ <CardHeader className="pb-3">
+ <CardTitle>Jobs Applied</CardTitle>
+ <CardDescription className="max-w-lg text-balance leading-relaxed">
+ Create new jobs to apply and track.
+ </CardDescription>
+ </CardHeader>
+ <CardFooter>
+ <Button>Create New Job</Button>
+ </CardFooter>
+ </Card>
+ );
+}
diff --git a/src/components/NumberCard.tsx b/src/components/NumberCard.tsx
new file mode 100644
index 0000000..870ce41
--- /dev/null
+++ b/src/components/NumberCard.tsx
@@ -0,0 +1,38 @@
+import {
+ Card,
+ CardContent,
+ CardDescription,
+ CardFooter,
+ CardHeader,
+ CardTitle,
+} from "@/components/ui/card";
+import { Progress } from "@/components/ui/progress";
+
+interface NumberCardProps {
+ label: string;
+ num: number;
+ desc: string;
+ progress: number;
+}
+
+export default function NumberCard({
+ label,
+ num,
+ desc,
+ progress,
+}: NumberCardProps) {
+ return (
+ <Card>
+ <CardHeader className="pb-2">
+ <CardDescription>{label}</CardDescription>
+ <CardTitle className="text-4xl">{num}</CardTitle>
+ </CardHeader>
+ <CardContent>
+ <div className="text-xs text-muted-foreground">{desc}</div>
+ </CardContent>
+ <CardFooter>
+ <Progress value={progress} aria-label="25% increase" />
+ </CardFooter>
+ </Card>
+ );
+}
diff --git a/src/components/RecentJobsCard.tsx b/src/components/RecentJobsCard.tsx
new file mode 100644
index 0000000..aa9e519
--- /dev/null
+++ b/src/components/RecentJobsCard.tsx
@@ -0,0 +1,79 @@
+import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
+import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
+
+export default function RecentJobsCard() {
+ return (
+ <Card>
+ <CardHeader>
+ <CardTitle>Recent Jobs Applied</CardTitle>
+ </CardHeader>
+ <CardContent className="grid gap-6">
+ <div className="flex items-center gap-4">
+ <Avatar className="hidden h-9 w-9 sm:flex">
+ <AvatarImage src="/avatars/01.png" alt="Avatar" />
+ <AvatarFallback>MS</AvatarFallback>
+ </Avatar>
+ <div className="grid gap-1">
+ <p className="text-sm font-medium leading-none">
+ Full Stack Developer
+ </p>
+ <p className="text-sm text-muted-foreground">Microsoft</p>
+ </div>
+ <div className="ml-auto font-medium">+1,999</div>
+ </div>
+ <div className="flex items-center gap-4">
+ <Avatar className="hidden h-9 w-9 sm:flex">
+ <AvatarImage src="/avatars/02.png" alt="Avatar" />
+ <AvatarFallback>FB</AvatarFallback>
+ </Avatar>
+ <div className="grid gap-1">
+ <p className="text-sm font-medium leading-none">
+ Full Stack Developer
+ </p>
+ <p className="text-sm text-muted-foreground">Facebook</p>
+ </div>
+ <div className="ml-auto font-medium">+39</div>
+ </div>
+ <div className="flex items-center gap-4">
+ <Avatar className="hidden h-9 w-9 sm:flex">
+ <AvatarImage src="/avatars/03.png" alt="Avatar" />
+ <AvatarFallback>AM</AvatarFallback>
+ </Avatar>
+ <div className="grid gap-1">
+ <p className="text-sm font-medium leading-none">
+ Frontend Developer
+ </p>
+ <p className="text-sm text-muted-foreground">Amazon</p>
+ </div>
+ <div className="ml-auto font-medium">+299</div>
+ </div>
+ <div className="flex items-center gap-4">
+ <Avatar className="hidden h-9 w-9 sm:flex">
+ <AvatarImage src="/avatars/04.png" alt="Avatar" />
+ <AvatarFallback>NF</AvatarFallback>
+ </Avatar>
+ <div className="grid gap-1">
+ <p className="text-sm font-medium leading-none">
+ Frontend Developer
+ </p>
+ <p className="text-sm text-muted-foreground">Netflix</p>
+ </div>
+ <div className="ml-auto font-medium">+99</div>
+ </div>
+ <div className="flex items-center gap-4">
+ <Avatar className="hidden h-9 w-9 sm:flex">
+ <AvatarImage src="/avatars/05.png" alt="Avatar" />
+ <AvatarFallback>SD</AvatarFallback>
+ </Avatar>
+ <div className="grid gap-1">
+ <p className="text-sm font-medium leading-none">
+ Software Architect
+ </p>
+ <p className="text-sm text-muted-foreground">Oracle</p>
+ </div>
+ <div className="ml-auto font-medium">+39</div>
+ </div>
+ </CardContent>
+ </Card>
+ );
+}
diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx
index 6779990..85576c7 100644
--- a/src/components/Sidebar.tsx
+++ b/src/components/Sidebar.tsx
@@ -16,14 +16,14 @@ function Sidebar() {
<Briefcase className="h-4 w-4 transition-all group-hover:scale-110" />
<span className="sr-only">JobSync</span>
</Link>
- <TooltipProvider delayDuration={200}>
+ <TooltipProvider delayDuration={800}>
{SIDEBAR_LINKS.map((item) => {
return (
<NavLink
key={item.label}
label={item.label}
Icon={item.icon}
- route="#"
+ route={item.route}
/>
);
})}
diff --git a/src/components/ui/avatar.tsx b/src/components/ui/avatar.tsx
new file mode 100644
index 0000000..51e507b
--- /dev/null
+++ b/src/components/ui/avatar.tsx
@@ -0,0 +1,50 @@
+"use client"
+
+import * as React from "react"
+import * as AvatarPrimitive from "@radix-ui/react-avatar"
+
+import { cn } from "@/lib/utils"
+
+const Avatar = React.forwardRef<
+ React.ElementRef<typeof AvatarPrimitive.Root>,
+ React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>
+>(({ className, ...props }, ref) => (
+ <AvatarPrimitive.Root
+ ref={ref}
+ className={cn(
+ "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
+ className
+ )}
+ {...props}
+ />
+))
+Avatar.displayName = AvatarPrimitive.Root.displayName
+
+const AvatarImage = React.forwardRef<
+ React.ElementRef<typeof AvatarPrimitive.Image>,
+ React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>
+>(({ className, ...props }, ref) => (
+ <AvatarPrimitive.Image
+ ref={ref}
+ className={cn("aspect-square h-full w-full", className)}
+ {...props}
+ />
+))
+AvatarImage.displayName = AvatarPrimitive.Image.displayName
+
+const AvatarFallback = React.forwardRef<
+ React.ElementRef<typeof AvatarPrimitive.Fallback>,
+ React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>
+>(({ className, ...props }, ref) => (
+ <AvatarPrimitive.Fallback
+ ref={ref}
+ className={cn(
+ "flex h-full w-full items-center justify-center rounded-full bg-muted",
+ className
+ )}
+ {...props}
+ />
+))
+AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName
+
+export { Avatar, AvatarImage, AvatarFallback }
diff --git a/src/components/ui/card.tsx b/src/components/ui/card.tsx
new file mode 100644
index 0000000..afa13ec
--- /dev/null
+++ b/src/components/ui/card.tsx
@@ -0,0 +1,79 @@
+import * as React from "react"
+
+import { cn } from "@/lib/utils"
+
+const Card = React.forwardRef<
+ HTMLDivElement,
+ React.HTMLAttributes<HTMLDivElement>
+>(({ className, ...props }, ref) => (
+ <div
+ ref={ref}
+ className={cn(
+ "rounded-lg border bg-card text-card-foreground shadow-sm",
+ className
+ )}
+ {...props}
+ />
+))
+Card.displayName = "Card"
+
+const CardHeader = React.forwardRef<
+ HTMLDivElement,
+ React.HTMLAttributes<HTMLDivElement>
+>(({ className, ...props }, ref) => (
+ <div
+ ref={ref}
+ className={cn("flex flex-col space-y-1.5 p-6", className)}
+ {...props}
+ />
+))
+CardHeader.displayName = "CardHeader"
+
+const CardTitle = React.forwardRef<
+ HTMLParagraphElement,
+ React.HTMLAttributes<HTMLHeadingElement>
+>(({ className, ...props }, ref) => (
+ <h3
+ ref={ref}
+ className={cn(
+ "text-2xl font-semibold leading-none tracking-tight",
+ className
+ )}
+ {...props}
+ />
+))
+CardTitle.displayName = "CardTitle"
+
+const CardDescription = React.forwardRef<
+ HTMLParagraphElement,
+ React.HTMLAttributes<HTMLParagraphElement>
+>(({ className, ...props }, ref) => (
+ <p
+ ref={ref}
+ className={cn("text-sm text-muted-foreground", className)}
+ {...props}
+ />
+))
+CardDescription.displayName = "CardDescription"
+
+const CardContent = React.forwardRef<
+ HTMLDivElement,
+ React.HTMLAttributes<HTMLDivElement>
+>(({ className, ...props }, ref) => (
+ <div ref={ref} className={cn("p-6 pt-0", className)} {...props} />
+))
+CardContent.displayName = "CardContent"
+
+const CardFooter = React.forwardRef<
+ HTMLDivElement,
+ React.HTMLAttributes<HTMLDivElement>
+>(({ className, ...props }, ref) => (
+ <div
+ ref={ref}
+ className={cn("flex items-center p-6 pt-0", className)}
+ {...props}
+ />
+))
+CardFooter.displayName = "CardFooter"
+
+export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }
diff --git a/src/components/ui/progress.tsx b/src/components/ui/progress.tsx
new file mode 100644
index 0000000..5c87ea4
--- /dev/null
+++ b/src/components/ui/progress.tsx
@@ -0,0 +1,28 @@
+"use client"
+
+import * as React from "react"
+import * as ProgressPrimitive from "@radix-ui/react-progress"
+
+import { cn } from "@/lib/utils"
+
+const Progress = React.forwardRef<
+ React.ElementRef<typeof ProgressPrimitive.Root>,
+ React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>
+>(({ className, value, ...props }, ref) => (
+ <ProgressPrimitive.Root
+ ref={ref}
+ className={cn(
+ "relative h-4 w-full overflow-hidden rounded-full bg-secondary",
+ className
+ )}
+ {...props}
+ >
+ <ProgressPrimitive.Indicator
+ className="h-full w-full flex-1 bg-primary transition-all"
+ style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
+ />
+ </ProgressPrimitive.Root>
+))
+Progress.displayName = ProgressPrimitive.Root.displayName
+
+export { Progress }
diff --git a/src/lib/constants.ts b/src/lib/constants.ts
index 4ef47dc..06c01e7 100644
--- a/src/lib/constants.ts
+++ b/src/lib/constants.ts
@@ -9,22 +9,22 @@ import {
export const SIDEBAR_LINKS = [
{
icon: LayoutDashboard,
- route: "#",
+ route: "/",
label: "Dashboard",
},
{
icon: BriefcaseBusiness,
- route: "#",
+ route: "/myjobs",
label: "My Jobs",
},
{
icon: CalendarClock,
- route: "#",
+ route: "/activities",
label: "Activities",
},
{
icon: UserRound,
- route: "#",
+ route: "/profile",
label: "Profile",
},
{