Spaces:
Sleeping
Sleeping
muhammad naveed commited on
Upload folder using huggingface_hub
Browse filesFiles changed (25)
- DockerfileAdded+24
- README.md+27-4
- app/about/page.tsxAdded+202
- app/contact/page.tsxAdded+246
- app/courses/page.tsxAdded+268
- app/globals.cssAdded+212
- app/layout.tsxAdded+19
- app/page.tsxAdded+814
- app/register/page.tsxAdded+331
- app/resources/page.tsxAdded+1272
- app/student/chat/page.tsxAdded+420
- app/student/dashboard/page.tsxAdded+477
- app/student/learn/page.tsxAdded+521
- app/student/progress/page.tsxAdded+223
- app/student/quiz/page.tsxAdded+310
- app/teacher/dashboard/page.tsxAdded+317
- lib/api.tsAdded+387
- next-env.d.tsAdded+5
- next.config.jsAdded+51
- package-lock.jsonAdded
- package.jsonAdded+30
- postcss.config.jsAdded+6
- tailwind.config.jsAdded+107
- tsconfig.jsonAdded+34
- tsconfig.tsbuildinfoAdded+1
123456789101112131415161718192021222324FROM node:18-alpine
WORKDIR /app
# Copy package filesCOPY package*.json ./
# Install dependenciesRUN npm install
# Copy application codeCOPY . .
# Set the API URL to the Hugging Face deployed APIENV NEXT_PUBLIC_API_URL=https://naveed247365-learnflow-api.hf.space
# Build the applicationRUN npm run build
# Expose portEXPOSE 3000
# Start the applicationCMD ["npm", "start"]12345678910---title: Learnflowemoji: 💻colorFrom: greencolorTo: indigosdk: dockerpinned: false---Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference123456789101112131415161718192021222324252627282930313233---title: LearnFlowemoji: 🎓colorFrom: greencolorTo: bluesdk: dockerpinned: falselicense: mitapp_port: 3000---# LearnFlow - AI-Powered Python Learning PlatformAn interactive Python learning platform with AI tutors, code execution, and progress tracking.## Features- **AI Python Tutor** - Get instant help with Python questions- **Interactive Code Editor** - Write and run Python code- **Quizzes** - Test your knowledge- **Progress Tracking** - Track your learning journey- **Learning Resources** - Guides, cheatsheets, videos## Tech Stack- Next.js 14- Tailwind CSS- TypeScript- Monaco Editor## Live DemoTry it out! Register an account and start learning Python.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202'use client';
import Link from 'next/link';
export default function AboutPage() { const team = [ { name: 'Dr. Sarah Chen', role: 'Founder & CEO', image: '👩💼', bio: 'Former Google engineer with 15 years in EdTech' }, { name: 'Muhammad Ali', role: 'Lead AI Engineer', image: '👨💻', bio: 'PhD in Machine Learning, Stanford University' }, { name: 'Emily Rodriguez', role: 'Head of Curriculum', image: '👩🏫', bio: '10 years teaching Python at MIT' }, { name: 'James Wilson', role: 'CTO', image: '👨🔬', bio: 'Built scalable systems at AWS and Netflix' }, ];
const values = [ { icon: '🎯', title: 'Personalized Learning', description: 'AI adapts to your pace and learning style' }, { icon: '🤝', title: 'Supportive Community', description: 'Learn alongside thousands of motivated students' }, { icon: '💡', title: 'Practical Skills', description: 'Build real projects, not just theory' }, { icon: '🚀', title: 'Career Growth', description: 'Skills that employers actually want' }, ];
const milestones = [ { year: '2022', event: 'LearnFlow founded with a mission to democratize coding education' }, { year: '2023', event: 'Launched AI tutoring system, reached 10,000 students' }, { year: '2024', event: 'Expanded to 50+ countries, 100,000+ students enrolled' }, { year: '2025', event: 'Introduced advanced debugging agent and teacher dashboard' }, ];
return ( <div className="min-h-screen bg-gradient-to-b from-cream-50 to-white"> {/* Header */} <header className="bg-white/80 backdrop-blur-md border-b border-warmgray-100 sticky top-0 z-50"> <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> <div className="flex items-center justify-between h-16"> <Link href="/" className="flex items-center space-x-3"> <div className="w-10 h-10 bg-gradient-to-br from-teal-500 to-teal-600 rounded-xl flex items-center justify-center shadow-soft"> <span className="text-white font-bold text-lg">L</span> </div> <span className="text-xl font-bold text-warmgray-900">LearnFlow</span> </Link>
<nav className="hidden md:flex items-center space-x-1"> {[ { name: 'Home', href: '/' }, { name: 'Courses', href: '/courses' }, { name: 'About', href: '/about' }, { name: 'Resources', href: '/resources' }, { name: 'Contact', href: '/contact' }, ].map((item) => ( <Link key={item.name} href={item.href} className={`px-4 py-2 rounded-full text-sm font-medium transition-all duration-200 ${ item.name === 'About' ? 'bg-teal-50 text-teal-700' : 'text-warmgray-600 hover:text-teal-700 hover:bg-teal-50' }`} > {item.name} </Link> ))} </nav>
<div className="flex items-center space-x-3"> <Link href="/register" className="text-warmgray-700 hover:text-teal-700 font-medium text-sm"> Sign Up </Link> <Link href="/" className="bg-teal-600 text-white px-5 py-2.5 rounded-full hover:bg-teal-700 transition-all font-medium text-sm"> Login </Link> </div> </div> </div> </header>
{/* Hero Section */} <section className="py-20 px-4"> <div className="max-w-4xl mx-auto text-center"> <h1 className="text-4xl md:text-5xl font-bold text-warmgray-900 mb-6"> About <span className="text-teal-600">LearnFlow</span> </h1> <p className="text-xl text-warmgray-600 leading-relaxed"> We're on a mission to make Python programming accessible to everyone through AI-powered personalized learning experiences. </p> </div> </section>
{/* Our Story */} <section className="py-16 px-4 bg-white"> <div className="max-w-6xl mx-auto"> <div className="grid md:grid-cols-2 gap-12 items-center"> <div> <h2 className="text-3xl font-bold text-warmgray-900 mb-6">Our Story</h2> <p className="text-warmgray-600 mb-4"> LearnFlow was born from a simple observation: traditional coding education doesn't work for everyone. Students learn at different paces, have different backgrounds, and need different types of support. </p> <p className="text-warmgray-600 mb-4"> We built LearnFlow to solve this problem. Our AI tutors adapt to each student's learning style, providing personalized explanations, debugging help, and practice exercises. </p> <p className="text-warmgray-600"> Today, we're proud to help over 100,000 students worldwide learn Python effectively, with teacher dashboards that help educators identify and support struggling students. </p> </div> <div className="bg-gradient-to-br from-teal-500 to-sage-500 rounded-3xl p-8 text-white"> <div className="grid grid-cols-2 gap-6"> <div className="text-center"> <div className="text-4xl font-bold">100K+</div> <div className="text-teal-100">Students</div> </div> <div className="text-center"> <div className="text-4xl font-bold">50+</div> <div className="text-teal-100">Countries</div> </div> <div className="text-center"> <div className="text-4xl font-bold">95%</div> <div className="text-teal-100">Completion Rate</div> </div> <div className="text-center"> <div className="text-4xl font-bold">4.8</div> <div className="text-teal-100">Avg Rating</div> </div> </div> </div> </div> </div> </section>
{/* Our Values */} <section className="py-16 px-4"> <div className="max-w-6xl mx-auto"> <h2 className="text-3xl font-bold text-warmgray-900 text-center mb-12">Our Values</h2> <div className="grid md:grid-cols-2 lg:grid-cols-4 gap-6"> {values.map((value, index) => ( <div key={index} className="bg-white rounded-2xl p-6 shadow-soft hover:shadow-soft-lg transition-shadow"> <div className="text-4xl mb-4">{value.icon}</div> <h3 className="font-semibold text-warmgray-900 mb-2">{value.title}</h3> <p className="text-warmgray-600 text-sm">{value.description}</p> </div> ))} </div> </div> </section>
{/* Timeline */} <section className="py-16 px-4 bg-white"> <div className="max-w-4xl mx-auto"> <h2 className="text-3xl font-bold text-warmgray-900 text-center mb-12">Our Journey</h2> <div className="space-y-8"> {milestones.map((milestone, index) => ( <div key={index} className="flex gap-6"> <div className="flex-shrink-0 w-20 text-right"> <span className="text-teal-600 font-bold">{milestone.year}</span> </div> <div className="flex-shrink-0 w-4 h-4 mt-1 bg-teal-500 rounded-full relative"> {index < milestones.length - 1 && ( <div className="absolute top-4 left-1/2 w-0.5 h-16 bg-teal-200 -translate-x-1/2" /> )} </div> <div className="flex-1 pb-8"> <p className="text-warmgray-700">{milestone.event}</p> </div> </div> ))} </div> </div> </section>
{/* Team */} <section className="py-16 px-4"> <div className="max-w-6xl mx-auto"> <h2 className="text-3xl font-bold text-warmgray-900 text-center mb-12">Meet Our Team</h2> <div className="grid md:grid-cols-2 lg:grid-cols-4 gap-6"> {team.map((member, index) => ( <div key={index} className="bg-white rounded-2xl p-6 shadow-soft text-center hover:shadow-soft-lg transition-shadow"> <div className="text-6xl mb-4">{member.image}</div> <h3 className="font-semibold text-warmgray-900">{member.name}</h3> <p className="text-teal-600 text-sm mb-2">{member.role}</p> <p className="text-warmgray-500 text-sm">{member.bio}</p> </div> ))} </div> </div> </section>
{/* CTA */} <section className="py-16 px-4 bg-gradient-to-r from-teal-600 to-teal-700"> <div className="max-w-4xl mx-auto text-center text-white"> <h2 className="text-3xl font-bold mb-4">Join Our Learning Community</h2> <p className="text-teal-100 mb-8">Start your Python journey today with AI-powered personalized learning.</p> <Link href="/register" className="inline-block bg-white text-teal-700 px-8 py-3 rounded-full font-semibold hover:bg-cream-50 transition-colors shadow-lg" > Get Started Free </Link> </div> </section> </div> );}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246'use client';
import Link from 'next/link';import { useState } from 'react';
export default function ContactPage() { const [formData, setFormData] = useState({ name: '', email: '', subject: '', message: '', }); const [isSubmitting, setIsSubmitting] = useState(false); const [submitted, setSubmitted] = useState(false);
const handleSubmit = async (e: React.FormEvent) => { e.preventDefault(); setIsSubmitting(true);
// Simulate form submission await new Promise(resolve => setTimeout(resolve, 1500));
setIsSubmitting(false); setSubmitted(true); setFormData({ name: '', email: '', subject: '', message: '' }); };
const contactInfo = [ { icon: '📧', label: 'Email', value: 'support@learnflow.com', href: 'mailto:support@learnflow.com' }, { icon: '📞', label: 'Phone', value: '+1 (555) 123-4567', href: 'tel:+15551234567' }, { icon: '📍', label: 'Address', value: '123 Learning Street, San Francisco, CA 94102', href: '#' }, ];
const faqs = [ { q: 'How do I reset my password?', a: 'Click "Forgot Password" on the login page and follow the instructions.' }, { q: 'Can I get a refund?', a: 'Yes, we offer a 30-day money-back guarantee on all courses.' }, { q: 'How do I contact my instructor?', a: 'Use the chat feature in your course dashboard to message your instructor.' }, { q: 'Is there a mobile app?', a: 'Our mobile app is coming soon! Currently, our website works great on mobile browsers.' }, ];
return ( <div className="min-h-screen bg-gradient-to-b from-cream-50 to-white"> {/* Header */} <header className="bg-white/80 backdrop-blur-md border-b border-warmgray-100 sticky top-0 z-50"> <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> <div className="flex items-center justify-between h-16"> <Link href="/" className="flex items-center space-x-3"> <div className="w-10 h-10 bg-gradient-to-br from-teal-500 to-teal-600 rounded-xl flex items-center justify-center shadow-soft"> <span className="text-white font-bold text-lg">L</span> </div> <span className="text-xl font-bold text-warmgray-900">LearnFlow</span> </Link>
<nav className="hidden md:flex items-center space-x-1"> {[ { name: 'Home', href: '/' }, { name: 'Courses', href: '/courses' }, { name: 'About', href: '/about' }, { name: 'Resources', href: '/resources' }, { name: 'Contact', href: '/contact' }, ].map((item) => ( <Link key={item.name} href={item.href} className={`px-4 py-2 rounded-full text-sm font-medium transition-all duration-200 ${ item.name === 'Contact' ? 'bg-teal-50 text-teal-700' : 'text-warmgray-600 hover:text-teal-700 hover:bg-teal-50' }`} > {item.name} </Link> ))} </nav>
<div className="flex items-center space-x-3"> <Link href="/register" className="text-warmgray-700 hover:text-teal-700 font-medium text-sm"> Sign Up </Link> <Link href="/" className="bg-teal-600 text-white px-5 py-2.5 rounded-full hover:bg-teal-700 transition-all font-medium text-sm"> Login </Link> </div> </div> </div> </header>
{/* Hero Section */} <section className="py-16 px-4"> <div className="max-w-4xl mx-auto text-center"> <h1 className="text-4xl md:text-5xl font-bold text-warmgray-900 mb-4"> Get in <span className="text-teal-600">Touch</span> </h1> <p className="text-lg text-warmgray-600"> Have questions? We'd love to hear from you. Send us a message and we'll respond as soon as possible. </p> </div> </section>
{/* Contact Info Cards */} <section className="px-4 pb-12"> <div className="max-w-4xl mx-auto"> <div className="grid md:grid-cols-3 gap-6"> {contactInfo.map((info, index) => ( <a key={index} href={info.href} className="bg-white rounded-2xl p-6 shadow-soft hover:shadow-soft-lg transition-all text-center group" > <div className="text-4xl mb-3">{info.icon}</div> <div className="text-sm text-warmgray-500 mb-1">{info.label}</div> <div className="font-medium text-warmgray-900 group-hover:text-teal-600 transition-colors"> {info.value} </div> </a> ))} </div> </div> </section>
{/* Contact Form & FAQs */} <section className="px-4 pb-20"> <div className="max-w-6xl mx-auto"> <div className="grid lg:grid-cols-2 gap-12"> {/* Contact Form */} <div className="bg-white rounded-3xl p-8 shadow-soft"> <h2 className="text-2xl font-bold text-warmgray-900 mb-6">Send us a Message</h2>
{submitted ? ( <div className="text-center py-12"> <div className="text-6xl mb-4">✅</div> <h3 className="text-xl font-semibold text-warmgray-900 mb-2">Message Sent!</h3> <p className="text-warmgray-600 mb-6">We'll get back to you within 24 hours.</p> <button onClick={() => setSubmitted(false)} className="text-teal-600 font-medium hover:text-teal-700" > Send another message </button> </div> ) : ( <form onSubmit={handleSubmit} className="space-y-5"> <div> <label className="block text-sm font-medium text-warmgray-700 mb-2">Your Name</label> <input type="text" required value={formData.name} onChange={(e) => setFormData({ ...formData, name: e.target.value })} className="w-full px-4 py-3 rounded-xl border border-warmgray-200 focus:border-teal-500 focus:ring-2 focus:ring-teal-500/20 outline-none transition-all" placeholder="John Doe" /> </div> <div> <label className="block text-sm font-medium text-warmgray-700 mb-2">Email Address</label> <input type="email" required value={formData.email} onChange={(e) => setFormData({ ...formData, email: e.target.value })} className="w-full px-4 py-3 rounded-xl border border-warmgray-200 focus:border-teal-500 focus:ring-2 focus:ring-teal-500/20 outline-none transition-all" placeholder="john@example.com" /> </div> <div> <label className="block text-sm font-medium text-warmgray-700 mb-2">Subject</label> <select required value={formData.subject} onChange={(e) => setFormData({ ...formData, subject: e.target.value })} className="w-full px-4 py-3 rounded-xl border border-warmgray-200 focus:border-teal-500 focus:ring-2 focus:ring-teal-500/20 outline-none transition-all" > <option value="">Select a subject</option> <option value="general">General Inquiry</option> <option value="support">Technical Support</option> <option value="billing">Billing Question</option> <option value="partnership">Partnership Opportunity</option> <option value="feedback">Feedback</option> </select> </div> <div> <label className="block text-sm font-medium text-warmgray-700 mb-2">Message</label> <textarea required rows={5} value={formData.message} onChange={(e) => setFormData({ ...formData, message: e.target.value })} className="w-full px-4 py-3 rounded-xl border border-warmgray-200 focus:border-teal-500 focus:ring-2 focus:ring-teal-500/20 outline-none transition-all resize-none" placeholder="How can we help you?" /> </div> <button type="submit" disabled={isSubmitting} className="w-full bg-teal-600 text-white py-3 rounded-xl font-semibold hover:bg-teal-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2" > {isSubmitting ? ( <> <svg className="animate-spin h-5 w-5" viewBox="0 0 24 24"> <circle className="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" strokeWidth="4" fill="none" /> <path className="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" /> </svg> Sending... </> ) : ( 'Send Message' )} </button> </form> )} </div>
{/* FAQs */} <div> <h2 className="text-2xl font-bold text-warmgray-900 mb-6">Frequently Asked Questions</h2> <div className="space-y-4"> {faqs.map((faq, index) => ( <div key={index} className="bg-white rounded-2xl p-6 shadow-soft"> <h3 className="font-semibold text-warmgray-900 mb-2">{faq.q}</h3> <p className="text-warmgray-600 text-sm">{faq.a}</p> </div> ))} </div>
{/* Social Links */} <div className="mt-8 bg-gradient-to-br from-teal-500 to-sage-500 rounded-2xl p-6 text-white"> <h3 className="font-semibold mb-4">Follow Us</h3> <div className="flex gap-4"> {['Twitter', 'LinkedIn', 'YouTube', 'Discord'].map((social) => ( <a key={social} href="#" className="bg-white/20 hover:bg-white/30 transition-colors px-4 py-2 rounded-lg text-sm font-medium" > {social} </a> ))} </div> </div> </div> </div> </div> </section> </div> );}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268'use client';
import Link from 'next/link';import { useState } from 'react';
export default function CoursesPage() { const [selectedCategory, setSelectedCategory] = useState('all');
const categories = [ { id: 'all', name: 'All Courses' }, { id: 'beginner', name: 'Beginner' }, { id: 'intermediate', name: 'Intermediate' }, { id: 'advanced', name: 'Advanced' }, ];
const courses = [ { id: 1, title: 'Python Fundamentals', description: 'Learn Python from scratch. Variables, data types, operators, and basic syntax.', level: 'beginner', duration: '4 weeks', lessons: 24, students: 1250, rating: 4.8, image: '🐍', color: 'bg-teal-500', }, { id: 2, title: 'Control Flow & Loops', description: 'Master if statements, for loops, while loops, and conditional logic.', level: 'beginner', duration: '3 weeks', lessons: 18, students: 980, rating: 4.7, image: '🔄', color: 'bg-sage-500', }, { id: 3, title: 'Functions & Modules', description: 'Create reusable code with functions, parameters, return values, and modules.', level: 'intermediate', duration: '4 weeks', lessons: 22, students: 756, rating: 4.9, image: '⚡', color: 'bg-lavender-500', }, { id: 4, title: 'Object-Oriented Programming', description: 'Classes, objects, inheritance, polymorphism, and encapsulation in Python.', level: 'intermediate', duration: '5 weeks', lessons: 30, students: 645, rating: 4.8, image: '🏗️', color: 'bg-coral-500', }, { id: 5, title: 'Data Structures', description: 'Lists, dictionaries, sets, tuples, and when to use each data structure.', level: 'intermediate', duration: '4 weeks', lessons: 26, students: 823, rating: 4.7, image: '📊', color: 'bg-teal-600', }, { id: 6, title: 'File Handling & APIs', description: 'Read/write files, work with JSON, and consume REST APIs with Python.', level: 'advanced', duration: '3 weeks', lessons: 20, students: 432, rating: 4.9, image: '📁', color: 'bg-sage-600', }, { id: 7, title: 'Error Handling & Debugging', description: 'Try-except blocks, custom exceptions, and debugging techniques.', level: 'intermediate', duration: '2 weeks', lessons: 14, students: 567, rating: 4.6, image: '🐛', color: 'bg-lavender-600', }, { id: 8, title: 'Python Projects', description: 'Build real-world projects: CLI tools, web scrapers, and automation scripts.', level: 'advanced', duration: '6 weeks', lessons: 35, students: 389, rating: 4.9, image: '🚀', color: 'bg-coral-600', }, ];
const filteredCourses = selectedCategory === 'all' ? courses : courses.filter(course => course.level === selectedCategory);
return ( <div className="min-h-screen bg-gradient-to-b from-cream-50 to-white"> {/* Header */} <header className="bg-white/80 backdrop-blur-md border-b border-warmgray-100 sticky top-0 z-50"> <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> <div className="flex items-center justify-between h-16"> <Link href="/" className="flex items-center space-x-3"> <div className="w-10 h-10 bg-gradient-to-br from-teal-500 to-teal-600 rounded-xl flex items-center justify-center shadow-soft"> <span className="text-white font-bold text-lg">L</span> </div> <span className="text-xl font-bold text-warmgray-900">LearnFlow</span> </Link>
<nav className="hidden md:flex items-center space-x-1"> {[ { name: 'Home', href: '/' }, { name: 'Courses', href: '/courses' }, { name: 'About', href: '/about' }, { name: 'Resources', href: '/resources' }, { name: 'Contact', href: '/contact' }, ].map((item) => ( <Link key={item.name} href={item.href} className={`px-4 py-2 rounded-full text-sm font-medium transition-all duration-200 ${ item.name === 'Courses' ? 'bg-teal-50 text-teal-700' : 'text-warmgray-600 hover:text-teal-700 hover:bg-teal-50' }`} > {item.name} </Link> ))} </nav>
<div className="flex items-center space-x-3"> <Link href="/register" className="text-warmgray-700 hover:text-teal-700 font-medium text-sm"> Sign Up </Link> <Link href="/" className="bg-teal-600 text-white px-5 py-2.5 rounded-full hover:bg-teal-700 transition-all font-medium text-sm"> Login </Link> </div> </div> </div> </header>
{/* Hero Section */} <section className="py-16 px-4"> <div className="max-w-7xl mx-auto text-center"> <h1 className="text-4xl md:text-5xl font-bold text-warmgray-900 mb-4"> Explore Our <span className="text-teal-600">Python Courses</span> </h1> <p className="text-lg text-warmgray-600 max-w-2xl mx-auto"> From beginner to advanced, find the perfect course to master Python programming with AI-powered guidance. </p> </div> </section>
{/* Category Filter */} <section className="px-4 pb-8"> <div className="max-w-7xl mx-auto"> <div className="flex flex-wrap justify-center gap-3"> {categories.map((category) => ( <button key={category.id} onClick={() => setSelectedCategory(category.id)} className={`px-6 py-2.5 rounded-full font-medium transition-all duration-200 ${ selectedCategory === category.id ? 'bg-teal-600 text-white shadow-soft' : 'bg-white text-warmgray-600 hover:bg-teal-50 hover:text-teal-700 border border-warmgray-200' }`} > {category.name} </button> ))} </div> </div> </section>
{/* Courses Grid */} <section className="px-4 pb-20"> <div className="max-w-7xl mx-auto"> <div className="grid md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6"> {filteredCourses.map((course) => ( <div key={course.id} className="bg-white rounded-2xl shadow-soft hover:shadow-soft-lg transition-all duration-300 overflow-hidden group" > <div className={`${course.color} h-32 flex items-center justify-center`}> <span className="text-5xl">{course.image}</span> </div> <div className="p-5"> <div className="flex items-center gap-2 mb-2"> <span className={`px-2.5 py-1 rounded-full text-xs font-medium ${ course.level === 'beginner' ? 'bg-green-100 text-green-700' : course.level === 'intermediate' ? 'bg-yellow-100 text-yellow-700' : 'bg-red-100 text-red-700' }`}> {course.level.charAt(0).toUpperCase() + course.level.slice(1)} </span> <span className="text-warmgray-400 text-xs">{course.duration}</span> </div> <h3 className="font-semibold text-warmgray-900 mb-2 group-hover:text-teal-600 transition-colors"> {course.title} </h3> <p className="text-sm text-warmgray-600 mb-4 line-clamp-2"> {course.description} </p> <div className="flex items-center justify-between text-sm"> <div className="flex items-center gap-3 text-warmgray-500"> <span>{course.lessons} lessons</span> <span>{course.students} students</span> </div> <div className="flex items-center text-yellow-500"> <svg className="w-4 h-4" fill="currentColor" viewBox="0 0 20 20"> <path d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" /> </svg> <span className="ml-1 text-warmgray-700">{course.rating}</span> </div> </div> <Link href="/register" className="mt-4 block w-full text-center bg-teal-50 text-teal-700 py-2.5 rounded-xl font-medium hover:bg-teal-100 transition-colors" > Enroll Now </Link> </div> </div> ))} </div> </div> </section>
{/* CTA Section */} <section className="py-16 px-4 bg-gradient-to-r from-teal-600 to-teal-700"> <div className="max-w-4xl mx-auto text-center text-white"> <h2 className="text-3xl font-bold mb-4">Ready to Start Learning?</h2> <p className="text-teal-100 mb-8">Join thousands of students mastering Python with AI-powered tutoring.</p> <Link href="/register" className="inline-block bg-white text-teal-700 px-8 py-3 rounded-full font-semibold hover:bg-cream-50 transition-colors shadow-lg" > Get Started Free </Link> </div> </section> </div> );}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212@tailwind base;@tailwind components;@tailwind utilities;
/* VeryWellMind-inspired Wellness Theme */:root { /* Primary Colors */ --primary-teal: #0d9488; --primary-teal-light: #14b8a6; --primary-teal-dark: #0f766e;
/* Accent Colors */ --accent-lavender: #a855f7; --accent-coral: #ff6b6b; --accent-sage: #7a8b63;
/* Background Colors */ --bg-cream: #fdf9f3; --bg-soft: #fafaf9; --bg-white: #ffffff;
/* Text Colors */ --text-primary: #1c1917; --text-secondary: #57534e; --text-muted: #78716c;
/* Foreground/Background */ --foreground-rgb: 28, 25, 23; --background-rgb: 253, 249, 243;}
@media (prefers-color-scheme: dark) { :root { --foreground-rgb: 250, 250, 249; --background-rgb: 28, 25, 23; }}
* { box-sizing: border-box; padding: 0; margin: 0;}
html { scroll-behavior: smooth;}
body { color: rgb(var(--foreground-rgb)); background: rgb(var(--background-rgb)); font-feature-settings: 'rlig' 1, 'calt' 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;}
/* Wellness Typography */@layer base { h1, h2, h3, h4, h5, h6 { @apply font-display tracking-tight; }
h1 { @apply text-4xl md:text-5xl lg:text-6xl font-bold leading-tight; }
h2 { @apply text-3xl md:text-4xl font-bold; }
h3 { @apply text-xl md:text-2xl font-semibold; }
p { @apply leading-relaxed; }}
/* Custom Components */@layer components { /* Wellness Card Style */ .wellness-card { @apply bg-white rounded-2xl p-6 shadow-soft transition-all duration-300; }
.wellness-card:hover { @apply shadow-soft-lg -translate-y-1; }
/* Soft Button Styles */ .btn-primary { @apply bg-teal-600 text-white px-6 py-3 rounded-full font-medium hover:bg-teal-700 transition-all duration-300 shadow-sm hover:shadow-md; }
.btn-secondary { @apply bg-white text-teal-700 px-6 py-3 rounded-full font-medium border-2 border-teal-200 hover:border-teal-300 hover:bg-teal-50 transition-all duration-300; }
.btn-soft { @apply bg-cream-100 text-warmgray-700 px-6 py-3 rounded-full font-medium hover:bg-cream-200 transition-all duration-300; }
/* Category Pill */ .category-pill { @apply inline-flex items-center px-4 py-2 rounded-full text-sm font-medium transition-all duration-200; }
.category-pill-teal { @apply bg-teal-100 text-teal-800 hover:bg-teal-200; }
.category-pill-lavender { @apply bg-lavender-100 text-lavender-800 hover:bg-lavender-200; }
.category-pill-coral { @apply bg-coral-100 text-coral-800 hover:bg-coral-200; }
.category-pill-sage { @apply bg-sage-100 text-sage-800 hover:bg-sage-200; }
/* Input Styles */ .input-wellness { @apply w-full px-4 py-3 rounded-xl border-2 border-warmgray-200 bg-white focus:outline-none focus:border-teal-400 focus:ring-4 focus:ring-teal-100 transition-all duration-200 placeholder:text-warmgray-400; }
/* Section Styles */ .section-wellness { @apply py-16 md:py-24; }
/* Gradient Backgrounds */ .bg-gradient-wellness { background: linear-gradient(135deg, #f0fdfa 0%, #faf5ff 50%, #fdf9f3 100%); }
.bg-gradient-hero { background: radial-gradient(circle at 30% 20%, rgba(20, 184, 166, 0.08) 0%, transparent 50%), radial-gradient(circle at 70% 80%, rgba(168, 85, 247, 0.06) 0%, transparent 50%), linear-gradient(180deg, #fdf9f3 0%, #ffffff 100%); }
/* Decorative Elements */ .blob-teal { @apply absolute rounded-full bg-teal-200/30 blur-3xl; }
.blob-lavender { @apply absolute rounded-full bg-lavender-200/30 blur-3xl; }}
@layer utilities { .text-balance { text-wrap: balance; }
.animate-float { animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-10px); } }
.animate-pulse-soft { animation: pulse-soft 4s ease-in-out infinite; }
@keyframes pulse-soft { 0%, 100% { opacity: 1; } 50% { opacity: 0.8; } }}
/* Custom Scrollbar */::-webkit-scrollbar { width: 8px;}
::-webkit-scrollbar-track { background: #f5f5f4;}
::-webkit-scrollbar-thumb { background: #d6d3d1; border-radius: 4px;}
::-webkit-scrollbar-thumb:hover { background: #a8a29e;}
/* Selection Color */::selection { background-color: rgba(20, 184, 166, 0.2); color: #0f766e;}12345678910111213141516171819import './globals.css';import type { Metadata } from 'next';
export const metadata: Metadata = { title: 'LearnFlow - AI-Powered Python Tutoring', description: 'Interactive Python learning platform with AI tutors',};
export default function RootLayout({ children,}: { children: React.ReactNode;}) { return ( <html lang="en"> <body className="font-sans antialiased">{children}</body> </html> );}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814'use client';
import { useState } from 'react';import Link from 'next/link';import { useRouter } from 'next/navigation';
const API_URL = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8000';
export default function Home() { const router = useRouter(); const [role, setRole] = useState<'student' | 'teacher'>('student'); const [mobileMenuOpen, setMobileMenuOpen] = useState(false); const [loginEmail, setLoginEmail] = useState(''); const [loginPassword, setLoginPassword] = useState(''); const [loginError, setLoginError] = useState(''); const [isLoggingIn, setIsLoggingIn] = useState(false);
const handleLogin = async (e: React.FormEvent) => { e.preventDefault(); setLoginError(''); setIsLoggingIn(true);
try { let user; let token;
// Try API login first try { const response = await fetch(`${API_URL}/auth/login`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ email: loginEmail, password: loginPassword, }), });
if (response.ok) { const data = await response.json(); user = data.user; token = data.token; localStorage.setItem('learnflow_token', token); } else if (response.status === 401) { setLoginError('Invalid email or password'); setIsLoggingIn(false); return; } else { throw new Error('API not available'); } } catch (apiError) { // Fallback to localStorage console.log('Using localStorage fallback for login'); const users = JSON.parse(localStorage.getItem('learnflow_users') || '[]'); user = users.find((u: any) => u.email === loginEmail && u.password === loginPassword);
if (!user) { setLoginError('Invalid email or password'); setIsLoggingIn(false); return; } }
// Check if role matches if (user.role !== role) { setLoginError(`This account is registered as a ${user.role}. Please select the correct role.`); setIsLoggingIn(false); return; }
// Set current user session localStorage.setItem('learnflow_current_user', JSON.stringify({ id: user.id, name: user.name, email: user.email, role: user.role, }));
// Redirect based on role if (role === 'student') { router.push('/student/dashboard'); } else { router.push('/teacher/dashboard'); } } catch (err) { setLoginError('Something went wrong. Please try again.'); setIsLoggingIn(false); } };
const categories = [ { name: 'Python Basics', color: 'teal', icon: '🐍' }, { name: 'Data Science', color: 'lavender', icon: '📊' }, { name: 'Web Dev', color: 'coral', icon: '🌐' }, { name: 'AI & ML', color: 'sage', icon: '🤖' }, ];
const features = [ { icon: ( <svg className="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.5} d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z" /> </svg> ), title: 'AI-Powered Learning', description: 'Personalized learning paths that adapt to your unique pace and style', color: 'teal', }, { icon: ( <svg className="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.5} d="M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4" /> </svg> ), title: 'Interactive Coding', description: 'Practice with real-time code execution and instant feedback', color: 'lavender', }, { icon: ( <svg className="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.5} d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197m13.5-9a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0z" /> </svg> ), title: 'Expert Community', description: 'Connect with mentors and peers who support your learning journey', color: 'coral', }, { icon: ( <svg className="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.5} d="M9 12l2 2 4-4M7.835 4.697a3.42 3.42 0 001.946-.806 3.42 3.42 0 014.438 0 3.42 3.42 0 001.946.806 3.42 3.42 0 013.138 3.138 3.42 3.42 0 00.806 1.946 3.42 3.42 0 010 4.438 3.42 3.42 0 00-.806 1.946 3.42 3.42 0 01-3.138 3.138 3.42 3.42 0 00-1.946.806 3.42 3.42 0 01-4.438 0 3.42 3.42 0 00-1.946-.806 3.42 3.42 0 01-3.138-3.138 3.42 3.42 0 00-.806-1.946 3.42 3.42 0 010-4.438 3.42 3.42 0 00.806-1.946 3.42 3.42 0 013.138-3.138z" /> </svg> ), title: 'Verified Certificates', description: 'Earn industry-recognized credentials that boost your career', color: 'sage', }, ];
const courses = [ { title: 'Python for Beginners', description: 'Start your coding journey with the most beginner-friendly language', duration: '8 weeks', level: 'Beginner', rating: 4.9, students: '15,000+', image: '🐍', color: 'teal', }, { title: 'Data Science Essentials', description: 'Master data analysis, visualization, and machine learning fundamentals', duration: '12 weeks', level: 'Intermediate', rating: 4.8, students: '12,000+', image: '📊', color: 'lavender', }, { title: 'Full Stack Web Development', description: 'Build modern web applications from frontend to backend', duration: '16 weeks', level: 'Intermediate', rating: 4.7, students: '10,000+', image: '🌐', color: 'coral', }, ];
const testimonials = [ { quote: "LearnFlow transformed my career. The AI tutor felt like having a personal mentor available 24/7.", name: "Sarah Ahmed", role: "Software Developer", avatar: "SA", }, { quote: "The interactive coding exercises made learning Python actually fun. I went from zero to building apps in weeks.", name: "Ali Hassan", role: "Data Analyst", avatar: "AH", }, { quote: "Finally, a learning platform that adapts to my pace. No more feeling left behind or bored.", name: "Fatima Khan", role: "Web Developer", avatar: "FK", }, ];
return ( <div className="min-h-screen bg-cream-50"> {/* Header */} <header className="bg-white/80 backdrop-blur-md border-b border-warmgray-100 sticky top-0 z-50"> <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> <div className="flex justify-between items-center h-16"> <div className="flex items-center"> <div className="flex-shrink-0 flex items-center"> <div className="w-10 h-10 bg-gradient-to-br from-teal-500 to-teal-600 rounded-xl flex items-center justify-center shadow-soft"> <span className="text-white font-bold text-lg">LF</span> </div> <span className="ml-3 text-xl font-bold text-warmgray-900">LearnFlow</span> </div> </div>
<nav className="hidden md:flex items-center space-x-1"> {[ { name: 'Home', href: '/' }, { name: 'Courses', href: '/courses' }, { name: 'About', href: '/about' }, { name: 'Resources', href: '/resources' }, { name: 'Contact', href: '/contact' }, ].map((item, i) => ( <Link key={item.name} href={item.href} className={`px-4 py-2 rounded-full text-sm font-medium transition-all duration-200 ${ i === 0 ? 'bg-teal-50 text-teal-700' : 'text-warmgray-600 hover:text-teal-700 hover:bg-teal-50' }`} > {item.name} </Link> ))} </nav>
<div className="hidden md:flex items-center space-x-3"> <Link href="/register" className="text-warmgray-700 hover:text-teal-700 font-medium text-sm transition-colors px-4 py-2" > Sign Up </Link> <a href="#login" className="bg-teal-600 text-white px-5 py-2.5 rounded-full hover:bg-teal-700 transition-all duration-300 font-medium text-sm shadow-soft hover:shadow-md" > Login </a> </div>
<div className="md:hidden flex items-center"> <button onClick={() => setMobileMenuOpen(!mobileMenuOpen)} className="text-warmgray-700 hover:text-teal-600 p-2 rounded-lg hover:bg-teal-50 transition-colors" > <svg className="h-6 w-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"> {mobileMenuOpen ? ( <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" /> ) : ( <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M4 6h16M4 12h16M4 18h16" /> )} </svg> </button> </div> </div>
{mobileMenuOpen && ( <div className="md:hidden py-4 border-t border-warmgray-100 bg-white/95 backdrop-blur-md absolute left-0 right-0 shadow-soft-lg"> <div className="flex flex-col space-y-1 px-4"> {[ { name: 'Home', href: '/' }, { name: 'Courses', href: '/courses' }, { name: 'About', href: '/about' }, { name: 'Resources', href: '/resources' }, { name: 'Contact', href: '/contact' }, ].map((item, i) => ( <Link key={item.name} href={item.href} className={`px-4 py-3 rounded-xl font-medium transition-colors ${ i === 0 ? 'bg-teal-50 text-teal-700' : 'text-warmgray-700 hover:bg-teal-50 hover:text-teal-700' }`} > {item.name} </Link> ))} <div className="pt-4 mt-2 flex flex-col space-y-3 border-t border-warmgray-100"> <Link href="/register" className="text-teal-600 hover:text-teal-700 font-medium px-4 py-2"> Sign Up </Link> <a href="#login" className="bg-teal-600 text-white px-4 py-3 rounded-xl text-center hover:bg-teal-700 transition-colors font-medium" > Login </a> </div> </div> </div> )} </div> </header>
{/* Hero Section */} <section className="relative overflow-hidden bg-gradient-hero"> {/* Decorative blobs */} <div className="blob-teal w-96 h-96 -top-48 -left-48 opacity-60" /> <div className="blob-lavender w-80 h-80 top-20 right-0 opacity-40" />
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-16 md:py-24 relative"> <div className="grid grid-cols-1 lg:grid-cols-2 gap-12 items-center"> <div className="text-center lg:text-left"> <div className="inline-flex items-center bg-teal-100 text-teal-800 px-4 py-2 rounded-full text-sm font-medium mb-6"> <span className="w-2 h-2 bg-teal-500 rounded-full mr-2 animate-pulse" /> AI-Powered Learning Platform </div> <h1 className="text-warmgray-900 mb-6 text-balance"> Your Journey to{' '} <span className="text-transparent bg-clip-text bg-gradient-to-r from-teal-600 to-teal-500"> Programming Mastery </span>{' '} Starts Here </h1> <p className="text-lg md:text-xl text-warmgray-600 mb-8 leading-relaxed max-w-xl mx-auto lg:mx-0"> Experience personalized learning with AI tutors that understand your pace, answer your questions, and guide you every step of the way. </p> <div className="flex flex-col sm:flex-row gap-4 justify-center lg:justify-start"> <Link href="/register" className="btn-primary inline-flex items-center justify-center"> Start Learning Free <svg className="w-5 h-5 ml-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M13 7l5 5m0 0l-5 5m5-5H6" /> </svg> </Link> <a href="#courses" className="btn-secondary inline-flex items-center justify-center"> Explore Courses </a> </div>
{/* Trust badges */} <div className="mt-10 flex flex-wrap items-center justify-center lg:justify-start gap-6 text-sm text-warmgray-500"> <div className="flex items-center"> <svg className="w-5 h-5 text-teal-500 mr-2" fill="currentColor" viewBox="0 0 20 20"> <path fillRule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clipRule="evenodd" /> </svg> 50,000+ Students </div> <div className="flex items-center"> <svg className="w-5 h-5 text-teal-500 mr-2" fill="currentColor" viewBox="0 0 20 20"> <path fillRule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clipRule="evenodd" /> </svg> 95% Success Rate </div> <div className="flex items-center"> <svg className="w-5 h-5 text-teal-500 mr-2" fill="currentColor" viewBox="0 0 20 20"> <path fillRule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clipRule="evenodd" /> </svg> 24/7 Support </div> </div> </div>
{/* Hero Card */} <div className="relative"> <div className="bg-white rounded-3xl p-8 shadow-soft-lg relative z-10"> <div className="text-center mb-6"> <div className="w-20 h-20 bg-gradient-to-br from-teal-400 to-teal-600 rounded-2xl flex items-center justify-center mx-auto mb-4 shadow-soft animate-float"> <span className="text-4xl">🎓</span> </div> <h3 className="text-xl font-bold text-warmgray-900 mb-2">Start Your Learning Journey</h3> <p className="text-warmgray-600">Interactive Python tutoring with real-time AI feedback</p> </div>
<div className="grid grid-cols-2 gap-4"> {[ { value: '50K+', label: 'Students', bg: 'bg-teal-50', text: 'text-teal-700' }, { value: '100+', label: 'Courses', bg: 'bg-lavender-50', text: 'text-lavender-700' }, { value: '95%', label: 'Success', bg: 'bg-coral-50', text: 'text-coral-700' }, { value: '24/7', label: 'Support', bg: 'bg-sage-50', text: 'text-sage-700' }, ].map((stat) => ( <div key={stat.label} className={`${stat.bg} p-4 rounded-2xl text-center`}> <div className={`text-2xl font-bold ${stat.text}`}>{stat.value}</div> <div className="text-sm text-warmgray-600">{stat.label}</div> </div> ))} </div> </div>
{/* Decorative elements */} <div className="absolute -bottom-4 -right-4 w-32 h-32 bg-lavender-200 rounded-2xl -z-10 opacity-50" /> <div className="absolute -top-4 -left-4 w-24 h-24 bg-teal-200 rounded-2xl -z-10 opacity-50" /> </div> </div> </div> </section>
{/* Categories Section */} <section className="py-12 bg-white"> <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> <div className="flex flex-wrap justify-center gap-3"> {categories.map((cat) => ( <button key={cat.name} className={`category-pill category-pill-${cat.color} flex items-center gap-2`} > <span>{cat.icon}</span> {cat.name} </button> ))} </div> </div> </section>
{/* Features Section */} <section className="section-wellness bg-white"> <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> <div className="text-center mb-16"> <h2 className="text-warmgray-900 mb-4">Why Choose LearnFlow?</h2> <p className="text-lg text-warmgray-600 max-w-2xl mx-auto"> Our platform combines cutting-edge AI with proven learning methods to create an experience that's effective and enjoyable </p> </div>
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8"> {features.map((feature) => ( <div key={feature.title} className="wellness-card text-center group"> <div className={`w-16 h-16 mx-auto mb-6 rounded-2xl flex items-center justify-center transition-transform duration-300 group-hover:scale-110 ${ feature.color === 'teal' ? 'bg-teal-100 text-teal-600' : feature.color === 'lavender' ? 'bg-lavender-100 text-lavender-600' : feature.color === 'coral' ? 'bg-coral-100 text-coral-600' : 'bg-sage-100 text-sage-600' }`} > {feature.icon} </div> <h3 className="text-lg font-bold text-warmgray-900 mb-3">{feature.title}</h3> <p className="text-warmgray-600 text-sm leading-relaxed">{feature.description}</p> </div> ))} </div> </div> </section>
{/* Courses Section */} <section id="courses" className="section-wellness bg-gradient-wellness"> <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> <div className="text-center mb-16"> <h2 className="text-warmgray-900 mb-4">Popular Courses</h2> <p className="text-lg text-warmgray-600 max-w-2xl mx-auto"> Choose from our carefully crafted programs designed to take you from beginner to professional </p> </div>
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8"> {courses.map((course) => ( <div key={course.title} className="wellness-card group"> <div className="flex items-start justify-between mb-4"> <div className={`w-14 h-14 rounded-2xl flex items-center justify-center text-2xl ${ course.color === 'teal' ? 'bg-teal-100' : course.color === 'lavender' ? 'bg-lavender-100' : 'bg-coral-100' }`} > {course.image} </div> <span className={`px-3 py-1 rounded-full text-xs font-medium ${ course.color === 'teal' ? 'bg-teal-100 text-teal-700' : course.color === 'lavender' ? 'bg-lavender-100 text-lavender-700' : 'bg-coral-100 text-coral-700' }`} > {course.level} </span> </div>
<h3 className="text-lg font-bold text-warmgray-900 mb-2">{course.title}</h3> <p className="text-warmgray-600 text-sm mb-4 leading-relaxed">{course.description}</p>
<div className="flex items-center justify-between text-sm text-warmgray-500 mb-4"> <span className="flex items-center"> <svg className="w-4 h-4 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> {course.duration} </span> <span className="flex items-center"> <svg className="w-4 h-4 mr-1 text-yellow-500" fill="currentColor" viewBox="0 0 20 20"> <path d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" /> </svg> {course.rating} </span> <span>{course.students}</span> </div>
<button className={`w-full py-3 rounded-xl font-medium transition-all duration-300 ${ course.color === 'teal' ? 'bg-teal-600 hover:bg-teal-700 text-white' : course.color === 'lavender' ? 'bg-lavender-600 hover:bg-lavender-700 text-white' : 'bg-coral-600 hover:bg-coral-700 text-white' }`} > Enroll Now </button> </div> ))} </div>
<div className="text-center mt-12"> <a href="#" className="btn-secondary inline-flex items-center"> View All Courses <svg className="w-5 h-5 ml-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M13 7l5 5m0 0l-5 5m5-5H6" /> </svg> </a> </div> </div> </section>
{/* Testimonials Section */} <section className="section-wellness bg-white"> <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> <div className="text-center mb-16"> <h2 className="text-warmgray-900 mb-4">What Our Students Say</h2> <p className="text-lg text-warmgray-600 max-w-2xl mx-auto"> Join thousands of learners who have transformed their careers with LearnFlow </p> </div>
<div className="grid grid-cols-1 md:grid-cols-3 gap-8"> {testimonials.map((testimonial, index) => ( <div key={index} className="wellness-card"> <div className="flex items-center mb-4"> {[...Array(5)].map((_, i) => ( <svg key={i} className="w-5 h-5 text-yellow-400" fill="currentColor" viewBox="0 0 20 20"> <path d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" /> </svg> ))} </div> <p className="text-warmgray-700 mb-6 italic leading-relaxed">"{testimonial.quote}"</p> <div className="flex items-center"> <div className="w-12 h-12 bg-gradient-to-br from-teal-400 to-teal-600 rounded-full flex items-center justify-center text-white font-bold"> {testimonial.avatar} </div> <div className="ml-4"> <div className="font-semibold text-warmgray-900">{testimonial.name}</div> <div className="text-sm text-warmgray-500">{testimonial.role}</div> </div> </div> </div> ))} </div> </div> </section>
{/* Login Section */} <section id="login" className="section-wellness bg-gradient-wellness"> <div className="max-w-xl mx-auto px-4 sm:px-6 lg:px-8"> <div className="bg-white rounded-3xl p-8 md:p-10 shadow-soft-lg"> <div className="text-center mb-8"> <h2 className="text-2xl font-bold text-warmgray-900 mb-2">Welcome Back</h2> <p className="text-warmgray-600">Access your personalized learning dashboard</p> </div>
<div className="flex justify-center gap-2 mb-8 bg-warmgray-100 p-1.5 rounded-full"> <button onClick={() => setRole('student')} className={`flex-1 px-6 py-2.5 rounded-full font-medium text-sm transition-all duration-300 ${ role === 'student' ? 'bg-teal-600 text-white shadow-soft' : 'text-warmgray-600 hover:text-warmgray-900' }`} > Student </button> <button onClick={() => setRole('teacher')} className={`flex-1 px-6 py-2.5 rounded-full font-medium text-sm transition-all duration-300 ${ role === 'teacher' ? 'bg-lavender-600 text-white shadow-soft' : 'text-warmgray-600 hover:text-warmgray-900' }`} > Teacher </button> </div>
{/* Login Error */} {loginError && ( <div className="mb-6 p-4 bg-coral-50 border border-coral-200 rounded-xl flex items-center text-coral-700"> <svg className="w-5 h-5 mr-3 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> <span className="text-sm">{loginError}</span> </div> )}
<form onSubmit={handleLogin} className="space-y-5"> <div> <label htmlFor="login-email" className="block text-sm font-medium text-warmgray-700 mb-2"> Email Address </label> <input type="email" id="login-email" name="email" required value={loginEmail} onChange={(e) => { setLoginEmail(e.target.value); setLoginError(''); }} className="input-wellness" placeholder="you@example.com" disabled={isLoggingIn} /> </div> <div> <label htmlFor="login-password" className="block text-sm font-medium text-warmgray-700 mb-2"> Password </label> <input type="password" id="login-password" name="password" required value={loginPassword} onChange={(e) => { setLoginPassword(e.target.value); setLoginError(''); }} className="input-wellness" placeholder="Enter your password" disabled={isLoggingIn} /> </div> <div className="flex items-center justify-between"> <div className="flex items-center"> <input id="remember-me" name="remember-me" type="checkbox" className="h-4 w-4 text-teal-600 focus:ring-teal-500 border-warmgray-300 rounded" /> <label htmlFor="remember-me" className="ml-2 block text-sm text-warmgray-700"> Remember me </label> </div> <a href="#" className="text-sm text-teal-600 hover:text-teal-700 font-medium"> Forgot password? </a> </div> <button type="submit" disabled={isLoggingIn} className={`w-full py-3 rounded-xl font-medium transition-all duration-300 flex items-center justify-center ${ role === 'student' ? 'bg-teal-600 hover:bg-teal-700 text-white' : 'bg-lavender-600 hover:bg-lavender-700 text-white' } ${isLoggingIn ? 'opacity-70 cursor-not-allowed' : ''}`} > {isLoggingIn ? ( <> <svg className="animate-spin -ml-1 mr-3 h-5 w-5 text-white" fill="none" viewBox="0 0 24 24"> <circle className="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" strokeWidth="4" /> <path className="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" /> </svg> Signing In... </> ) : ( 'Sign In' )} </button> </form>
<p className="text-center mt-6 text-sm text-warmgray-600"> Don't have an account?{' '} <Link href="/register" className="text-teal-600 hover:text-teal-700 font-medium"> Sign up for free </Link> </p> </div> </div> </section>
{/* Newsletter Section */} <section className="py-16 bg-teal-700"> <div className="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center"> <h2 className="text-2xl md:text-3xl font-bold text-white mb-4"> Stay Updated with Latest Courses </h2> <p className="text-teal-100 mb-8 max-w-xl mx-auto"> Subscribe to our newsletter and get notified about new courses, tips, and exclusive offers </p> <form className="flex flex-col sm:flex-row gap-4 max-w-md mx-auto"> <input type="email" placeholder="Enter your email" className="flex-1 px-5 py-3 rounded-full bg-white/10 border border-white/20 text-white placeholder:text-teal-200 focus:outline-none focus:ring-2 focus:ring-white/30" /> <button type="submit" className="bg-white text-teal-700 px-8 py-3 rounded-full font-medium hover:bg-teal-50 transition-colors" > Subscribe </button> </form> </div> </section>
{/* Footer */} <footer className="bg-warmgray-900 text-white"> <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12"> <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8 mb-12"> <div> <div className="flex items-center mb-6"> <div className="w-10 h-10 bg-gradient-to-br from-teal-400 to-teal-600 rounded-xl flex items-center justify-center"> <span className="text-white font-bold">LF</span> </div> <span className="ml-3 text-lg font-bold">LearnFlow</span> </div> <p className="text-warmgray-400 text-sm leading-relaxed mb-6"> Empowering the next generation of developers with AI-powered learning experiences that adapt to your unique journey. </p> <div className="flex space-x-4"> {['facebook', 'twitter', 'linkedin', 'instagram'].map((social) => ( <a key={social} href="#" className="w-10 h-10 bg-warmgray-800 hover:bg-teal-600 rounded-full flex items-center justify-center transition-colors" > <span className="sr-only">{social}</span> <svg className="w-5 h-5" fill="currentColor" viewBox="0 0 24 24"> {social === 'facebook' && ( <path fillRule="evenodd" d="M22 12c0-5.523-4.477-10-10-10S2 6.477 2 12c0 4.991 3.657 9.128 8.438 9.878v-6.987h-2.54V12h2.54V9.797c0-2.506 1.492-3.89 3.777-3.89 1.094 0 2.238.195 2.238.195v2.46h-1.26c-1.243 0-1.63.771-1.63 1.562V12h2.773l-.443 2.89h-2.33v6.988C18.343 21.128 22 16.991 22 12z" clipRule="evenodd" /> )} {social === 'twitter' && ( <path d="M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84" /> )} {social === 'linkedin' && ( <path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" /> )} {social === 'instagram' && ( <path fillRule="evenodd" d="M12.315 2c2.43 0 2.784.013 3.808.06 1.064.049 1.791.218 2.427.465a4.902 4.902 0 011.772 1.153 4.902 4.902 0 011.153 1.772c.247.636.416 1.363.465 2.427.048 1.067.06 1.407.06 4.123v.08c0 2.643-.012 2.987-.06 4.043-.049 1.064-.218 1.791-.465 2.427a4.902 4.902 0 01-1.153 1.772 4.902 4.902 0 01-1.772 1.153c-.636.247-1.363.416-2.427.465-1.067.048-1.407.06-4.123.06h-.08c-2.643 0-2.987-.012-4.043-.06-1.064-.049-1.791-.218-2.427-.465a4.902 4.902 0 01-1.772-1.153 4.902 4.902 0 01-1.153-1.772c-.247-.636-.416-1.363-.465-2.427-.047-1.024-.06-1.379-.06-3.808v-.63c0-2.43.013-2.784.06-3.808.049-1.064.218-1.791.465-2.427a4.902 4.902 0 011.153-1.772A4.902 4.902 0 015.45 2.525c.636-.247 1.363-.416 2.427-.465C8.901 2.013 9.256 2 11.685 2h.63zm-.081 1.802h-.468c-2.456 0-2.784.011-3.807.058-.975.045-1.504.207-1.857.344-.467.182-.8.398-1.15.748-.35.35-.566.683-.748 1.15-.137.353-.3.882-.344 1.857-.047 1.023-.058 1.351-.058 3.807v.468c0 2.456.011 2.784.058 3.807.045.975.207 1.504.344 1.857.182.466.399.8.748 1.15.35.35.683.566 1.15.748.353.137.882.3 1.857.344 1.054.048 1.37.058 4.041.058h.08c2.597 0 2.917-.01 3.96-.058.976-.045 1.505-.207 1.858-.344.466-.182.8-.398 1.15-.748.35-.35.566-.683.748-1.15.137-.353.3-.882.344-1.857.048-1.055.058-1.37.058-4.041v-.08c0-2.597-.01-2.917-.058-3.96-.045-.976-.207-1.505-.344-1.858a3.097 3.097 0 00-.748-1.15 3.098 3.098 0 00-1.15-.748c-.353-.137-.882-.3-1.857-.344-1.023-.047-1.351-.058-3.807-.058zM12 6.865a5.135 5.135 0 110 10.27 5.135 5.135 0 010-10.27zm0 1.802a3.333 3.333 0 100 6.666 3.333 3.333 0 000-6.666zm5.338-3.205a1.2 1.2 0 110 2.4 1.2 1.2 0 010-2.4z" clipRule="evenodd" /> )} </svg> </a> ))} </div> </div>
<div> <h3 className="text-sm font-semibold uppercase tracking-wider mb-4">Quick Links</h3> <ul className="space-y-3"> {['About Us', 'Courses', 'Instructors', 'Blog', 'Careers'].map((link) => ( <li key={link}> <a href="#" className="text-warmgray-400 hover:text-teal-400 transition-colors text-sm"> {link} </a> </li> ))} </ul> </div>
<div> <h3 className="text-sm font-semibold uppercase tracking-wider mb-4">Programs</h3> <ul className="space-y-3"> {['Python Programming', 'Data Science', 'Web Development', 'Machine Learning', 'Cyber Security'].map((link) => ( <li key={link}> <a href="#" className="text-warmgray-400 hover:text-teal-400 transition-colors text-sm"> {link} </a> </li> ))} </ul> </div>
<div> <h3 className="text-sm font-semibold uppercase tracking-wider mb-4">Contact</h3> <ul className="space-y-3 text-sm text-warmgray-400"> <li className="flex items-start"> <svg className="w-5 h-5 mr-3 mt-0.5 text-teal-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" /> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M15 11a3 3 0 11-6 0 3 3 0 016 0z" /> </svg> 123 Education Street, Karachi, Pakistan </li> <li className="flex items-center"> <svg className="w-5 h-5 mr-3 text-teal-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" /> </svg> info@learnflow.edu.pk </li> <li className="flex items-center"> <svg className="w-5 h-5 mr-3 text-teal-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z" /> </svg> +92 300 1234567 </li> </ul> </div> </div>
<div className="border-t border-warmgray-800 pt-8 flex flex-col md:flex-row justify-between items-center"> <p className="text-sm text-warmgray-400"> © 2026 LearnFlow. All rights reserved. </p> <div className="flex space-x-6 mt-4 md:mt-0"> <a href="#" className="text-sm text-warmgray-400 hover:text-teal-400 transition-colors"> Privacy Policy </a> <a href="#" className="text-sm text-warmgray-400 hover:text-teal-400 transition-colors"> Terms of Service </a> <a href="#" className="text-sm text-warmgray-400 hover:text-teal-400 transition-colors"> Cookie Policy </a> </div> </div> </div> </footer> </div> );}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331'use client';
import { useState } from 'react';import Link from 'next/link';import { useRouter } from 'next/navigation';
const API_URL = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8000';
export default function RegisterPage() { const router = useRouter(); const [isStudent, setIsStudent] = useState(true); const [isLoading, setIsLoading] = useState(false); const [error, setError] = useState(''); const [formData, setFormData] = useState({ name: '', email: '', password: '', confirmPassword: '', });
const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => { const { name, value } = e.target; setFormData(prev => ({ ...prev, [name]: value })); setError(''); // Clear error when user types };
const handleRoleChange = (student: boolean) => { setIsStudent(student); setError(''); };
const handleSubmit = async (e: React.FormEvent) => { e.preventDefault(); setError(''); setIsLoading(true);
// Validation if (!formData.name.trim()) { setError('Please enter your full name'); setIsLoading(false); return; }
if (!formData.email.trim()) { setError('Please enter your email'); setIsLoading(false); return; }
if (formData.password.length < 6) { setError('Password must be at least 6 characters'); setIsLoading(false); return; }
if (formData.password !== formData.confirmPassword) { setError('Passwords do not match'); setIsLoading(false); return; }
try { // Try to register via API let user; let token;
try { const response = await fetch(`${API_URL}/auth/register`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ name: formData.name, email: formData.email, password: formData.password, role: isStudent ? 'student' : 'teacher', }), });
if (response.ok) { const data = await response.json(); user = data.user; token = data.token; localStorage.setItem('learnflow_token', token); } else if (response.status === 400) { const data = await response.json(); setError(data.detail || 'Registration failed'); setIsLoading(false); return; } else { throw new Error('API not available'); } } catch (apiError) { // Fallback to localStorage console.log('Using localStorage fallback for registration');
user = { id: Date.now().toString(), name: formData.name, email: formData.email, role: isStudent ? 'student' : 'teacher', createdAt: new Date().toISOString(), };
const existingUsers = JSON.parse(localStorage.getItem('learnflow_users') || '[]'); if (existingUsers.find((u: any) => u.email === formData.email)) { setError('An account with this email already exists'); setIsLoading(false); return; }
existingUsers.push({ ...user, password: formData.password }); localStorage.setItem('learnflow_users', JSON.stringify(existingUsers)); }
// Set current user session localStorage.setItem('learnflow_current_user', JSON.stringify(user));
// Redirect based on role if (isStudent) { router.push('/student/dashboard'); } else { router.push('/teacher/dashboard'); } } catch (err) { setError('Something went wrong. Please try again.'); setIsLoading(false); } };
return ( <div className="min-h-screen bg-cream-50"> {/* Header */} <header className="bg-white/80 backdrop-blur-md border-b border-warmgray-100"> <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> <div className="flex justify-between items-center h-16"> <Link href="/" className="flex items-center"> <div className="w-10 h-10 bg-gradient-to-br from-teal-500 to-teal-600 rounded-xl flex items-center justify-center shadow-soft"> <span className="text-white font-bold text-lg">LF</span> </div> <span className="ml-3 text-xl font-bold text-warmgray-900">LearnFlow</span> </Link>
<Link href="/" className="text-warmgray-600 hover:text-teal-600 font-medium text-sm transition-colors flex items-center" > <svg className="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M10 19l-7-7m0 0l7-7m-7 7h18" /> </svg> Back to Home </Link> </div> </div> </header>
<div className="min-h-[calc(100vh-64px)] flex items-center justify-center py-12 px-4"> <div className="w-full max-w-md"> {/* Decorative elements */} <div className="absolute top-20 left-10 w-64 h-64 bg-teal-200/20 rounded-full blur-3xl -z-10" /> <div className="absolute bottom-20 right-10 w-64 h-64 bg-lavender-200/20 rounded-full blur-3xl -z-10" />
<div className="bg-white rounded-3xl shadow-soft-lg p-8 md:p-10"> <div className="text-center mb-8"> <div className="mx-auto w-16 h-16 bg-gradient-to-br from-teal-400 to-teal-600 rounded-2xl flex items-center justify-center mb-4 shadow-soft"> <svg className="w-8 h-8 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M18 9v3m0 0v3m0-3h3m-3 0h-3m-2-5a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z" /> </svg> </div> <h1 className="text-2xl font-bold text-warmgray-900 mb-2">Create Account</h1> <p className="text-warmgray-600">Join our learning community today</p> </div>
{/* Error Message */} {error && ( <div className="mb-6 p-4 bg-coral-50 border border-coral-200 rounded-xl flex items-center text-coral-700"> <svg className="w-5 h-5 mr-3 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> <span className="text-sm">{error}</span> </div> )}
<form onSubmit={handleSubmit} className="space-y-5"> <div> <label htmlFor="name" className="block text-sm font-medium text-warmgray-700 mb-2"> Full Name </label> <input type="text" id="name" name="name" value={formData.name} onChange={handleChange} className="input-wellness" placeholder="Enter your full name" required disabled={isLoading} /> </div>
<div> <label htmlFor="email" className="block text-sm font-medium text-warmgray-700 mb-2"> Email Address </label> <input type="email" id="email" name="email" value={formData.email} onChange={handleChange} className="input-wellness" placeholder="you@example.com" required disabled={isLoading} /> </div>
<div> <label htmlFor="password" className="block text-sm font-medium text-warmgray-700 mb-2"> Password </label> <input type="password" id="password" name="password" value={formData.password} onChange={handleChange} className="input-wellness" placeholder="At least 6 characters" required disabled={isLoading} /> </div>
<div> <label htmlFor="confirmPassword" className="block text-sm font-medium text-warmgray-700 mb-2"> Confirm Password </label> <input type="password" id="confirmPassword" name="confirmPassword" value={formData.confirmPassword} onChange={handleChange} className="input-wellness" placeholder="Confirm your password" required disabled={isLoading} /> </div>
{/* Role Selection */} <div> <label className="block text-sm font-medium text-warmgray-700 mb-3"> I am a </label> <div className="flex gap-3 p-1.5 bg-warmgray-100 rounded-full"> <button type="button" onClick={() => handleRoleChange(true)} disabled={isLoading} className={`flex-1 px-4 py-2.5 rounded-full text-sm font-medium transition-all duration-300 ${ isStudent ? 'bg-teal-600 text-white shadow-soft' : 'text-warmgray-600 hover:text-warmgray-900' }`} > <span className="flex items-center justify-center"> <svg className="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253" /> </svg> Student </span> </button> <button type="button" onClick={() => handleRoleChange(false)} disabled={isLoading} className={`flex-1 px-4 py-2.5 rounded-full text-sm font-medium transition-all duration-300 ${ !isStudent ? 'bg-lavender-600 text-white shadow-soft' : 'text-warmgray-600 hover:text-warmgray-900' }`} > <span className="flex items-center justify-center"> <svg className="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" /> </svg> Teacher </span> </button> </div> </div>
<button type="submit" disabled={isLoading} className={`w-full py-3 rounded-xl font-medium transition-all duration-300 flex items-center justify-center ${ isStudent ? 'bg-teal-600 hover:bg-teal-700 text-white' : 'bg-lavender-600 hover:bg-lavender-700 text-white' } ${isLoading ? 'opacity-70 cursor-not-allowed' : ''}`} > {isLoading ? ( <> <svg className="animate-spin -ml-1 mr-3 h-5 w-5 text-white" fill="none" viewBox="0 0 24 24"> <circle className="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" strokeWidth="4" /> <path className="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" /> </svg> Creating Account... </> ) : ( 'Create Account' )} </button> </form>
<div className="mt-8 text-center"> <p className="text-sm text-warmgray-600"> Already have an account?{' '} <Link href="/" className="font-medium text-teal-600 hover:text-teal-700"> Sign in </Link> </p> </div> </div> </div> </div> </div> );}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272'use client';
import Link from 'next/link';import { useState } from 'react';
type Guide = { title: string; description: string; icon: string; difficulty: string; readTime: string; content: string;};
type Cheatsheet = { title: string; icon: string; downloads: string; content: string;};
type Video = { title: string; duration: string; views: string; thumbnail: string; youtubeId: string; channel: string;};
type Tool = { name: string; description: string; url: string; icon: string;};
export default function ResourcesPage() { const [activeTab, setActiveTab] = useState('guides'); const [selectedGuide, setSelectedGuide] = useState<Guide | null>(null); const [selectedVideo, setSelectedVideo] = useState<Video | null>(null);
const guides: Guide[] = [ { title: 'Python Installation Guide', description: 'Step-by-step guide to install Python on Windows, Mac, and Linux.', icon: '📥', difficulty: 'Beginner', readTime: '5 min', content: `# Python Installation Guide
## Windows Installation
1. **Download Python**: Visit [python.org](https://python.org) and download the latest version2. **Run Installer**: Double-click the downloaded file3. **Important**: Check "Add Python to PATH" before clicking Install4. **Verify**: Open Command Prompt and type \`python --version\`
## Mac Installation
1. **Using Homebrew** (Recommended): \`\`\`bash brew install python \`\`\`
2. **Or download from python.org**
3. **Verify**: Open Terminal and type \`python3 --version\`
## Linux Installation
Most Linux distributions come with Python pre-installed.
\`\`\`bash# Ubuntu/Debiansudo apt updatesudo apt install python3 python3-pip
# Fedorasudo dnf install python3 python3-pip
# Verify installationpython3 --version\`\`\`
## Next Steps
After installation, you can:- Run Python scripts: \`python script.py\`- Use the interactive shell: \`python\`- Install packages: \`pip install package_name\``, }, { title: 'Setting Up VS Code for Python', description: 'Configure VS Code with the best extensions for Python development.', icon: '💻', difficulty: 'Beginner', readTime: '10 min', content: `# Setting Up VS Code for Python
## Step 1: Install VS Code
Download from [code.visualstudio.com](https://code.visualstudio.com)
## Step 2: Essential Extensions
### Must-Have Extensions:
1. **Python** (Microsoft) - IntelliSense, linting, debugging - Search "Python" in Extensions
2. **Pylance** - Fast, feature-rich language support - Type checking and auto-imports
3. **Python Indent** - Correct indentation on Enter
### Recommended Extensions:
4. **autoDocstring** - Generate docstrings automatically
5. **Python Test Explorer** - Run and debug tests easily
## Step 3: Configure Settings
Open Settings (Ctrl+,) and configure:
\`\`\`json{ "python.linting.enabled": true, "python.linting.pylintEnabled": true, "python.formatting.provider": "black", "editor.formatOnSave": true}\`\`\`
## Step 4: Select Python Interpreter
1. Press Ctrl+Shift+P2. Type "Python: Select Interpreter"3. Choose your Python installation
## Pro Tips
- Use \`Ctrl+Shift+P\` for command palette- \`F5\` to run/debug- \`Ctrl+\`\` to open terminal`, }, { title: 'Virtual Environments Explained', description: 'Learn why and how to use virtual environments in Python projects.', icon: '📦', difficulty: 'Intermediate', readTime: '8 min', content: `# Virtual Environments Explained
## Why Use Virtual Environments?
- **Isolation**: Each project has its own dependencies- **Version Control**: Different projects can use different package versions- **Clean System**: Don't pollute global Python installation- **Reproducibility**: Share exact dependencies with others
## Creating Virtual Environments
### Using venv (Built-in)
\`\`\`bash# Create virtual environmentpython -m venv myenv
# Activate (Windows)myenv\\Scripts\\activate
# Activate (Mac/Linux)source myenv/bin/activate
# Deactivatedeactivate\`\`\`
### Using conda
\`\`\`bash# Create environmentconda create --name myenv python=3.11
# Activateconda activate myenv
# Deactivateconda deactivate\`\`\`
## Managing Dependencies
\`\`\`bash# Install packagespip install requests pandas
# Save dependenciespip freeze > requirements.txt
# Install from requirementspip install -r requirements.txt\`\`\`
## Best Practices
1. Always use virtual environments for projects2. Keep requirements.txt updated3. Don't commit venv folder to git4. Add venv to .gitignore`, }, { title: 'Git for Python Developers', description: 'Version control basics every Python developer should know.', icon: '🔀', difficulty: 'Intermediate', readTime: '15 min', content: `# Git for Python Developers
## Getting Started
\`\`\`bash# Configure Gitgit config --global user.name "Your Name"git config --global user.email "you@example.com"
# Initialize repositorygit init
# Clone existing repogit clone https://github.com/user/repo.git\`\`\`
## Essential Commands
\`\`\`bash# Check statusgit status
# Stage changesgit add filename.pygit add . # All files
# Commit changesgit commit -m "Add feature X"
# View historygit log --oneline\`\`\`
## Branching
\`\`\`bash# Create branchgit branch feature-name
# Switch branchgit checkout feature-name
# Create and switchgit checkout -b feature-name
# Merge branchgit merge feature-name\`\`\`
## Python .gitignore
\`\`\`# Virtual environmentsvenv/env/.env
# Python cache__pycache__/*.pyc*.pyo
# IDE.vscode/.idea/
# Distributiondist/build/*.egg-info/\`\`\`
## Remote Repositories
\`\`\`bash# Add remotegit remote add origin URL
# Push changesgit push -u origin main
# Pull changesgit pull origin main\`\`\``, }, { title: 'Debugging Techniques', description: 'Master the art of finding and fixing bugs in your Python code.', icon: '🐛', difficulty: 'Intermediate', readTime: '12 min', content: `# Python Debugging Techniques
## 1. Print Debugging
\`\`\`pythondef calculate(x, y): print(f"DEBUG: x={x}, y={y}") # Add debug prints result = x * y print(f"DEBUG: result={result}") return result\`\`\`
## 2. Using the Debugger (pdb)
\`\`\`pythonimport pdb
def buggy_function(): x = 10 pdb.set_trace() # Breakpoint y = x / 0 # Bug here return y\`\`\`
### pdb Commands:- \`n\` - Next line- \`s\` - Step into function- \`c\` - Continue- \`p variable\` - Print variable- \`q\` - Quit
## 3. VS Code Debugging
1. Set breakpoints (click left of line number)2. Press F5 to start debugging3. Use debug controls (step over, step into, continue)4. Watch variables in the sidebar
## 4. Logging
\`\`\`pythonimport logging
logging.basicConfig(level=logging.DEBUG)logger = logging.getLogger(__name__)
def process_data(data): logger.debug(f"Processing: {data}") logger.info("Process started") logger.warning("Something might be wrong") logger.error("An error occurred")\`\`\`
## 5. Common Bug Patterns
### Off-by-one errors\`\`\`python# Wrongfor i in range(len(items) + 1): # IndexError
# Correctfor i in range(len(items)):\`\`\`
### Mutable default arguments\`\`\`python# Wrongdef add_item(item, items=[]): items.append(item) return items
# Correctdef add_item(item, items=None): if items is None: items = [] items.append(item) return items\`\`\``, }, { title: 'Python Best Practices', description: 'Write clean, maintainable, and Pythonic code.', icon: '✨', difficulty: 'Advanced', readTime: '20 min', content: `# Python Best Practices
## 1. Follow PEP 8 Style Guide
\`\`\`python# Gooddef calculate_total(items): total = sum(item.price for item in items) return total
# Baddef CalculateTotal(Items): Total=sum(Item.price for Item in Items) return Total\`\`\`
## 2. Use Type Hints
\`\`\`pythonfrom typing import List, Optional
def greet(name: str) -> str: return f"Hello, {name}!"
def find_user(user_id: int) -> Optional[dict]: # Returns user dict or None pass\`\`\`
## 3. Write Docstrings
\`\`\`pythondef calculate_average(numbers: List[float]) -> float: """Calculate the average of a list of numbers.
Args: numbers: A list of numbers to average.
Returns: The arithmetic mean of the numbers.
Raises: ValueError: If the list is empty. """ if not numbers: raise ValueError("Cannot average empty list") return sum(numbers) / len(numbers)\`\`\`
## 4. Use Context Managers
\`\`\`python# Goodwith open('file.txt', 'r') as f: content = f.read()
# Badf = open('file.txt', 'r')content = f.read()f.close()\`\`\`
## 5. List Comprehensions
\`\`\`python# Pythonicsquares = [x**2 for x in range(10)]evens = [x for x in numbers if x % 2 == 0]
# Less Pythonicsquares = []for x in range(10): squares.append(x**2)\`\`\`
## 6. Use f-strings
\`\`\`pythonname = "Alice"age = 30
# Goodmessage = f"{name} is {age} years old"
# Avoidmessage = name + " is " + str(age) + " years old"\`\`\`
## 7. Handle Exceptions Properly
\`\`\`pythontry: result = risky_operation()except SpecificError as e: logger.error(f"Operation failed: {e}") raiseexcept Exception as e: logger.exception("Unexpected error") raise\`\`\``, }, ];
const cheatsheets: Cheatsheet[] = [ { title: 'Python Syntax Cheatsheet', icon: '📝', downloads: '12.5k', content: `PYTHON SYNTAX CHEATSHEET========================
VARIABLES & DATA TYPES----------------------x = 10 # Integery = 3.14 # Floatname = "Python" # Stringis_true = True # Booleanitems = [1,2,3] # Listdata = {"a": 1} # Dictionary
OPERATORS---------+ Addition - Subtraction* Multiplication / Division// Floor Division % Modulus** Exponentiation
COMPARISON----------== Equal != Not Equal> Greater < Less>= Greater/Equal <= Less/Equal
CONTROL FLOW------------if condition: # codeelif other: # codeelse: # code
LOOPS-----for item in items: print(item)
while condition: # code
FUNCTIONS---------def greet(name): return f"Hello, {name}"
CLASSES-------class Person: def __init__(self, name): self.name = name`, }, { title: 'String Methods Reference', icon: '🔤', downloads: '8.2k', content: `STRING METHODS REFERENCE========================
CASE METHODS------------s.upper() → "HELLO"s.lower() → "hello"s.capitalize() → "Hello"s.title() → "Hello World"s.swapcase() → "hELLO"
SEARCH METHODS--------------s.find("x") → index or -1s.index("x") → index or errors.count("x") → occurrencess.startswith("x") → True/Falses.endswith("x") → True/False
MODIFICATION------------s.strip() → remove whitespaces.lstrip() → remove left whitespaces.rstrip() → remove right whitespaces.replace("a","b") → replace all
SPLIT & JOIN------------s.split(",") → ["a","b","c"]",".join(list) → "a,b,c"s.splitlines() → split by newline
VALIDATION----------s.isalpha() → only letters?s.isdigit() → only digits?s.isalnum() → letters/digits?s.isspace() → only whitespace?s.isupper() → all uppercase?s.islower() → all lowercase?
FORMATTING----------f"{name}" → f-string"{} {}".format() → format methods.center(20) → center in widths.ljust(20) → left justifys.rjust(20) → right justifys.zfill(5) → pad with zeros`, }, { title: 'List Comprehensions', icon: '📋', downloads: '9.1k', content: `LIST COMPREHENSIONS CHEATSHEET==============================
BASIC SYNTAX------------[expression for item in iterable]
EXAMPLES--------# Squares[x**2 for x in range(10)]→ [0, 1, 4, 9, 16, 25, 36, 49, 64, 81]
# With condition (filter)[x for x in range(10) if x % 2 == 0]→ [0, 2, 4, 6, 8]
# Transform strings[s.upper() for s in ["hello", "world"]]→ ["HELLO", "WORLD"]
# Conditional expression["even" if x%2==0 else "odd" for x in range(5)]→ ["even", "odd", "even", "odd", "even"]
NESTED LOOPS------------[(x,y) for x in [1,2] for y in [3,4]]→ [(1,3), (1,4), (2,3), (2,4)]
# Flatten nested list[[1,2], [3,4]] → [1, 2, 3, 4][x for sublist in nested for x in sublist]
DICT COMPREHENSION------------------{k: v for k, v in items}{x: x**2 for x in range(5)}→ {0:0, 1:1, 2:4, 3:9, 4:16}
SET COMPREHENSION-----------------{x**2 for x in range(5)}→ {0, 1, 4, 9, 16}
GENERATOR EXPRESSION--------------------(x**2 for x in range(10))# Memory efficient, lazy evaluation`, }, { title: 'Dictionary Operations', icon: '📖', downloads: '7.8k', content: `DICTIONARY OPERATIONS=====================
CREATING DICTIONARIES---------------------d = {}d = dict()d = {"name": "Alice", "age": 30}d = dict(name="Alice", age=30)
ACCESSING VALUES----------------d["key"] # KeyError if missingd.get("key") # None if missingd.get("key", default) # default if missing
ADDING/UPDATING---------------d["key"] = valued.update({"a": 1, "b": 2})d |= {"new": "data"} # Python 3.9+
REMOVING--------del d["key"]d.pop("key") # returns valued.pop("key", None) # no error if missingd.popitem() # remove last itemd.clear() # remove all
ITERATION---------for key in d:for key in d.keys():for value in d.values():for key, value in d.items():
USEFUL METHODS--------------d.keys() # all keysd.values() # all valuesd.items() # key-value pairslen(d) # number of items"key" in d # check existenced.copy() # shallow copy
MERGING (Python 3.9+)---------------------merged = d1 | d2d1 |= d2 # in-place
DEFAULT VALUES--------------from collections import defaultdictd = defaultdict(list)d["key"].append(value)`, }, { title: 'File I/O Quick Reference', icon: '📁', downloads: '6.3k', content: `FILE I/O QUICK REFERENCE========================
OPENING FILES-------------f = open("file.txt", mode)
MODES-----"r" - Read (default)"w" - Write (overwrites)"a" - Append"x" - Create (error if exists)"b" - Binary mode"t" - Text mode (default)"+" - Read and write
CONTEXT MANAGER (Recommended)-----------------------------with open("file.txt", "r") as f: content = f.read()# File automatically closed
READING-------f.read() # entire filef.read(n) # n charactersf.readline() # one linef.readlines() # list of lines
# Iterate linesfor line in f: print(line)
WRITING-------f.write("text")f.writelines(list_of_strings)
PRACTICAL EXAMPLES------------------# Read entire filewith open("data.txt") as f: content = f.read()
# Read lineswith open("data.txt") as f: lines = f.readlines()
# Write to filewith open("output.txt", "w") as f: f.write("Hello World")
# Append to filewith open("log.txt", "a") as f: f.write("New log entry\\n")
JSON FILES----------import json
# Read JSONwith open("data.json") as f: data = json.load(f)
# Write JSONwith open("data.json", "w") as f: json.dump(data, f, indent=2)`, }, { title: 'Exception Handling Guide', icon: '⚠️', downloads: '5.9k', content: `EXCEPTION HANDLING GUIDE========================
BASIC SYNTAX------------try: # risky codeexcept ExceptionType: # handle errorelse: # runs if no exceptionfinally: # always runs
COMMON EXCEPTIONS-----------------ValueError - Wrong value typeTypeError - Wrong data typeKeyError - Dict key not foundIndexError - Index out of rangeFileNotFoundError - File doesn't existZeroDivisionError - Division by zeroAttributeError - Attribute not foundImportError - Import failed
CATCHING EXCEPTIONS-------------------# Catch specifictry: x = int("abc")except ValueError: print("Invalid number")
# Catch multipleexcept (ValueError, TypeError): print("Error occurred")
# Get exception infoexcept ValueError as e: print(f"Error: {e}")
# Catch all (avoid when possible)except Exception as e: print(f"Unexpected: {e}")
RAISING EXCEPTIONS------------------raise ValueError("Invalid input")raise TypeError("Expected string")
# Re-raiseexcept SomeError: logger.error("Failed") raise
CUSTOM EXCEPTIONS-----------------class CustomError(Exception): def __init__(self, message): self.message = message super().__init__(message)
raise CustomError("Something wrong")
BEST PRACTICES--------------1. Catch specific exceptions2. Don't use bare except:3. Log exceptions properly4. Clean up in finally5. Fail fast, fail loud`, }, ];
const videos: Video[] = [ { title: 'Python in 100 Seconds', duration: '2:18', views: '3.8M', thumbnail: '🎬', youtubeId: 'x7X9w_GIm1s', channel: 'Fireship', }, { title: 'Python Tutorial for Beginners', duration: '6:14:07', views: '41M', thumbnail: '🔄', youtubeId: '_uQrJ0TkZlc', channel: 'Programming with Mosh', }, { title: 'Python OOP Tutorial', duration: '1:20:49', views: '2.8M', thumbnail: '🏗️', youtubeId: 'ZDa-Z5JzLYM', channel: 'Corey Schafer', }, { title: 'Python API Development', duration: '19:03:32', views: '1.2M', thumbnail: '🌐', youtubeId: '0sOvCWFmrtA', channel: 'freeCodeCamp', }, ];
const tools: Tool[] = [ { name: 'Python Official Docs', description: 'The official Python documentation', url: 'https://docs.python.org/3/', icon: '📚', }, { name: 'PyPI', description: 'Python Package Index - find libraries', url: 'https://pypi.org/', icon: '📦', }, { name: 'Replit', description: 'Online Python IDE', url: 'https://replit.com/languages/python3', icon: '💻', }, { name: 'Stack Overflow', description: 'Q&A for programmers', url: 'https://stackoverflow.com/questions/tagged/python', icon: '❓', }, { name: 'Real Python', description: 'Python tutorials and articles', url: 'https://realpython.com/', icon: '🐍', }, { name: 'Python Tutor', description: 'Visualize code execution', url: 'https://pythontutor.com/', icon: '👁️', }, ];
const downloadCheatsheet = (sheet: Cheatsheet) => { const blob = new Blob([sheet.content], { type: 'text/plain' }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = `${sheet.title.replace(/\s+/g, '_')}.txt`; document.body.appendChild(a); a.click(); document.body.removeChild(a); URL.revokeObjectURL(url); };
return ( <div className="min-h-screen bg-gradient-to-b from-cream-50 to-white"> {/* Header */} <header className="bg-white/80 backdrop-blur-md border-b border-warmgray-100 sticky top-0 z-50"> <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> <div className="flex items-center justify-between h-16"> <Link href="/" className="flex items-center space-x-3"> <div className="w-10 h-10 bg-gradient-to-br from-teal-500 to-teal-600 rounded-xl flex items-center justify-center shadow-soft"> <span className="text-white font-bold text-lg">L</span> </div> <span className="text-xl font-bold text-warmgray-900">LearnFlow</span> </Link>
<nav className="hidden md:flex items-center space-x-1"> {[ { name: 'Home', href: '/' }, { name: 'Courses', href: '/courses' }, { name: 'About', href: '/about' }, { name: 'Resources', href: '/resources' }, { name: 'Contact', href: '/contact' }, ].map((item) => ( <Link key={item.name} href={item.href} className={`px-4 py-2 rounded-full text-sm font-medium transition-all duration-200 ${ item.name === 'Resources' ? 'bg-teal-50 text-teal-700' : 'text-warmgray-600 hover:text-teal-700 hover:bg-teal-50' }`} > {item.name} </Link> ))} </nav>
<div className="flex items-center space-x-3"> <Link href="/register" className="text-warmgray-700 hover:text-teal-700 font-medium text-sm"> Sign Up </Link> <Link href="/" className="bg-teal-600 text-white px-5 py-2.5 rounded-full hover:bg-teal-700 transition-all font-medium text-sm"> Login </Link> </div> </div> </div> </header>
{/* Hero Section */} <section className="py-16 px-4"> <div className="max-w-4xl mx-auto text-center"> <h1 className="text-4xl md:text-5xl font-bold text-warmgray-900 mb-4"> Learning <span className="text-teal-600">Resources</span> </h1> <p className="text-lg text-warmgray-600"> Free guides, cheatsheets, videos, and tools to accelerate your Python learning journey. </p> </div> </section>
{/* Tabs */} <section className="px-4 pb-8"> <div className="max-w-6xl mx-auto"> <div className="flex flex-wrap justify-center gap-2 bg-white rounded-2xl p-2 shadow-soft"> {[ { id: 'guides', label: 'Guides', icon: '📖' }, { id: 'cheatsheets', label: 'Cheatsheets', icon: '📝' }, { id: 'videos', label: 'Videos', icon: '🎥' }, { id: 'tools', label: 'Tools', icon: '🛠️' }, ].map((tab) => ( <button key={tab.id} onClick={() => setActiveTab(tab.id)} className={`px-6 py-3 rounded-xl font-medium transition-all duration-200 flex items-center gap-2 ${ activeTab === tab.id ? 'bg-teal-600 text-white shadow-soft' : 'text-warmgray-600 hover:bg-teal-50 hover:text-teal-700' }`} > <span>{tab.icon}</span> {tab.label} </button> ))} </div> </div> </section>
{/* Content */} <section className="px-4 pb-20"> <div className="max-w-6xl mx-auto"> {activeTab === 'guides' && ( <div className="grid md:grid-cols-2 lg:grid-cols-3 gap-6"> {guides.map((guide, index) => ( <div key={index} onClick={() => setSelectedGuide(guide)} className="bg-white rounded-2xl p-6 shadow-soft hover:shadow-soft-lg transition-all group cursor-pointer" > <div className="text-4xl mb-4">{guide.icon}</div> <div className="flex items-center gap-2 mb-2"> <span className={`px-2 py-1 rounded-full text-xs font-medium ${ guide.difficulty === 'Beginner' ? 'bg-green-100 text-green-700' : guide.difficulty === 'Intermediate' ? 'bg-yellow-100 text-yellow-700' : 'bg-red-100 text-red-700' }`} > {guide.difficulty} </span> <span className="text-warmgray-400 text-xs">{guide.readTime} read</span> </div> <h3 className="font-semibold text-warmgray-900 mb-2 group-hover:text-teal-600 transition-colors"> {guide.title} </h3> <p className="text-sm text-warmgray-600">{guide.description}</p> <div className="mt-4 text-teal-600 text-sm font-medium flex items-center gap-1"> Read Guide <svg className="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 5l7 7-7 7" /> </svg> </div> </div> ))} </div> )}
{activeTab === 'cheatsheets' && ( <div className="grid md:grid-cols-2 lg:grid-cols-3 gap-6"> {cheatsheets.map((sheet, index) => ( <div key={index} className="bg-white rounded-2xl p-6 shadow-soft hover:shadow-soft-lg transition-all group"> <div className="flex items-center justify-between mb-4"> <span className="text-4xl">{sheet.icon}</span> <span className="text-sm text-warmgray-400">{sheet.downloads} downloads</span> </div> <h3 className="font-semibold text-warmgray-900 mb-4 group-hover:text-teal-600 transition-colors"> {sheet.title} </h3> <button onClick={() => downloadCheatsheet(sheet)} className="w-full bg-teal-50 text-teal-700 py-2.5 rounded-xl font-medium hover:bg-teal-100 transition-colors flex items-center justify-center gap-2" > <svg className="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" /> </svg> Download Cheatsheet </button> </div> ))} </div> )}
{activeTab === 'videos' && ( <div className="grid md:grid-cols-2 gap-6"> {videos.map((video, index) => ( <div key={index} onClick={() => setSelectedVideo(video)} className="bg-white rounded-2xl overflow-hidden shadow-soft hover:shadow-soft-lg transition-all group cursor-pointer" > <div className="bg-gradient-to-br from-teal-500 to-sage-500 h-48 flex items-center justify-center relative"> <span className="text-6xl">{video.thumbnail}</span> <div className="absolute inset-0 bg-black/20 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity"> <div className="w-16 h-16 bg-white rounded-full flex items-center justify-center"> <svg className="w-8 h-8 text-teal-600 ml-1" fill="currentColor" viewBox="0 0 24 24"> <path d="M8 5v14l11-7z" /> </svg> </div> </div> <span className="absolute bottom-3 right-3 bg-black/70 text-white text-sm px-2 py-1 rounded"> {video.duration} </span> </div> <div className="p-5"> <h3 className="font-semibold text-warmgray-900 mb-1 group-hover:text-teal-600 transition-colors"> {video.title} </h3> <p className="text-sm text-warmgray-500"> {video.channel} • {video.views} views </p> </div> </div> ))} </div> )}
{activeTab === 'tools' && ( <div className="grid md:grid-cols-2 gap-6"> {tools.map((tool, index) => ( <a key={index} href={tool.url} target="_blank" rel="noopener noreferrer" className="bg-white rounded-2xl p-6 shadow-soft hover:shadow-soft-lg transition-all group flex items-center gap-4" > <div className="text-4xl">{tool.icon}</div> <div className="flex-1"> <h3 className="font-semibold text-warmgray-900 group-hover:text-teal-600 transition-colors"> {tool.name} </h3> <p className="text-sm text-warmgray-600">{tool.description}</p> </div> <svg className="w-5 h-5 text-warmgray-400 group-hover:text-teal-600 transition-colors" fill="none" stroke="currentColor" viewBox="0 0 24 24" > <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14" /> </svg> </a> ))} </div> )} </div> </section>
{/* Guide Modal */} {selectedGuide && ( <div className="fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4" onClick={() => setSelectedGuide(null)}> <div className="bg-white rounded-2xl max-w-3xl w-full max-h-[90vh] overflow-hidden" onClick={(e) => e.stopPropagation()} > <div className="p-6 border-b border-warmgray-100 flex items-center justify-between"> <div className="flex items-center gap-3"> <span className="text-3xl">{selectedGuide.icon}</span> <div> <h2 className="text-xl font-bold text-warmgray-900">{selectedGuide.title}</h2> <p className="text-sm text-warmgray-500">{selectedGuide.readTime} read</p> </div> </div> <button onClick={() => setSelectedGuide(null)} className="text-warmgray-400 hover:text-warmgray-600 p-2" > <svg className="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" /> </svg> </button> </div> <div className="p-6 overflow-y-auto max-h-[calc(90vh-100px)]"> <pre className="whitespace-pre-wrap font-mono text-sm text-warmgray-700 leading-relaxed"> {selectedGuide.content} </pre> </div> </div> </div> )}
{/* Video Modal */} {selectedVideo && ( <div className="fixed inset-0 bg-black/80 flex items-center justify-center z-50 p-4" onClick={() => setSelectedVideo(null)}> <div className="w-full max-w-4xl" onClick={(e) => e.stopPropagation()}> <div className="flex justify-between items-center mb-4"> <h3 className="text-white font-semibold">{selectedVideo.title}</h3> <button onClick={() => setSelectedVideo(null)} className="text-white hover:text-warmgray-300 p-2"> <svg className="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" /> </svg> </button> </div> <div className="relative pb-[56.25%] h-0"> <iframe className="absolute top-0 left-0 w-full h-full rounded-xl" src={`https://www.youtube.com/embed/${selectedVideo.youtubeId}?autoplay=1`} title={selectedVideo.title} allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen /> </div> <p className="text-warmgray-400 mt-3 text-sm"> {selectedVideo.channel} • {selectedVideo.views} views </p> </div> </div> )}
{/* CTA */} <section className="py-16 px-4 bg-gradient-to-r from-teal-600 to-teal-700"> <div className="max-w-4xl mx-auto text-center text-white"> <h2 className="text-3xl font-bold mb-4">Want More Resources?</h2> <p className="text-teal-100 mb-8">Sign up for free and get access to exclusive learning materials.</p> <Link href="/register" className="inline-block bg-white text-teal-700 px-8 py-3 rounded-full font-semibold hover:bg-cream-50 transition-colors shadow-lg" > Get Started Free </Link> </div> </section> </div> );}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420'use client';
import { useState, useEffect, useRef } from 'react';import { useRouter } from 'next/navigation';import Link from 'next/link';
const API_URL = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8000';
type Message = { id: number; role: 'user' | 'assistant'; content: string; timestamp: Date;};
type User = { id: string; name: string; email: string; role: string;};
export default function ChatPage() { const router = useRouter(); const [user, setUser] = useState<User | null>(null); const [isLoading, setIsLoading] = useState(true); const [messages, setMessages] = useState<Message[]>([ { id: 1, role: 'assistant', content: "Hello! I'm your Python AI tutor. I'm here to help you learn Python programming. You can ask me about:\n\n- Python syntax and concepts\n- Code explanations\n- Debugging help\n- Best practices\n- Exercise guidance\n\nWhat would you like to learn today?", timestamp: new Date() } ]); const [inputMessage, setInputMessage] = useState(''); const [isSending, setIsSending] = useState(false); const messagesEndRef = useRef<HTMLDivElement>(null);
const suggestedQuestions = [ "How do I create a for loop?", "Explain list comprehensions", "What are Python functions?", "How do I handle errors?", ];
useEffect(() => { const currentUser = localStorage.getItem('learnflow_current_user'); if (!currentUser) { router.push('/'); return; }
const parsedUser = JSON.parse(currentUser); if (parsedUser.role !== 'student') { router.push('/teacher/dashboard'); return; }
setUser(parsedUser); setIsLoading(false); }, [router]);
useEffect(() => { messagesEndRef.current?.scrollIntoView({ behavior: 'smooth' }); }, [messages]);
const generateResponse = (question: string): string => { const lowerQuestion = question.toLowerCase();
if (lowerQuestion.includes('for loop') || lowerQuestion.includes('loop')) { return `Great question! A for loop in Python is used to iterate over sequences like lists, strings, or ranges.
Here's the basic syntax:
\`\`\`python# Iterating over a listfruits = ['apple', 'banana', 'cherry']for fruit in fruits: print(fruit)
# Using rangefor i in range(5): print(i) # Prints 0, 1, 2, 3, 4
# Using range with start, stop, stepfor i in range(0, 10, 2): print(i) # Prints 0, 2, 4, 6, 8\`\`\`
Key points:- No need for index counters like in other languages- The indented block is the loop body- Use \`break\` to exit early, \`continue\` to skip iterations
Would you like me to explain more or show different examples?`; }
if (lowerQuestion.includes('list comprehension')) { return `List comprehensions are a concise way to create lists in Python!
Basic syntax: \`[expression for item in iterable]\`
Examples:
\`\`\`python# Create a list of squaressquares = [x**2 for x in range(10)]# Result: [0, 1, 4, 9, 16, 25, 36, 49, 64, 81]
# With condition (filtering)evens = [x for x in range(20) if x % 2 == 0]# Result: [0, 2, 4, 6, 8, 10, 12, 14, 16, 18]
# String manipulationwords = ['hello', 'world']upper_words = [word.upper() for word in words]# Result: ['HELLO', 'WORLD']\`\`\`
Benefits:- More readable than traditional loops- Usually faster- Can include conditions for filtering
Would you like to practice with some exercises?`; }
if (lowerQuestion.includes('function')) { return `Functions in Python are reusable blocks of code that perform specific tasks.
Basic syntax:
\`\`\`python# Simple functiondef greet(name): return f"Hello, {name}!"
# Function with default parameterdef greet_with_title(name, title="Mr."): return f"Hello, {title} {name}!"
# Function with multiple return valuesdef get_stats(numbers): return min(numbers), max(numbers), sum(numbers)/len(numbers)
# Using the functionsprint(greet("Alice")) # Hello, Alice!print(greet_with_title("Smith")) # Hello, Mr. Smith!minimum, maximum, average = get_stats([1, 2, 3, 4, 5])\`\`\`
Key concepts:- \`def\` keyword defines a function- Parameters go in parentheses- \`return\` sends values back- Functions can have default parameters- *args and **kwargs for flexible arguments
Want me to explain any of these in more detail?`; }
if (lowerQuestion.includes('error') || lowerQuestion.includes('exception') || lowerQuestion.includes('debug')) { return `Error handling in Python uses try/except blocks to gracefully handle exceptions.
\`\`\`python# Basic try/excepttry: result = 10 / 0except ZeroDivisionError: print("Cannot divide by zero!")
# Multiple exceptionstry: value = int("not a number")except ValueError: print("Invalid number format")except TypeError: print("Type error occurred")
# Using else and finallytry: file = open("data.txt", "r") data = file.read()except FileNotFoundError: print("File not found!")else: print("File read successfully")finally: file.close() # Always executes
# Raising exceptionsdef validate_age(age): if age < 0: raise ValueError("Age cannot be negative") return age\`\`\`
Common exceptions:- \`ValueError\` - Wrong value type- \`TypeError\` - Wrong data type- \`KeyError\` - Missing dictionary key- \`IndexError\` - Index out of range- \`FileNotFoundError\` - File doesn't exist
Need help debugging a specific error?`; }
// Default response return `That's a great question about "${question}"!
As your AI Python tutor, I can help you understand this concept better. Here are some suggestions:
1. **Try it yourself**: Open the Learn page and experiment with code2. **Take a quiz**: Test your knowledge on this topic3. **Ask follow-up questions**: I'm here to help clarify anything
Would you like me to:- Provide a code example?- Explain the underlying concept?- Give you a practice exercise?
Feel free to ask more specific questions!`; };
const handleSendMessage = async () => { if (!inputMessage.trim() || isSending) return;
const userMessage: Message = { id: messages.length + 1, role: 'user', content: inputMessage.trim(), timestamp: new Date() };
setMessages(prev => [...prev, userMessage]); setInputMessage(''); setIsSending(true);
let responseText = '';
// Try to call the real API try { const token = localStorage.getItem('learnflow_token'); const response = await fetch(`${API_URL}/chat`, { method: 'POST', headers: { 'Content-Type': 'application/json', ...(token && { 'Authorization': `Bearer ${token}` }), }, body: JSON.stringify({ messages: [...messages, userMessage].map(m => ({ role: m.role, content: m.content })), user_id: user?.id || 'anonymous', }), });
if (response.ok) { const data = await response.json(); responseText = data.response; } else { // Fallback to simulated response responseText = generateResponse(userMessage.content); } } catch (error) { // API not available, use simulated response console.log('Using simulated response (API not available)'); responseText = generateResponse(userMessage.content); }
const assistantMessage: Message = { id: messages.length + 2, role: 'assistant', content: responseText, timestamp: new Date() };
setMessages(prev => [...prev, assistantMessage]); setIsSending(false); };
const handleSuggestedQuestion = (question: string) => { setInputMessage(question); };
if (isLoading) { return ( <div className="min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100 flex items-center justify-center"> <div className="text-center"> <div className="w-16 h-16 border-4 border-blue-500 border-t-transparent rounded-full animate-spin mx-auto mb-4"></div> <p className="text-gray-600">Loading chat...</p> </div> </div> ); }
return ( <div className="min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100 flex flex-col"> <header className="bg-white/80 backdrop-blur-md shadow-lg border-b border-white/20 sticky top-0 z-10"> <div className="max-w-4xl mx-auto px-4 py-4 sm:px-6 lg:px-8"> <div className="flex items-center justify-between"> <Link href="/student/dashboard" className="flex items-center space-x-3"> <div className="w-10 h-10 bg-gradient-to-r from-blue-500 to-purple-600 rounded-lg flex items-center justify-center"> <span className="text-white font-bold text-sm">LF</span> </div> <div> <span className="text-xl font-bold text-gray-900">AI Python Tutor</span> <div className="flex items-center text-sm text-green-600"> <span className="w-2 h-2 bg-green-500 rounded-full mr-2"></span> Online </div> </div> </Link> <Link href="/student/dashboard" className="text-gray-600 hover:text-gray-800 font-medium flex items-center" > <svg className="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M10 19l-7-7m0 0l7-7m-7 7h18" /> </svg> Back </Link> </div> </div> </header>
<main className="flex-1 max-w-4xl w-full mx-auto px-4 py-6 flex flex-col"> {/* Suggested Questions */} {messages.length <= 1 && ( <div className="mb-4"> <p className="text-sm text-gray-500 mb-2">Try asking:</p> <div className="flex flex-wrap gap-2"> {suggestedQuestions.map((question, index) => ( <button key={index} onClick={() => handleSuggestedQuestion(question)} className="px-3 py-1.5 bg-white rounded-full text-sm text-blue-600 hover:bg-blue-50 border border-blue-200 transition-colors" > {question} </button> ))} </div> </div> )}
{/* Messages */} <div className="flex-1 overflow-y-auto space-y-4 mb-4"> {messages.map((message) => ( <div key={message.id} className={`flex ${message.role === 'user' ? 'justify-end' : 'justify-start'}`} > <div className={`max-w-[80%] p-4 rounded-2xl ${ message.role === 'user' ? 'bg-gradient-to-r from-blue-500 to-purple-600 text-white' : 'bg-white shadow-lg text-gray-800' }`} > {message.role === 'assistant' && ( <div className="flex items-center mb-2"> <div className="w-6 h-6 bg-gradient-to-r from-green-400 to-blue-500 rounded-full flex items-center justify-center mr-2"> <svg className="w-3 h-3 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z" /> </svg> </div> <span className="text-xs text-gray-500">AI Tutor</span> </div> )} <div className="whitespace-pre-wrap text-sm">{message.content}</div> <div className={`text-xs mt-2 ${message.role === 'user' ? 'text-blue-200' : 'text-gray-400'}`}> {message.timestamp.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' })} </div> </div> </div> ))}
{isSending && ( <div className="flex justify-start"> <div className="bg-white shadow-lg p-4 rounded-2xl"> <div className="flex items-center space-x-2"> <div className="w-2 h-2 bg-gray-400 rounded-full animate-bounce" style={{ animationDelay: '0ms' }}></div> <div className="w-2 h-2 bg-gray-400 rounded-full animate-bounce" style={{ animationDelay: '150ms' }}></div> <div className="w-2 h-2 bg-gray-400 rounded-full animate-bounce" style={{ animationDelay: '300ms' }}></div> </div> </div> </div> )}
<div ref={messagesEndRef} /> </div>
{/* Input */} <div className="bg-white rounded-2xl shadow-lg p-4"> <div className="flex items-center space-x-4"> <input type="text" value={inputMessage} onChange={(e) => setInputMessage(e.target.value)} onKeyPress={(e) => e.key === 'Enter' && handleSendMessage()} placeholder="Ask me anything about Python..." disabled={isSending} className="flex-1 bg-gray-100 rounded-xl px-4 py-3 focus:outline-none focus:ring-2 focus:ring-blue-500 disabled:opacity-50" /> <button onClick={handleSendMessage} disabled={!inputMessage.trim() || isSending} className="bg-gradient-to-r from-blue-500 to-purple-600 hover:from-blue-600 hover:to-purple-700 disabled:opacity-50 disabled:cursor-not-allowed text-white p-3 rounded-xl transition-all" > <svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 19l9 2-9-18-9 18 9-2zm0 0v-8" /> </svg> </button> </div> </div> </main> </div> );}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477'use client';
import { useState, useEffect } from 'react';import Link from 'next/link';import { useRouter } from 'next/navigation';
type Module = { id: string; name: string; description: string; masteryLevel: number; // 0-100 progress: number; // 0-100 status: 'locked' | 'in-progress' | 'completed';};
type User = { id: string; name: string; email: string; role: string;};
export default function StudentDashboard() { const router = useRouter(); const [user, setUser] = useState<User | null>(null); const [isLoading, setIsLoading] = useState(true);
const [modules, setModules] = useState<Module[]>([ { id: 'mod1', name: 'Python Basics', description: 'Variables, data types, operators, input/output', masteryLevel: 85, progress: 100, status: 'completed' }, { id: 'mod2', name: 'Control Flow', description: 'Conditional statements, loops, break/continue', masteryLevel: 65, progress: 75, status: 'in-progress' }, { id: 'mod3', name: 'Functions', description: 'Defining functions, parameters, return values', masteryLevel: 30, progress: 40, status: 'in-progress' }, { id: 'mod4', name: 'Data Structures', description: 'Lists, tuples, dictionaries, sets', masteryLevel: 0, progress: 0, status: 'locked' }, { id: 'mod5', name: 'Object-Oriented Programming', description: 'Classes, objects, inheritance, polymorphism', masteryLevel: 0, progress: 0, status: 'locked' }, { id: 'mod6', name: 'File Operations', description: 'Reading/writing files, CSV, JSON', masteryLevel: 0, progress: 0, status: 'locked' }, { id: 'mod7', name: 'Error Handling', description: 'Try/except blocks, exception types, debugging', masteryLevel: 0, progress: 0, status: 'locked' }, { id: 'mod8', name: 'Libraries & APIs', description: 'Installing packages, using APIs, virtual environments', masteryLevel: 0, progress: 0, status: 'locked' } ]);
const [recentActivities, setRecentActivities] = useState([ { id: 1, activity: 'Completed "Loops in Python" quiz', timestamp: '2026-01-15 14:30', score: 85 }, { id: 2, activity: 'Submitted "Function Practice" exercise', timestamp: '2026-01-15 12:15', result: 'Passed' }, { id: 3, activity: 'Asked "How do I use list comprehensions?"', timestamp: '2026-01-15 10:45', response: 'Explained' } ]);
useEffect(() => { // Check if user is logged in const currentUser = localStorage.getItem('learnflow_current_user'); if (!currentUser) { router.push('/'); return; }
const parsedUser = JSON.parse(currentUser); if (parsedUser.role !== 'student') { router.push('/teacher/dashboard'); return; }
setUser(parsedUser); setIsLoading(false); }, [router]);
const handleLogout = () => { localStorage.removeItem('learnflow_current_user'); router.push('/'); };
if (isLoading) { return ( <div className="min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100 flex items-center justify-center"> <div className="text-center"> <div className="w-16 h-16 border-4 border-blue-500 border-t-transparent rounded-full animate-spin mx-auto mb-4"></div> <p className="text-gray-600">Loading dashboard...</p> </div> </div> ); }
return ( <div className="min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100"> {/* Animated background */} <div className="absolute inset-0 overflow-hidden"> <div className="absolute -top-40 -right-40 w-80 h-80 bg-purple-200 rounded-full mix-blend-multiply filter blur-xl opacity-30 animate-pulse"></div> <div className="absolute -bottom-40 -left-40 w-80 h-80 bg-blue-200 rounded-full mix-blend-multiply filter blur-xl opacity-30 animate-pulse animation-delay-2000"></div> </div>
<div className="relative"> <header className="bg-white/80 backdrop-blur-md shadow-lg border-b border-white/20 sticky top-0 z-10"> <div className="max-w-7xl mx-auto px-4 py-4 sm:px-6 lg:px-8 flex justify-between items-center"> <div className="flex items-center space-x-4"> <div className="w-10 h-10 bg-gradient-to-r from-blue-500 to-purple-600 rounded-lg flex items-center justify-center"> <span className="text-white font-bold text-sm">LF</span> </div> <h1 className="text-2xl font-bold bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent"> LearnFlow Dashboard </h1> </div>
<div className="flex items-center space-x-4"> <div className="flex items-center space-x-3 bg-gray-100/50 rounded-full px-4 py-2"> <div className="w-8 h-8 bg-gradient-to-r from-green-400 to-blue-500 rounded-full flex items-center justify-center"> <span className="text-white text-sm font-semibold">{user?.name?.charAt(0).toUpperCase() || 'U'}</span> </div> <span className="text-gray-700 font-medium">{user?.name?.split(' ')[0] || 'User'}</span> </div> <button onClick={handleLogout} className="bg-gradient-to-r from-red-500 to-pink-600 hover:from-red-600 hover:to-pink-700 text-white px-4 py-2 rounded-lg transition-all duration-300 transform hover:scale-105 shadow-md" > Logout </button> </div> </div> </header>
<main className="max-w-7xl mx-auto px-4 py-8 sm:px-6 lg:px-8"> <div className="mb-8"> <h2 className="text-3xl font-bold text-gray-800 mb-2">Welcome back, {user?.name?.split(' ')[0] || 'Student'}!</h2> <p className="text-gray-600">Continue your Python learning journey where you left off</p> </div>
<div className="grid grid-cols-1 lg:grid-cols-3 gap-8"> {/* Progress Overview */} <div className="lg:col-span-2"> <div className="bg-white/70 backdrop-blur-sm rounded-2xl shadow-xl border border-white/20 p-6 mb-8"> <h2 className="text-2xl font-bold text-gray-800 mb-6 flex items-center"> <svg className="w-6 h-6 mr-2 text-blue-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" /> </svg> Your Learning Progress </h2>
<div className="grid grid-cols-2 md:grid-cols-4 gap-4 mb-8"> <div className="bg-gradient-to-br from-blue-100 to-blue-200 p-5 rounded-xl shadow-md border border-white/50"> <div className="flex items-center justify-between"> <div> <p className="text-sm font-semibold text-blue-800">Overall Mastery</p> <p className="text-3xl font-bold text-blue-600 mt-1">72%</p> </div> <div className="w-12 h-12 bg-blue-500/20 rounded-full flex items-center justify-center"> <svg className="w-6 h-6 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 12l2 2 4-4M7.835 4.697a3.42 3.42 0 001.946-.806 3.42 3.42 0 014.438 0 3.42 3.42 0 001.946.806 3.42 3.42 0 013.138 3.138 3.42 3.42 0 00.806 1.946 3.42 3.42 0 010 4.438 3.42 3.42 0 00-.806 1.946 3.42 3.42 0 01-3.138 3.138 3.42 3.42 0 00-1.946.806 3.42 3.42 0 01-4.438 0 3.42 3.42 0 00-1.946-.806 3.42 3.42 0 01-3.138-3.138 3.42 3.42 0 00-.806-1.946 3.42 3.42 0 010-4.438 3.42 3.42 0 00.806-1.946 3.42 3.42 0 013.138-3.138z" /> </svg> </div> </div> </div>
<div className="bg-gradient-to-br from-green-100 to-green-200 p-5 rounded-xl shadow-md border border-white/50"> <div className="flex items-center justify-between"> <div> <p className="text-sm font-semibold text-green-800">Modules Completed</p> <p className="text-3xl font-bold text-green-600 mt-1">2/8</p> </div> <div className="w-12 h-12 bg-green-500/20 rounded-full flex items-center justify-center"> <svg className="w-6 h-6 text-green-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 5H7a2 2 0 00-2 2v10a2 2 0 002 2h8a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2" /> </svg> </div> </div> </div>
<div className="bg-gradient-to-br from-yellow-100 to-yellow-200 p-5 rounded-xl shadow-md border border-white/50"> <div className="flex items-center justify-between"> <div> <p className="text-sm font-semibold text-yellow-800">Current Streak</p> <p className="text-3xl font-bold text-yellow-600 mt-1">5 days</p> </div> <div className="w-12 h-12 bg-yellow-500/20 rounded-full flex items-center justify-center"> <svg className="w-6 h-6 text-yellow-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M17.657 18.657A8 8 0 016.343 7.343S7 9 9 10c0-2 .5-5 2.986-7C14 5 16.09 5.777 17.656 7.343A7.975 7.975 0 0120 13a7.975 7.975 0 01-2.343 5.657z" /> </svg> </div> </div> </div>
<div className="bg-gradient-to-br from-purple-100 to-purple-200 p-5 rounded-xl shadow-md border border-white/50"> <div className="flex items-center justify-between"> <div> <p className="text-sm font-semibold text-purple-800">Hours Learned</p> <p className="text-3xl font-bold text-purple-600 mt-1">24</p> </div> <div className="w-12 h-12 bg-purple-500/20 rounded-full flex items-center justify-center"> <svg className="w-6 h-6 text-purple-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> </div> </div> </div> </div>
<h3 className="text-xl font-semibold text-gray-800 mb-4 flex items-center"> <svg className="w-5 h-5 mr-2 text-blue-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" /> </svg> Learning Modules </h3>
<div className="space-y-4"> {modules.map((module) => ( <div key={module.id} className={`bg-white/50 backdrop-blur-sm rounded-xl p-5 border transition-all duration-300 hover:shadow-lg ${ module.status === 'locked' ? 'opacity-60 border-gray-200' : module.status === 'in-progress' ? 'border-blue-200 shadow-md' : 'border-green-200 shadow-md' }`} > <div className="flex justify-between items-start"> <div className="flex-1"> <div className="flex items-center mb-2"> <h4 className="font-bold text-lg text-gray-800">{module.name}</h4> {module.status === 'completed' && ( <span className="ml-3 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800"> <svg className="w-3 h-3 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M5 13l4 4L19 7" /> </svg> Completed </span> )} {module.status === 'in-progress' && ( <span className="ml-3 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-blue-100 text-blue-800"> <svg className="w-3 h-3 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> In Progress </span> )} </div> <p className="text-gray-600 text-sm mb-3">{module.description}</p>
<div className="flex items-center justify-between mb-2"> <span className="text-sm font-medium text-gray-700">Progress: {module.progress}%</span> <span className="text-sm font-medium text-gray-700">Mastery: {module.masteryLevel}%</span> </div>
<div className="w-full bg-gray-200 rounded-full h-2.5 mb-2"> <div className={`h-2.5 rounded-full ${ module.status === 'completed' ? 'bg-green-500' : module.status === 'in-progress' ? 'bg-blue-500' : 'bg-gray-400' }`} style={{ width: `${module.progress}%` }} ></div> </div> </div>
<Link href={`/student/learn?module=${module.id}`} className={`ml-4 px-4 py-2 rounded-lg font-medium transition-all duration-300 transform hover:scale-105 ${ module.status === 'locked' ? 'bg-gray-300 text-gray-500 cursor-not-allowed' : module.status === 'completed' ? 'bg-gradient-to-r from-green-500 to-green-600 hover:from-green-600 hover:to-green-700 text-white shadow-md' : module.status === 'in-progress' ? 'bg-gradient-to-r from-blue-500 to-blue-600 hover:from-blue-600 hover:to-blue-700 text-white shadow-md' : 'bg-gradient-to-r from-purple-500 to-purple-600 hover:from-purple-600 hover:to-purple-700 text-white shadow-md' }`} prefetch={false} > {module.status === 'completed' ? 'Review' : module.status === 'in-progress' ? 'Continue' : 'Start'} </Link> </div>
<div className="mt-3 flex items-center"> <span className={`text-xs px-3 py-1 rounded-full font-medium ${ module.masteryLevel >= 90 ? 'bg-gradient-to-r from-blue-100 to-blue-200 text-blue-800' : module.masteryLevel >= 70 ? 'bg-gradient-to-r from-green-100 to-green-200 text-green-800' : module.masteryLevel >= 40 ? 'bg-gradient-to-r from-yellow-100 to-yellow-200 text-yellow-800' : 'bg-gradient-to-r from-red-100 to-red-200 text-red-800' }`}> {module.masteryLevel >= 90 ? '⭐ Mastered' : module.masteryLevel >= 70 ? '💪 Proficient' : module.masteryLevel >= 40 ? '📚 Learning' : '🌱 Beginner'} </span> </div> </div> ))} </div> </div> </div>
{/* Sidebar */} <div className="space-y-6"> {/* Recent Activity */} <div className="bg-white/70 backdrop-blur-sm rounded-2xl shadow-xl border border-white/20 p-6"> <h3 className="text-xl font-bold text-gray-800 mb-4 flex items-center"> <svg className="w-5 h-5 mr-2 text-blue-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> Recent Activity </h3> <ul className="space-y-4"> {recentActivities.map((activity) => ( <li key={activity.id} className="border-b border-gray-100 pb-4 last:border-0 last:pb-0"> <div className="flex items-start"> <div className="flex-shrink-0 mt-1"> <div className="w-8 h-8 bg-gradient-to-r from-blue-100 to-purple-100 rounded-full flex items-center justify-center"> <svg className="w-4 h-4 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M13 10V3L4 14h7v7l9-11h-7z" /> </svg> </div> </div> <div className="ml-3"> <p className="text-sm font-medium text-gray-800">{activity.activity}</p> <p className="text-xs text-gray-500 mt-1">{activity.timestamp}</p> {activity.score && ( <span className="inline-block mt-1 px-2 py-1 text-xs bg-green-100 text-green-800 rounded-full"> Score: {activity.score}% </span> )} {activity.result && ( <span className="inline-block mt-1 px-2 py-1 text-xs bg-blue-100 text-blue-800 rounded-full"> {activity.result} </span> )} </div> </div> </li> ))} </ul> </div>
{/* Continue Learning */} <div className="bg-gradient-to-br from-blue-500 to-purple-600 rounded-2xl shadow-xl p-6 text-white"> <h3 className="text-xl font-bold mb-4 flex items-center"> <svg className="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M13 10V3L4 14h7v7l9-11h-7z" /> </svg> Continue Learning </h3> <div className="bg-white/20 backdrop-blur-sm rounded-xl p-4 mb-4"> <p className="font-semibold">Control Flow Module</p> <p className="text-sm opacity-90 mt-1">75% complete • 65% mastery</p> <div className="w-full bg-white/30 rounded-full h-2 mt-3"> <div className="bg-white h-2 rounded-full" style={{ width: '75%' }}></div> </div> </div> <Link href="/student/learn?module=mod2" className="w-full bg-white text-blue-600 hover:bg-gray-100 font-semibold py-3 px-4 rounded-lg transition-all duration-300 transform hover:scale-105 block text-center" prefetch={false} > Continue Learning </Link> </div>
{/* Quick Actions */} <div className="bg-white/70 backdrop-blur-sm rounded-2xl shadow-xl border border-white/20 p-6"> <h3 className="text-xl font-bold text-gray-800 mb-4 flex items-center"> <svg className="w-5 h-5 mr-2 text-blue-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M13 10V3L4 14h7v7l9-11h-7z" /> </svg> Quick Actions </h3> <div className="space-y-3"> <Link href="/student/quiz" className="flex items-center p-4 bg-gradient-to-r from-gray-50 to-gray-100 hover:from-blue-50 hover:to-purple-50 rounded-xl transition-all duration-300 transform hover:scale-[1.02] border border-gray-100 hover:border-blue-200" prefetch={false} > <div className="w-10 h-10 bg-gradient-to-r from-blue-100 to-blue-200 rounded-lg flex items-center justify-center mr-3"> <svg className="w-5 h-5 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> </div> <span className="font-medium text-gray-800">Take a Quiz</span> </Link>
<Link href="/student/progress" className="flex items-center p-4 bg-gradient-to-r from-gray-50 to-gray-100 hover:from-green-50 hover:to-teal-50 rounded-xl transition-all duration-300 transform hover:scale-[1.02] border border-gray-100 hover:border-green-200" prefetch={false} > <div className="w-10 h-10 bg-gradient-to-r from-green-100 to-green-200 rounded-lg flex items-center justify-center mr-3"> <svg className="w-5 h-5 text-green-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" /> </svg> </div> <span className="font-medium text-gray-800">View Progress</span> </Link>
<Link href="/student/chat" className="flex items-center p-4 bg-gradient-to-r from-gray-50 to-gray-100 hover:from-purple-50 hover:to-pink-50 rounded-xl transition-all duration-300 transform hover:scale-[1.02] border border-gray-100 hover:border-purple-200" prefetch={false} > <div className="w-10 h-10 bg-gradient-to-r from-purple-100 to-purple-200 rounded-lg flex items-center justify-center mr-3"> <svg className="w-5 h-5 text-purple-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" /> </svg> </div> <span className="font-medium text-gray-800">Chat with Tutor</span> </Link> </div> </div> </div> </div> </main> </div>
<style jsx global>{` .animation-delay-2000 { animation-delay: 2s; } .animation-delay-4000 { animation-delay: 4s; } @keyframes pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 0.4; } } .animate-pulse { animation: pulse 6s cubic-bezier(0.4, 0, 0.6, 1) infinite; } `}</style> </div> );}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521'use client';
import { useState, useRef, useEffect } from 'react';import { useRouter } from 'next/navigation';import dynamic from 'next/dynamic';
const API_URL = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8000';
// Dynamically import Monaco Editor with error handling to avoid SSR issuesconst MonacoEditor = dynamic( () => import('@monaco-editor/react'), { ssr: false, loading: () => ( <div className="h-full w-full flex items-center justify-center bg-gray-900"> <div className="text-green-400 font-mono text-sm">Loading code editor...</div> </div> ) });
export default function LearnPage() { const [code, setCode] = useState<string>('print("Hello, Python learner!")\n# Write your code here'); const [output, setOutput] = useState<string>(''); const [isLoading, setIsLoading] = useState<boolean>(false); const [messages, setMessages] = useState<Array<{role: string, content: string}>>([ { role: 'assistant', content: 'Hello! I\'m your Python tutor. What would you like to learn today?' } ]); const [inputMessage, setInputMessage] = useState<string>(''); const editorRef = useRef<any>(null);
const handleRunCode = async () => { setIsLoading(true); setOutput('Running code...');
try { const token = localStorage.getItem('learnflow_token'); const response = await fetch(`${API_URL}/execute`, { method: 'POST', headers: { 'Content-Type': 'application/json', ...(token && { 'Authorization': `Bearer ${token}` }), }, body: JSON.stringify({ code }), });
if (response.ok) { const data = await response.json(); if (data.error) { setOutput(`Error:\n${data.error}\n\nOutput:\n${data.output || '(none)'}`); } else { setOutput(data.output || 'Code executed successfully (no output)'); } } else { // Fallback: simulate execution for demo simulateExecution(); } } catch (error) { // API not available, simulate execution console.log('Using simulated execution (API not available)'); simulateExecution(); }
setIsLoading(false); };
const simulateExecution = () => { // Simple Python simulation for common operations const lines = code.split('\n'); let output = '';
for (const line of lines) { const trimmed = line.trim(); if (trimmed.startsWith('print(')) { const match = trimmed.match(/print\((.*)\)/); if (match) { let content = match[1]; // Handle string literals if ((content.startsWith('"') && content.endsWith('"')) || (content.startsWith("'") && content.endsWith("'"))) { output += content.slice(1, -1) + '\n'; } else if (content.startsWith('f"') || content.startsWith("f'")) { output += content.slice(2, -1) + '\n'; } else { output += content + '\n'; } } } }
setOutput(output || 'Code executed successfully!\n(Simulated - connect API Gateway for real execution)'); };
const [isSending, setIsSending] = useState<boolean>(false);
const generateLocalResponse = (question: string): string => { const lowerQuestion = question.toLowerCase();
if (lowerQuestion.includes('loop') || lowerQuestion.includes('for')) { return `**For Loops in Python**
A for loop iterates over a sequence (list, string, range, etc.):
\`\`\`python# Basic for loopfor i in range(5): print(i) # Prints 0, 1, 2, 3, 4
# Loop through a listfruits = ['apple', 'banana', 'cherry']for fruit in fruits: print(fruit)
# Loop with enumerate (get index too)for index, fruit in enumerate(fruits): print(f"{index}: {fruit}")\`\`\`
**Key points:**- \`range(n)\` generates numbers 0 to n-1- Use \`break\` to exit early- Use \`continue\` to skip to next iteration
Would you like me to explain more or try it in the code editor?`; }
if (lowerQuestion.includes('function') || lowerQuestion.includes('def')) { return `**Functions in Python**
Functions are reusable blocks of code:
\`\`\`python# Basic functiondef greet(name): return f"Hello, {name}!"
# With default parameterdef greet(name, greeting="Hello"): return f"{greeting}, {name}!"
# Multiple return valuesdef get_stats(numbers): return min(numbers), max(numbers)
# Calling functionsmessage = greet("Alice")minimum, maximum = get_stats([1, 2, 3, 4, 5])\`\`\`
Try writing a function in the code editor!`; }
if (lowerQuestion.includes('list')) { return `**Lists in Python**
Lists are ordered, mutable collections:
\`\`\`python# Create a listnumbers = [1, 2, 3, 4, 5]mixed = [1, "hello", 3.14, True]
# Access elementsfirst = numbers[0] # 1last = numbers[-1] # 5
# Modify listsnumbers.append(6) # Add to endnumbers.insert(0, 0) # Insert at indexnumbers.remove(3) # Remove value
# List comprehensionsquares = [x**2 for x in range(5)]# Result: [0, 1, 4, 9, 16]\`\`\`
Try creating a list in the code editor!`; }
if (lowerQuestion.includes('if') || lowerQuestion.includes('condition')) { return `**If Statements in Python**
Control flow with conditions:
\`\`\`pythonage = 18
if age < 13: print("Child")elif age < 20: print("Teenager")else: print("Adult")
# One-line conditionalstatus = "Adult" if age >= 18 else "Minor"
# Multiple conditionsif age >= 18 and has_license: print("Can drive")\`\`\`
Try writing an if statement in the code editor!`; }
return `Great question about "${question}"!
I'm your Python AI tutor. I can help you with:- **Python syntax** - variables, operators, data types- **Control flow** - if/else, loops, functions- **Data structures** - lists, dictionaries, tuples- **Code debugging** - finding and fixing errors
Try asking about a specific topic, or write some code in the editor and I'll help you understand it!`; };
const handleSendMessage = async () => { if (!inputMessage.trim() || isSending) return;
const userMessage = { role: 'user', content: inputMessage }; const newMessages = [...messages, userMessage]; setMessages(newMessages); const currentInput = inputMessage; setInputMessage(''); setIsSending(true);
try { const token = localStorage.getItem('learnflow_token'); const response = await fetch(`${API_URL}/chat`, { method: 'POST', headers: { 'Content-Type': 'application/json', ...(token && { 'Authorization': `Bearer ${token}` }), }, body: JSON.stringify({ messages: newMessages.map(m => ({ role: m.role, content: m.content })), user_id: 'learn-page-user', }), });
if (response.ok) { const data = await response.json(); setMessages(prev => [...prev, { role: 'assistant', content: data.response }]); } else { // Fallback to local response setMessages(prev => [...prev, { role: 'assistant', content: generateLocalResponse(currentInput) }]); } } catch (error) { // API not available, use local response console.log('Using local response (API not available)'); setMessages(prev => [...prev, { role: 'assistant', content: generateLocalResponse(currentInput) }]); }
setIsSending(false); };
const handleEditorDidMount = (editor: any) => { editorRef.current = editor; };
return ( <div className="min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100"> {/* Animated background elements */} <div className="absolute inset-0 overflow-hidden"> <div className="absolute -top-40 -right-40 w-80 h-80 bg-purple-200 rounded-full mix-blend-multiply filter blur-xl opacity-20 animate-pulse"></div> <div className="absolute -bottom-40 -left-40 w-80 h-80 bg-blue-200 rounded-full mix-blend-multiply filter blur-xl opacity-20 animate-pulse animation-delay-2000"></div> </div>
<div className="relative"> <header className="bg-white/80 backdrop-blur-md shadow-lg border-b border-white/20 sticky top-0 z-10"> <div className="max-w-7xl mx-auto px-4 py-4 sm:px-6 lg:px-8"> <div className="flex items-center justify-between"> <div> <h1 className="text-3xl font-bold bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent"> Python Learning Studio </h1> <p className="text-gray-600 mt-1">Interactive coding with AI-powered tutoring</p> </div> <div className="flex items-center space-x-4"> <div className="bg-gradient-to-r from-blue-100 to-purple-100 rounded-lg px-4 py-2"> <span className="text-sm font-medium text-gray-700">Module: Control Flow</span> </div> <div className="w-10 h-10 bg-gradient-to-r from-green-400 to-blue-500 rounded-full flex items-center justify-center"> <span className="text-white font-bold text-sm">A</span> </div> </div> </div> </div> </header>
<main className="max-w-7xl mx-auto px-4 py-8 sm:px-6 lg:px-8"> <div className="grid grid-cols-1 lg:grid-cols-2 gap-8 mb-8"> {/* Chat Interface */} <div className="bg-white/70 backdrop-blur-sm rounded-2xl shadow-xl border border-white/20 overflow-hidden"> <div className="p-6 border-b border-white/20"> <div className="flex items-center"> <div className="w-3 h-3 bg-green-500 rounded-full mr-2"></div> <h2 className="text-xl font-bold text-gray-800 flex items-center"> <svg className="w-5 h-5 mr-2 text-blue-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" /> </svg> AI Tutor Chat </h2> </div> </div>
<div className="h-96 overflow-y-auto p-6 bg-gradient-to-b from-gray-50 to-gray-100"> {messages.map((msg, index) => ( <div key={index} className={`mb-4 p-4 rounded-2xl max-w-[85%] ${ msg.role === 'user' ? 'ml-auto bg-gradient-to-r from-blue-500 to-purple-600 text-white shadow-lg' : 'mr-auto bg-gradient-to-r from-green-100 to-blue-100 text-gray-800 shadow-md' }`} > <div className="flex items-start"> {msg.role === 'assistant' && ( <div className="w-6 h-6 bg-gradient-to-r from-green-400 to-blue-500 rounded-full flex items-center justify-center mr-2 flex-shrink-0"> <svg className="w-3 h-3 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z" /> </svg> </div> )} <div className={`${msg.role === 'user' ? 'text-white' : 'text-gray-800'}`}> {msg.content} </div> </div> </div> ))} </div>
<div className="p-4 border-t border-white/20 bg-white/50"> <div className="flex"> <input type="text" value={inputMessage} onChange={(e) => setInputMessage(e.target.value)} onKeyPress={(e) => e.key === 'Enter' && handleSendMessage()} placeholder="Ask a Python question..." className="flex-1 bg-white/80 backdrop-blur-sm border border-gray-200 rounded-l-xl px-4 py-3 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all duration-200" /> <button onClick={handleSendMessage} disabled={isSending || !inputMessage.trim()} className="bg-gradient-to-r from-blue-500 to-purple-600 hover:from-blue-600 hover:to-purple-700 text-white px-6 py-3 rounded-r-xl disabled:opacity-50 disabled:cursor-not-allowed transition-all duration-300 transform hover:scale-105 font-medium" > <div className="flex items-center"> {isSending ? ( <> <svg className="animate-spin w-4 h-4 mr-1" fill="none" viewBox="0 0 24 24"> <circle className="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" strokeWidth="4"></circle> <path className="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path> </svg> Thinking... </> ) : ( <> <svg className="w-4 h-4 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 19l9 2-9-18-9 18 9-2zm0 0v-8" /> </svg> Send </> )} </div> </button> </div> </div> </div>
{/* Code Editor */} <div className="bg-white/70 backdrop-blur-sm rounded-2xl shadow-xl border border-white/20 overflow-hidden"> <div className="p-5 border-b border-white/20 bg-gradient-to-r from-gray-50 to-gray-100"> <div className="flex justify-between items-center"> <h2 className="text-xl font-bold text-gray-800 flex items-center"> <svg className="w-5 h-5 mr-2 text-blue-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4" /> </svg> Python Code Editor </h2> <button onClick={handleRunCode} disabled={isLoading} className="bg-gradient-to-r from-green-500 to-emerald-600 hover:from-green-600 hover:to-emerald-700 text-white px-6 py-2 rounded-lg disabled:opacity-50 transition-all duration-300 transform hover:scale-105 font-medium flex items-center" > {isLoading ? ( <> <svg className="animate-spin -ml-1 mr-2 h-4 w-4 text-white" fill="none" viewBox="0 0 24 24"> <circle className="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" strokeWidth="4"></circle> <path className="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path> </svg> Running... </> ) : ( <> <svg className="w-4 h-4 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M14.828 14.828a4 4 0 01-5.656 0M9 10h1m4 0h1m-6 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> Run Code </> )} </button> </div> </div>
<div className="h-80"> <MonacoEditor height="100%" language="python" value={code} onChange={(value) => setCode(value || '')} onMount={handleEditorDidMount} theme="vs-light" options={{ minimap: { enabled: true }, fontSize: 14, scrollBeyondLastLine: false, automaticLayout: true, fontFamily: 'Consolas, "Courier New", monospace', }} /> </div>
<div className="p-4 border-t border-white/20 bg-gray-50/50"> <h3 className="font-bold text-gray-800 mb-2 flex items-center"> <svg className="w-4 h-4 mr-2 text-green-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> Output </h3> <div className="bg-gray-900 text-green-400 p-4 rounded-lg font-mono text-sm h-32 overflow-auto border border-gray-700"> {output || 'Click "Run Code" to execute your Python code...'} </div> </div> </div> </div>
{/* Learning Resources */} <div className="bg-white/70 backdrop-blur-sm rounded-2xl shadow-xl border border-white/20 p-6"> <h2 className="text-2xl font-bold text-gray-800 mb-6 flex items-center"> <svg className="w-6 h-6 mr-2 text-blue-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.746 0 3.332.477 4.5 1.253v13C19.832 18.477 18.246 18 16.5 18c-1.746 0-3.332.477-4.5 1.253" /> </svg> Learning Resources </h2>
<div className="grid grid-cols-1 md:grid-cols-3 gap-6"> <div className="bg-gradient-to-br from-blue-50 to-blue-100 rounded-xl p-6 border border-white/50 hover:shadow-lg transition-all duration-300 transform hover:-translate-y-1"> <div className="w-12 h-12 bg-gradient-to-r from-blue-500 to-blue-600 rounded-lg flex items-center justify-center mb-4"> <svg className="w-6 h-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2zM9 9h6v6H9V9z" /> </svg> </div> <h3 className="font-bold text-lg text-gray-800 mb-2">Python Basics</h3> <p className="text-gray-600 mb-4">Variables, data types, operators, and basic syntax</p> <button className="bg-gradient-to-r from-blue-500 to-blue-600 hover:from-blue-600 hover:to-blue-700 text-white px-4 py-2 rounded-lg transition-all duration-300 transform hover:scale-105"> Start Module </button> </div>
<div className="bg-gradient-to-br from-purple-50 to-purple-100 rounded-xl p-6 border border-white/50 hover:shadow-lg transition-all duration-300 transform hover:-translate-y-1"> <div className="w-12 h-12 bg-gradient-to-r from-purple-500 to-purple-600 rounded-lg flex items-center justify-center mb-4"> <svg className="w-6 h-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" /> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z" /> </svg> </div> <h3 className="font-bold text-lg text-gray-800 mb-2">Control Flow</h3> <p className="text-gray-600 mb-4">If statements, loops, functions, and control structures</p> <button className="bg-gradient-to-r from-purple-500 to-purple-600 hover:from-purple-600 hover:to-purple-700 text-white px-4 py-2 rounded-lg transition-all duration-300 transform hover:scale-105"> Start Module </button> </div>
<div className="bg-gradient-to-br from-green-50 to-green-100 rounded-xl p-6 border border-white/50 hover:shadow-lg transition-all duration-300 transform hover:-translate-y-1"> <div className="w-12 h-12 bg-gradient-to-r from-green-500 to-green-600 rounded-lg flex items-center justify-center mb-4"> <svg className="w-6 h-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 12l2 2 4-4M7.835 4.697a3.42 3.42 0 001.946-.806 3.42 3.42 0 014.438 0 3.42 3.42 0 001.946.806 3.42 3.42 0 013.138 3.138 3.42 3.42 0 00.806 1.946 3.42 3.42 0 010 4.438 3.42 3.42 0 00-.806 1.946 3.42 3.42 0 01-3.138 3.138 3.42 3.42 0 00-1.946.806 3.42 3.42 0 01-4.438 0 3.42 3.42 0 00-1.946-.806 3.42 3.42 0 01-3.138-3.138 3.42 3.42 0 00-.806-1.946 3.42 3.42 0 010-4.438 3.42 3.42 0 00.806-1.946 3.42 3.42 0 013.138-3.138z" /> </svg> </div> <h3 className="font-bold text-lg text-gray-800 mb-2">Practice Exercises</h3> <p className="text-gray-600 mb-4">Hands-on coding challenges and projects</p> <button className="bg-gradient-to-r from-green-500 to-green-600 hover:from-green-600 hover:to-green-700 text-white px-4 py-2 rounded-lg transition-all duration-300 transform hover:scale-105"> Start Practice </button> </div> </div> </div> </main> </div>
<style jsx global>{` .animation-delay-2000 { animation-delay: 2s; } .animation-delay-4000 { animation-delay: 4s; } @keyframes pulse { 0%, 100% { opacity: 0.2; } 50% { opacity: 0.3; } } .animate-pulse { animation: pulse 6s cubic-bezier(0.4, 0, 0.6, 1) infinite; } `}</style> </div> );}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223'use client';
import { useState, useEffect } from 'react';import { useRouter } from 'next/navigation';import Link from 'next/link';
type User = { id: string; name: string; email: string; role: string;};
type ModuleProgress = { id: string; name: string; mastery: number; completed: number; total: number; lastActivity: string;};
export default function ProgressPage() { const router = useRouter(); const [user, setUser] = useState<User | null>(null); const [isLoading, setIsLoading] = useState(true);
const overallStats = { totalMastery: 72, totalHours: 24, streak: 5, quizzesTaken: 12, exercisesCompleted: 45, rank: 'Intermediate' };
const moduleProgress: ModuleProgress[] = [ { id: 'mod1', name: 'Python Basics', mastery: 92, completed: 10, total: 10, lastActivity: '2 days ago' }, { id: 'mod2', name: 'Control Flow', mastery: 75, completed: 8, total: 12, lastActivity: '1 day ago' }, { id: 'mod3', name: 'Functions', mastery: 45, completed: 5, total: 15, lastActivity: 'Today' }, { id: 'mod4', name: 'Data Structures', mastery: 30, completed: 3, total: 18, lastActivity: '3 days ago' }, { id: 'mod5', name: 'OOP', mastery: 0, completed: 0, total: 20, lastActivity: 'Not started' }, { id: 'mod6', name: 'File Operations', mastery: 0, completed: 0, total: 10, lastActivity: 'Not started' }, ];
const recentAchievements = [ { id: 1, title: 'Quiz Master', description: 'Scored 100% on 3 quizzes', icon: '🏆', date: '2 days ago' }, { id: 2, title: 'Code Warrior', description: 'Completed 10 exercises in a day', icon: '⚔️', date: '5 days ago' }, { id: 3, title: 'Fast Learner', description: 'Finished a module in record time', icon: '🚀', date: '1 week ago' }, ];
const weeklyActivity = [ { day: 'Mon', hours: 2 }, { day: 'Tue', hours: 1.5 }, { day: 'Wed', hours: 3 }, { day: 'Thu', hours: 2.5 }, { day: 'Fri', hours: 1 }, { day: 'Sat', hours: 4 }, { day: 'Sun', hours: 2 }, ];
useEffect(() => { const currentUser = localStorage.getItem('learnflow_current_user'); if (!currentUser) { router.push('/'); return; }
const parsedUser = JSON.parse(currentUser); if (parsedUser.role !== 'student') { router.push('/teacher/dashboard'); return; }
setUser(parsedUser); setIsLoading(false); }, [router]);
if (isLoading) { return ( <div className="min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100 flex items-center justify-center"> <div className="text-center"> <div className="w-16 h-16 border-4 border-blue-500 border-t-transparent rounded-full animate-spin mx-auto mb-4"></div> <p className="text-gray-600">Loading progress...</p> </div> </div> ); }
return ( <div className="min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100"> <header className="bg-white/80 backdrop-blur-md shadow-lg border-b border-white/20 sticky top-0 z-10"> <div className="max-w-7xl mx-auto px-4 py-4 sm:px-6 lg:px-8"> <div className="flex items-center justify-between"> <Link href="/student/dashboard" className="flex items-center space-x-3"> <div className="w-10 h-10 bg-gradient-to-r from-blue-500 to-purple-600 rounded-lg flex items-center justify-center"> <span className="text-white font-bold text-sm">LF</span> </div> <span className="text-xl font-bold text-gray-900">My Progress</span> </Link> <Link href="/student/dashboard" className="text-gray-600 hover:text-gray-800 font-medium flex items-center" > <svg className="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M10 19l-7-7m0 0l7-7m-7 7h18" /> </svg> Back to Dashboard </Link> </div> </div> </header>
<main className="max-w-7xl mx-auto px-4 py-8 sm:px-6 lg:px-8"> {/* Overall Stats */} <div className="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4 mb-8"> <div className="bg-white rounded-xl p-4 shadow-lg"> <div className="text-3xl font-bold text-blue-600">{overallStats.totalMastery}%</div> <div className="text-sm text-gray-500">Overall Mastery</div> </div> <div className="bg-white rounded-xl p-4 shadow-lg"> <div className="text-3xl font-bold text-green-600">{overallStats.totalHours}h</div> <div className="text-sm text-gray-500">Total Hours</div> </div> <div className="bg-white rounded-xl p-4 shadow-lg"> <div className="text-3xl font-bold text-orange-600">{overallStats.streak}</div> <div className="text-sm text-gray-500">Day Streak</div> </div> <div className="bg-white rounded-xl p-4 shadow-lg"> <div className="text-3xl font-bold text-purple-600">{overallStats.quizzesTaken}</div> <div className="text-sm text-gray-500">Quizzes Taken</div> </div> <div className="bg-white rounded-xl p-4 shadow-lg"> <div className="text-3xl font-bold text-teal-600">{overallStats.exercisesCompleted}</div> <div className="text-sm text-gray-500">Exercises Done</div> </div> <div className="bg-white rounded-xl p-4 shadow-lg"> <div className="text-3xl font-bold text-indigo-600">{overallStats.rank}</div> <div className="text-sm text-gray-500">Current Rank</div> </div> </div>
<div className="grid grid-cols-1 lg:grid-cols-3 gap-8"> {/* Module Progress */} <div className="lg:col-span-2 bg-white rounded-2xl shadow-xl p-6"> <h2 className="text-xl font-bold text-gray-900 mb-6">Module Progress</h2> <div className="space-y-4"> {moduleProgress.map((module) => ( <div key={module.id} className="border border-gray-100 rounded-xl p-4"> <div className="flex justify-between items-start mb-2"> <div> <h3 className="font-semibold text-gray-900">{module.name}</h3> <p className="text-sm text-gray-500">{module.completed}/{module.total} lessons completed</p> </div> <span className={`px-3 py-1 rounded-full text-sm font-medium ${ module.mastery >= 80 ? 'bg-green-100 text-green-800' : module.mastery >= 50 ? 'bg-yellow-100 text-yellow-800' : module.mastery > 0 ? 'bg-orange-100 text-orange-800' : 'bg-gray-100 text-gray-600' }`}> {module.mastery}% Mastery </span> </div> <div className="w-full bg-gray-200 rounded-full h-2 mb-2"> <div className={`h-2 rounded-full ${ module.mastery >= 80 ? 'bg-green-500' : module.mastery >= 50 ? 'bg-yellow-500' : module.mastery > 0 ? 'bg-orange-500' : 'bg-gray-400' }`} style={{ width: `${module.mastery}%` }} ></div> </div> <p className="text-xs text-gray-400">Last activity: {module.lastActivity}</p> </div> ))} </div> </div>
{/* Sidebar */} <div className="space-y-6"> {/* Weekly Activity */} <div className="bg-white rounded-2xl shadow-xl p-6"> <h2 className="text-xl font-bold text-gray-900 mb-4">Weekly Activity</h2> <div className="flex items-end justify-between h-32"> {weeklyActivity.map((day, index) => ( <div key={index} className="flex flex-col items-center"> <div className="w-8 bg-blue-500 rounded-t" style={{ height: `${(day.hours / 4) * 100}%` }} ></div> <span className="text-xs text-gray-500 mt-2">{day.day}</span> </div> ))} </div> <div className="text-center mt-4 text-sm text-gray-600"> Total this week: {weeklyActivity.reduce((acc, d) => acc + d.hours, 0)} hours </div> </div>
{/* Achievements */} <div className="bg-white rounded-2xl shadow-xl p-6"> <h2 className="text-xl font-bold text-gray-900 mb-4">Recent Achievements</h2> <div className="space-y-4"> {recentAchievements.map((achievement) => ( <div key={achievement.id} className="flex items-start space-x-3"> <div className="text-2xl">{achievement.icon}</div> <div> <h3 className="font-semibold text-gray-900">{achievement.title}</h3> <p className="text-sm text-gray-500">{achievement.description}</p> <p className="text-xs text-gray-400">{achievement.date}</p> </div> </div> ))} </div> </div> </div> </div> </main> </div> );}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310'use client';
import { useState, useEffect } from 'react';import { useRouter } from 'next/navigation';import Link from 'next/link';
type Question = { id: number; question: string; options: string[]; correctAnswer: number; explanation: string;};
type User = { id: string; name: string; email: string; role: string;};
export default function QuizPage() { const router = useRouter(); const [user, setUser] = useState<User | null>(null); const [isLoading, setIsLoading] = useState(true); const [currentQuestion, setCurrentQuestion] = useState(0); const [selectedAnswer, setSelectedAnswer] = useState<number | null>(null); const [showResult, setShowResult] = useState(false); const [score, setScore] = useState(0); const [quizCompleted, setQuizCompleted] = useState(false); const [answers, setAnswers] = useState<number[]>([]);
const questions: Question[] = [ { id: 1, question: "What is the correct way to create a variable in Python?", options: ["var x = 5", "x = 5", "int x = 5", "let x = 5"], correctAnswer: 1, explanation: "In Python, you create variables by simply assigning a value. No keyword like 'var', 'let', or type declaration is needed." }, { id: 2, question: "Which of the following is a valid Python list?", options: ["[1, 2, 3]", "{1, 2, 3}", "(1, 2, 3)", "<1, 2, 3>"], correctAnswer: 0, explanation: "Lists in Python are created using square brackets []. Curly braces {} create sets or dicts, and parentheses () create tuples." }, { id: 3, question: "What does the 'len()' function do?", options: ["Converts to lowercase", "Returns the length of an object", "Creates a new list", "Removes an item"], correctAnswer: 1, explanation: "The len() function returns the number of items in an object like a string, list, tuple, etc." }, { id: 4, question: "How do you start a for loop in Python?", options: ["for (i = 0; i < 10; i++)", "for i in range(10):", "foreach i in range(10)", "loop i from 0 to 10"], correctAnswer: 1, explanation: "Python uses 'for item in iterable:' syntax. The range() function generates a sequence of numbers." }, { id: 5, question: "What will print(type(5.0)) output?", options: ["<class 'int'>", "<class 'float'>", "<class 'number'>", "<class 'decimal'>"], correctAnswer: 1, explanation: "5.0 is a floating-point number in Python, so type() returns <class 'float'>." } ];
useEffect(() => { const currentUser = localStorage.getItem('learnflow_current_user'); if (!currentUser) { router.push('/'); return; }
const parsedUser = JSON.parse(currentUser); if (parsedUser.role !== 'student') { router.push('/teacher/dashboard'); return; }
setUser(parsedUser); setIsLoading(false); }, [router]);
const handleAnswerSelect = (answerIndex: number) => { if (showResult) return; setSelectedAnswer(answerIndex); };
const handleSubmitAnswer = () => { if (selectedAnswer === null) return;
const newAnswers = [...answers, selectedAnswer]; setAnswers(newAnswers);
if (selectedAnswer === questions[currentQuestion].correctAnswer) { setScore(score + 1); }
setShowResult(true); };
const handleNextQuestion = () => { if (currentQuestion < questions.length - 1) { setCurrentQuestion(currentQuestion + 1); setSelectedAnswer(null); setShowResult(false); } else { setQuizCompleted(true); } };
const handleRestartQuiz = () => { setCurrentQuestion(0); setSelectedAnswer(null); setShowResult(false); setScore(0); setQuizCompleted(false); setAnswers([]); };
if (isLoading) { return ( <div className="min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100 flex items-center justify-center"> <div className="text-center"> <div className="w-16 h-16 border-4 border-blue-500 border-t-transparent rounded-full animate-spin mx-auto mb-4"></div> <p className="text-gray-600">Loading quiz...</p> </div> </div> ); }
if (quizCompleted) { const percentage = Math.round((score / questions.length) * 100); return ( <div className="min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100"> <header className="bg-white/80 backdrop-blur-md shadow-lg border-b border-white/20 sticky top-0 z-10"> <div className="max-w-4xl mx-auto px-4 py-4 sm:px-6 lg:px-8"> <div className="flex items-center justify-between"> <Link href="/student/dashboard" className="flex items-center space-x-3"> <div className="w-10 h-10 bg-gradient-to-r from-blue-500 to-purple-600 rounded-lg flex items-center justify-center"> <span className="text-white font-bold text-sm">LF</span> </div> <span className="text-xl font-bold text-gray-900">LearnFlow</span> </Link> </div> </div> </header>
<main className="max-w-2xl mx-auto px-4 py-12"> <div className="bg-white rounded-2xl shadow-xl p-8 text-center"> <div className={`w-24 h-24 mx-auto mb-6 rounded-full flex items-center justify-center ${ percentage >= 80 ? 'bg-green-100' : percentage >= 60 ? 'bg-yellow-100' : 'bg-red-100' }`}> <span className={`text-4xl font-bold ${ percentage >= 80 ? 'text-green-600' : percentage >= 60 ? 'text-yellow-600' : 'text-red-600' }`}>{percentage}%</span> </div>
<h2 className="text-2xl font-bold text-gray-900 mb-2">Quiz Completed!</h2> <p className="text-gray-600 mb-6"> You scored {score} out of {questions.length} questions correctly. </p>
<div className={`p-4 rounded-lg mb-8 ${ percentage >= 80 ? 'bg-green-50 text-green-800' : percentage >= 60 ? 'bg-yellow-50 text-yellow-800' : 'bg-red-50 text-red-800' }`}> {percentage >= 80 ? "Excellent! You've mastered this topic!" : percentage >= 60 ? "Good job! Keep practicing to improve." : "Keep learning! Review the material and try again."} </div>
<div className="flex gap-4 justify-center"> <button onClick={handleRestartQuiz} className="bg-blue-500 hover:bg-blue-600 text-white px-6 py-3 rounded-lg font-medium transition-colors" > Retry Quiz </button> <Link href="/student/dashboard" className="bg-gray-200 hover:bg-gray-300 text-gray-800 px-6 py-3 rounded-lg font-medium transition-colors" > Back to Dashboard </Link> </div> </div> </main> </div> ); }
const question = questions[currentQuestion];
return ( <div className="min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100"> <header className="bg-white/80 backdrop-blur-md shadow-lg border-b border-white/20 sticky top-0 z-10"> <div className="max-w-4xl mx-auto px-4 py-4 sm:px-6 lg:px-8"> <div className="flex items-center justify-between"> <Link href="/student/dashboard" className="flex items-center space-x-3"> <div className="w-10 h-10 bg-gradient-to-r from-blue-500 to-purple-600 rounded-lg flex items-center justify-center"> <span className="text-white font-bold text-sm">LF</span> </div> <span className="text-xl font-bold text-gray-900">LearnFlow Quiz</span> </Link> <div className="text-sm text-gray-600"> Question {currentQuestion + 1} of {questions.length} </div> </div> </div> </header>
<main className="max-w-2xl mx-auto px-4 py-8"> {/* Progress Bar */} <div className="mb-8"> <div className="w-full bg-gray-200 rounded-full h-2"> <div className="bg-blue-500 h-2 rounded-full transition-all duration-300" style={{ width: `${((currentQuestion + 1) / questions.length) * 100}%` }} ></div> </div> </div>
<div className="bg-white rounded-2xl shadow-xl p-8"> <h2 className="text-xl font-bold text-gray-900 mb-6">{question.question}</h2>
<div className="space-y-3 mb-8"> {question.options.map((option, index) => ( <button key={index} onClick={() => handleAnswerSelect(index)} disabled={showResult} className={`w-full p-4 text-left rounded-lg border-2 transition-all ${ showResult ? index === question.correctAnswer ? 'border-green-500 bg-green-50' : index === selectedAnswer ? 'border-red-500 bg-red-50' : 'border-gray-200' : selectedAnswer === index ? 'border-blue-500 bg-blue-50' : 'border-gray-200 hover:border-blue-300 hover:bg-blue-50' }`} > <div className="flex items-center"> <span className={`w-8 h-8 rounded-full flex items-center justify-center mr-3 text-sm font-medium ${ showResult ? index === question.correctAnswer ? 'bg-green-500 text-white' : index === selectedAnswer ? 'bg-red-500 text-white' : 'bg-gray-200 text-gray-600' : selectedAnswer === index ? 'bg-blue-500 text-white' : 'bg-gray-200 text-gray-600' }`}> {String.fromCharCode(65 + index)} </span> <span className="text-gray-800">{option}</span> </div> </button> ))} </div>
{showResult && ( <div className={`p-4 rounded-lg mb-6 ${ selectedAnswer === question.correctAnswer ? 'bg-green-50 text-green-800' : 'bg-red-50 text-red-800' }`}> <p className="font-medium mb-1"> {selectedAnswer === question.correctAnswer ? 'Correct!' : 'Incorrect!'} </p> <p className="text-sm">{question.explanation}</p> </div> )}
<div className="flex justify-between"> <Link href="/student/dashboard" className="text-gray-600 hover:text-gray-800 font-medium" > Exit Quiz </Link>
{!showResult ? ( <button onClick={handleSubmitAnswer} disabled={selectedAnswer === null} className="bg-blue-500 hover:bg-blue-600 disabled:bg-gray-300 disabled:cursor-not-allowed text-white px-6 py-2 rounded-lg font-medium transition-colors" > Submit Answer </button> ) : ( <button onClick={handleNextQuestion} className="bg-blue-500 hover:bg-blue-600 text-white px-6 py-2 rounded-lg font-medium transition-colors" > {currentQuestion < questions.length - 1 ? 'Next Question' : 'See Results'} </button> )} </div> </div> </main> </div> );}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317'use client';
import { useState, useEffect } from 'react';import { useRouter } from 'next/navigation';import Link from 'next/link';
type Student = { id: string; name: string; currentModule: string; masteryPercentage: number; lastActive: string; status: 'active' | 'struggling' | 'idle';};
type StruggleAlert = { id: string; studentId: string; studentName: string; issue: string; timestamp: string; resolved: boolean;};
type User = { id: string; name: string; email: string; role: string;};
export default function TeacherDashboard() { const router = useRouter(); const [user, setUser] = useState<User | null>(null); const [isLoading, setIsLoading] = useState(true);
const [students, setStudents] = useState<Student[]>([ { id: '1', name: 'Alex Johnson', currentModule: 'Control Flow', masteryPercentage: 65, lastActive: '2026-01-15 14:30', status: 'active' }, { id: '2', name: 'Sam Smith', currentModule: 'Functions', masteryPercentage: 42, lastActive: '2026-01-15 13:45', status: 'struggling' }, { id: '3', name: 'Taylor Brown', currentModule: 'Data Structures', masteryPercentage: 88, lastActive: '2026-01-15 15:15', status: 'active' }, { id: '4', name: 'Jordan Davis', currentModule: 'Basics', masteryPercentage: 92, lastActive: '2026-01-15 12:20', status: 'idle' }, { id: '5', name: 'Casey Wilson', currentModule: 'OOP', masteryPercentage: 35, lastActive: '2026-01-15 14:50', status: 'struggling' }, { id: '6', name: 'Morgan Lee', currentModule: 'Files', masteryPercentage: 76, lastActive: '2026-01-15 15:05', status: 'active' } ]);
const [alerts, setAlerts] = useState<StruggleAlert[]>([ { id: 'a1', studentId: '2', studentName: 'Sam Smith', issue: 'Stuck on for loop exercise for 15 minutes', timestamp: '2026-01-15 14:25', resolved: false }, { id: 'a2', studentId: '5', studentName: 'Casey Wilson', issue: 'Repeated the same syntax error 3 times', timestamp: '2026-01-15 14:48', resolved: false } ]);
const [classStats, setClassStats] = useState({ totalStudents: 24, activeStudents: 18, averageMastery: 68, strugglingStudents: 4 });
useEffect(() => { // Check if user is logged in const currentUser = localStorage.getItem('learnflow_current_user'); if (!currentUser) { router.push('/'); return; }
const parsedUser = JSON.parse(currentUser); if (parsedUser.role !== 'teacher') { router.push('/student/dashboard'); return; }
setUser(parsedUser); setIsLoading(false); }, [router]);
const handleLogout = () => { localStorage.removeItem('learnflow_current_user'); router.push('/'); };
if (isLoading) { return ( <div className="min-h-screen bg-gray-50 flex items-center justify-center"> <div className="text-center"> <div className="w-16 h-16 border-4 border-purple-500 border-t-transparent rounded-full animate-spin mx-auto mb-4"></div> <p className="text-gray-600">Loading dashboard...</p> </div> </div> ); }
const resolveAlert = (alertId: string) => { setAlerts(alerts.map(alert => alert.id === alertId ? {...alert, resolved: true} : alert )); };
return ( <div className="min-h-screen bg-gray-50"> <header className="bg-white shadow"> <div className="max-w-7xl mx-auto px-4 py-6 sm:px-6 lg:px-8"> <div className="flex justify-between items-center"> <div> <div className="flex items-center space-x-4"> <Link href="/" className="flex items-center"> <div className="w-10 h-10 bg-gradient-to-r from-purple-500 to-indigo-600 rounded-lg flex items-center justify-center"> <span className="text-white font-bold text-sm">LF</span> </div> </Link> <div> <h1 className="text-2xl font-bold text-gray-900">Teacher Dashboard</h1> <p className="text-sm text-gray-500">Welcome, {user?.name || 'Teacher'}</p> </div> </div> </div> <div className="flex items-center space-x-4"> <div className="flex items-center space-x-3 bg-gray-100 rounded-full px-4 py-2"> <div className="w-8 h-8 bg-gradient-to-r from-purple-400 to-indigo-500 rounded-full flex items-center justify-center"> <span className="text-white text-sm font-semibold">{user?.name?.charAt(0).toUpperCase() || 'T'}</span> </div> <span className="text-gray-700 font-medium">{user?.name?.split(' ')[0] || 'Teacher'}</span> </div> <button onClick={handleLogout} className="bg-red-500 hover:bg-red-600 text-white px-4 py-2 rounded-lg transition-colors" > Logout </button> </div> </div> </div> </header>
<main className="max-w-7xl mx-auto px-4 py-8 sm:px-6 lg:px-8"> {/* Class Statistics */} <div className="grid grid-cols-1 gap-5 sm:grid-cols-2 lg:grid-cols-4 mb-8"> <div className="bg-white overflow-hidden shadow rounded-lg"> <div className="px-4 py-5 sm:p-6"> <div className="flex items-center"> <div className="flex-shrink-0 bg-blue-500 rounded-md p-3"> <svg className="h-6 w-6 text-white" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z" /> </svg> </div> <div className="ml-5 w-0 flex-1"> <dl> <dt className="text-sm font-medium text-gray-500 truncate">Total Students</dt> <dd className="text-2xl font-semibold text-gray-900">{classStats.totalStudents}</dd> </dl> </div> </div> </div> </div>
<div className="bg-white overflow-hidden shadow rounded-lg"> <div className="px-4 py-5 sm:p-6"> <div className="flex items-center"> <div className="flex-shrink-0 bg-green-500 rounded-md p-3"> <svg className="h-6 w-6 text-white" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> </div> <div className="ml-5 w-0 flex-1"> <dl> <dt className="text-sm font-medium text-gray-500 truncate">Active Students</dt> <dd className="text-2xl font-semibold text-gray-900">{classStats.activeStudents}</dd> </dl> </div> </div> </div> </div>
<div className="bg-white overflow-hidden shadow rounded-lg"> <div className="px-4 py-5 sm:p-6"> <div className="flex items-center"> <div className="flex-shrink-0 bg-yellow-500 rounded-md p-3"> <svg className="h-6 w-6 text-white" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" /> </svg> </div> <div className="ml-5 w-0 flex-1"> <dl> <dt className="text-sm font-medium text-gray-500 truncate">Avg. Mastery</dt> <dd className="text-2xl font-semibold text-gray-900">{classStats.averageMastery}%</dd> </dl> </div> </div> </div> </div>
<div className="bg-white overflow-hidden shadow rounded-lg"> <div className="px-4 py-5 sm:p-6"> <div className="flex items-center"> <div className="flex-shrink-0 bg-red-500 rounded-md p-3"> <svg className="h-6 w-6 text-white" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-1.937-1-2.707.333-1.54 2.667-1.937 5.333-1.937 8z" /> </svg> </div> <div className="ml-5 w-0 flex-1"> <dl> <dt className="text-sm font-medium text-gray-500 truncate">Struggling Students</dt> <dd className="text-2xl font-semibold text-gray-900">{classStats.strugglingStudents}</dd> </dl> </div> </div> </div> </div> </div>
<div className="grid grid-cols-1 lg:grid-cols-2 gap-8"> {/* Student List */} <div className="bg-white shadow rounded-lg p-6"> <h2 className="text-xl font-semibold text-gray-800 mb-4">Student Progress</h2>
<div className="overflow-x-auto"> <table className="min-w-full divide-y divide-gray-200"> <thead className="bg-gray-50"> <tr> <th scope="col" className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Student</th> <th scope="col" className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Module</th> <th scope="col" className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Mastery</th> <th scope="col" className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th> </tr> </thead> <tbody className="bg-white divide-y divide-gray-200"> {students.map((student) => ( <tr key={student.id}> <td className="px-6 py-4 whitespace-nowrap"> <div className="text-sm font-medium text-gray-900">{student.name}</div> </td> <td className="px-6 py-4 whitespace-nowrap"> <div className="text-sm text-gray-500">{student.currentModule}</div> </td> <td className="px-6 py-4 whitespace-nowrap"> <div className="flex items-center"> <div className="w-24 bg-gray-200 rounded-full h-2.5 mr-2"> <div className={`h-2.5 rounded-full ${ student.masteryPercentage >= 90 ? 'bg-blue-600' : student.masteryPercentage >= 70 ? 'bg-green-500' : student.masteryPercentage >= 40 ? 'bg-yellow-500' : 'bg-red-500' }`} style={{ width: `${student.masteryPercentage}%` }} ></div> </div> <span className="text-sm text-gray-500">{student.masteryPercentage}%</span> </div> </td> <td className="px-6 py-4 whitespace-nowrap"> <span className={`px-2 inline-flex text-xs leading-5 font-semibold rounded-full ${ student.status === 'active' ? 'bg-green-100 text-green-800' : student.status === 'struggling' ? 'bg-red-100 text-red-800' : 'bg-gray-100 text-gray-800' }`}> {student.status.charAt(0).toUpperCase() + student.status.slice(1)} </span> </td> </tr> ))} </tbody> </table> </div> </div>
{/* Struggle Alerts */} <div className="bg-white shadow rounded-lg p-6"> <h2 className="text-xl font-semibold text-gray-800 mb-4">Struggle Alerts</h2>
<div className="space-y-4"> {alerts.filter(a => !a.resolved).map((alert) => ( <div key={alert.id} className="border-l-4 border-red-500 bg-red-50 p-4 rounded"> <div className="flex justify-between"> <div> <p className="font-medium text-red-800">{alert.studentName}</p> <p className="text-sm text-red-600">{alert.issue}</p> <p className="text-xs text-red-500">{alert.timestamp}</p> </div> <button onClick={() => resolveAlert(alert.id)} className="text-sm bg-red-500 hover:bg-red-600 text-white px-3 py-1 rounded-md" > Resolve </button> </div> </div> ))}
{alerts.filter(a => !a.resolved).length === 0 && ( <div className="text-center py-8 text-gray-500"> <p>No active struggle alerts</p> </div> )} </div>
<div className="mt-6"> <h3 className="text-lg font-medium text-gray-800 mb-3">Generate Exercise</h3> <div className="space-y-3"> <select className="w-full border border-gray-300 rounded-md px-3 py-2"> <option>Select student</option> {students.filter(s => s.status === 'struggling').map(s => ( <option key={s.id} value={s.id}>{s.name}</option> ))} </select> <textarea className="w-full border border-gray-300 rounded-md px-3 py-2 h-24" placeholder="Describe the custom exercise to generate..." ></textarea> <button className="w-full bg-blue-500 hover:bg-blue-600 text-white py-2 px-4 rounded-md"> Generate Exercise </button> </div> </div> </div> </div> </main> </div> );}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387// API Service Layer for LearnFlow Frontend
const API_BASE_URL = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8000';
// Service URLsconst SERVICES = { triage: process.env.NEXT_PUBLIC_TRIAGE_URL || 'http://localhost:8001', concepts: process.env.NEXT_PUBLIC_CONCEPTS_URL || 'http://localhost:8002', codeReview: process.env.NEXT_PUBLIC_CODE_REVIEW_URL || 'http://localhost:8003', debug: process.env.NEXT_PUBLIC_DEBUG_URL || 'http://localhost:8004', exercise: process.env.NEXT_PUBLIC_EXERCISE_URL || 'http://localhost:8005', progress: process.env.NEXT_PUBLIC_PROGRESS_URL || 'http://localhost:8006',};
// Auth token managementlet authToken: string | null = null;
export const setAuthToken = (token: string) => { authToken = token; if (typeof window !== 'undefined') { localStorage.setItem('learnflow_token', token); }};
export const getAuthToken = (): string | null => { if (authToken) return authToken; if (typeof window !== 'undefined') { return localStorage.getItem('learnflow_token'); } return null;};
export const clearAuthToken = () => { authToken = null; if (typeof window !== 'undefined') { localStorage.removeItem('learnflow_token'); }};
// Generic fetch wrapperasync function apiFetch<T>( url: string, options: RequestInit = {}): Promise<T> { const token = getAuthToken();
const headers: HeadersInit = { 'Content-Type': 'application/json', ...(token && { Authorization: `Bearer ${token}` }), ...options.headers, };
const response = await fetch(url, { ...options, headers, });
if (!response.ok) { const error = await response.json().catch(() => ({ message: 'Request failed' })); throw new Error(error.message || `HTTP error! status: ${response.status}`); }
return response.json();}
// ==================== AUTH API ====================
export interface LoginRequest { email: string; password: string;}
export interface RegisterRequest { name: string; email: string; password: string; role: 'student' | 'teacher';}
export interface AuthResponse { token: string; user: { id: string; name: string; email: string; role: 'student' | 'teacher'; };}
export const authAPI = { login: async (data: LoginRequest): Promise<AuthResponse> => { return apiFetch<AuthResponse>(`${API_BASE_URL}/auth/login`, { method: 'POST', body: JSON.stringify(data), }); },
register: async (data: RegisterRequest): Promise<AuthResponse> => { return apiFetch<AuthResponse>(`${API_BASE_URL}/auth/register`, { method: 'POST', body: JSON.stringify(data), }); },
me: async (): Promise<AuthResponse['user']> => { return apiFetch<AuthResponse['user']>(`${API_BASE_URL}/auth/me`); },};
// ==================== TRIAGE API ====================
export interface QueryRequest { query: string; user_id: string;}
export interface RoutingResponse { agent: string; message: string; params: Record<string, any>;}
export const triageAPI = { routeQuery: async (data: QueryRequest): Promise<RoutingResponse> => { return apiFetch<RoutingResponse>(`${SERVICES.triage}/query`, { method: 'POST', body: JSON.stringify(data), }); },
health: async (): Promise<{ status: string }> => { return apiFetch<{ status: string }>(`${SERVICES.triage}/health`); },};
// ==================== CONCEPTS API ====================
export interface ExplainRequest { topic: string; level?: 'beginner' | 'intermediate' | 'advanced'; user_context?: Record<string, any>;}
export interface ExplanationResponse { topic: string; explanation: string; examples: string[]; level: string;}
export const conceptsAPI = { explain: async (data: ExplainRequest): Promise<ExplanationResponse> => { return apiFetch<ExplanationResponse>(`${SERVICES.concepts}/explain`, { method: 'POST', body: JSON.stringify(data), }); },
health: async (): Promise<{ status: string }> => { return apiFetch<{ status: string }>(`${SERVICES.concepts}/health`); },};
// ==================== EXERCISE API ====================
export interface ExerciseRequest { module: string; topic: string; difficulty?: 'beginner' | 'intermediate' | 'advanced'; user_id?: string;}
export interface ExerciseResponse { id: string; module: string; topic: string; problem: string; starter_code: string; test_cases: Array<{ input: string; expected_output: string }>; difficulty: string;}
export interface SubmissionRequest { quiz_id: string; user_id: string; code: string;}
export interface GradeResponse { quiz_id: string; user_id: string; score: number; feedback: string; passed_tests: number; total_tests: number;}
export const exerciseAPI = { generate: async (data: ExerciseRequest): Promise<ExerciseResponse> => { return apiFetch<ExerciseResponse>(`${SERVICES.exercise}/generate`, { method: 'POST', body: JSON.stringify(data), }); },
grade: async (data: SubmissionRequest): Promise<GradeResponse> => { return apiFetch<GradeResponse>(`${SERVICES.exercise}/grade`, { method: 'POST', body: JSON.stringify(data), }); },
health: async (): Promise<{ status: string }> => { return apiFetch<{ status: string }>(`${SERVICES.exercise}/health`); },};
// ==================== CODE REVIEW API ====================
export interface ReviewRequest { code: string; context?: string; user_id?: string;}
export interface ReviewResponse { overall_quality: string; issues: Array<{ type: string; line: number; message: string; suggestion: string; }>; suggestions: string[]; score: number;}
export const codeReviewAPI = { review: async (data: ReviewRequest): Promise<ReviewResponse> => { return apiFetch<ReviewResponse>(`${SERVICES.codeReview}/review`, { method: 'POST', body: JSON.stringify(data), }); },
health: async (): Promise<{ status: string }> => { return apiFetch<{ status: string }>(`${SERVICES.codeReview}/health`); },};
// ==================== DEBUG API ====================
export interface DebugRequest { code: string; error_message: string; user_id?: string;}
export interface DebugResponse { error_type: string; explanation: string; fix_suggestion: string; corrected_code: string; learning_tip: string;}
export const debugAPI = { analyze: async (data: DebugRequest): Promise<DebugResponse> => { return apiFetch<DebugResponse>(`${SERVICES.debug}/analyze`, { method: 'POST', body: JSON.stringify(data), }); },
health: async (): Promise<{ status: string }> => { return apiFetch<{ status: string }>(`${SERVICES.debug}/health`); },};
// ==================== PROGRESS API ====================
export interface ProgressData { user_id: string; overall_mastery: number; modules_completed: number; current_module: string; modules: Record<string, Record<string, { mastery_score: number }>>;}
export interface UpdateProgressRequest { user_id: string; module: string; topic: string; score: number; activity_type: 'quiz' | 'exercise' | 'lesson';}
export const progressAPI = { getProgress: async (userId: string): Promise<ProgressData> => { return apiFetch<ProgressData>(`${SERVICES.progress}/progress/${userId}`); },
updateProgress: async (data: UpdateProgressRequest): Promise<ProgressData> => { return apiFetch<ProgressData>(`${SERVICES.progress}/progress`, { method: 'POST', body: JSON.stringify(data), }); },
health: async (): Promise<{ status: string }> => { return apiFetch<{ status: string }>(`${SERVICES.progress}/health`); },};
// ==================== AI CHAT API ====================
export interface ChatMessage { role: 'user' | 'assistant'; content: string;}
export interface ChatRequest { messages: ChatMessage[]; user_id: string; context?: string;}
export interface ChatResponse { response: string; agent_used: string;}
export const chatAPI = { sendMessage: async (data: ChatRequest): Promise<ChatResponse> => { // First route through triage const routing = await triageAPI.routeQuery({ query: data.messages[data.messages.length - 1].content, user_id: data.user_id, });
// Then call the appropriate agent if (routing.agent === 'concepts-agent') { const response = await conceptsAPI.explain({ topic: data.messages[data.messages.length - 1].content, level: 'intermediate', }); return { response: `${response.explanation}\n\nExamples:\n${response.examples.join('\n')}`, agent_used: routing.agent, }; }
// Default response return { response: routing.message, agent_used: routing.agent, }; },};
// ==================== UTILITY FUNCTIONS ====================
export const checkServicesHealth = async (): Promise<Record<string, boolean>> => { const services = ['triage', 'concepts', 'codeReview', 'debug', 'exercise', 'progress'] as const; const results: Record<string, boolean> = {};
await Promise.all( services.map(async (service) => { try { const api = { triage: triageAPI, concepts: conceptsAPI, codeReview: codeReviewAPI, debug: debugAPI, exercise: exerciseAPI, progress: progressAPI, }[service]; await api.health(); results[service] = true; } catch { results[service] = false; } }) );
return results;};12345/// <reference types="next" />/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited// see https://nextjs.org/docs/basic-features/typescript for more information.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051/** @type {import('next').NextConfig} */const nextConfig = { experimental: { // Enable SWC transforms for better dynamic import handling swcPlugins: [], }, // Handle dynamic imports properly webpack: (config, { isServer }) => { if (!isServer) { // Allow dynamic imports in client-side bundles config.resolve.fallback = { ...config.resolve.fallback, fs: false, path: false, os: false, crypto: false, stream: false, buffer: false, util: false, }; }
// Configure chunk splitting for better loading config.optimization.splitChunks = { chunks: 'all', cacheGroups: { default: { minChunks: 2, priority: 20, reuseExistingChunk: true, }, vendor: { test: /[\\/]node_modules[\\/]/, name: 'vendors', priority: 10, chunks: 'all', }, monaco: { test: /[\\/]node_modules[\\/]monaco-editor/, name: 'monaco', priority: 30, chunks: 'all', }, }, };
return config; },};
module.exports = nextConfig;123456789101112131415161718192021222324252627282930{ "name": "learnflow-frontend", "version": "0.1.0", "private": true, "scripts": { "dev": "next dev", "build": "next build", "start": "next start", "lint": "next lint" }, "dependencies": { "react": "^18", "react-dom": "^18", "next": "14.0.0", "@monaco-editor/react": "^4.6.0", "axios": "^1.5.0", "clsx": "^2.0.0", "tailwind-merge": "^1.14.0" }, "devDependencies": { "typescript": "^5", "@types/node": "^20", "@types/react": "^18", "@types/react-dom": "^18", "autoprefixer": "^10", "postcss": "^8", "tailwindcss": "^3", "eslint-config-next": "14.0.0" }}123456module.exports = { plugins: { tailwindcss: {}, autoprefixer: {}, },}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107/** @type {import('tailwindcss').Config} */module.exports = { content: [ './pages/**/*.{js,ts,jsx,tsx,mdx}', './components/**/*.{js,ts,jsx,tsx,mdx}', './app/**/*.{js,ts,jsx,tsx,mdx}', ], theme: { extend: { colors: { // VeryWellMind-inspired wellness color palette teal: { 50: '#f0fdfa', 100: '#ccfbf1', 200: '#99f6e4', 300: '#5eead4', 400: '#2dd4bf', 500: '#14b8a6', 600: '#0d9488', 700: '#0f766e', 800: '#115e59', 900: '#134e4a', }, sage: { 50: '#f6f7f4', 100: '#e8ebe3', 200: '#d4dac9', 300: '#b5c0a5', 400: '#96a67f', 500: '#7a8b63', 600: '#5f6e4c', 700: '#4b573d', 800: '#3e4734', 900: '#353d2e', }, lavender: { 50: '#faf5ff', 100: '#f3e8ff', 200: '#e9d5ff', 300: '#d8b4fe', 400: '#c084fc', 500: '#a855f7', 600: '#9333ea', 700: '#7e22ce', 800: '#6b21a8', 900: '#581c87', }, cream: { 50: '#fefdfb', 100: '#fdf9f3', 200: '#faf3e6', 300: '#f5e9d4', 400: '#eddbb8', 500: '#e3c99a', 600: '#d4b07a', 700: '#c19660', 800: '#a67b4b', 900: '#8a6540', }, coral: { 50: '#fff5f5', 100: '#ffe3e3', 200: '#ffc9c9', 300: '#ffa8a8', 400: '#ff8787', 500: '#ff6b6b', 600: '#fa5252', 700: '#f03e3e', 800: '#e03131', 900: '#c92a2a', }, warmgray: { 50: '#fafaf9', 100: '#f5f5f4', 200: '#e7e5e4', 300: '#d6d3d1', 400: '#a8a29e', 500: '#78716c', 600: '#57534e', 700: '#44403c', 800: '#292524', 900: '#1c1917', }, }, fontFamily: { sans: ['Inter', 'system-ui', 'sans-serif'], display: ['Georgia', 'serif'], }, borderRadius: { '4xl': '2rem', '5xl': '2.5rem', }, boxShadow: { 'soft': '0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04)', 'soft-lg': '0 10px 40px -10px rgba(0, 0, 0, 0.1)', 'inner-soft': 'inset 0 2px 4px 0 rgba(0, 0, 0, 0.02)', }, backgroundImage: { 'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))', 'gradient-conic': 'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))', 'wellness-gradient': 'linear-gradient(135deg, #f0fdfa 0%, #faf5ff 50%, #fdf9f3 100%)', 'hero-pattern': 'radial-gradient(circle at 30% 20%, rgba(20, 184, 166, 0.1) 0%, transparent 50%)', }, }, }, plugins: [],}12345678910111213141516171819202122232425262728293031323334{ "compilerOptions": { "lib": [ "dom", "dom.iterable", "esnext" ], "allowJs": true, "skipLibCheck": true, "strict": false, "noEmit": true, "incremental": true, "esModuleInterop": true, "module": "esnext", "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, "jsx": "preserve", "plugins": [ { "name": "next" } ] }, "include": [ "next-env.d.ts", ".next/types/**/*.ts", "**/*.ts", "**/*.tsx" ], "exclude": [ "node_modules" ]}1{"fileNames":["./node_modules/typescript/lib/lib.es5.d.ts","./node_modules/typescript/lib/lib.es2015.d.ts","./node_modules/typescript/lib/lib.es2016.d.ts","./node_modules/typescript/lib/lib.es2017.d.ts","./node_modules/typescript/lib/lib.es2018.d.ts","./node_modules/typescript/lib/lib.es2019.d.ts","./node_modules/typescript/lib/lib.es2020.d.ts","./node_modules/typescript/lib/lib.es2021.d.ts","./node_modules/typescript/lib/lib.es2022.d.ts","./node_modules/typescript/lib/lib.es2023.d.ts","./node_modules/typescript/lib/lib.es2024.d.ts","./node_modules/typescript/lib/lib.esnext.d.ts","./node_modules/typescript/lib/lib.dom.d.ts","./node_modules/typescript/lib/lib.dom.iterable.d.ts","./node_modules/typescript/lib/lib.es2015.core.d.ts","./node_modules/typescript/lib/lib.es2015.collection.d.ts","./node_modules/typescript/lib/lib.es2015.generator.d.ts","./node_modules/typescript/lib/lib.es2015.iterable.d.ts","./node_modules/typescript/lib/lib.es2015.promise.d.ts","./node_modules/typescript/lib/lib.es2015.proxy.d.ts","./node_modules/typescript/lib/lib.es2015.reflect.d.ts","./node_modules/typescript/lib/lib.es2015.symbol.d.ts","./node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","./node_modules/typescript/lib/lib.es2016.array.include.d.ts","./node_modules/typescript/lib/lib.es2016.intl.d.ts","./node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","./node_modules/typescript/lib/lib.es2017.date.d.ts","./node_modules/typescript/lib/lib.es2017.object.d.ts","./node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","./node_modules/typescript/lib/lib.es2017.string.d.ts","./node_modules/typescript/lib/lib.es2017.intl.d.ts","./node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","./node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","./node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","./node_modules/typescript/lib/lib.es2018.intl.d.ts","./node_modules/typescript/lib/lib.es2018.promise.d.ts","./node_modules/typescript/lib/lib.es2018.regexp.d.ts","./node_modules/typescript/lib/lib.es2019.array.d.ts","./node_modules/typescript/lib/lib.es2019.object.d.ts","./node_modules/typescript/lib/lib.es2019.string.d.ts","./node_modules/typescript/lib/lib.es2019.symbol.d.ts","./node_modules/typescript/lib/lib.es2019.intl.d.ts","./node_modules/typescript/lib/lib.es2020.bigint.d.ts","./node_modules/typescript/lib/lib.es2020.date.d.ts","./node_modules/typescript/lib/lib.es2020.promise.d.ts","./node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","./node_modules/typescript/lib/lib.es2020.string.d.ts","./node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","./node_modules/typescript/lib/lib.es2020.intl.d.ts","./node_modules/typescript/lib/lib.es2020.number.d.ts","./node_modules/typescript/lib/lib.es2021.promise.d.ts","./node_modules/typescript/lib/lib.es2021.string.d.ts","./node_modules/typescript/lib/lib.es2021.weakref.d.ts","./node_modules/typescript/lib/lib.es2021.intl.d.ts","./node_modules/typescript/lib/lib.es2022.array.d.ts","./node_modules/typescript/lib/lib.es2022.error.d.ts","./node_modules/typescript/lib/lib.es2022.intl.d.ts","./node_modules/typescript/lib/lib.es2022.object.d.ts","./node_modules/typescript/lib/lib.es2022.string.d.ts","./node_modules/typescript/lib/lib.es2022.regexp.d.ts","./node_modules/typescript/lib/lib.es2023.array.d.ts","./node_modules/typescript/lib/lib.es2023.collection.d.ts","./node_modules/typescript/lib/lib.es2023.intl.d.ts","./node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","./node_modules/typescript/lib/lib.es2024.collection.d.ts","./node_modules/typescript/lib/lib.es2024.object.d.ts","./node_modules/typescript/lib/lib.es2024.promise.d.ts","./node_modules/typescript/lib/lib.es2024.regexp.d.ts","./node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","./node_modules/typescript/lib/lib.es2024.string.d.ts","./node_modules/typescript/lib/lib.esnext.array.d.ts","./node_modules/typescript/lib/lib.esnext.collection.d.ts","./node_modules/typescript/lib/lib.esnext.intl.d.ts","./node_modules/typescript/lib/lib.esnext.disposable.d.ts","./node_modules/typescript/lib/lib.esnext.promise.d.ts","./node_modules/typescript/lib/lib.esnext.decorators.d.ts","./node_modules/typescript/lib/lib.esnext.iterator.d.ts","./node_modules/typescript/lib/lib.esnext.float16.d.ts","./node_modules/typescript/lib/lib.esnext.error.d.ts","./node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts","./node_modules/typescript/lib/lib.decorators.d.ts","./node_modules/typescript/lib/lib.decorators.legacy.d.ts","./node_modules/next/dist/styled-jsx/types/css.d.ts","./node_modules/@types/react/global.d.ts","./node_modules/csstype/index.d.ts","./node_modules/@types/prop-types/index.d.ts","./node_modules/@types/react/index.d.ts","./node_modules/next/dist/styled-jsx/types/index.d.ts","./node_modules/next/dist/styled-jsx/types/macro.d.ts","./node_modules/next/dist/styled-jsx/types/style.d.ts","./node_modules/next/dist/styled-jsx/types/global.d.ts","./node_modules/next/dist/shared/lib/amp.d.ts","./node_modules/next/amp.d.ts","./node_modules/@types/node/compatibility/disposable.d.ts","./node_modules/@types/node/compatibility/indexable.d.ts","./node_modules/@types/node/compatibility/iterators.d.ts","./node_modules/@types/node/compatibility/index.d.ts","./node_modules/@types/node/globals.typedarray.d.ts","./node_modules/@types/node/buffer.buffer.d.ts","./node_modules/@types/node/globals.d.ts","./node_modules/@types/node/web-globals/abortcontroller.d.ts","./node_modules/@types/node/web-globals/domexception.d.ts","./node_modules/@types/node/web-globals/events.d.ts","./node_modules/undici-types/header.d.ts","./node_modules/undici-types/readable.d.ts","./node_modules/undici-types/file.d.ts","./node_modules/undici-types/fetch.d.ts","./node_modules/undici-types/formdata.d.ts","./node_modules/undici-types/connector.d.ts","./node_modules/undici-types/client.d.ts","./node_modules/undici-types/errors.d.ts","./node_modules/undici-types/dispatcher.d.ts","./node_modules/undici-types/global-dispatcher.d.ts","./node_modules/undici-types/global-origin.d.ts","./node_modules/undici-types/pool-stats.d.ts","./node_modules/undici-types/pool.d.ts","./node_modules/undici-types/handlers.d.ts","./node_modules/undici-types/balanced-pool.d.ts","./node_modules/undici-types/agent.d.ts","./node_modules/undici-types/mock-interceptor.d.ts","./node_modules/undici-types/mock-agent.d.ts","./node_modules/undici-types/mock-client.d.ts","./node_modules/undici-types/mock-pool.d.ts","./node_modules/undici-types/mock-errors.d.ts","./node_modules/undici-types/proxy-agent.d.ts","./node_modules/undici-types/env-http-proxy-agent.d.ts","./node_modules/undici-types/retry-handler.d.ts","./node_modules/undici-types/retry-agent.d.ts","./node_modules/undici-types/api.d.ts","./node_modules/undici-types/interceptors.d.ts","./node_modules/undici-types/util.d.ts","./node_modules/undici-types/cookies.d.ts","./node_modules/undici-types/patch.d.ts","./node_modules/undici-types/websocket.d.ts","./node_modules/undici-types/eventsource.d.ts","./node_modules/undici-types/filereader.d.ts","./node_modules/undici-types/diagnostics-channel.d.ts","./node_modules/undici-types/content-type.d.ts","./node_modules/undici-types/cache.d.ts","./node_modules/undici-types/index.d.ts","./node_modules/@types/node/web-globals/fetch.d.ts","./node_modules/@types/node/assert.d.ts","./node_modules/@types/node/assert/strict.d.ts","./node_modules/@types/node/async_hooks.d.ts","./node_modules/@types/node/buffer.d.ts","./node_modules/@types/node/child_process.d.ts","./node_modules/@types/node/cluster.d.ts","./node_modules/@types/node/console.d.ts","./node_modules/@types/node/constants.d.ts","./node_modules/@types/node/crypto.d.ts","./node_modules/@types/node/dgram.d.ts","./node_modules/@types/node/diagnostics_channel.d.ts","./node_modules/@types/node/dns.d.ts","./node_modules/@types/node/dns/promises.d.ts","./node_modules/@types/node/domain.d.ts","./node_modules/@types/node/events.d.ts","./node_modules/@types/node/fs.d.ts","./node_modules/@types/node/fs/promises.d.ts","./node_modules/@types/node/http.d.ts","./node_modules/@types/node/http2.d.ts","./node_modules/@types/node/https.d.ts","./node_modules/@types/node/inspector.generated.d.ts","./node_modules/@types/node/module.d.ts","./node_modules/@types/node/net.d.ts","./node_modules/@types/node/os.d.ts","./node_modules/@types/node/path.d.ts","./node_modules/@types/node/perf_hooks.d.ts","./node_modules/@types/node/process.d.ts","./node_modules/@types/node/punycode.d.ts","./node_modules/@types/node/querystring.d.ts","./node_modules/@types/node/readline.d.ts","./node_modules/@types/node/readline/promises.d.ts","./node_modules/@types/node/repl.d.ts","./node_modules/@types/node/sea.d.ts","./node_modules/@types/node/stream.d.ts","./node_modules/@types/node/stream/promises.d.ts","./node_modules/@types/node/stream/consumers.d.ts","./node_modules/@types/node/stream/web.d.ts","./node_modules/@types/node/string_decoder.d.ts","./node_modules/@types/node/test.d.ts","./node_modules/@types/node/timers.d.ts","./node_modules/@types/node/timers/promises.d.ts","./node_modules/@types/node/tls.d.ts","./node_modules/@types/node/trace_events.d.ts","./node_modules/@types/node/tty.d.ts","./node_modules/@types/node/url.d.ts","./node_modules/@types/node/util.d.ts","./node_modules/@types/node/v8.d.ts","./node_modules/@types/node/vm.d.ts","./node_modules/@types/node/wasi.d.ts","./node_modules/@types/node/worker_threads.d.ts","./node_modules/@types/node/zlib.d.ts","./node_modules/@types/node/index.d.ts","./node_modules/next/dist/server/get-page-files.d.ts","./node_modules/@types/react/canary.d.ts","./node_modules/@types/react/experimental.d.ts","./node_modules/@types/react-dom/index.d.ts","./node_modules/@types/react-dom/canary.d.ts","./node_modules/@types/react-dom/experimental.d.ts","./node_modules/next/dist/compiled/webpack/webpack.d.ts","./node_modules/next/dist/server/config.d.ts","./node_modules/next/dist/lib/load-custom-routes.d.ts","./node_modules/next/dist/shared/lib/image-config.d.ts","./node_modules/next/dist/build/webpack/plugins/subresource-integrity-plugin.d.ts","./node_modules/next/dist/server/body-streams.d.ts","./node_modules/next/dist/server/future/route-kind.d.ts","./node_modules/next/dist/server/future/route-definitions/route-definition.d.ts","./node_modules/next/dist/server/future/route-matches/route-match.d.ts","./node_modules/next/dist/client/components/app-router-headers.d.ts","./node_modules/next/dist/server/request-meta.d.ts","./node_modules/next/dist/server/config-shared.d.ts","./node_modules/next/dist/server/base-http/index.d.ts","./node_modules/next/dist/server/api-utils/index.d.ts","./node_modules/next/dist/server/node-environment.d.ts","./node_modules/next/dist/server/require-hook.d.ts","./node_modules/next/dist/server/node-polyfill-crypto.d.ts","./node_modules/next/dist/build/analysis/get-page-static-info.d.ts","./node_modules/next/dist/build/webpack/loaders/get-module-build-info.d.ts","./node_modules/next/dist/build/webpack/plugins/middleware-plugin.d.ts","./node_modules/next/dist/server/lib/revalidate.d.ts","./node_modules/next/dist/lib/setup-exception-listeners.d.ts","./node_modules/next/dist/build/index.d.ts","./node_modules/next/dist/server/response-cache/types.d.ts","./node_modules/next/dist/server/response-cache/index.d.ts","./node_modules/next/dist/server/lib/incremental-cache/index.d.ts","./node_modules/next/dist/client/components/hooks-server-context.d.ts","./node_modules/next/dist/client/components/static-generation-async-storage.external.d.ts","./node_modules/next/dist/server/render-result.d.ts","./node_modules/next/dist/server/future/helpers/i18n-provider.d.ts","./node_modules/next/dist/server/web/next-url.d.ts","./node_modules/next/dist/compiled/@edge-runtime/cookies/index.d.ts","./node_modules/next/dist/server/web/spec-extension/cookies.d.ts","./node_modules/next/dist/server/web/spec-extension/request.d.ts","./node_modules/next/dist/server/web/spec-extension/fetch-event.d.ts","./node_modules/next/dist/server/web/spec-extension/response.d.ts","./node_modules/next/dist/server/web/types.d.ts","./node_modules/next/dist/build/webpack/plugins/pages-manifest-plugin.d.ts","./node_modules/next/dist/shared/lib/router/utils/route-regex.d.ts","./node_modules/next/dist/shared/lib/router/utils/route-matcher.d.ts","./node_modules/next/dist/shared/lib/router/utils/parse-url.d.ts","./node_modules/next/dist/server/base-http/node.d.ts","./node_modules/next/dist/server/font-utils.d.ts","./node_modules/next/dist/build/webpack/plugins/flight-manifest-plugin.d.ts","./node_modules/next/dist/server/future/route-modules/route-module.d.ts","./node_modules/next/dist/server/load-components.d.ts","./node_modules/next/dist/shared/lib/router/utils/middleware-route-matcher.d.ts","./node_modules/next/dist/build/webpack/plugins/next-font-manifest-plugin.d.ts","./node_modules/next/dist/server/future/route-definitions/locale-route-definition.d.ts","./node_modules/next/dist/server/future/route-definitions/pages-route-definition.d.ts","./node_modules/next/dist/shared/lib/mitt.d.ts","./node_modules/next/dist/client/with-router.d.ts","./node_modules/next/dist/client/router.d.ts","./node_modules/next/dist/client/route-loader.d.ts","./node_modules/next/dist/client/page-loader.d.ts","./node_modules/next/dist/shared/lib/bloom-filter.d.ts","./node_modules/next/dist/shared/lib/router/router.d.ts","./node_modules/next/dist/shared/lib/router-context.shared-runtime.d.ts","./node_modules/next/dist/shared/lib/loadable-context.shared-runtime.d.ts","./node_modules/next/dist/shared/lib/loadable.shared-runtime.d.ts","./node_modules/next/dist/shared/lib/image-config-context.shared-runtime.d.ts","./node_modules/next/dist/shared/lib/hooks-client-context.shared-runtime.d.ts","./node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.d.ts","./node_modules/next/dist/server/future/route-definitions/app-page-route-definition.d.ts","./node_modules/next/dist/shared/lib/modern-browserslist-target.d.ts","./node_modules/next/dist/shared/lib/constants.d.ts","./node_modules/next/dist/build/webpack/loaders/metadata/types.d.ts","./node_modules/next/dist/build/webpack/loaders/next-app-loader.d.ts","./node_modules/next/dist/server/lib/app-dir-module.d.ts","./node_modules/next/dist/server/web/spec-extension/adapters/request-cookies.d.ts","./node_modules/next/dist/server/async-storage/draft-mode-provider.d.ts","./node_modules/next/dist/server/web/spec-extension/adapters/headers.d.ts","./node_modules/next/dist/client/components/request-async-storage.external.d.ts","./node_modules/next/dist/server/app-render/create-error-handler.d.ts","./node_modules/next/dist/server/app-render/app-render.d.ts","./node_modules/next/dist/shared/lib/server-inserted-html.shared-runtime.d.ts","./node_modules/next/dist/shared/lib/amp-context.shared-runtime.d.ts","./node_modules/next/dist/server/future/route-modules/app-page/vendored/contexts/entrypoints.d.ts","./node_modules/next/dist/server/future/route-modules/app-page/module.compiled.d.ts","./node_modules/next/dist/client/components/error-boundary.d.ts","./node_modules/next/dist/client/components/router-reducer/create-initial-router-state.d.ts","./node_modules/next/dist/client/components/app-router.d.ts","./node_modules/next/dist/client/components/layout-router.d.ts","./node_modules/next/dist/client/components/render-from-template-context.d.ts","./node_modules/next/dist/client/components/action-async-storage.external.d.ts","./node_modules/next/dist/client/components/static-generation-bailout.d.ts","./node_modules/next/dist/client/components/static-generation-searchparams-bailout-provider.d.ts","./node_modules/next/dist/client/components/searchparams-bailout-proxy.d.ts","./node_modules/next/dist/server/app-render/rsc/preloads.d.ts","./node_modules/next/dist/server/app-render/rsc/taint.d.ts","./node_modules/next/dist/client/components/not-found-boundary.d.ts","./node_modules/next/dist/server/app-render/entry-base.d.ts","./node_modules/next/dist/build/templates/app-page.d.ts","./node_modules/next/dist/server/future/route-modules/app-page/module.d.ts","./node_modules/next/dist/server/app-render/types.d.ts","./node_modules/next/dist/client/components/router-reducer/fetch-server-response.d.ts","./node_modules/next/dist/client/components/router-reducer/router-reducer-types.d.ts","./node_modules/next/dist/shared/lib/app-router-context.shared-runtime.d.ts","./node_modules/next/dist/server/future/route-modules/pages/vendored/contexts/entrypoints.d.ts","./node_modules/next/dist/server/future/route-modules/pages/module.compiled.d.ts","./node_modules/next/dist/build/templates/pages.d.ts","./node_modules/next/dist/server/future/route-modules/pages/module.d.ts","./node_modules/next/dist/server/render.d.ts","./node_modules/next/dist/server/future/route-definitions/pages-api-route-definition.d.ts","./node_modules/next/dist/server/future/route-matches/pages-api-route-match.d.ts","./node_modules/next/dist/server/future/route-matchers/route-matcher.d.ts","./node_modules/next/dist/server/future/route-matcher-providers/route-matcher-provider.d.ts","./node_modules/next/dist/server/future/route-matcher-managers/route-matcher-manager.d.ts","./node_modules/next/dist/server/future/normalizers/normalizer.d.ts","./node_modules/next/dist/server/future/normalizers/locale-route-normalizer.d.ts","./node_modules/next/dist/server/future/normalizers/request/rsc.d.ts","./node_modules/next/dist/server/future/normalizers/request/postponed.d.ts","./node_modules/next/dist/server/base-server.d.ts","./node_modules/next/dist/server/image-optimizer.d.ts","./node_modules/next/dist/server/next-server.d.ts","./node_modules/next/dist/lib/coalesced-function.d.ts","./node_modules/next/dist/trace/shared.d.ts","./node_modules/next/dist/trace/trace.d.ts","./node_modules/next/dist/trace/index.d.ts","./node_modules/next/dist/build/webpack-config.d.ts","./node_modules/next/dist/build/webpack/plugins/define-env-plugin.d.ts","./node_modules/next/dist/build/swc/index.d.ts","./node_modules/next/dist/server/dev/parse-version-info.d.ts","./node_modules/next/dist/server/dev/hot-reloader-types.d.ts","./node_modules/next/dist/telemetry/storage.d.ts","./node_modules/next/dist/server/lib/types.d.ts","./node_modules/next/dist/server/lib/router-utils/types.d.ts","./node_modules/next/dist/server/lib/render-server.d.ts","./node_modules/next/dist/server/lib/router-server.d.ts","./node_modules/next/dist/shared/lib/router/utils/path-match.d.ts","./node_modules/next/dist/server/lib/router-utils/filesystem.d.ts","./node_modules/next/dist/server/lib/router-utils/setup-dev-bundler.d.ts","./node_modules/next/dist/server/lib/dev-bundler-service.d.ts","./node_modules/next/dist/server/dev/static-paths-worker.d.ts","./node_modules/next/dist/server/dev/next-dev-server.d.ts","./node_modules/next/dist/server/next.d.ts","./node_modules/next/dist/lib/metadata/types/alternative-urls-types.d.ts","./node_modules/next/dist/lib/metadata/types/extra-types.d.ts","./node_modules/next/dist/lib/metadata/types/metadata-types.d.ts","./node_modules/next/dist/lib/metadata/types/manifest-types.d.ts","./node_modules/next/dist/lib/metadata/types/opengraph-types.d.ts","./node_modules/next/dist/lib/metadata/types/twitter-types.d.ts","./node_modules/next/dist/lib/metadata/types/metadata-interface.d.ts","./node_modules/next/types/index.d.ts","./node_modules/next/dist/shared/lib/html-context.shared-runtime.d.ts","./node_modules/@next/env/dist/index.d.ts","./node_modules/next/dist/shared/lib/utils.d.ts","./node_modules/next/dist/pages/_app.d.ts","./node_modules/next/app.d.ts","./node_modules/next/dist/server/web/spec-extension/unstable-cache.d.ts","./node_modules/next/dist/server/web/spec-extension/revalidate-path.d.ts","./node_modules/next/dist/server/web/spec-extension/revalidate-tag.d.ts","./node_modules/next/dist/server/web/spec-extension/unstable-no-store.d.ts","./node_modules/next/cache.d.ts","./node_modules/next/dist/shared/lib/runtime-config.external.d.ts","./node_modules/next/config.d.ts","./node_modules/next/dist/pages/_document.d.ts","./node_modules/next/document.d.ts","./node_modules/next/dist/shared/lib/dynamic.d.ts","./node_modules/next/dynamic.d.ts","./node_modules/next/dist/pages/_error.d.ts","./node_modules/next/error.d.ts","./node_modules/next/dist/shared/lib/head.d.ts","./node_modules/next/head.d.ts","./node_modules/next/dist/shared/lib/get-img-props.d.ts","./node_modules/next/dist/client/image-component.d.ts","./node_modules/next/dist/shared/lib/image-external.d.ts","./node_modules/next/image.d.ts","./node_modules/next/dist/client/link.d.ts","./node_modules/next/link.d.ts","./node_modules/next/dist/client/components/redirect.d.ts","./node_modules/next/dist/client/components/not-found.d.ts","./node_modules/next/dist/client/components/navigation.d.ts","./node_modules/next/navigation.d.ts","./node_modules/next/router.d.ts","./node_modules/next/dist/client/script.d.ts","./node_modules/next/script.d.ts","./node_modules/next/dist/server/web/spec-extension/user-agent.d.ts","./node_modules/next/dist/compiled/@edge-runtime/primitives/url.d.ts","./node_modules/next/dist/server/web/spec-extension/image-response.d.ts","./node_modules/next/dist/compiled/@vercel/og/satori/index.d.ts","./node_modules/next/dist/compiled/@vercel/og/emoji/index.d.ts","./node_modules/next/dist/compiled/@vercel/og/types.d.ts","./node_modules/next/server.d.ts","./node_modules/next/types/global.d.ts","./node_modules/next/types/compiled.d.ts","./node_modules/next/index.d.ts","./node_modules/next/image-types/global.d.ts","./next-env.d.ts","./app/layout.tsx","./.next/types/app/layout.ts","./app/page.tsx","./.next/types/app/page.ts","./app/register/page.tsx","./.next/types/app/register/page.ts","./app/student/chat/page.tsx","./.next/types/app/student/chat/page.ts","./app/student/dashboard/page.tsx","./.next/types/app/student/dashboard/page.ts","./node_modules/monaco-editor/esm/vs/editor/editor.api.d.ts","./node_modules/@monaco-editor/loader/lib/types.d.ts","./node_modules/monaco-editor/esm/vs/editor/editor.main.d.ts","./node_modules/@monaco-editor/react/dist/index.d.ts","./app/student/learn/page.tsx","./.next/types/app/student/learn/page.ts","./app/student/progress/page.tsx","./.next/types/app/student/progress/page.ts","./app/student/quiz/page.tsx","./.next/types/app/student/quiz/page.ts","./app/teacher/dashboard/page.tsx","./.next/types/app/teacher/dashboard/page.ts","./node_modules/@types/json5/index.d.ts","./node_modules/@types/trusted-types/lib/index.d.ts","./node_modules/@types/trusted-types/index.d.ts"],"fileIdsList":[[99,145,342,389],[99,145,342,391],[99,145,342,393],[99,145,342,395],[99,145,342,397],[99,145,342,403],[99,145,342,405],[99,145,342,407],[99,145,342,409],[99,145,386],[87,99,145,369,373],[87,99,145,359,402],[99,145,386,387],[99,145,399],[87,99,145,399,400,401],[99,145],[99,142,145],[99,144,145],[145],[99,145,150,178],[99,145,146,151,156,164,175,186],[99,145,146,147,156,164],[94,95,96,99,145],[99,145,148,187],[99,145,149,150,157,165],[99,145,150,175,183],[99,145,151,153,156,164],[99,144,145,152],[99,145,153,154],[99,145,155,156],[99,144,145,156],[99,145,156,157,158,175,186],[99,145,156,157,158,171,175,178],[99,145,153,156,159,164,175,186],[99,145,156,157,159,160,164,175,183,186],[99,145,159,161,175,183,186],[97,98,99,100,101,102,103,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192],[99,145,156,162],[99,145,163,186,191],[99,145,153,156,164,175],[99,145,165],[99,145,166],[99,144,145,167],[99,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192],[99,145,169],[99,145,170],[99,145,156,171,172],[99,145,171,173,187,189],[99,145,156,175,176,178],[99,145,177,178],[99,145,175,176],[99,145,178],[99,145,179],[99,142,145,175,180],[99,145,156,181,182],[99,145,181,182],[99,145,150,164,175,183],[99,145,184],[99,145,164,185],[99,145,159,170,186],[99,145,150,187],[99,145,175,188],[99,145,163,189],[99,145,190],[99,140,145],[99,140,145,156,158,167,175,178,186,189,191],[99,145,175,192],[87,99,145,197,198,199],[87,99,145,197,198],[87,99,145],[87,91,99,145,196,343,382],[87,91,99,145,195,343,382],[84,85,86,99,145],[99,145,412],[92,99,145],[99,145,347],[99,145,349,350,351,352],[99,145,354],[99,145,202,211,218,343],[99,145,202,209,213,220],[99,145,211,320],[99,145,268,278,291,385],[99,145,299],[99,145,202,211,217,255,265,318,385],[99,145,217,385],[99,145,211,265,266,385],[99,145,211,217,255,385],[99,145,385],[99,145,217,218,385],[99,144,145,193],[87,99,145,279,280,296],[87,99,145,196],[87,99,145,279,294],[99,145,275,297,370,371],[99,145,232],[99,144,145,193,232,269,270,271],[87,99,145,294,297],[99,145,294,296],[87,99,145,294,295,297],[99,144,145,193,212,225,226],[87,99,145,203,364],[87,99,145,186,193],[87,99,145,217,253],[87,99,145,217],[99,145,251,256],[87,99,145,252,346],[87,91,99,145,159,193,195,196,343,380,381],[99,145,201],[99,145,336,337,338,339,340,341],[99,145,338],[87,99,145,344,346],[87,99,145,346],[99,145,159,193,212,346],[99,145,159,193,210,227,228,243,272,273,293,294],[99,145,226,227,272,281,282,283,284,285,286,287,288,289,290,385],[87,99,145,170,193,211,225,243,245,247,293,343,385],[99,145,159,193,212,213,232,233,269],[99,145,159,193,211,213],[99,145,159,175,193,210,212,213],[99,145,159,170,186,193,201,203,210,211,212,213,217,220,222,224,225,228,229,237,239,242,243,245,246,247,294,302,304,307,309,310,311,343],[99,145,159,175,193],[99,145,202,203,204,210,343,346,385],[99,145,211],[99,145,159,175,186,193,207,319,321,322,385],[99,145,170,186,193,207,210,212,225,236,237,239,240,241,245,307,312,314,332,333],[99,145,211,215,225],[99,145,210,211],[99,145,229,308],[99,145,308],[99,145,206,207],[99,145,206,248],[99,145,206],[99,145,208,229,306],[99,145,305],[99,145,207,208],[99,145,208,303],[99,145,207],[99,145,293],[99,145,159,193,210,228,244,263,268,274,277,292,294],[99,145,257,258,259,260,261,262,275,276,297,344],[99,145,301],[99,145,159,193,210,228,244,249,298,300,302,343,346],[99,145,159,186,193,203,210,211,224],[99,145,267],[99,145,159,193,325,331],[99,145,222,224,346],[99,145,326,332,335],[99,145,159,215,325,327],[99,145,202,211,222,246,329],[99,145,159,193,211,217,246,315,323,324,328,329,330],[99,145,194,243,244,343,346],[99,145,159,170,186,193,208,210,212,215,219,220,222,224,225,228,236,237,239,240,241,242,245,304,312,313,346],[99,145,159,193,210,211,215,314,334],[99,145,159,193,220,227],[87,99,145,159,170,193,201,203,210,213,228,242,243,245,247,301,343,346],[99,145,159,170,186,193,205,208,209,212],[99,145,223],[99,145,159,193,220,228],[99,145,159,193,211,229],[99,145,159,193],[99,145,231],[99,145,233],[99,145,211,230,232,236],[99,145,211,230,232],[99,145,159,193,205,211,212,233,234,235],[87,99,145,294,295,296],[99,145,264],[87,99,145,203],[87,99,145,239],[87,99,145,194,242,247,343,346],[99,145,203,364,365],[87,99,145,256],[87,99,145,170,186,193,201,250,252,254,255,346],[99,145,212,217,239],[99,145,170,193],[99,145,238],[87,99,145,157,159,170,193,201,256,265,343,344,345],[83,87,88,89,90,99,145,195,196,343,382],[99,145,150],[99,145,316,317],[99,145,316],[99,145,356],[99,145,358],[99,145,360],[99,145,362],[99,145,366],[91,93,99,145,343,348,353,355,357,359,361,363,367,369,373,374,376,383,384,385],[99,145,368],[99,145,372],[99,145,252],[99,145,375],[99,144,145,233,234,235,236,377,378,379,382],[99,145,193],[87,91,99,145,159,161,170,193,195,196,197,199,201,213,335,342,346,382],[99,112,116,145,186],[99,112,145,175,186],[99,107,145],[99,109,112,145,183,186],[99,145,164,183],[99,107,145,193],[99,109,112,145,164,186],[99,104,105,108,111,145,156,175,186],[99,112,119,145],[99,104,110,145],[99,112,133,134,145],[99,108,112,145,178,186,193],[99,133,145,193],[99,106,107,145,193],[99,112,145],[99,106,107,108,109,110,111,112,113,114,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,134,135,136,137,138,139,145],[99,112,127,145],[99,112,119,120,145],[99,110,112,120,121,145],[99,111,145],[99,104,107,112,145],[99,112,116,120,121,145],[99,116,145],[99,110,112,115,145,186],[99,104,109,112,119,145],[99,145,175],[99,107,112,133,145,191,193]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"8fd575e12870e9944c7e1d62e1f5a73fcf23dd8d3a321f2a2c74c20d022283fe","impliedFormat":1},{"version":"2ab096661c711e4a81cc464fa1e6feb929a54f5340b46b0a07ac6bbf857471f0","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2e80ee7a49e8ac312cc11b77f1475804bee36b3b2bc896bead8b6e1266befb43","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"df83c2a6c73228b625b0beb6669c7ee2a09c914637e2d35170723ad49c0f5cd4","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"87dc0f382502f5bbce5129bdc0aea21e19a3abbc19259e0b43ae038a9fc4e326","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ece9f17b3866cc077099c73f4983bddbcb1dc7ddb943227f1ec070f529dedd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"1c9319a09485199c1f7b0498f2988d6d2249793ef67edda49d1e584746be9032","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3a2a0cee0f03ffdde24d89660eba2685bfbdeae955a6c67e8c4c9fd28928eeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"60037901da1a425516449b9a20073aa03386cce92f7a1fd902d7602be3a7c2e9","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"22adec94ef7047a6c9d1af3cb96be87a335908bf9ef386ae9fd50eeb37f44c47","affectsGlobalScope":true,"impliedFormat":1},{"version":"196cb558a13d4533a5163286f30b0509ce0210e4b316c56c38d4c0fd2fb38405","affectsGlobalScope":true,"impliedFormat":1},{"version":"73f78680d4c08509933daf80947902f6ff41b6230f94dd002ae372620adb0f60","affectsGlobalScope":true,"impliedFormat":1},{"version":"c5239f5c01bcfa9cd32f37c496cf19c61d69d37e48be9de612b541aac915805b","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"0990a7576222f248f0a3b888adcb7389f957928ce2afb1cd5128169086ff4d29","impliedFormat":1},{"version":"eb5b19b86227ace1d29ea4cf81387279d04bb34051e944bc53df69f58914b788","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac51dd7d31333793807a6abaa5ae168512b6131bd41d9c5b98477fc3b7800f9f","impliedFormat":1},{"version":"87d9d29dbc745f182683f63187bf3d53fd8673e5fca38ad5eaab69798ed29fbc","impliedFormat":1},{"version":"7a3aa194cfd5919c4da251ef04ea051077e22702638d4edcb9579e9101653519","affectsGlobalScope":true,"impliedFormat":1},{"version":"cc69795d9954ee4ad57545b10c7bf1a7260d990231b1685c147ea71a6faa265c","impliedFormat":1},{"version":"8bc6c94ff4f2af1f4023b7bb2379b08d3d7dd80c698c9f0b07431ea16101f05f","impliedFormat":1},{"version":"1b61d259de5350f8b1e5db06290d31eaebebc6baafd5f79d314b5af9256d7153","impliedFormat":1},{"version":"57194e1f007f3f2cbef26fa299d4c6b21f4623a2eddc63dfeef79e38e187a36e","impliedFormat":1},{"version":"0f6666b58e9276ac3a38fdc80993d19208442d6027ab885580d93aec76b4ef00","impliedFormat":1},{"version":"05fd364b8ef02fb1e174fbac8b825bdb1e5a36a016997c8e421f5fab0a6da0a0","impliedFormat":1},{"version":"70521b6ab0dcba37539e5303104f29b721bfb2940b2776da4cc818c07e1fefc1","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true,"impliedFormat":1},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"98cffbf06d6bab333473c70a893770dbe990783904002c4f1a960447b4b53dca","affectsGlobalScope":true,"impliedFormat":1},{"version":"ba481bca06f37d3f2c137ce343c7d5937029b2468f8e26111f3c9d9963d6568d","affectsGlobalScope":true,"impliedFormat":1},{"version":"6d9ef24f9a22a88e3e9b3b3d8c40ab1ddb0853f1bfbd5c843c37800138437b61","affectsGlobalScope":true,"impliedFormat":1},{"version":"1db0b7dca579049ca4193d034d835f6bfe73096c73663e5ef9a0b5779939f3d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"9798340ffb0d067d69b1ae5b32faa17ab31b82466a3fc00d8f2f2df0c8554aaa","affectsGlobalScope":true,"impliedFormat":1},{"version":"f26b11d8d8e4b8028f1c7d618b22274c892e4b0ef5b3678a8ccbad85419aef43","affectsGlobalScope":true,"impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"763fe0f42b3d79b440a9b6e51e9ba3f3f91352469c1e4b3b67bfa4ff6352f3f4","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"7f182617db458e98fc18dfb272d40aa2fff3a353c44a89b2c0ccb3937709bfb5","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"e61be3f894b41b7baa1fbd6a66893f2579bfad01d208b4ff61daef21493ef0a8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"615ba88d0128ed16bf83ef8ccbb6aff05c3ee2db1cc0f89ab50a4939bfc1943f","impliedFormat":1},{"version":"a4d551dbf8746780194d550c88f26cf937caf8d56f102969a110cfaed4b06656","impliedFormat":1},{"version":"8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","impliedFormat":1},{"version":"317e63deeb21ac07f3992f5b50cdca8338f10acd4fbb7257ebf56735bf52ab00","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"2cbe0621042e2a68c7cbce5dfed3906a1862a16a7d496010636cdbdb91341c0f","affectsGlobalScope":true,"impliedFormat":1},{"version":"e2677634fe27e87348825bb041651e22d50a613e2fdf6a4a3ade971d71bac37e","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"8c0bcd6c6b67b4b503c11e91a1fb91522ed585900eab2ab1f61bba7d7caa9d6f","impliedFormat":1},{"version":"8cd19276b6590b3ebbeeb030ac271871b9ed0afc3074ac88a94ed2449174b776","affectsGlobalScope":true,"impliedFormat":1},{"version":"696eb8d28f5949b87d894b26dc97318ef944c794a9a4e4f62360cd1d1958014b","impliedFormat":1},{"version":"3f8fa3061bd7402970b399300880d55257953ee6d3cd408722cb9ac20126460c","impliedFormat":1},{"version":"35ec8b6760fd7138bbf5809b84551e31028fb2ba7b6dc91d95d098bf212ca8b4","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"68bd56c92c2bd7d2339457eb84d63e7de3bd56a69b25f3576e1568d21a162398","affectsGlobalScope":true,"impliedFormat":1},{"version":"3e93b123f7c2944969d291b35fed2af79a6e9e27fdd5faa99748a51c07c02d28","impliedFormat":1},{"version":"9d19808c8c291a9010a6c788e8532a2da70f811adb431c97520803e0ec649991","impliedFormat":1},{"version":"87aad3dd9752067dc875cfaa466fc44246451c0c560b820796bdd528e29bef40","impliedFormat":1},{"version":"4aacb0dd020eeaef65426153686cc639a78ec2885dc72ad220be1d25f1a439df","impliedFormat":1},{"version":"f0bd7e6d931657b59605c44112eaf8b980ba7f957a5051ed21cb93d978cf2f45","impliedFormat":1},{"version":"8db0ae9cb14d9955b14c214f34dae1b9ef2baee2fe4ce794a4cd3ac2531e3255","affectsGlobalScope":true,"impliedFormat":1},{"version":"15fc6f7512c86810273af28f224251a5a879e4261b4d4c7e532abfbfc3983134","impliedFormat":1},{"version":"58adba1a8ab2d10b54dc1dced4e41f4e7c9772cbbac40939c0dc8ce2cdb1d442","impliedFormat":1},{"version":"2fd4c143eff88dabb57701e6a40e02a4dbc36d5eb1362e7964d32028056a782b","impliedFormat":1},{"version":"714435130b9015fae551788df2a88038471a5a11eb471f27c4ede86552842bc9","impliedFormat":1},{"version":"855cd5f7eb396f5f1ab1bc0f8580339bff77b68a770f84c6b254e319bbfd1ac7","impliedFormat":1},{"version":"5650cf3dace09e7c25d384e3e6b818b938f68f4e8de96f52d9c5a1b3db068e86","impliedFormat":1},{"version":"1354ca5c38bd3fd3836a68e0f7c9f91f172582ba30ab15bb8c075891b91502b7","affectsGlobalScope":true,"impliedFormat":1},{"version":"27fdb0da0daf3b337c5530c5f266efe046a6ceb606e395b346974e4360c36419","impliedFormat":1},{"version":"2d2fcaab481b31a5882065c7951255703ddbe1c0e507af56ea42d79ac3911201","impliedFormat":1},{"version":"a192fe8ec33f75edbc8d8f3ed79f768dfae11ff5735e7fe52bfa69956e46d78d","impliedFormat":1},{"version":"ca867399f7db82df981d6915bcbb2d81131d7d1ef683bc782b59f71dda59bc85","affectsGlobalScope":true,"impliedFormat":1},{"version":"0e456fd5b101271183d99a9087875a282323e3a3ff0d7bcf1881537eaa8b8e63","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e043a1bc8fbf2a255bccf9bf27e0f1caf916c3b0518ea34aa72357c0afd42ec","impliedFormat":1},{"version":"b4f70ec656a11d570e1a9edce07d118cd58d9760239e2ece99306ee9dfe61d02","impliedFormat":1},{"version":"3bc2f1e2c95c04048212c569ed38e338873f6a8593930cf5a7ef24ffb38fc3b6","impliedFormat":1},{"version":"6e70e9570e98aae2b825b533aa6292b6abd542e8d9f6e9475e88e1d7ba17c866","impliedFormat":1},{"version":"f9d9d753d430ed050dc1bf2667a1bab711ccbb1c1507183d794cc195a5b085cc","impliedFormat":1},{"version":"9eece5e586312581ccd106d4853e861aaaa1a39f8e3ea672b8c3847eedd12f6e","impliedFormat":1},{"version":"47ab634529c5955b6ad793474ae188fce3e6163e3a3fb5edd7e0e48f14435333","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"45650f47bfb376c8a8ed39d4bcda5902ab899a3150029684ee4c10676d9fbaee","impliedFormat":1},{"version":"0225ecb9ed86bdb7a2c7fd01f1556906902929377b44483dc4b83e03b3ef227d","affectsGlobalScope":true,"impliedFormat":1},{"version":"74cf591a0f63db318651e0e04cb55f8791385f86e987a67fd4d2eaab8191f730","impliedFormat":1},{"version":"5eab9b3dc9b34f185417342436ec3f106898da5f4801992d8ff38ab3aff346b5","impliedFormat":1},{"version":"12ed4559eba17cd977aa0db658d25c4047067444b51acfdcbf38470630642b23","affectsGlobalScope":true,"impliedFormat":1},{"version":"f3ffabc95802521e1e4bcba4c88d8615176dc6e09111d920c7a213bdda6e1d65","impliedFormat":1},{"version":"ddc734b4fae82a01d247e9e342d020976640b5e93b4e9b3a1e30e5518883a060","impliedFormat":1},{"version":"ae56f65caf3be91108707bd8dfbccc2a57a91feb5daabf7165a06a945545ed26","impliedFormat":1},{"version":"a136d5de521da20f31631a0a96bf712370779d1c05b7015d7019a9b2a0446ca9","impliedFormat":1},{"version":"c3b41e74b9a84b88b1dca61ec39eee25c0dbc8e7d519ba11bb070918cfacf656","affectsGlobalScope":true,"impliedFormat":1},{"version":"4737a9dc24d0e68b734e6cfbcea0c15a2cfafeb493485e27905f7856988c6b29","affectsGlobalScope":true,"impliedFormat":1},{"version":"36d8d3e7506b631c9582c251a2c0b8a28855af3f76719b12b534c6edf952748d","impliedFormat":1},{"version":"1ca69210cc42729e7ca97d3a9ad48f2e9cb0042bada4075b588ae5387debd318","impliedFormat":1},{"version":"f5ebe66baaf7c552cfa59d75f2bfba679f329204847db3cec385acda245e574e","impliedFormat":1},{"version":"ed59add13139f84da271cafd32e2171876b0a0af2f798d0c663e8eeb867732cf","affectsGlobalScope":true,"impliedFormat":1},{"version":"05db535df8bdc30d9116fe754a3473d1b6479afbc14ae8eb18b605c62677d518","impliedFormat":1},{"version":"b1810689b76fd473bd12cc9ee219f8e62f54a7d08019a235d07424afbf074d25","impliedFormat":1},{"version":"8caa5c86be1b793cd5f599e27ecb34252c41e011980f7d61ae4989a149ff6ccc","impliedFormat":1},{"version":"91b0f6d01993021ecbe01eb076db6a3cf1b66359c1d99104f43436010e81afb5","impliedFormat":1},{"version":"d1bd4e51810d159899aad1660ccb859da54e27e08b8c9862b40cd36c1d9ff00f","impliedFormat":1},{"version":"17ed71200119e86ccef2d96b73b02ce8854b76ad6bd21b5021d4269bec527b5f","impliedFormat":1},{"version":"1cfa8647d7d71cb03847d616bd79320abfc01ddea082a49569fda71ac5ece66b","impliedFormat":1},{"version":"bb7a61dd55dc4b9422d13da3a6bb9cc5e89be888ef23bbcf6558aa9726b89a1c","impliedFormat":1},{"version":"db6d2d9daad8a6d83f281af12ce4355a20b9a3e71b82b9f57cddcca0a8964a96","impliedFormat":1},{"version":"cfe4ef4710c3786b6e23dae7c086c70b4f4835a2e4d77b75d39f9046106e83d3","impliedFormat":1},{"version":"cbea99888785d49bb630dcbb1613c73727f2b5a2cf02e1abcaab7bcf8d6bf3c5","impliedFormat":1},{"version":"3b8f725c3d5ffb64bf876c87409686875102c6f7450b268d8f5188b6920f7c25","impliedFormat":1},{"version":"a86f82d646a739041d6702101afa82dcb935c416dd93cbca7fd754fd0282ce1f","impliedFormat":1},{"version":"2dad084c67e649f0f354739ec7df7c7df0779a28a4f55c97c6b6883ae850d1ce","impliedFormat":1},{"version":"fa5bbc7ab4130dd8cdc55ea294ec39f76f2bc507a0f75f4f873e38631a836ca7","impliedFormat":1},{"version":"df45ca1176e6ac211eae7ddf51336dc075c5314bc5c253651bae639defd5eec5","impliedFormat":1},{"version":"cf86de1054b843e484a3c9300d62fbc8c97e77f168bbffb131d560ca0474d4a8","impliedFormat":1},{"version":"37f7b8e560025858aae5195ca74a3e95ecd55591e2babc0acd57bc1dab4ea8ea","impliedFormat":1},{"version":"e2d5483c9a79900ba9d6012135f18b662b3ca1d33fde4f5e39b71f74e47d6331","impliedFormat":1},{"version":"22b9fab85e85b95f6378b5a2bd43c9d2e15106d760e0e58111c416fe224cc76f","impliedFormat":1},{"version":"fc46f093d1b754a8e3e34a071a1dd402f42003927676757a9a10c6f1d195a35b","impliedFormat":1},{"version":"b7b3258e8d47333721f9d4c287361d773f8fa88e52d1148812485d9fc06d2577","impliedFormat":1},{"version":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","impliedFormat":1},{"version":"49e567e0aa388ab416eeb7a7de9bce5045a7b628bad18d1f6fa9d3eacee7bc3f","impliedFormat":1},{"version":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","impliedFormat":1},{"version":"87eaecac33864ecec8972b1773c5d897f0f589deb7ac8fe0dcdf4b721b06e28d","impliedFormat":1},{"version":"47e5af2a841356a961f815e7c55d72554db0c11b4cba4d0caab91f8717846a94","impliedFormat":1},{"version":"4c91cc1ab59b55d880877ccf1999ded0bb2ebc8e3a597c622962d65bf0e76be8","impliedFormat":1},{"version":"fa1ea09d3e073252eccff2f6630a4ce5633cc2ff963ba672dd8fd6783108ea83","impliedFormat":1},{"version":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","impliedFormat":1},{"version":"309816cd6e597f4d4b080bc5e36215c6b78196f744d578adf61589bee5fd7eea","impliedFormat":1},{"version":"bdb44eca306ff5b62bcf2b4e70e96a40987e018029d95565e2f234aad80830cf","impliedFormat":1},{"version":"edaa0bbf2891b17f904a67aef7f9d53371c993fe3ff6dec708c2aff6083b01af","impliedFormat":1},{"version":"89aece12f9cd6d736ae7c350800f257a2363f6322ae8f998da73153fb405d8af","impliedFormat":1},{"version":"d23518a5f155f1a3e07214baf0295687507122ae2e6e9bd5e772551ebd4b3157","impliedFormat":1},{"version":"aa9a92be255ec97f669ea89678fafcbd35d165f65b68ff22685263f6eaeb3c9c","impliedFormat":1},{"version":"fa8b514302736759e491d3df074a61f54ed1a6a69b4aadee05dbcdda53f881c3","impliedFormat":1},{"version":"e8da637cbd6ed1cf6c36e9424f6bcee4515ca2c677534d4006cbd9a05f930f0c","impliedFormat":1},{"version":"ca1b882a105a1972f82cc58e3be491e7d750a1eb074ffd13b198269f57ed9e1b","impliedFormat":1},{"version":"c9d71f340f1a4576cd2a572f73a54dc7212161fa172dfe3dea64ac627c8fcb50","impliedFormat":1},{"version":"3867ca0e9757cc41e04248574f4f07b8f9e3c0c2a796a5eb091c65bfd2fc8bdb","impliedFormat":1},{"version":"6c66f6f7d9ff019a644ff50dd013e6bf59be4bf389092948437efa6b77dc8f9a","impliedFormat":1},{"version":"4e10622f89fea7b05dd9b52fb65e1e2b5cbd96d4cca3d9e1a60bb7f8a9cb86a1","impliedFormat":1},{"version":"ef2d1bd01d144d426b72db3744e7a6b6bb518a639d5c9c8d86438fb75a3b1934","impliedFormat":1},{"version":"b9750fe7235da7d8bf75cb171bf067b7350380c74271d3f80f49aea7466b55b5","impliedFormat":1},{"version":"ac60bbee0d4235643cc52b57768b22de8c257c12bd8c2039860540cab1fa1d82","impliedFormat":1},{"version":"973b59a17aaa817eb205baf6c132b83475a5c0a44e8294a472af7793b1817e89","impliedFormat":1},{"version":"ada39cbb2748ab2873b7835c90c8d4620723aedf323550e8489f08220e477c7f","impliedFormat":1},{"version":"6e5f5cee603d67ee1ba6120815497909b73399842254fc1e77a0d5cdc51d8c9c","impliedFormat":1},{"version":"f79e0681538ef94c273a46bb1a073b4fe9fdc93ef7f40cc2c3abd683b85f51fc","impliedFormat":1},{"version":"70f3814c457f54a7efe2d9ce9d2686de9250bb42eb7f4c539bd2280a42e52d33","impliedFormat":1},{"version":"17ace83a5bea3f1da7e0aef7aab0f52bca22619e243537a83a89352a611b837d","impliedFormat":1},{"version":"ef61792acbfa8c27c9bd113f02731e66229f7d3a169e3c1993b508134f1a58e0","impliedFormat":1},{"version":"6cf2d240d4e449ccfee82aff7ce0fd1890c1b6d4f144ec003aa51f7f70f68935","impliedFormat":1},{"version":"f6404e7837b96da3ea4d38c4f1a3812c96c9dcdf264e93d5bdb199f983a3ef4b","impliedFormat":1},{"version":"c5426dbfc1cf90532f66965a7aa8c1136a78d4d0f96d8180ecbfc11d7722f1a5","impliedFormat":1},{"version":"65a15fc47900787c0bd18b603afb98d33ede930bed1798fc984d5ebb78b26cf9","impliedFormat":1},{"version":"9d202701f6e0744adb6314d03d2eb8fc994798fc83d91b691b75b07626a69801","impliedFormat":1},{"version":"de9d2df7663e64e3a91bf495f315a7577e23ba088f2949d5ce9ec96f44fba37d","impliedFormat":1},{"version":"c7af78a2ea7cb1cd009cfb5bdb48cd0b03dad3b54f6da7aab615c2e9e9d570c5","impliedFormat":1},{"version":"1dc574e42493e8bf9bb37be44d9e38c5bd7bbc04f884e5e58b4d69636cb192b3","impliedFormat":1},{"version":"9deab571c42ed535c17054f35da5b735d93dc454d83c9a5330ecc7a4fb184e9e","affectsGlobalScope":true,"impliedFormat":1},{"version":"db01d18853469bcb5601b9fc9826931cc84cc1a1944b33cad76fd6f1e3d8c544","affectsGlobalScope":true,"impliedFormat":1},{"version":"6b8e8c0331a0c2e9fb53b8b0d346e44a8db8c788dae727a2c52f4cf3bd857f0d","impliedFormat":1},{"version":"903e299a28282fa7b714586e28409ed73c3b63f5365519776bf78e8cf173db36","affectsGlobalScope":true,"impliedFormat":1},{"version":"fa6c12a7c0f6b84d512f200690bfc74819e99efae69e4c95c4cd30f6884c526e","impliedFormat":1},{"version":"f1c32f9ce9c497da4dc215c3bc84b722ea02497d35f9134db3bb40a8d918b92b","impliedFormat":1},{"version":"b73c319af2cc3ef8f6421308a250f328836531ea3761823b4cabbd133047aefa","affectsGlobalScope":true,"impliedFormat":1},{"version":"e433b0337b8106909e7953015e8fa3f2d30797cea27141d1c5b135365bb975a6","impliedFormat":1},{"version":"dd3900b24a6a8745efeb7ad27629c0f8a626470ac229c1d73f1fe29d67e44dca","impliedFormat":1},{"version":"ddff7fc6edbdc5163a09e22bf8df7bef75f75369ebd7ecea95ba55c4386e2441","impliedFormat":1},{"version":"106c6025f1d99fd468fd8bf6e5bda724e11e5905a4076c5d29790b6c3745e50c","impliedFormat":1},{"version":"ec29be0737d39268696edcec4f5e97ce26f449fa9b7afc2f0f99a86def34a418","impliedFormat":1},{"version":"8945919709e0c6069c32ca26a675a0de90fd2ad70d5bc3ba281c628729a0c39d","impliedFormat":1},{"version":"ec6cba1c02c675e4dd173251b156792e8d3b0c816af6d6ad93f1a55d674591aa","impliedFormat":1},{"version":"763ee3998716d599321e34b7f7e93a8e57bef751206325226ebf088bf75ea460","impliedFormat":1},{"version":"e15d3c84d5077bb4a3adee4c791022967b764dc41cb8fa3cfa44d4379b2c95f5","impliedFormat":1},{"version":"3556cfbab7b43da96d15a442ddbb970e1f2fc97876d055b6555d86d7ac57dae5","impliedFormat":1},{"version":"437751e0352c6e924ddf30e90849f1d9eb00ca78c94d58d6a37202ec84eb8393","impliedFormat":1},{"version":"48e8af7fdb2677a44522fd185d8c87deff4d36ee701ea003c6c780b1407a1397","impliedFormat":1},{"version":"606e6f841ba9667de5d83ca458449f0ed8c511ba635f753eaa731e532dea98c7","impliedFormat":1},{"version":"7c0d4fc71fe32cedb758c7e3c08715235a51e5a22d184306a59dae10a9c7ffaa","impliedFormat":1},{"version":"ce8a0b21e80cf5f10adc9336b46ffc666696d1373a763b170baf69a722f85d67","impliedFormat":1},{"version":"2e4f37ffe8862b14d8e24ae8763daaa8340c0df0b859d9a9733def0eee7562d9","impliedFormat":1},{"version":"13283350547389802aa35d9f2188effaeac805499169a06ef5cd77ce2a0bd63f","impliedFormat":1},{"version":"680793958f6a70a44c8d9ae7d46b7a385361c69ac29dcab3ed761edce1c14ab8","impliedFormat":1},{"version":"6ac6715916fa75a1f7ebdfeacac09513b4d904b667d827b7535e84ff59679aff","impliedFormat":1},{"version":"baeffe1b7d836196d497eb755699718deb729a2033078a018f037a14ecaeb9a7","impliedFormat":1},{"version":"39da0a8478aede3a55308089e231c5966b2196e7201494280b1e19f8ec8e24d4","impliedFormat":1},{"version":"90be1a7f573bad71331ff10deeadce25b09034d3d27011c2155bcb9cb9800b7f","impliedFormat":1},{"version":"bc7221c9a8dc71587ff784120f7707985627282dad0a99439e893a1588651ef0","impliedFormat":1},{"version":"438c7513b1df91dcef49b13cd7a1c4720f91a36e88c1df731661608b7c055f10","impliedFormat":1},{"version":"ad444a874f011d3a797f1a41579dbfcc6b246623f49c20009f60e211dbd5315e","impliedFormat":1},{"version":"1124613ba0669e7ea5fb785ede1c3f254ed1968335468b048b8fc35c172393de","impliedFormat":1},{"version":"5fa139523e35fd907f3dd6c2e38ef2066687b27ed88e2680783e05662355ac04","impliedFormat":1},{"version":"9c250db4bab4f78fad08be7f4e43e962cc143e0f78763831653549ceb477344a","impliedFormat":1},{"version":"9385cdc09850950bc9b59cca445a3ceb6fcca32b54e7b626e746912e489e535e","impliedFormat":1},{"version":"0a72186f94215d020cb386f7dca81d7495ab6c17066eb07d0f44a5bf33c1b21a","impliedFormat":1},{"version":"db7c948e2e69559324be7628cb63296ec8986d60f26173f9e324aeb8a2fe23d8","impliedFormat":1},{"version":"9c2353ef1fb353a1c8f30af2cf104f0bc64ebc2fcdb98c2834d451bd654664ab","impliedFormat":1},{"version":"63a8e96f65a22604eae82737e409d1536e69a467bb738bec505f4f97cce9d878","impliedFormat":1},{"version":"3fd78152a7031315478f159c6a5872c712ece6f01212c78ea82aef21cb0726e2","impliedFormat":1},{"version":"7fda4c0e3f50513286029633c458ee82cee563cd6af20b92e43b4425c969c146","impliedFormat":1},{"version":"cda4052f66b1e6cb7cf1fdfd96335d1627aa24a3b8b82ba4a9f873ec3a7bcde8","impliedFormat":1},{"version":"703733dde084b7e856f5940f9c3c12007ca62858accb9482c2b65e030877702d","impliedFormat":1},{"version":"413cb597cc5933562ec064bfb1c3a9164ef5d2f09e5f6b7bd19f483d5352449e","impliedFormat":1},{"version":"fd933f824347f9edd919618a76cdb6a0c0085c538115d9a287fa0c7f59957ab3","impliedFormat":1},{"version":"6ac6715916fa75a1f7ebdfeacac09513b4d904b667d827b7535e84ff59679aff","impliedFormat":1},{"version":"6a1aa3e55bdc50503956c5cd09ae4cd72e3072692d742816f65c66ca14f4dfdd","impliedFormat":1},{"version":"ab75cfd9c4f93ffd601f7ca1753d6a9d953bbedfbd7a5b3f0436ac8a1de60dfa","impliedFormat":1},{"version":"6cc79183c88040697e1552ba81c5245b0c701b965623774587c4b9d1e7497278","impliedFormat":1},{"version":"b73cbf0a72c8800cf8f96a9acfe94f3ad32ca71342a8908b8ae484d61113f647","impliedFormat":1},{"version":"bae6dd176832f6423966647382c0d7ba9e63f8c167522f09a982f086cd4e8b23","impliedFormat":1},{"version":"1364f64d2fb03bbb514edc42224abd576c064f89be6a990136774ecdd881a1da","impliedFormat":1},{"version":"c9958eb32126a3843deedda8c22fb97024aa5d6dd588b90af2d7f2bfac540f23","impliedFormat":1},{"version":"950fb67a59be4c2dbe69a5786292e60a5cb0e8612e0e223537784c731af55db1","impliedFormat":1},{"version":"e927c2c13c4eaf0a7f17e6022eee8519eb29ef42c4c13a31e81a611ab8c95577","impliedFormat":1},{"version":"07ca44e8d8288e69afdec7a31fa408ce6ab90d4f3d620006701d5544646da6aa","impliedFormat":1},{"version":"82c27d4cf380b0e6cd62628f069b850298d20051f0b7b0a1904fdb38c53fa7a6","impliedFormat":1},{"version":"c97b9278c8ce212c1bdf4fae9c77d58c15565d4ebf663d761a9deb924b6ca8b3","impliedFormat":1},{"version":"8bb6e7ce91ec84336203e87010b1198514548c2e44789752c1741eaac02f2431","impliedFormat":1},{"version":"b33ac7d8d7d1bfc8cc06c75d1ee186d21577ab2026f482e29babe32b10b26512","impliedFormat":1},{"version":"24f8f342c14c911eedfee43074c6a0d0a5ebb5ec984353bffaeadddb3f6a6b1c","impliedFormat":1},{"version":"6459054aabb306821a043e02b89d54da508e3a6966601a41e71c166e4ea1474f","impliedFormat":1},{"version":"03d4a10c21ac451b682246f3261b769247baf774c4878551c02256ae98299b1c","impliedFormat":1},{"version":"2d9b710fee8c3d7eabee626af8fd6ec2cf6f71e6b7429b307b8f67d70b1707c5","impliedFormat":1},{"version":"652a4bbefba6aa309bfc3063f59ed1a2e739c1d802273b0e6e0aa7082659f3b3","impliedFormat":1},{"version":"d7ca19bfb1ba4c3ef59d43bd7cd3719d8c5ffb60a9b6f402dee4e229f4d921aa","impliedFormat":1},{"version":"0c0a85a19b60f2ec18a32ff051bb1423860977a16b645dbf159baa7202bc633b","impliedFormat":1},{"version":"fc5bdc1d13667041055811568043956c75150923d8b9a32b989ac7588418ce47","impliedFormat":1},{"version":"f974e4a06953682a2c15d5bd5114c0284d5abf8bc0fe4da25cb9159427b70072","impliedFormat":1},{"version":"d3b290cc3c08cbde2b463df2616b948fb32733dafe3ac29b9e6ded26baee5489","impliedFormat":1},{"version":"94404c4a878fe291e7578a2a80264c6f18e9f1933fbb57e48f0eb368672e389c","impliedFormat":1},{"version":"5c1b7f03aa88be854bc15810bfd5bd5a1943c5a7620e1c53eddd2a013996343e","impliedFormat":1},{"version":"f416c9c3eee9d47ff49132c34f96b9180e50485d435d5748f0e8b72521d28d2e","impliedFormat":1},{"version":"9558d365d0e72b6d9bd8c1742fe1185f983965c6d2eff88a117a59b9f51d3c5f","impliedFormat":1},{"version":"6cc2961fbe8d32e34fd4c7f1b7045353016fff50df98bc31af7c7d1b4b6eb552","impliedFormat":1},{"version":"01aa917531e116485beca44a14970834687b857757159769c16b228eb1e49c5f","impliedFormat":1},{"version":"a2e1f7010ae5f746b937621840cb87dee9eeb69188d32880bd9752029084212c","impliedFormat":1},{"version":"dd30eb34b5c4597a568de0efb8b34e328c224648c258759ac541beb16256ffb6","impliedFormat":1},{"version":"6129bd7098131a0e346352901bc8d461a76d0568686bb0e1f8499df91fde8a1f","impliedFormat":1},{"version":"7cd7923a36835c1194a92b808068a524c4e7c0ff7bdc8712865800e6963d75da","impliedFormat":1},{"version":"82200d39d66c91f502f74c85db8c7a8d56cfc361c20d7da6d7b68a4eeaaefbf4","impliedFormat":1},{"version":"741067675daa6d4334a2dc80a4452ca3850e89d5852e330db7cb2b5f867173b1","impliedFormat":1},{"version":"a1c8542ed1189091dd39e732e4390882a9bcd15c0ca093f6e9483eba4e37573f","impliedFormat":1},{"version":"131b1475d2045f20fb9f43b7aa6b7cb51f25250b5e4c6a1d4aa3cf4dd1a68793","impliedFormat":1},{"version":"3a17f09634c50cce884721f54fd9e7b98e03ac505889c560876291fcf8a09e90","impliedFormat":1},{"version":"32531dfbb0cdc4525296648f53b2b5c39b64282791e2a8c765712e49e6461046","impliedFormat":1},{"version":"0ce1b2237c1c3df49748d61568160d780d7b26693bd9feb3acb0744a152cd86d","impliedFormat":1},{"version":"e489985388e2c71d3542612685b4a7db326922b57ac880f299da7026a4e8a117","impliedFormat":1},{"version":"76264a4df0b7c78b7b12dfaedc05d9f1016f27be1f3d0836417686ff6757f659","impliedFormat":1},{"version":"c0fabd699e6e0b6bfc1728c048e52737b73fb6609eeeae0f7f4775ff14ff2df6","affectsGlobalScope":true,"impliedFormat":1},{"version":"fd1b9d883b9446f1e1da1e1033a6a98995c25fbf3c10818a78960e2f2917d10c","impliedFormat":1},{"version":"19252079538942a69be1645e153f7dbbc1ef56b4f983c633bf31fe26aeac32cd","impliedFormat":1},{"version":"4dd4f6e28afc1ee30ce76ffc659d19e14dff29cb19b7747610ada3535b7409af","impliedFormat":1},{"version":"1640728521f6ab040fc4a85edd2557193839d0cd0e41c02004fc8d415363d4e2","impliedFormat":1},{"version":"65c24a8baa2cca1de069a0ba9fba82a173690f52d7e2d0f1f7542d59d5eb4db0","impliedFormat":1},{"version":"ec9fd890d681789cb0aa9efbc50b1e0afe76fbf3c49c3ac50ff80e90e29c6bcb","impliedFormat":1},{"version":"5fbd292aa08208ae99bf06d5da63321fdc768ee43a7a104980963100a3841752","impliedFormat":1},{"version":"9eac5a6beea91cfb119688bf44a5688b129b804ede186e5e2413572a534c21bb","impliedFormat":1},{"version":"e81bf06c0600517d8f04cc5de398c28738bfdf04c91fb42ad835bfe6b0d63a23","impliedFormat":1},{"version":"363996fe13c513a7793aa28ffb05b5d0230db2b3d21b7bfaf21f79e4cde54b4e","impliedFormat":1},{"version":"b7fff2d004c5879cae335db8f954eb1d61242d9f2d28515e67902032723caeab","impliedFormat":1},{"version":"5f3dc10ae646f375776b4e028d2bed039a93eebbba105694d8b910feebbe8b9c","impliedFormat":1},{"version":"7f6c48cacd08c1b1e29737b8221b7661e6b855767f8778f9a181fa2f74c09d21","impliedFormat":1},{"version":"4545c1a1ceca170d5d83452dd7c4994644c35cf676a671412601689d9a62da35","impliedFormat":1},{"version":"15959543f93f27e8e2b1a012fe28e14b682034757e2d7a6c1f02f87107fc731e","impliedFormat":1},{"version":"a2d648d333cf67b9aeac5d81a1a379d563a8ffa91ddd61c6179f68de724260ff","impliedFormat":1},{"version":"4e828bf688597c32905215785730cbdb603b54e284d472a23fc0195c6d4aeee8","impliedFormat":1},{"version":"a3f41ed1b4f2fc3049394b945a68ae4fdefd49fa1739c32f149d32c0545d67f5","impliedFormat":1},{"version":"4da80db9ed5a1a20fd5bfce863dd178b8928bcaf4a3d75e8657bcae32e572ede","impliedFormat":1},{"version":"47699512e6d8bebf7be488182427189f999affe3addc1c87c882d36b7f2d0b0e","impliedFormat":1},{"version":"f72ee46ae3f73e6c5ff0da682177251d80500dd423bfd50286124cd0ca11e160","impliedFormat":1},{"version":"898b714aad9cfd0e546d1ad2c031571de7622bd0f9606a499bee193cf5e7cf0c","impliedFormat":1},{"version":"d707fb7ca32930495019a4c85500385f6850c785ee0987a1b6bcad6ade95235e","impliedFormat":1},{"version":"fedebeae32c5cdd1a85b4e0504a01996e4a8adf3dfa72876920d3dd6e42978e7","impliedFormat":1},{"version":"5d26aae738fa3efc87c24f6e5ec07c54694e6bcf431cc38d3da7576d6bb35bd6","impliedFormat":1},{"version":"cdf21eee8007e339b1b9945abf4a7b44930b1d695cc528459e68a3adc39a622e","impliedFormat":1},{"version":"e0aa1079d58134e55ad2f73508ad1be565a975f2247245d76c64c1ca9e5e5b26","impliedFormat":1},{"version":"cd0c5af42811a4a56a0f77856cfa6c170278e9522888db715b11f176df3ff1f2","impliedFormat":1},{"version":"68f81dad9e8d7b7aa15f35607a70c8b68798cf579ac44bd85325b8e2f1fb3600","impliedFormat":1},{"version":"1de80059b8078ea5749941c9f863aa970b4735bdbb003be4925c853a8b6b4450","impliedFormat":1},{"version":"1d079c37fa53e3c21ed3fa214a27507bda9991f2a41458705b19ed8c2b61173d","impliedFormat":1},{"version":"94fd3ce628bd94a2caf431e8d85901dbe3a64ab52c0bd1dbe498f63ca18789f7","impliedFormat":1},{"version":"5835a6e0d7cd2738e56b671af0e561e7c1b4fb77751383672f4b009f4e161d70","impliedFormat":1},{"version":"c0eeaaa67c85c3bb6c52b629ebbfd3b2292dc67e8c0ffda2fc6cd2f78dc471e6","impliedFormat":1},{"version":"4b7f74b772140395e7af67c4841be1ab867c11b3b82a51b1aeb692822b76c872","impliedFormat":1},{"version":"27be6622e2922a1b412eb057faa854831b95db9db5035c3f6d4b677b902ab3b7","impliedFormat":1},{"version":"2470a2412a59c6177cd4408dd7edb099ca7ace68c0187f54187dfee56dc9c5aa","impliedFormat":99},{"version":"c2008605e78208cfa9cd70bd29856b72dda7ad89df5dc895920f8e10bcb9cd0a","impliedFormat":99},{"version":"ec61ebac4d71c4698318673efbb5c481a6c4d374da8d285f6557541a5bd318d0","impliedFormat":99},{"version":"16fd66ae997b2f01c972531239da90fbf8ab4022bb145b9587ef746f6cecde5a","affectsGlobalScope":true,"impliedFormat":1},{"version":"fc8fbee8f73bf5ffd6ba08ba1c554d6f714c49cae5b5e984afd545ab1b7abe06","affectsGlobalScope":true,"impliedFormat":1},{"version":"3586f5ea3cc27083a17bd5c9059ede9421d587286d5a47f4341a4c2d00e4fa91","impliedFormat":1},{"version":"521fc35a732f1a19f5d52024c2c22e257aa63258554968f7806a823be2f82b03","impliedFormat":1},{"version":"b789bf89eb19c777ed1e956dbad0925ca795701552d22e68fd130a032008b9f9","impliedFormat":1},"9269d492817e359123ac64c8205e5d05dab63d71a3a7a229e68b5d9a0e8150bf","9036ae3ed72f744b33643af8e52b6e920bad5000534ddb5783c0b9f48f69d1c9","13fe295414f8fb40f00c222881b4cdf0bd7307292581b68793a657365b82f2a3","773719ba9c61d8d214621803d5b4789224dda790582e69dfa7e8a7863fee6c0c","593bba908bc1947c33f4b527d20dcedc96fa87e953b082e4667f8e8272154bc4","1457b7757cde4056b3008434882ea1c18ec5f7c61150b4f33b44a45fcf4cdf55","ff0236b46656604f1ab88d7e6cfe4cb399f5f70534b59f4c4684f0937389c404","7f2a3c03c8d709b1d8df85c3c7c586d84047351c70b17dd31c25d10545e4a36f","9acdf9ba116b4ea4215a8750fcd976324d30846da9e1ab419ff0a11098c4ee7a","5339f80c9aeada565c03c138854229837d15f5df2cef981b061565b06810828a","0b2eb709a02f1a688daa3929f579acec0b413f983d5c019ccdf951cb5b2bd8e5",{"version":"b99c4ff8d11110b9699edc4e5c3bb304360a70ca47e4f9851fc42ad0b663ba83","affectsGlobalScope":true,"impliedFormat":1},{"version":"2e5c41e56098ae93bc42a15473acb1a176f28b2ba95c38f3c67820434acd85b6","impliedFormat":1},{"version":"ba340fc8e5b0f08d90c6ef8552b8ce7bb5dc8e18d47b57f90dee105bc77d0d9e","affectsGlobalScope":true,"impliedFormat":1},{"version":"0f263eeea7877199808b1bc220df95b25a72695ec214eb96d740d4b06c7cc868","impliedFormat":1},"d0e134d21c26b531a5dbe6d801b7b7a6409129926713b18fe0ab5efec2789c1c","c873123a6480c3cd533524bfdea0bf7871bb7d549abc3b6252d59de1bf2ed3cf","9e19240df6ed90533e9a734fad6084dd3801347b81e153169411c275c4a6c6c9","56062695918e75372afd67333c94642091525272ecc6378839069e37ec6802ba","626efb23ccea0f0c727d061cb5ba2b90aa17678bacf7672c7c2871dbbd6d89f4","98908f00c2992f073cf6e78988bc734a0f6f717fd9c17450ba0a42e2e7ff5fb6","9586ec947eac461551939a20205e2d7390447340d78225faa9bc8ccfa590237b","7c8dbc5f184cb9834a27e42081f4f6b35d3f77045ac959f72f60c9e4af05c6b8",{"version":"96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538","impliedFormat":1},{"version":"15fe687c59d62741b4494d5e623d497d55eb38966ecf5bea7f36e48fc3fbe15e","impliedFormat":1},{"version":"2c3b8be03577c98530ef9cb1a76e2c812636a871f367e9edf4c5f3ce702b77f8","affectsGlobalScope":true,"impliedFormat":1}],"root":[[388,398],[403,410]],"options":{"allowJs":true,"esModuleInterop":true,"jsx":1,"module":99,"skipLibCheck":true,"strict":false},"referencedMap":[[390,1],[392,2],[394,3],[396,4],[398,5],[404,6],[406,7],[408,8],[410,9],[389,10],[391,11],[393,11],[395,11],[397,11],[403,12],[405,11],[407,11],[409,11],[388,13],[400,14],[402,15],[345,16],[411,16],[142,17],[143,17],[144,18],[99,19],[145,20],[146,21],[147,22],[94,16],[97,23],[95,16],[96,16],[148,24],[149,25],[150,26],[151,27],[152,28],[153,29],[154,29],[155,30],[156,31],[157,32],[158,33],[100,16],[98,16],[159,34],[160,35],[161,36],[193,37],[162,38],[163,39],[164,40],[165,41],[166,42],[167,43],[168,44],[169,45],[170,46],[171,47],[172,47],[173,48],[174,16],[175,49],[177,50],[176,51],[178,52],[179,53],[180,54],[181,55],[182,56],[183,57],[184,58],[185,59],[186,60],[187,61],[188,62],[189,63],[190,64],[101,16],[102,16],[103,16],[141,65],[191,66],[192,67],[86,16],[198,68],[199,69],[197,70],[195,71],[196,72],[84,16],[87,73],[413,74],[412,16],[85,16],[399,16],[401,14],[93,75],[348,76],[353,77],[355,78],[217,79],[222,80],[321,81],[292,82],[300,83],[319,84],[218,85],[266,16],[267,86],[320,87],[243,88],[219,89],[247,88],[237,88],[204,88],[284,90],[209,16],[281,91],[279,92],[226,16],[282,93],[372,94],[290,70],[371,16],[370,95],[283,70],[272,96],[280,97],[295,98],[296,99],[287,16],[227,100],[285,16],[286,70],[365,101],[368,102],[254,103],[253,104],[252,105],[375,70],[251,106],[231,16],[378,16],[381,16],[380,70],[382,107],[200,16],[315,16],[202,108],[336,16],[337,16],[339,16],[342,109],[338,16],[340,110],[341,110],[221,16],[347,106],[356,111],[360,112],[213,113],[274,114],[273,16],[291,115],[288,16],[289,16],[294,116],[270,117],[212,118],[241,119],[312,120],[205,121],[211,122],[201,123],[323,124],[334,125],[322,16],[333,126],[242,16],[229,127],[309,128],[308,16],[311,129],[310,129],[263,130],[248,130],[303,131],[249,131],[207,132],[206,16],[307,133],[306,134],[305,135],[304,136],[208,137],[278,138],[293,139],[277,140],[299,141],[301,142],[298,140],[244,137],[194,16],[313,143],[268,144],[332,145],[225,146],[327,147],[220,16],[328,148],[330,149],[331,150],[326,16],[325,121],[245,151],[314,152],[335,153],[214,16],[216,16],[228,154],[302,155],[210,156],[215,16],[224,157],[223,158],[230,159],[271,160],[269,95],[232,161],[234,162],[379,16],[233,163],[235,164],[350,16],[351,16],[349,16],[352,16],[377,16],[236,165],[276,70],[92,16],[297,166],[255,16],[265,167],[358,70],[364,168],[262,70],[362,70],[261,169],[344,170],[260,168],[203,16],[366,171],[258,70],[259,70],[250,16],[264,16],[257,172],[256,173],[246,174],[240,175],[329,16],[239,176],[238,16],[354,16],[275,70],[346,177],[83,16],[91,178],[88,70],[89,16],[90,16],[324,179],[318,180],[316,16],[317,181],[357,182],[359,183],[361,184],[363,185],[387,186],[367,186],[386,187],[369,188],[373,189],[374,190],[376,191],[383,192],[385,16],[384,193],[343,194],[81,16],[82,16],[13,16],[14,16],[16,16],[15,16],[2,16],[17,16],[18,16],[19,16],[20,16],[21,16],[22,16],[23,16],[24,16],[3,16],[25,16],[26,16],[4,16],[27,16],[31,16],[28,16],[29,16],[30,16],[32,16],[33,16],[34,16],[5,16],[35,16],[36,16],[37,16],[38,16],[6,16],[42,16],[39,16],[40,16],[41,16],[43,16],[7,16],[44,16],[49,16],[50,16],[45,16],[46,16],[47,16],[48,16],[8,16],[54,16],[51,16],[52,16],[53,16],[55,16],[9,16],[56,16],[57,16],[58,16],[60,16],[59,16],[61,16],[62,16],[10,16],[63,16],[64,16],[65,16],[11,16],[66,16],[67,16],[68,16],[69,16],[70,16],[1,16],[71,16],[72,16],[12,16],[76,16],[74,16],[79,16],[78,16],[73,16],[77,16],[75,16],[80,16],[119,195],[129,196],[118,195],[139,197],[110,198],[109,199],[138,193],[132,200],[137,201],[112,202],[126,203],[111,204],[135,205],[107,206],[106,193],[136,207],[108,208],[113,209],[114,16],[117,209],[104,16],[140,210],[130,211],[121,212],[122,213],[124,214],[120,215],[123,216],[133,193],[115,217],[116,218],[125,219],[105,220],[128,211],[127,209],[131,16],[134,221]],"affectedFilesPendingEmit":[390,392,394,396,398,404,406,408,410,389,391,393,395,397,403,405,407,409],"version":"5.9.3"}DockerfileAdded+24
README.md+27-4
app/about/page.tsxAdded+202
app/contact/page.tsxAdded+246
app/courses/page.tsxAdded+268
app/globals.cssAdded+212
app/layout.tsxAdded+19
app/page.tsxAdded+814
app/register/page.tsxAdded+331
app/resources/page.tsxAdded+1272
app/student/chat/page.tsxAdded+420
app/student/dashboard/page.tsxAdded+477
app/student/learn/page.tsxAdded+521
app/student/progress/page.tsxAdded+223
app/student/quiz/page.tsxAdded+310
app/teacher/dashboard/page.tsxAdded+317
lib/api.tsAdded+387
next-env.d.tsAdded+5
next.config.jsAdded+51
package-lock.jsonAdded
package.jsonAdded+30
postcss.config.jsAdded+6
tailwind.config.jsAdded+107
tsconfig.jsonAdded+34
tsconfig.tsbuildinfoAdded+1