diff --git a/apps/web/app/(main)/(page)/dashboard/Dashboard.tsx b/apps/web/app/(main)/(page)/dashboard/Dashboard.tsx new file mode 100644 index 00000000..665535b2 --- /dev/null +++ b/apps/web/app/(main)/(page)/dashboard/Dashboard.tsx @@ -0,0 +1,68 @@ +import { UserButton } from '@clerk/nextjs' +import { Button } from '@/components/ui/button' +import { GenerateImage } from '@/components/GenerateImage' +import { Camera } from '@/components/Camera' +import { Credits } from '@/components/navbar/Credits' +import { Packs } from '@/components/Packs' +import { Train } from '@/components/Train' +import { Tabs, TabsTrigger, TabsContent, TabsList } from '@/components/ui/tabs' +import Link from 'next/link' + +export const Dashboard = () => { + return ( + +
+

photo.ai

+ +
+ + +
+
+ +
+
+
+ +
+ + + + + + + + + + + + + + + +
+ + +
+
+ + + Gallery + + + Generate + + + Packs + + + Trains + + +
+
+ + ) +}; diff --git a/apps/web/app/(main)/(page)/dashboard/page.tsx b/apps/web/app/(main)/(page)/dashboard/page.tsx new file mode 100644 index 00000000..623f0846 --- /dev/null +++ b/apps/web/app/(main)/(page)/dashboard/page.tsx @@ -0,0 +1,54 @@ +import { ThemeToggle2 } from "@/components/ThemeToggle"; +import { SidebarGenerateImage } from "@/components/SidebarGenerateImage" +import { redirect } from "next/navigation"; +import { auth } from "@clerk/nextjs/server"; +export const dynamic = "force-dynamic"; +import { ChevronDown } from "lucide-react"; +import { Dashboard } from "./Dashboard" + +export default async function Page() { + const { userId } = await auth(); + + if (!userId) { + redirect("/"); + } + + return ( +
+
+
+
+
+

General Settings

+
+ +
+ Prompt History + +
+
+
+
+ +
+
+
+

Generate

+
+ +
+
+
+
+ +
+ +
+
+
+ + +
+ + ); +} diff --git a/apps/web/app/payment/cancel/page.tsx b/apps/web/app/(main)/(page)/payment/cancel/page.tsx similarity index 100% rename from apps/web/app/payment/cancel/page.tsx rename to apps/web/app/(main)/(page)/payment/cancel/page.tsx diff --git a/apps/web/app/payment/success/page.tsx b/apps/web/app/(main)/(page)/payment/success/page.tsx similarity index 100% rename from apps/web/app/payment/success/page.tsx rename to apps/web/app/(main)/(page)/payment/success/page.tsx diff --git a/apps/web/app/payment/verify/page.tsx b/apps/web/app/(main)/(page)/payment/verify/page.tsx similarity index 100% rename from apps/web/app/payment/verify/page.tsx rename to apps/web/app/(main)/(page)/payment/verify/page.tsx diff --git a/apps/web/app/pricing/page.tsx b/apps/web/app/(main)/(page)/pricing/page.tsx similarity index 100% rename from apps/web/app/pricing/page.tsx rename to apps/web/app/(main)/(page)/pricing/page.tsx diff --git a/apps/web/app/purchases/page.tsx b/apps/web/app/(main)/(page)/purchases/page.tsx similarity index 100% rename from apps/web/app/purchases/page.tsx rename to apps/web/app/(main)/(page)/purchases/page.tsx diff --git a/apps/web/app/train/page.tsx b/apps/web/app/(main)/(page)/train/page.tsx similarity index 99% rename from apps/web/app/train/page.tsx rename to apps/web/app/(main)/(page)/train/page.tsx index 75873ee8..82edfb52 100644 --- a/apps/web/app/train/page.tsx +++ b/apps/web/app/(main)/(page)/train/page.tsx @@ -22,7 +22,7 @@ import { UploadModal } from "@/components/ui/upload" import { useState } from "react" import { TrainModelInput } from "common/inferred" import axios from "axios" -import { BACKEND_URL } from "../config" +import { BACKEND_URL } from "@/app/config" import { useRouter } from "next/navigation" import { useAuth } from "@clerk/nextjs" @@ -152,4 +152,4 @@ export default function Train() {
) -} \ No newline at end of file +} diff --git a/apps/web/app/dashboard/page.tsx b/apps/web/app/dashboard/page.tsx deleted file mode 100644 index 31419879..00000000 --- a/apps/web/app/dashboard/page.tsx +++ /dev/null @@ -1,78 +0,0 @@ -import { GenerateImage } from "@/components/GenerateImage"; -import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; -import { Train } from "@/components/Train"; -import { Packs } from "@/components/Packs"; -import { Camera } from "@/components/Camera"; -import { redirect } from "next/navigation"; -import { auth } from "@clerk/nextjs/server"; -export const dynamic = "force-dynamic"; - -export default async function DashboardPage() { - const { userId } = await auth(); - - if (!userId) { - redirect("/"); - } - - return ( -
-
- - - - Camera - - - GenerateImages - - - Packs - - - TrainModel - - - -
- - - - - - - - - - - - -
-
-
-
- ); -} diff --git a/apps/web/app/fonts/GeistMonoVF.woff b/apps/web/app/fonts/GeistMonoVF.woff deleted file mode 100644 index f2ae185c..00000000 Binary files a/apps/web/app/fonts/GeistMonoVF.woff and /dev/null differ diff --git a/apps/web/app/fonts/GeistVF.woff b/apps/web/app/fonts/GeistVF.woff deleted file mode 100644 index 1b62daac..00000000 Binary files a/apps/web/app/fonts/GeistVF.woff and /dev/null differ diff --git a/apps/web/app/globals.css b/apps/web/app/globals.css index 634e375e..1c14d636 100644 --- a/apps/web/app/globals.css +++ b/apps/web/app/globals.css @@ -4,6 +4,12 @@ @custom-variant dark (&:is(.dark *)); +@theme { + --font-*: initial; + --font-sans: "Inter"; + --font-serif: "Instrument Serif"; +} + @keyframes blob { 0% { transform: translate(0px, 0px) scale(1); @@ -173,6 +179,12 @@ } } +@layer utilities { + .z-index{ + @apply z-0 group-hover:z-10 + } +} + @layer base { :root { --sidebar-background: 0 0% 98%; diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsx index bf5c6db0..9595518f 100644 --- a/apps/web/app/layout.tsx +++ b/apps/web/app/layout.tsx @@ -1,25 +1,27 @@ import type { Metadata } from "next"; -import localFont from "next/font/local"; -import "./globals.css"; -import { Appbar } from "@/components/Appbar"; +import { Inter, Instrument_Serif, Roboto } from "next/font/google"; import { Providers } from "@/components/providers/Providers"; -import { Footer } from "@/components/Footer"; +import { meta } from "@/lib/constants"; import Script from "next/script"; +import { cn } from "@/lib/utils"; + +import "./globals.css"; -const geistSans = localFont({ - src: "./fonts/GeistVF.woff", - variable: "--font-geist-sans", +const inter = Inter({ + variable: "--font-inter", + subsets: ["latin"], + weight: "300" }); -const geistMono = localFont({ - src: "./fonts/GeistMonoVF.woff", - variable: "--font-geist-mono", +const instrumentSerif = Instrument_Serif({ + variable: "--font-instrument-serif", + subsets: ["latin"], + weight: "400" }); export const metadata: Metadata = { - title: "100xPhoto - AI-Powered Photo Enhancement", - description: - "Transform your photos with AI-powered enhancement and editing tools.", + title: meta.title, + description: meta.description }; export default function RootLayout({ @@ -36,15 +38,11 @@ export default function RootLayout({ strategy="beforeInteractive" /> - + -
- -
{children}
-
-
+
+ {children} +
diff --git a/apps/web/app/page.tsx b/apps/web/app/page.tsx index 01308386..0be7006c 100644 --- a/apps/web/app/page.tsx +++ b/apps/web/app/page.tsx @@ -1,5 +1,5 @@ "use client"; -import { Hero } from "@/components/home/Hero"; +import { Landing } from "@/components/landing/Landing"; import { useAuth } from "@/hooks/useAuth"; import { redirect } from "next/navigation"; @@ -9,9 +9,5 @@ export default function Home() { if (user) { redirect("/dashboard"); } - return ( -
- -
- ); + return ; } diff --git a/apps/web/components/Appbar.tsx b/apps/web/components/Appbar.tsx index d1c53291..8eac4b51 100644 --- a/apps/web/components/Appbar.tsx +++ b/apps/web/components/Appbar.tsx @@ -1,113 +1,30 @@ "use client"; import { SignInButton, SignedIn, SignedOut, UserButton } from "@clerk/nextjs"; -import { Button } from "./ui/button"; -import { Credits } from "./navbar/Credits"; import Link from "next/link"; -import { motion } from "framer-motion"; import { ThemeToggle } from "./ThemeToggle"; -export function Appbar() { - return ( -
- - -
- {/* Logo */} - - - - - - - 100xPhotos - - - +export const Appbar = () => { + return ( +
+

100xphoto.ai

- {/* Auth & Pricing */} -
- - - - - - - - - - - - - -
-
- - -
- ); +
+ + Pricing + + Signin + + + + {/* */} + + + + + + +
+
+ ) } diff --git a/apps/web/components/Camera.tsx b/apps/web/components/Camera.tsx index 47110d00..8578ee1a 100644 --- a/apps/web/components/Camera.tsx +++ b/apps/web/components/Camera.tsx @@ -97,30 +97,29 @@ export function Camera() { return (
-
-

Your Gallery

+
{images.length} images
{imagesLoading - ? [...Array(8)].map((_, i) => ( + ? [...Array(4)].map((_, i) => ( )) : images.map((image, index) => (
handleImageClick(image, index)} > -
-
- {/* Brand Section */} -
-
- - - - 100xPhoto -
+ return ( +
+
+

+ Just upload & Enjoy. +

-

- Transform your photos with AI-powered editing tools. Create - stunning visuals with just a few clicks. -

+
+

+ © {new Date().getFullYear()} PhotoAI. All rights reserved. +

-
- - -
-
- - {/* Quick Links */} -
-
-

Company

- -
- -
-

Help

- -
-
-
- -
-
-

- © {new Date().getFullYear()} PhotoAI. All rights reserved. -

- -
- - -
-
-
-
- - ); +
+ + Privacy Policy + + + Terms of Service + +
+
+
+ + ); } + diff --git a/apps/web/components/GenerateImage.tsx b/apps/web/components/GenerateImage.tsx index 8c89b7c2..f10b32d9 100644 --- a/apps/web/components/GenerateImage.tsx +++ b/apps/web/components/GenerateImage.tsx @@ -9,11 +9,9 @@ import { BACKEND_URL } from "@/app/config"; import { SelectModel } from "./Models"; import toast from "react-hot-toast"; import { motion } from "framer-motion"; -import { Sparkles } from "lucide-react"; +import { Wand2 } from "lucide-react"; import { useCredits } from "@/hooks/use-credits"; import { useRouter } from "next/navigation"; -import CustomLabel from "./ui/customLabel"; -import { GlowEffect } from "./GlowEffect"; export function GenerateImage() { const [prompt, setPrompt] = useState(""); @@ -23,7 +21,8 @@ export function GenerateImage() { const { credits } = useCredits(); const router = useRouter(); - const handleGenerate = async () => { + const handleGenerate = async (e: React.FormEvent) => { + e.preventDefault(); if (!prompt || !selectedModel) return; if (credits <= 0) { @@ -56,52 +55,39 @@ export function GenerateImage() { return ( -
- - -