From c30071b36d52c79ff333543ec8890de90b775eaf Mon Sep 17 00:00:00 2001 From: ritesh301 Date: Fri, 12 Sep 2025 00:04:10 +0530 Subject: [PATCH 1/6] design landing,features , signin, and signup pages --- apps/web/app/(auth)/signin/page.tsx | 262 +++---- apps/web/app/(auth)/signup/page.tsx | 337 ++++---- apps/web/app/components/theme-provider.tsx | 11 + apps/web/app/components/ui/accordion.tsx | 66 ++ apps/web/app/components/ui/alert-dialog.tsx | 157 ++++ apps/web/app/components/ui/alert.tsx | 66 ++ apps/web/app/components/ui/aspect-ratio.tsx | 11 + apps/web/app/components/ui/avatar.tsx | 53 ++ apps/web/app/components/ui/badge.tsx | 46 ++ apps/web/app/components/ui/breadcrumb.tsx | 109 +++ apps/web/app/components/ui/button.tsx | 59 ++ apps/web/app/components/ui/calendar.tsx | 213 +++++ apps/web/app/components/ui/card.tsx | 92 +++ apps/web/app/components/ui/carousel.tsx | 241 ++++++ apps/web/app/components/ui/chart.tsx | 353 +++++++++ apps/web/app/components/ui/checkbox.tsx | 32 + apps/web/app/components/ui/collapsible.tsx | 33 + apps/web/app/components/ui/command.tsx | 184 +++++ apps/web/app/components/ui/context-menu.tsx | 252 ++++++ apps/web/app/components/ui/dialog.tsx | 143 ++++ apps/web/app/components/ui/drawer.tsx | 135 ++++ apps/web/app/components/ui/dropdown-menu.tsx | 257 +++++++ apps/web/app/components/ui/form.tsx | 167 ++++ apps/web/app/components/ui/hover-card.tsx | 44 ++ apps/web/app/components/ui/input-otp.tsx | 77 ++ apps/web/app/components/ui/input.tsx | 21 + apps/web/app/components/ui/label.tsx | 24 + apps/web/app/components/ui/menubar.tsx | 276 +++++++ .../web/app/components/ui/navigation-menu.tsx | 168 ++++ apps/web/app/components/ui/pagination.tsx | 127 +++ apps/web/app/components/ui/popover.tsx | 48 ++ apps/web/app/components/ui/progress.tsx | 31 + apps/web/app/components/ui/radio-group.tsx | 45 ++ apps/web/app/components/ui/resizable.tsx | 56 ++ apps/web/app/components/ui/scroll-area.tsx | 58 ++ apps/web/app/components/ui/select.tsx | 185 +++++ apps/web/app/components/ui/separator.tsx | 28 + apps/web/app/components/ui/sheet.tsx | 139 ++++ apps/web/app/components/ui/sidebar.tsx | 726 ++++++++++++++++++ apps/web/app/components/ui/skeleton.tsx | 13 + apps/web/app/components/ui/slider.tsx | 63 ++ apps/web/app/components/ui/sonner.tsx | 25 + apps/web/app/components/ui/switch.tsx | 31 + apps/web/app/components/ui/table.tsx | 116 +++ apps/web/app/components/ui/tabs.tsx | 66 ++ apps/web/app/components/ui/textarea.tsx | 18 + apps/web/app/components/ui/toast.tsx | 129 ++++ apps/web/app/components/ui/toaster.tsx | 35 + apps/web/app/components/ui/toggle-group.tsx | 73 ++ apps/web/app/components/ui/toggle.tsx | 47 ++ apps/web/app/components/ui/tooltip.tsx | 61 ++ apps/web/app/components/ui/use-mobile.tsx | 19 + apps/web/app/components/ui/use-toast.ts | 191 +++++ apps/web/app/features/page.tsx | 417 ++++++++++ apps/web/app/globals.css | 98 ++- apps/web/app/lib/utils.ts | 6 + apps/web/app/page.tsx | 533 ++++++++++++- apps/web/app/public/placeholder-logo.png | Bin 0 -> 568 bytes apps/web/app/public/placeholder-logo.svg | 1 + apps/web/app/public/placeholder-user.jpg | Bin 0 -> 1635 bytes apps/web/app/public/placeholder.jpg | Bin 0 -> 1064 bytes apps/web/app/public/placeholder.svg | 1 + apps/web/components.json | 22 + apps/web/components/ui/badge.tsx | 36 + apps/web/components/ui/button.tsx | 57 ++ apps/web/components/ui/card.tsx | 76 ++ apps/web/components/ui/input.tsx | 22 + apps/web/components/ui/label.tsx | 26 + apps/web/lib/utils.ts | 6 + apps/web/package.json | 7 + .../20250911181640_init/migration.sql | 82 ++ .../web/prisma/migrations/migration_lock.toml | 3 + apps/web/tailwind.config.js | 55 +- pnpm-lock.yaml | 138 +++- 74 files changed, 7437 insertions(+), 368 deletions(-) create mode 100644 apps/web/app/components/theme-provider.tsx create mode 100644 apps/web/app/components/ui/accordion.tsx create mode 100644 apps/web/app/components/ui/alert-dialog.tsx create mode 100644 apps/web/app/components/ui/alert.tsx create mode 100644 apps/web/app/components/ui/aspect-ratio.tsx create mode 100644 apps/web/app/components/ui/avatar.tsx create mode 100644 apps/web/app/components/ui/badge.tsx create mode 100644 apps/web/app/components/ui/breadcrumb.tsx create mode 100644 apps/web/app/components/ui/button.tsx create mode 100644 apps/web/app/components/ui/calendar.tsx create mode 100644 apps/web/app/components/ui/card.tsx create mode 100644 apps/web/app/components/ui/carousel.tsx create mode 100644 apps/web/app/components/ui/chart.tsx create mode 100644 apps/web/app/components/ui/checkbox.tsx create mode 100644 apps/web/app/components/ui/collapsible.tsx create mode 100644 apps/web/app/components/ui/command.tsx create mode 100644 apps/web/app/components/ui/context-menu.tsx create mode 100644 apps/web/app/components/ui/dialog.tsx create mode 100644 apps/web/app/components/ui/drawer.tsx create mode 100644 apps/web/app/components/ui/dropdown-menu.tsx create mode 100644 apps/web/app/components/ui/form.tsx create mode 100644 apps/web/app/components/ui/hover-card.tsx create mode 100644 apps/web/app/components/ui/input-otp.tsx create mode 100644 apps/web/app/components/ui/input.tsx create mode 100644 apps/web/app/components/ui/label.tsx create mode 100644 apps/web/app/components/ui/menubar.tsx create mode 100644 apps/web/app/components/ui/navigation-menu.tsx create mode 100644 apps/web/app/components/ui/pagination.tsx create mode 100644 apps/web/app/components/ui/popover.tsx create mode 100644 apps/web/app/components/ui/progress.tsx create mode 100644 apps/web/app/components/ui/radio-group.tsx create mode 100644 apps/web/app/components/ui/resizable.tsx create mode 100644 apps/web/app/components/ui/scroll-area.tsx create mode 100644 apps/web/app/components/ui/select.tsx create mode 100644 apps/web/app/components/ui/separator.tsx create mode 100644 apps/web/app/components/ui/sheet.tsx create mode 100644 apps/web/app/components/ui/sidebar.tsx create mode 100644 apps/web/app/components/ui/skeleton.tsx create mode 100644 apps/web/app/components/ui/slider.tsx create mode 100644 apps/web/app/components/ui/sonner.tsx create mode 100644 apps/web/app/components/ui/switch.tsx create mode 100644 apps/web/app/components/ui/table.tsx create mode 100644 apps/web/app/components/ui/tabs.tsx create mode 100644 apps/web/app/components/ui/textarea.tsx create mode 100644 apps/web/app/components/ui/toast.tsx create mode 100644 apps/web/app/components/ui/toaster.tsx create mode 100644 apps/web/app/components/ui/toggle-group.tsx create mode 100644 apps/web/app/components/ui/toggle.tsx create mode 100644 apps/web/app/components/ui/tooltip.tsx create mode 100644 apps/web/app/components/ui/use-mobile.tsx create mode 100644 apps/web/app/components/ui/use-toast.ts create mode 100644 apps/web/app/features/page.tsx create mode 100644 apps/web/app/lib/utils.ts create mode 100644 apps/web/app/public/placeholder-logo.png create mode 100644 apps/web/app/public/placeholder-logo.svg create mode 100644 apps/web/app/public/placeholder-user.jpg create mode 100644 apps/web/app/public/placeholder.jpg create mode 100644 apps/web/app/public/placeholder.svg create mode 100644 apps/web/components.json create mode 100644 apps/web/components/ui/badge.tsx create mode 100644 apps/web/components/ui/button.tsx create mode 100644 apps/web/components/ui/card.tsx create mode 100644 apps/web/components/ui/input.tsx create mode 100644 apps/web/components/ui/label.tsx create mode 100644 apps/web/lib/utils.ts create mode 100644 apps/web/prisma/migrations/20250911181640_init/migration.sql create mode 100644 apps/web/prisma/migrations/migration_lock.toml diff --git a/apps/web/app/(auth)/signin/page.tsx b/apps/web/app/(auth)/signin/page.tsx index 049865c..2435564 100644 --- a/apps/web/app/(auth)/signin/page.tsx +++ b/apps/web/app/(auth)/signin/page.tsx @@ -5,7 +5,13 @@ import { signIn } from "next-auth/react"; import { useRouter } from "next/navigation"; import Link from "next/link"; -export default function SignIn() { +import { Button } from "@/components/ui/button"; +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; +import { Input } from "@/components/ui/input"; +import { Label } from "@/components/ui/label"; +import { Code, ArrowLeft } from "lucide-react"; + +export default function SignInPage() { const [email, setEmail] = useState(""); const [password, setPassword] = useState(""); const [isLoading, setIsLoading] = useState(false); @@ -25,14 +31,14 @@ export default function SignIn() { }); if (result?.error) { - setError("Invalid credentials"); + setError("Invalid email or password. Please try again."); } else { - router.push("/"); + router.push("/dashboard"); // Redirect to dashboard on success router.refresh(); } } catch (error: unknown) { console.error("Sign in error:", error); - setError("An error occurred. Please try again."); + setError("An unexpected error occurred. Please try again."); } finally { setIsLoading(false); } @@ -40,144 +46,138 @@ export default function SignIn() { const handleOAuthSignIn = async (provider: string) => { setIsLoading(true); - await signIn(provider, { callbackUrl: "/" }); + await signIn(provider, { callbackUrl: "/dashboard" }); + // No need to setIsLoading(false) here, as the page will redirect }; return ( -
-
-
-

- Sign in to your account -

-

- Or{" "} - - create a new account - -

-
-
- {error && ( -
-
-
-

{error}

-
+
+ {/* Header */} +
+
+
+ +
+
-
- )} -
-
- - setEmail(e.target.value)} - /> -
-
- - setPassword(e.target.value)} - /> -
+ Dev8.dev + +
+
+
-
- + {/* Sign In Form */} +
+
+
+

