chore: Secure routes with auth middleware, update text and fix minor bugs

This commit is contained in:
2026-08-03 17:55:20 +05:30
parent 62d15c85f6
commit c2fab50749
68 changed files with 2515 additions and 6808 deletions

View File

@@ -1,11 +1,52 @@
"use client"
import { TutorChat } from "@/components/AI/TutorChat"
import { BrainCircuit, Sparkles, MessageSquare, Lightbulb } from "lucide-react"
import { Card, CardContent } from "@/components/ui/card"
const CAPABILITIES = [
{ icon: <Lightbulb size={16} className="text-yellow-400" />, label: "Concept Explanations", desc: "Step-by-step breakdown of Physics, Chemistry, Maths & Biology topics" },
{ icon: <Sparkles size={16} className="text-[#00F0FF]" />, label: "Problem Solving", desc: "Full worked solutions with formulas, derivations and shortcuts" },
{ icon: <MessageSquare size={16} className="text-green-400" />, label: "Doubt Clearing", desc: "Ask follow-up questions — the AI remembers context within the session" },
]
export default function TutorChatPage() {
return (
<div className="h-[calc(100vh-80px)] w-full flex flex-col p-4 md:p-6 animate-in fade-in duration-500">
<div className="flex-1 rounded-3xl overflow-hidden border border-border/50 shadow-xl bg-background">
<div className="p-6 md:p-8 space-y-6 max-w-7xl mx-auto animate-in fade-in duration-500 min-h-screen">
{/* Page Header */}
<div className="border-b border-border/50 pb-6">
<div className="flex items-start justify-between gap-4 flex-wrap">
<div>
<h1 className="text-3xl md:text-4xl font-black tracking-tight flex items-center gap-3 mb-2">
<span className="p-2.5 rounded-xl bg-[#00F0FF]/10 border border-[#00F0FF]/20">
<BrainCircuit className="text-[#00F0FF]" size={28} />
</span>
AI Tutor — 24/7 Doubt Solver
</h1>
<p className="text-muted-foreground text-base font-medium max-w-2xl pl-1">
Ask any JEE or NEET concept, get step-by-step explanations, formula derivations, and solved examples — instantly.
</p>
</div>
</div>
</div>
{/* Capabilities Strip */}
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
{CAPABILITIES.map(c => (
<Card key={c.label} className="border-border/50 bg-secondary/10 rounded-2xl">
<CardContent className="p-4 flex items-start gap-3">
<div className="mt-0.5 shrink-0">{c.icon}</div>
<div>
<div className="text-sm font-black">{c.label}</div>
<div className="text-xs text-muted-foreground font-medium mt-0.5">{c.desc}</div>
</div>
</CardContent>
</Card>
))}
</div>
{/* Chat — full height */}
<div className="flex-1 rounded-3xl overflow-hidden border border-border/50 shadow-xl bg-background" style={{ minHeight: "560px" }}>
<TutorChat />
</div>
</div>