@devries-cameron20 / OCIU-npo Mirror · read-only
Fork 0

Mirrored from https://github.com/Camo67/OCIU-npo.git

Synced Nov 21, 03:37 UTC

1 import { Navigation } from "@/components/Navigation";
2 import { Card, CardContent, CardHeader, CardTitle, CardDescription } from "@/components/ui/card";
3 import { Button } from "@/components/ui/button";
4 import { Textarea } from "@/components/ui/textarea";
5 import { Bot, BookOpen, MessageSquare, Sparkles, Brain, GraduationCap } from "lucide-react";
6 import { useState } from "react";
7
8 const features = [
9 {
10 icon: Brain,
11 title: "Personalized Learning",
12 description: "Adaptive AI that understands your learning style and pace"
13 },
14 {
15 icon: MessageSquare,
16 title: "Interactive Conversations",
17 description: "Ask questions and get instant, detailed explanations"
18 },
19 {
20 icon: BookOpen,
21 title: "Multiple Subjects",
22 description: "Support for math, science, languages, and more"
23 },
24 {
25 icon: GraduationCap,
26 title: "Skill Development",
27 description: "Build practical skills for career advancement"
28 }
29 ];
30
31 const AITutor = () => {
32 const [question, setQuestion] = useState("");
33 const [isLoading, setIsLoading] = useState(false);
34
35 const handleAsk = () => {
36 if (!question.trim()) return;
37 setIsLoading(true);
38 // Placeholder for AI integration
39 setTimeout(() => {
40 setIsLoading(false);
41 setQuestion("");
42 }, 2000);
43 };
44
45 return (
46 <div className="min-h-screen">
47 <Navigation />
48 <main className="pt-24 pb-16">
49 <div className="container mx-auto px-4">
50 {/* Hero Section */}
51 <div className="max-w-4xl mx-auto text-center mb-16 space-y-4 animate-fade-in">
52 <div className="flex justify-center mb-4">
53 <div className="p-4 bg-primary/10 rounded-full">
54 <Bot className="w-16 h-16 text-primary" />
55 </div>
56 </div>
57 <h1 className="text-5xl md:text-6xl font-bold text-foreground">
58 AI Learning Assistant
59 </h1>
60 <p className="text-xl text-muted-foreground">
61 Your personal AI tutor available 24/7 to help you learn and grow
62 </p>
63 </div>
64
65 {/* Interactive Question Box */}
66 <div className="max-w-3xl mx-auto mb-16 animate-slide-up">
67 <Card className="border-2">
68 <CardHeader>
69 <CardTitle className="flex items-center gap-2">
70 <Sparkles className="w-5 h-5 text-primary" />
71 Ask Your Question
72 </CardTitle>
73 <CardDescription>
74 Get instant help with homework, concepts, or skills you want to learn
75 </CardDescription>
76 </CardHeader>
77 <CardContent className="space-y-4">
78 <Textarea
79 placeholder="Example: Can you explain the Pythagorean theorem with a real-world example?"
80 value={question}
81 onChange={(e) => setQuestion(e.target.value)}
82 rows={4}
83 className="resize-none"
84 />
85 <Button
86 onClick={handleAsk}
87 disabled={isLoading || !question.trim()}
88 className="w-full"
89 >
90 {isLoading ? "Thinking..." : "Get Answer"}
91 </Button>
92 <p className="text-sm text-muted-foreground text-center">
93 AI tutoring is coming soon! Join our waitlist to be notified.
94 </p>
95 </CardContent>
96 </Card>
97 </div>
98
99 {/* Features Grid */}
100 <div className="max-w-5xl mx-auto">
101 <h2 className="text-3xl font-bold text-center mb-12 text-foreground">
102 Why Choose AI Tutoring?
103 </h2>
104 <div className="grid md:grid-cols-2 lg:grid-cols-4 gap-6">
105 {features.map((feature, index) => {
106 const Icon = feature.icon;
107 return (
108 <Card
109 key={feature.title}
110 className="text-center hover:shadow-xl transition-all animate-slide-up"
111 style={{ animationDelay: `${index * 0.1}s` }}
112 >
113 <CardHeader>
114 <div className="flex justify-center mb-4">
115 <div className="p-3 bg-primary/10 rounded-full">
116 <Icon className="w-8 h-8 text-primary" />
117 </div>
118 </div>
119 <CardTitle className="text-lg">{feature.title}</CardTitle>
120 </CardHeader>
121 <CardContent>
122 <p className="text-muted-foreground text-sm">
123 {feature.description}
124 </p>
125 </CardContent>
126 </Card>
127 );
128 })}
129 </div>
130 </div>
131 </div>
132 </main>
133 </div>
134 );
135 };
136
137 export default AITutor;