diff --git a/package-lock.json b/package-lock.json index e957a08..8c2f9a1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4427,7 +4427,6 @@ "integrity": "sha512-AwAfQ2Wa5bCx9WP8nZL2uMZWod7J7/JSplxbTmBQ5ms6QpqNYm672H0Vu9ZVKVngQ+ii4R/byguVEUZQyeg44g==", "devOptional": true, "license": "MIT", - "peer": true, "dependencies": { "csstype": "^3.0.2" } @@ -4438,7 +4437,6 @@ "integrity": "sha512-4hOiT/dwO8Ko0gV1m/TJZYk3y0KBnY9vzDh7W+DH17b2HFSOGgdj33dhihPeuy3l0q23+4e+hoXHV6hCC4dCXw==", "devOptional": true, "license": "MIT", - "peer": true, "peerDependencies": { "@types/react": "^19.0.0" } @@ -4505,7 +4503,6 @@ "integrity": "sha512-4O3idHxhyzjClSMJ0a29AcoK0+YwnEqzI6oz3vlRf3xw0zbzt15MzXwItOlnr5nIth6zlY2RENLsOPvhyrKAQA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.34.1", "@typescript-eslint/types": "8.34.1", @@ -5022,7 +5019,6 @@ "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -5449,7 +5445,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "caniuse-lite": "^1.0.30001718", "electron-to-chromium": "^1.5.160", @@ -6127,7 +6122,6 @@ "integrity": "sha512-t5aPOpmtJcZcz5UJyY2GbvpDlsK5E8JqRqoKtfiKE3cNh437KIqfJr3A3AKf5k64NPx6d0G3dno6XDY05PqPtw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", @@ -6301,7 +6295,6 @@ "integrity": "sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@rtsao/scc": "^1.1.0", "array-includes": "^3.1.8", @@ -8885,7 +8878,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", @@ -9078,7 +9070,6 @@ "resolved": "https://registry.npmjs.org/react/-/react-19.1.0.tgz", "integrity": "sha512-FS+XFBNvn3GTAWq26joslQgWNoFu08F4kl0J4CgdNKADkdSGXQyTCnKteIAJy96Br6YbpEU1LSzV5dYtjMkMDg==", "license": "MIT", - "peer": true, "engines": { "node": ">=0.10.0" } @@ -9088,7 +9079,6 @@ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.1.0.tgz", "integrity": "sha512-Xs1hdnE+DyKgeHJeJznQmYMIBG3TKIHJJT95Q58nHLSrElKlGQqDTR2HQ9fx5CN/Gk6Vh/kupBTDLU11/nDk/g==", "license": "MIT", - "peer": true, "dependencies": { "scheduler": "^0.26.0" }, @@ -9939,7 +9929,6 @@ "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -10105,7 +10094,6 @@ "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", "dev": true, "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/src/app/dashboard/page.tsx b/src/app/dashboard/page.tsx index 8053482..bfeb2f6 100644 --- a/src/app/dashboard/page.tsx +++ b/src/app/dashboard/page.tsx @@ -3,12 +3,11 @@ import React, { useState, useRef } from 'react'; import { Star, Clock, Filter } from 'lucide-react'; import { useRouter } from 'next/navigation'; import { NavbarDemo } from "@/components/nav"; -import { AnimatePresence } from 'framer-motion'; -import AcademicHubSkeleton from '@/components/skeletons/dashboardPageSkeleton'; +import { AnimatePresence } from "framer-motion"; +import AcademicHubSkeleton from "@/components/skeletons/dashboardPageSkeleton"; +import { MOCK_PROJECTS } from "@/data/mockProjects"; import Image from 'next/image'; -import Footer from '@/components/footer'; -// Magic Card Component (from main) const MagicCard = ({ children, className = "", @@ -38,6 +37,20 @@ const MagicCard = ({ className={`relative overflow-hidden ${className}`} style={{ position: "relative" }} > + {isHovered && ( +
+ )} {/* Inner glow effect */} {isHovered && ( @@ -57,8 +70,10 @@ const AcademicHub = () => { const router = useRouter(); // eslint-disable-next-line @typescript-eslint/no-unused-vars const [isLoading, setIsLoading] = useState(false); + const [searchQuery, setSearchQuery] = useState(""); - const featuredProjects = [ + // Core projects without duplicates + const coreProjects = [ { id: 1, title: "Assignment-Med", @@ -71,6 +86,7 @@ const AcademicHub = () => { originalPrice: 200, tag: "Best Seller", tagColor: "bg-amber-500", + tags: ["handwritten", "plagiarism-free", "on-time", "assignments"], }, { id: 2, @@ -84,6 +100,7 @@ const AcademicHub = () => { originalPrice: 400, tag: "New", tagColor: "bg-emerald-500", + tags: ["expert-guidance", "plagiarism-free", "termwork"], }, { id: 3, @@ -97,6 +114,7 @@ const AcademicHub = () => { originalPrice: 100, tag: "Popular", tagColor: "bg-blue-500", + tags: ["professional", "custom-design", "presentations", "ppt"], }, { id: 4, @@ -110,9 +128,43 @@ const AcademicHub = () => { originalPrice: 0, tag: "Free", tagColor: "bg-green-500", + tags: ["ai", "generator", "free", "instant"], }, ]; + // Combine with mock projects (starting from id 5 to avoid duplicates) + const allProjects = [ + ...coreProjects, + ...MOCK_PROJECTS.map((project, index) => ({ + id: index + 5, + title: project.title, + category: project.category, + level: project.level, + rating: project.rating, + reviews: project.reviews, + duration: project.deliveryTime, + price: project.price, + originalPrice: project.price * 2, + tag: project.badge || "Available", + tagColor: + project.badge === "Best Seller" ? "bg-amber-500" : + project.badge === "New" ? "bg-emerald-500" : + project.badge === "Popular" ? "bg-blue-500" : "bg-gray-500", + tags: project.tags, + })) + ]; + + const filteredProjects = allProjects.filter((project) => { + if (!searchQuery.trim()) return true; + const query = searchQuery.toLowerCase(); + return ( + project.title.toLowerCase().includes(query) || + project.category.toLowerCase().includes(query) || + project.level.toLowerCase().includes(query) || + project.tags.some((tag) => tag.toLowerCase().includes(query)) + ); + }); + const stats = [ { number: "0%", label: "Plagiarism" }, { number: "5K+", label: "Projects Delivered" }, @@ -125,20 +177,16 @@ const AcademicHub = () => { return (
- {/* Loading Screen (from your branch) */} {isLoading && } -
- {/* Navbar */} - +
+ - {/* Hero Section (single) */} -
-
+ {/* Hero Section with Gradient Background extending from top */} +
+ {/* Gradient Background - extends to cover navbar area */} +
+

Premium Academic{" "} @@ -147,9 +195,7 @@ const AcademicHub = () => {

- Get high-quality assignments, projects, and research papers - crafted by experts. Boost your academic performance with our - premium collection. + Get high-quality assignments, projects, and research papers crafted by experts. Boost your academic performance with our premium collection.

- {/* Featured Projects (MagicCard + your Shop Now button) */}
-
+

Featured Projects

-
- {featuredProjects.map((project) => ( - -
- - {project.tag} - -
- -
- {project.id === 1 && ( - Assignment - )} - {project.id === 2 && ( - Termwork - )} - {project.id === 3 && ( -
-
📊
-
- )} - {project.id === 4 && ( -
-
🤖
-
- )} -
+ {searchQuery && ( +
+

+ Showing {filteredProjects.length} results for{" "} + "{searchQuery}" +

+
+ )} -
-
- - {project.category} - - - {project.level} + {filteredProjects.length > 0 ? ( +
+ {filteredProjects.map((project) => ( + +
+ + {project.tag}
-

- {project.title} -

-
-
-
- - {project.rating} - ({project.reviews} reviews) +
+ {project.id === 1 && Assignment} + {project.id === 2 && Termwork} + {project.id === 3 && ( +
+
📊
+
+ )} + {project.id === 4 && ( +
+
🤖
+
+ )} + {project.id > 4 && ( +
+
📄
+
+ )}
-
-
- - {project.duration} -
+
+
+ {project.category} + {project.level} +
+

{project.title}

+
-
-
- {project.id === 4 ? ( - - FREE - - ) : ( - <> - - ₹{project.price} - - - ₹{project.originalPrice} - - - )} +
+
+ + {project.rating} + ({project.reviews} reviews) +
- {/* Your new minimal button */} -
+ +
+
+ {project.id === 4 ? ( + FREE + ) : ( + <> + ₹{project.price} + ₹{project.originalPrice} + + )} +
+ + -
- - ))} -
+ {project.id === 4 ? "Try Now" : "Shop Now"} + + + + + +
+ + ))} +
+ ) : ( +
+
+ + + +
+

No results found for "{searchQuery}"

+

Try different keywords or browse all projects

+ +
+ )}
- {/* Stats Section */}
@@ -323,11 +350,47 @@ const AcademicHub = () => {
- {/* Footer */} -
+
+
+
+
+
+
+ A +
+ Asshelp +
+

Your trusted partner for academic excellence. Get premium assignments and projects delivered on time.

+
+ +
+

Categories

+
+ {categories.map((category) => ( + {category} + ))} +
+
+ +
+

Support

+ +
+
+ +
+

© 2025 Asshelp. All rights reserved.

+
+
+
); }; -export default AcademicHub; +export default AcademicHub; \ No newline at end of file diff --git a/src/app/page.tsx b/src/app/page.tsx index 9e52194..c1988b7 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -118,6 +118,8 @@ export default function HomePage() { } > hero setIsSubscribed(false), 3000); } }; @@ -47,15 +46,23 @@ export default function Footer() { return (
- {/* Aurora effect overlay */}
- {/* Logo and Info Section */}
+
+ AsHelp Logo + AsHelp +
- {/* Newsletter Subscription */}

Stay Updated

@@ -84,7 +90,6 @@ export default function Footer() { placeholder="Enter your email" className="w-full pl-10 pr-4 py-2 bg-gray-800/50 border border-gray-700 rounded-lg text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent text-sm" required - suppressHydrationWarning />
- {/* Quick Links Section */}

Quick Links

    @@ -118,7 +122,6 @@ export default function Footer() {
- {/* Help Section */}

Help

    @@ -134,8 +137,7 @@ export default function Footer() { ))}
- - {/* Support & Social Section */} +

Support

    @@ -151,7 +153,6 @@ export default function Footer() { ))}