Welcome back

+

Sign in to access your Dev8.dev workspace

-
-
-
-
-
-
- - Or continue with - -
-
- -
- +
+ + - -
-
- +
+
+ +
+
+ Or continue with +
+
+ +
+ + +
+ +
+

+ Don't have an account?{" "} + + Sign up + +

+
+ + +
); -} +} \ No newline at end of file diff --git a/apps/web/app/(auth)/signup/page.tsx b/apps/web/app/(auth)/signup/page.tsx index 457015d..178ebf0 100644 --- a/apps/web/app/(auth)/signup/page.tsx +++ b/apps/web/app/(auth)/signup/page.tsx @@ -5,7 +5,13 @@ import { signIn } from "next-auth/react"; import { useRouter } from "next/navigation"; import Link from "next/link"; -export default function SignUp() { +import { Button } from "@/components/ui/button"; +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; +import { Input } from "@/components/ui/input"; +import { Label } from "@/components/ui/label"; +import { Code, ArrowLeft } from "lucide-react"; + +export default function SignUpPage() { const [name, setName] = useState(""); const [email, setEmail] = useState(""); const [password, setPassword] = useState(""); @@ -44,19 +50,18 @@ export default function SignUp() { const data = await response.json(); if (!response.ok) { - setError(data.error || "An error occurred"); + setError(data.error || "An error occurred during registration."); return; } - setSuccess("Account created successfully! You can now sign in."); + setSuccess("Account created successfully! Redirecting to sign in..."); - // Optionally auto-sign in the user setTimeout(() => { router.push("/signin"); }, 2000); } catch (error: unknown) { console.error("Sign up error:", error); - setError("An error occurred. Please try again."); + setError("An unexpected error occurred. Please try again."); } finally { setIsLoading(false); } @@ -64,187 +69,171 @@ export default function SignUp() { const handleOAuthSignIn = async (provider: string) => { setIsLoading(true); - await signIn(provider, { callbackUrl: "/" }); + await signIn(provider, { callbackUrl: "/dashboard" }); }; return ( -
-
-
-

- Create your account -

-

- Or{" "} - - sign in to your existing account - -

-
-
- {error && ( -
-
-
-

{error}

-
+
+ {/* Header */} +
+
+
+ +
+
-
- )} - {success && ( -
-
-
-

- {success} -

-
-
-
- )} -
-
- - setName(e.target.value)} - /> -
-
- - setEmail(e.target.value)} - /> -
-
- - setPassword(e.target.value)} - /> -
-
- - setConfirmPassword(e.target.value)} - /> -
+ Dev8.dev + +
+
+
-
- + {/* Sign Up Form */} +
+
+
+

