"use client" import { StudyPlanCard } from "@/components/AI/StudyPlanCard" import { WeeklyProgressReport } from "@/components/AI/WeeklyProgressReport" import { Card, CardContent } from "@/components/ui/card" import { Calendar, BookOpen, Clock, Target, CheckCircle2, TrendingUp, Flame } from "lucide-react" import { useActiveUser, isDemoUser } from "@/hooks/useActiveUser" export default function StudyPlanPage() { const { user, userId } = useActiveUser() const isDemo = isDemoUser(userId) const streakCount = user?.streak_count || (isDemo ? 12 : 1) return (
{/* Page Header */}

Personalized Daily & Weekly Study Plan

AI-generated task schedule dynamically tailored to fix your weak areas and maintain optimal syllabus coverage.

AI Powered
{/* KPI Strip */}
{[ { label: "Tasks Today", value: isDemo ? "5" : "3", sub: isDemo ? "2 completed" : "0 completed", icon: , color: "border-green-400/20 bg-green-400/5" }, { label: "Study Hours Today", value: isDemo ? "3.8 hrs" : "0.0 hrs", sub: "Target: 5 hrs", icon: , color: "border-[var(--cyan-ai-20)] bg-[var(--cyan-ai-10)]" }, { label: "Syllabus Coverage", value: isDemo ? "64%" : "0%", sub: isDemo ? "+8% this week" : "Day 1 Baseline", icon: , color: "border-amber-400/20 bg-amber-400/5" }, { label: "Current Streak", value: `${streakCount} Day${streakCount === 1 ? '' : 's'}`, sub: isDemo ? "Keep it up!" : "Day 1 active", icon: , color: "border-orange-400/20 bg-orange-400/5" }, ].map((kpi) => ( {kpi.icon}
{kpi.value}
{kpi.label}
{kpi.sub}
))}
{/* Today's Schedule */}
Today's Schedule
{new Date().toLocaleDateString("en-IN", { weekday: "long", day: "numeric", month: "long" })}
{/* Weekly Overview */}
Weekly Syllabus Progress
{/* Syllabus Coverage */}

Subject Coverage Breakdown

{[ { subject: "Physics", covered: 58, total: 100, chapters: "21 / 29 chapters" }, { subject: "Chemistry", covered: 71, total: 100, chapters: "19 / 26 chapters" }, { subject: "Biology / Maths", covered: 64, total: 100, chapters: "32 / 52 topics" }, ].map((sub) => (
{sub.subject}
{sub.chapters} = 70 ? "text-green-400" : sub.covered >= 55 ? "text-amber-400" : "text-red-400"}`}>{sub.covered}%
= 70 ? "bg-green-400" : sub.covered >= 55 ? "bg-amber-400" : "bg-red-400"}`} style={{ width: `${sub.covered}%` }} />
))}
{/* Sidebar */}

AI Scheduler Rules

  • High-Yield Prioritization: Extra time on topics with heavy exam weightage.
  • Error Interleaving: Recent incorrect questions are integrated directly into study blocks.
  • Burnout Prevention: 10-minute micro-breaks recommended between intensive problem sets.
  • Spaced Repetition: SM-2 algorithm reschedules mistake reviews at optimal intervals.

Upcoming This Week

{[ { day: "Tue, Aug 5", task: "Full-Length Mock — JEE Mains Pattern", type: "Test", color: "text-purple-400 bg-purple-400/10" }, { day: "Wed, Aug 6", task: "Rotational Dynamics Intensive Drill", type: "Practice", color: "text-[var(--cyan-ai)] bg-[var(--cyan-ai-10)]" }, { day: "Thu, Aug 7", task: "Chemistry Organic — Mistake Review", type: "Review", color: "text-red-400 bg-red-400/10" }, { day: "Fri, Aug 8", task: "Optics + Wave Optics Revision", type: "Revision", color: "text-yellow-400 bg-yellow-400/10" }, ].map((item) => (
{item.type}
{item.task}
{item.day}
))}
) }