- {/* Social Media Icons */}

Follow Us

@@ -175,18 +176,17 @@ export default function Footer() {
- {/* Bottom Copyright Section */}
Copyright © {new Date().getFullYear()} AsHelp. All rights reserved.
- Made with ❤️ for students worldwide + Made with ❤ for students worldwide
- ); +  ); } diff --git a/src/components/nav.tsx b/src/components/nav.tsx index 9ec0731..64a1053 100644 --- a/src/components/nav.tsx +++ b/src/components/nav.tsx @@ -12,12 +12,18 @@ import { } from "@/components/ui/resizable-navbar"; import { useState, useEffect } from "react"; import { GitHubStarsButton } from '@/components/animate-ui/buttons/github-stars'; -import { useRouter } from "next/navigation"; +import { useRouter, usePathname } from "next/navigation"; import { supabase } from "@/lib/supabaseclient"; import type { User } from '@supabase/supabase-js'; import Link from "next/link"; +import { Search, X } from 'lucide-react'; -export function NavbarDemo() { +interface NavbarDemoProps { + searchQuery?: string; + setSearchQuery?: (query: string) => void; +} + +export function NavbarDemo({ searchQuery = "", setSearchQuery }: NavbarDemoProps) { const navItems = [ { name: "Features", @@ -38,8 +44,13 @@ export function NavbarDemo() { ]; const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false); + const [showMobileSearch, setShowMobileSearch] = useState(false); const [user, setUser] = useState(null); const router = useRouter(); + const pathname = usePathname(); + + // Show search only on dashboard page + const showSearch = pathname === '/dashboard' && setSearchQuery; useEffect(() => { if (!supabase) return; @@ -49,15 +60,22 @@ export function NavbarDemo() { setUser(user); }; getUser(); - // Listen for auth state changes + const { data: listener } = supabase!.auth.onAuthStateChange((_event, session) => { setUser(session?.user ?? null); }); + return () => { listener?.subscription.unsubscribe(); }; }, []); + const clearSearch = () => { + if (setSearchQuery) { + setSearchQuery(""); + } + }; + return (
@@ -67,10 +85,42 @@ export function NavbarDemo() {
+ + {/* Desktop Search - Only on Dashboard */} + {showSearch && ( +
+
+ setSearchQuery(e.target.value)} + className="w-64 px-4 py-2 pl-10 bg-white/5 backdrop-blur-md border border-white/10 + rounded-full text-white placeholder-white/40 + focus:outline-none focus:border-white/30 focus:bg-white/5 + transition-all duration-200" + /> + + {searchQuery && ( + + )} +
+
+ )} +
{user === null && ( - router.push('/sign')}>Login + router.push('/sign')}> + Login + )}
@@ -79,12 +129,53 @@ export function NavbarDemo() { - setIsMobileMenuOpen(!isMobileMenuOpen)} - /> +
+ {/* Mobile Search Toggle - Only on Dashboard */} + {showSearch && ( + + )} + setIsMobileMenuOpen(!isMobileMenuOpen)} + /> +
+ {/* Mobile Search Bar */} + {showMobileSearch && showSearch && ( +
+
+ setSearchQuery(e.target.value)} + className="w-full px-4 py-3 pl-10 bg-white/5 backdrop-blur-sm border border-white/10 + rounded-lg text-white placeholder-white/40 + focus:outline-none focus:border-white/30 focus:bg-white/5 + transition-all" + /> + + {searchQuery && ( + + )} +
+
+ )} + setIsMobileMenuOpen(false)} @@ -113,9 +204,6 @@ export function NavbarDemo() {
- - - {/* Navbar */}
); -} +} \ No newline at end of file diff --git a/src/components/navbar1.tsx b/src/components/navbar1.tsx index 3ed8bd6..895b35e 100644 --- a/src/components/navbar1.tsx +++ b/src/components/navbar1.tsx @@ -1,16 +1,94 @@ -'use client'; +"use client"; +import { useState, useEffect } from "react"; +import { useRouter, usePathname } from "next/navigation"; +import { supabase } from "@/lib/supabaseclient"; +import type { User } from '@supabase/supabase-js'; +import Link from "next/link"; +import { Search, X, Github, Menu } from 'lucide-react'; +interface NavbarDemoProps { + searchQuery?: string; + setSearchQuery?: (query: string) => void; +} import React, { useState } from 'react'; import Link from 'next/link'; import Image from 'next/image'; -const Navbar = () => { - const [isOpen, setIsOpen] = useState(false); +export function NavbarDemo({ searchQuery = "", setSearchQuery }: NavbarDemoProps) { + const navItems = [ + { + name: "Features", + link: "/#features", + }, + { + name: "AI Generator", + link: "/ai-generator", + }, + { + name: "Dashboard", + link: "/dashboard", + }, + { + name: "Contact", + link: "/contact", + }, + ]; + + const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false); + const [showMobileSearch, setShowMobileSearch] = useState(false); + const [user, setUser] = useState(null); + const router = useRouter(); + const pathname = usePathname(); + + // Only show navbar if NOT on homepage or landing page + const shouldShowNavbar = pathname !== '/' && pathname !== '/home'; + + // Only show search on dashboard page + const showSearch = pathname === '/dashboard' && setSearchQuery; + + useEffect(() => { + if (!supabase) return; + + const getUser = async () => { + const { data: { user } } = await supabase!.auth.getUser(); + setUser(user); + }; + getUser(); + + const { data: listener } = supabase!.auth.onAuthStateChange((_event, session) => { + setUser(session?.user ?? null); + }); + + return () => { + listener?.subscription.unsubscribe(); + }; + }, []); + + const clearSearch = () => { + if (setSearchQuery) { + setSearchQuery(""); + } + }; + + // Don't render navbar on homepage + if (!shouldShowNavbar) { + return null; + } return ( ); -}; - -export default Navbar; +} \ No newline at end of file diff --git a/src/data/mockProjects.ts b/src/data/mockProjects.ts new file mode 100644 index 0000000..fb62d31 --- /dev/null +++ b/src/data/mockProjects.ts @@ -0,0 +1,95 @@ +// src/data/mockProjects.ts + +export const MOCK_PROJECTS = [ + { + id: 1, + title: "Handwritten Assignment - Population Growth", + category: "Assignments", + level: "Advanced", + price: 100, + rating: 4.9, + reviews: 5, + deliveryTime: "5 days", + tags: ["handwritten", "plagiarism-free", "on-time"], + badge: "Best Seller" + }, + { + id: 2, + title: "Termwork Project with Expert Guidance", + category: "Termwork", + level: "Expert", + price: 250, + rating: 4.8, + reviews: 15, + deliveryTime: "2-3 weeks", + tags: ["expert-guidance", "plagiarism-free"], + badge: "New" + }, + { + id: 3, + title: "Professional PowerPoint Presentation", + category: "Presentations", + level: "Intermediate", + price: 150, + rating: 4.7, + reviews: 8, + deliveryTime: "3-4 days", + tags: ["professional", "custom-design"], + badge: "Popular" + }, + { + id: 4, + title: "Python Programming Assignment", + category: "Assignments", + level: "Advanced", + price: 200, + rating: 4.9, + reviews: 12, + deliveryTime: "1 week", + tags: ["python", "coding", "tested"] + }, + { + id: 5, + title: "Data Science Project with Analysis", + category: "Projects", + level: "Expert", + price: 300, + rating: 5.0, + reviews: 20, + deliveryTime: "2 weeks", + tags: ["data-science", "analysis", "visualization"] + }, + { + id: 6, + title: "Machine Learning Model Development", + category: "Projects", + level: "Expert", + price: 350, + rating: 4.8, + reviews: 10, + deliveryTime: "3 weeks", + tags: ["machine-learning", "AI", "python"] + }, + { + id: 7, + title: "Web Development Project - React", + category: "Projects", + level: "Intermediate", + price: 180, + rating: 4.6, + reviews: 7, + deliveryTime: "1 week", + tags: ["react", "web-dev", "responsive"] + }, + { + id: 8, + title: "Database Design and Implementation", + category: "Assignments", + level: "Advanced", + price: 220, + rating: 4.7, + reviews: 9, + deliveryTime: "5 days", + tags: ["database", "SQL", "design"] + } +]; \ No newline at end of file diff --git a/src/lib/supabaseclient.ts b/src/lib/supabaseclient.ts index c41d707..5a9bbeb 100644 --- a/src/lib/supabaseclient.ts +++ b/src/lib/supabaseclient.ts @@ -1,3 +1,5 @@ +// src/lib/supabaseclient.ts + import { createClient } from '@supabase/supabase-js' // You can use environment variables for safety @@ -7,4 +9,4 @@ const supabaseAnonKey = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY || 'placeholde // Only create client if we have valid environment variables export const supabase = supabaseUrl !== 'https://placeholder.supabase.co' && supabaseAnonKey !== 'placeholder-key' ? createClient(supabaseUrl, supabaseAnonKey) - : null + : null \ No newline at end of file