Create your account

+

Start coding in the cloud in seconds

-
-
-
-
-
-
- - Or continue with - -
-
- -
- - - -
-
- +
+ + + + +
+
+ +
+
+ Or continue with +
+
+ +
+ + +
+ +
+

+ Already have an account?{" "} + + Sign in + +

+
+ + +
); -} +} \ No newline at end of file diff --git a/apps/web/app/components/theme-provider.tsx b/apps/web/app/components/theme-provider.tsx new file mode 100644 index 0000000..55c2f6e --- /dev/null +++ b/apps/web/app/components/theme-provider.tsx @@ -0,0 +1,11 @@ +'use client' + +import * as React from 'react' +import { + ThemeProvider as NextThemesProvider, + type ThemeProviderProps, +} from 'next-themes' + +export function ThemeProvider({ children, ...props }: ThemeProviderProps) { + return {children} +} diff --git a/apps/web/app/components/ui/accordion.tsx b/apps/web/app/components/ui/accordion.tsx new file mode 100644 index 0000000..e538a33 --- /dev/null +++ b/apps/web/app/components/ui/accordion.tsx @@ -0,0 +1,66 @@ +'use client' + +import * as React from 'react' +import * as AccordionPrimitive from '@radix-ui/react-accordion' +import { ChevronDownIcon } from 'lucide-react' + +import { cn } from '@/lib/utils' + +function Accordion({ + ...props +}: React.ComponentProps) { + return +} + +function AccordionItem({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AccordionTrigger({ + className, + children, + ...props +}: React.ComponentProps) { + return ( + + svg]:rotate-180', + className, + )} + {...props} + > + {children} + + + + ) +} + +function AccordionContent({ + className, + children, + ...props +}: React.ComponentProps) { + return ( + +
{children}
+
+ ) +} + +export { Accordion, AccordionItem, AccordionTrigger, AccordionContent } diff --git a/apps/web/app/components/ui/alert-dialog.tsx b/apps/web/app/components/ui/alert-dialog.tsx new file mode 100644 index 0000000..9704452 --- /dev/null +++ b/apps/web/app/components/ui/alert-dialog.tsx @@ -0,0 +1,157 @@ +'use client' + +import * as React from 'react' +import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog' + +import { cn } from '@/lib/utils' +import { buttonVariants } from '@/components/ui/button' + +function AlertDialog({ + ...props +}: React.ComponentProps) { + return +} + +function AlertDialogTrigger({ + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AlertDialogPortal({ + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AlertDialogOverlay({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AlertDialogContent({ + className, + ...props +}: React.ComponentProps) { + return ( + + + + + ) +} + +function AlertDialogHeader({ + className, + ...props +}: React.ComponentProps<'div'>) { + return ( +
+ ) +} + +function AlertDialogFooter({ + className, + ...props +}: React.ComponentProps<'div'>) { + return ( +
+ ) +} + +function AlertDialogTitle({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AlertDialogDescription({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AlertDialogAction({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AlertDialogCancel({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +export { + AlertDialog, + AlertDialogPortal, + AlertDialogOverlay, + AlertDialogTrigger, + AlertDialogContent, + AlertDialogHeader, + AlertDialogFooter, + AlertDialogTitle, + AlertDialogDescription, + AlertDialogAction, + AlertDialogCancel, +} diff --git a/apps/web/app/components/ui/alert.tsx b/apps/web/app/components/ui/alert.tsx new file mode 100644 index 0000000..e6751ab --- /dev/null +++ b/apps/web/app/components/ui/alert.tsx @@ -0,0 +1,66 @@ +import * as React from 'react' +import { cva, type VariantProps } from 'class-variance-authority' + +import { cn } from '@/lib/utils' + +const alertVariants = cva( + 'relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current', + { + variants: { + variant: { + default: 'bg-card text-card-foreground', + destructive: + 'text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90', + }, + }, + defaultVariants: { + variant: 'default', + }, + }, +) + +function Alert({ + className, + variant, + ...props +}: React.ComponentProps<'div'> & VariantProps) { + return ( +
+ ) +} + +function AlertTitle({ className, ...props }: React.ComponentProps<'div'>) { + return ( +
+ ) +} + +function AlertDescription({ + className, + ...props +}: React.ComponentProps<'div'>) { + return ( +
+ ) +} + +export { Alert, AlertTitle, AlertDescription } diff --git a/apps/web/app/components/ui/aspect-ratio.tsx b/apps/web/app/components/ui/aspect-ratio.tsx new file mode 100644 index 0000000..40bb120 --- /dev/null +++ b/apps/web/app/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/apps/web/app/components/ui/avatar.tsx b/apps/web/app/components/ui/avatar.tsx new file mode 100644 index 0000000..aa98465 --- /dev/null +++ b/apps/web/app/components/ui/avatar.tsx @@ -0,0 +1,53 @@ +'use client' + +import * as React from 'react' +import * as AvatarPrimitive from '@radix-ui/react-avatar' + +import { cn } from '@/lib/utils' + +function Avatar({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AvatarImage({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AvatarFallback({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +export { Avatar, AvatarImage, AvatarFallback } diff --git a/apps/web/app/components/ui/badge.tsx b/apps/web/app/components/ui/badge.tsx new file mode 100644 index 0000000..fc4126b --- /dev/null +++ b/apps/web/app/components/ui/badge.tsx @@ -0,0 +1,46 @@ +import * as React from 'react' +import { Slot } from '@radix-ui/react-slot' +import { cva, type VariantProps } from 'class-variance-authority' + +import { cn } from '@/lib/utils' + +const badgeVariants = cva( + 'inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden', + { + variants: { + variant: { + default: + 'border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90', + secondary: + 'border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90', + destructive: + 'border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60', + outline: + 'text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground', + }, + }, + defaultVariants: { + variant: 'default', + }, + }, +) + +function Badge({ + className, + variant, + asChild = false, + ...props +}: React.ComponentProps<'span'> & + VariantProps & { asChild?: boolean }) { + const Comp = asChild ? Slot : 'span' + + return ( + + ) +} + +export { Badge, badgeVariants } diff --git a/apps/web/app/components/ui/breadcrumb.tsx b/apps/web/app/components/ui/breadcrumb.tsx new file mode 100644 index 0000000..1750ff2 --- /dev/null +++ b/apps/web/app/components/ui/breadcrumb.tsx @@ -0,0 +1,109 @@ +import * as React from 'react' +import { Slot } from '@radix-ui/react-slot' +import { ChevronRight, MoreHorizontal } from 'lucide-react' + +import { cn } from '@/lib/utils' + +function Breadcrumb({ ...props }: React.ComponentProps<'nav'>) { + return