diff --git a/client/pages/Tutorials.tsx b/client/pages/Tutorials.tsx new file mode 100644 index 00000000..d416b969 --- /dev/null +++ b/client/pages/Tutorials.tsx @@ -0,0 +1,383 @@ +import { useState } from "react"; +import Layout from "@/components/Layout"; +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; +import { Badge } from "@/components/ui/badge"; +import { Button } from "@/components/ui/button"; +import { Input } from "@/components/ui/input"; +import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; +import { + BookOpen, + Play, + Clock, + User, + Star, + Search, + Filter, + Code, + Gamepad2, + Rocket, + Database, + Palette, + Brain, + Trophy, + ChevronRight, + Download, + Heart, + Eye, +} from "lucide-react"; + +interface Tutorial { + id: string; + title: string; + description: string; + category: string; + difficulty: 'beginner' | 'intermediate' | 'advanced'; + duration: string; + author: string; + rating: number; + views: number; + likes: number; + tags: string[]; + thumbnail: string; + isNew?: boolean; + isPremium?: boolean; +} + +const tutorials: Tutorial[] = [ + { + id: "1", + title: "Getting Started with AeThex Platform", + description: "Complete beginner's guide to navigating and using the AeThex development platform", + category: "Platform", + difficulty: "beginner", + duration: "15 min", + author: "AeThex Team", + rating: 4.9, + views: 2847, + likes: 234, + tags: ["getting-started", "platform", "basics"], + thumbnail: "https://images.unsplash.com/photo-1611224923853-80b023f02d71?w=400", + isNew: true + }, + { + id: "2", + title: "Building Your First Game with Unity & AeThex", + description: "Step-by-step tutorial for creating a 2D platformer game using Unity and AeThex tools", + category: "Game Development", + difficulty: "beginner", + duration: "45 min", + author: "Mike Johnson", + rating: 4.8, + views: 1923, + likes: 187, + tags: ["unity", "2d", "platformer", "game-dev"], + thumbnail: "https://images.unsplash.com/photo-1550745165-9bc0b252726f?w=400" + }, + { + id: "3", + title: "Advanced AI Integration Patterns", + description: "Learn how to integrate advanced AI systems into your projects using AeThex AI tools", + category: "AI/ML", + difficulty: "advanced", + duration: "60 min", + author: "Dr. Sarah Chen", + rating: 4.7, + views: 856, + likes: 98, + tags: ["ai", "machine-learning", "integration", "advanced"], + thumbnail: "https://images.unsplash.com/photo-1507146426996-ef05306b995a?w=400", + isPremium: true + }, + { + id: "4", + title: "Database Design Best Practices", + description: "Master database architecture and optimization for high-performance applications", + category: "Backend", + difficulty: "intermediate", + duration: "35 min", + author: "Alex Rodriguez", + rating: 4.6, + views: 1456, + likes: 142, + tags: ["database", "sql", "optimization", "backend"], + thumbnail: "https://images.unsplash.com/photo-1544383835-bda2bc66a55d?w=400" + }, + { + id: "5", + title: "UI/UX Design for Games", + description: "Create compelling user interfaces and experiences for modern games", + category: "Design", + difficulty: "intermediate", + duration: "40 min", + author: "Emma Wilson", + rating: 4.8, + views: 2134, + likes: 203, + tags: ["ui", "ux", "design", "games"], + thumbnail: "https://images.unsplash.com/photo-1541701494587-cb58502866ab?w=400" + }, + { + id: "6", + title: "Performance Optimization Techniques", + description: "Advanced strategies for optimizing application performance and reducing load times", + category: "Performance", + difficulty: "advanced", + duration: "50 min", + author: "David Kim", + rating: 4.9, + views: 987, + likes: 124, + tags: ["performance", "optimization", "advanced"], + thumbnail: "https://images.unsplash.com/photo-1460925895917-afdab827c52f?w=400", + isNew: true + } +]; + +const categories = [ + { id: "all", name: "All", icon: BookOpen, count: tutorials.length }, + { id: "platform", name: "Platform", icon: Rocket, count: 1 }, + { id: "game-development", name: "Game Dev", icon: Gamepad2, count: 1 }, + { id: "ai-ml", name: "AI/ML", icon: Brain, count: 1 }, + { id: "backend", name: "Backend", icon: Database, count: 1 }, + { id: "design", name: "Design", icon: Palette, count: 1 }, + { id: "performance", name: "Performance", icon: Trophy, count: 1 }, +]; + +export default function Tutorials() { + const [searchTerm, setSearchTerm] = useState(""); + const [selectedCategory, setSelectedCategory] = useState("all"); + const [selectedDifficulty, setSelectedDifficulty] = useState("all"); + const [sortBy, setSortBy] = useState("newest"); + + const getDifficultyColor = (difficulty: string) => { + switch (difficulty) { + case 'beginner': return 'bg-green-500'; + case 'intermediate': return 'bg-yellow-500'; + case 'advanced': return 'bg-red-500'; + default: return 'bg-gray-500'; + } + }; + + const getDifficultyTextColor = (difficulty: string) => { + switch (difficulty) { + case 'beginner': return 'text-green-400'; + case 'intermediate': return 'text-yellow-400'; + case 'advanced': return 'text-red-400'; + default: return 'text-gray-400'; + } + }; + + const filteredTutorials = tutorials.filter(tutorial => { + const matchesSearch = tutorial.title.toLowerCase().includes(searchTerm.toLowerCase()) || + tutorial.description.toLowerCase().includes(searchTerm.toLowerCase()) || + tutorial.tags.some(tag => tag.toLowerCase().includes(searchTerm.toLowerCase())); + const matchesCategory = selectedCategory === "all" || + tutorial.category.toLowerCase().replace(/[\/\s]/g, '-') === selectedCategory; + const matchesDifficulty = selectedDifficulty === "all" || tutorial.difficulty === selectedDifficulty; + + return matchesSearch && matchesCategory && matchesDifficulty; + }); + + return ( + +
+
+ {/* Header */} +
+

+ AeThex Tutorials +

+

+ Master cutting-edge development skills with our comprehensive tutorial library +

+ + {/* Search and Filters */} +
+
+
+ + setSearchTerm(e.target.value)} + className="pl-10 bg-slate-800/50 border-slate-600 text-white" + /> +
+
+
+ + +
+
+
+ +
+ {/* Categories Sidebar */} +
+ + + + + Categories + + + + {categories.map((category) => { + const Icon = category.icon; + return ( + + ); + })} + + +
+ + {/* Tutorials Grid */} +
+
+

+ Showing {filteredTutorials.length} tutorials +

+
+ +
+ {filteredTutorials.map((tutorial) => ( + +
+ {tutorial.title} +
+ +
+ {tutorial.isNew && ( + + New + + )} + {tutorial.isPremium && ( + + Premium + + )} +
+ + +
+ + {tutorial.category} + + + {tutorial.difficulty} + +
+ +

+ {tutorial.title} +

+ +

+ {tutorial.description} +

+ +
+
+
+ + {tutorial.duration} +
+
+ + {tutorial.author} +
+
+
+ +
+
+
+ + {tutorial.rating} +
+
+ + {tutorial.views} +
+
+ + {tutorial.likes} +
+
+ +
+ +
+ {tutorial.tags.slice(0, 3).map((tag) => ( + + {tag} + + ))} +
+
+
+ ))} +
+ + {filteredTutorials.length === 0 && ( + + + +

+ No tutorials found +

+

+ Try adjusting your search terms or filters to find what you're looking for. +

+
+
+ )} +
+
+
+
+
+ ); +}