# Changelog

All notable changes to AI Quiz Generator will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.3.0] - 2026-07-18

### 🎉 Major Release - Spaced Repetition Flashcards Generator

This release introduces an AI-powered Flashcards Generator featuring Leitner Spaced Repetition study mode, fully integrated with Clerk, MongoDB, and Gemini AI.

#### ✨ Added
- **NEW**: Spaced Repetition Flashcard system based on the Leitner algorithm (Box 1 to 5)
- **NEW**: 3D card flipping animation interface using `framer-motion`
- **NEW**: Dynamic Leitner Box progression rating: 🔴 Hard (Box 1), 🟡 Medium (Stay), 🟢 Easy (Box+1)
- **NEW**: Flashcard library dashboard displaying total decks, active card count, mastery rates, and due cards
- **NEW**: Topic-based and text-based AI flashcard generation with customizable difficulty (Easy/Medium/Hard) and card count range (5 to 30)
- **NEW**: Flashcards link added to top-level sidebar navigation with `Layers` icon
- **NEW**: Admin management panel under `Quiz → Flashcards` to view, search, sort, paginate, and delete flashcard decks globally

#### 🔄 Changed
- **CHANGED**: Integrated credit system validation to deduct 1 credit per flashcard deck generated
- **CHANGED**: Updated mobile bottom dock layout to include active route tracking for `/dashboard/flashcards`
- **CHANGED**: Updated Admin Sidebar layout to include Flashcards sub-menu routing under the 'Quiz' section

---

## [2.2.1] - 2025-12-24

### 🎨 UI/UX Improvements & Bug Fixes

#### ✨ Added
- **NEW**: Custom chatbot mascot (`/9253532.png`) for AI Assistant chat messages
- **NEW**: Force-dynamic rendering for Terms of Service and Privacy Policy pages

#### 🔄 Changed
- **CHANGED**: AI Assistant chat messages now use custom mascot image
- **CHANGED**: AI Assistant "thinking" indicator uses custom mascot image
- **CHANGED**: AI Assistant welcome screen retains the AI-Assistant.png mascot
- **CHANGED**: Terms & Privacy Policy pages now dynamically fetch content from database (no caching)
- **CHANGED**: Footer navigation grid now single-column on mobile for better alignment
- **CHANGED**: AI Pioneers "Apply to Join" button now redirects to Contact page

### 🐛 Bug Fixes
- **Terms of Service**: Now dynamically fetches content (no caching)
- **Privacy Policy**: Now dynamically fetches content (no caching)
- **AI Pioneers Page**: "Apply to Join" button now redirects to Contact page

### 📚 Documentation
- **New Section**: "Public Landing Pages" in Features Guide covering all role-based pages
- **Student Portal**: Added specific "Student Portal" feature cards and descriptions
- **Index**: Updated Core Platform Features to include Student Portal

#### 🗑️ Removed
- **REMOVED**: Press link from footer (no admin feature available for press content)

#### 🐛 Fixed
- **FIXED**: Terms of Service page not reflecting admin updates (added force-dynamic)
- **FIXED**: Privacy Policy page not reflecting admin updates (added force-dynamic)
- **FIXED**: Footer column alignment issues on mobile responsive views
- **FIXED**: AI Pioneers "Apply to Join" button was not functional

---

## [2.2.0] - 2025-12-24

### 🎉 Major Release - Educational Ecosystem & Docs Overhaul

This release transforms the platform into a complete educational ecosystem with over 200 AI tools, collaborative study rooms, and experimental labs. It also features a massive documentation overhaul with a premium design system matching the application.

### ✨ Added

#### 📚 Documentation 2.0
- **NEW**: Completely redesigned documentation hub with premium UI
- **NEW**: Visual design system matching the main application (Manrope font, Brand colors)
- **NEW**: Interactive sidebar navigation with categorized sections
- **NEW**: Enhanced responsive design for all devices
- **NEW**: New detailed guides: "Environment Setup", "MongoDB Setup", "Deployment" (AWS/Vercel)
- **NEW**: Visual components: Feature grids, callouts, stat cards, and step-by-step guides

#### 🤖 200+ AI Tools
- **NEW**: Extensive library of 100+ Educator Tools (Lesson Plans, Rubrics, IEPs)
- **NEW**: 50+ Student Tools (AI Tutor, Writing Feedback, Research Assistant)
- **NEW**: Categorized tool hub with search and filtering capabilities

#### 💬 Enhanced AI Assistant
- **NEW**: Multi-model support: Gemini 2.0 Flash (Default), GPT-4o Mini, Claude 3.5 Sonnet
- **NEW**: Persistent chat history with "Star" functionality
- **NEW**: Quick actions and prompt library

#### 👥 Collaborative Features
- **NEW**: Study Rooms for virtual classroom collaboration
- **NEW**: Assignment management and engagement tracking
- **NEW**: Team-based sharing options

#### 🧪 Labs & Resources
- **NEW**: Experimental "Labs" section
- **NEW**: Notes-to-Study-Guide AI converter
- **NEW**: Flashcard generator with spaced repetition
- **NEW**: Focus/Pomodoro timer

### 🔄 Changed
- **CHANGED**: Documentation styling updated to use CSS variables for easy theming
- **CHANGED**: Updated all documentation screenshots and assets
- **CHANGED**: Refined typography and spacing across all documentation pages

## [2.1.0] - 2025-01-20

### 🎉 Major Release - Admin Panel & Dynamic Content Management

This release introduces a comprehensive admin panel with complete content management capabilities, dynamic site settings, and enhanced customization options for CodeCanyon users.

### ✨ Added

#### 🎛️ Complete Admin Panel
- **NEW**: Full-featured admin dashboard with Clerk-based authentication
- **NEW**: Admin role management with custom metadata in Clerk
- **NEW**: Admin-only routes with middleware protection
- **NEW**: Admin sidebar navigation with organized menu structure
- **NEW**: Admin header with user profile and logout
- **NEW**: Skeleton loading states for all admin pages (replacing spinners)
- **NEW**: Custom toast notification system replacing browser alerts
- **NEW**: Custom confirmation dialogs with retro-styled UI

#### 👥 User Management
- **NEW**: View all users with pagination and search
- **NEW**: User detail modal with comprehensive information
- **NEW**: Adjust user credits directly from admin panel
- **NEW**: Delete users with data cleanup
- **NEW**: View user activity and quiz history

#### 📊 Admin Analytics Dashboard
- **NEW**: Revenue analytics with time-range filters (Yearly, Half-Yearly, Monthly, Weekly, Daily)
- **NEW**: User growth charts with visualizations
- **NEW**: Quiz creation analytics and trends
- **NEW**: Collections analytics (public/private breakdown)
- **NEW**: Quarterly revenue donut chart (March-March quarters)
- **NEW**: Recent purchases component with user email display
- **NEW**: Enhanced line and bar charts with tooltips and legends
- **NEW**: Live data updates without fallback mock data

#### 💰 Pricing Plan Management
- **NEW**: Create, edit, and delete pricing plans from admin panel
- **NEW**: Auto-creation of Stripe products and prices when plans are created
- **NEW**: Automatic Stripe price archiving when plans are updated
- **NEW**: Credit-based pricing model (removed feature-based plans)
- **NEW**: Display order management for plan sorting
- **NEW**: Popular plan marking
- **NEW**: Active/inactive plan status toggle
- **NEW**: Duplicate credit amount validation

#### ⚙️ Site Settings Management
- **NEW**: SEO settings (meta title, description, keywords)
- **NEW**: Logo management (site logo, footer logo, favicon)
- **NEW**: JSON/Lottie logo upload support for site and footer logos
- **NEW**: Logo renderer component with S3 JSON proxy for CORS handling
- **NEW**: Favicon upload (ICO, PNG, SVG formats)
- **NEW**: Footer settings (copyright text, links)
- **NEW**: Hero section image uploads (up to 2 images)
- **NEW**: App settings (name, URL, support email, show site name toggle)
- **NEW**: Contact settings (support email, contact email, phone, address, business hours, timezone)
- **NEW**: Dynamic metadata generation from database settings
- **NEW**: Live updates on landing page, navbar, and footer

#### 📄 Dynamic Content Pages
- **NEW**: Page management system (Privacy Policy, Terms & Conditions)
- **NEW**: Rich HTML content editor with live preview
- **NEW**: Publish/unpublish functionality
- **NEW**: Dynamic page rendering from database
- **NEW**: SEO-friendly page URLs with slug-based routing

#### ❓ FAQ Management
- **NEW**: Create, edit, and delete FAQs from admin panel
- **NEW**: Publish/unpublish FAQ items
- **NEW**: Dynamic FAQ display on public FAQ page
- **NEW**: Support email integration from settings

#### 📁 Content Management
- **NEW**: View all user files with subject organization
- **NEW**: Delete files from admin panel (removes from S3 and database)
- **NEW**: View all generated quizzes
- **NEW**: Delete quizzes with cleanup
- **NEW**: Subject management (view and delete subjects)
- **NEW**: Collection management (view, search, sort, delete collections)

#### 📞 Contact Management
- **NEW**: Manage contact information from admin panel
- **NEW**: Support email configuration
- **NEW**: Contact email, phone, address settings
- **NEW**: Business hours and timezone configuration
- **NEW**: Dynamic contact page with live data from settings

#### 🎨 UI/UX Enhancements
- **NEW**: Skeleton loading screens matching page layouts
- **NEW**: Custom toast component with success/error/warning types
- **NEW**: Custom confirmation dialogs with retro styling
- **NEW**: Action loading states on all admin buttons
- **NEW**: Improved error handling and user feedback
- **NEW**: Consistent retro design across admin panel

### 🔄 Changed

#### Admin Panel Improvements
- **CHANGED**: Replaced all browser `confirm()` dialogs with custom confirmation dialogs
- **CHANGED**: Replaced all `sonner` toast notifications with custom toast component
- **CHANGED**: Replaced loading spinners with skeleton loaders across all admin pages
- **CHANGED**: Improved admin sidebar with better navigation and hover states
- **CHANGED**: Enhanced admin header with fixed positioning and better styling

#### Settings & Configuration
- **CHANGED**: Site settings now stored in MongoDB database instead of hardcoded values
- **CHANGED**: Logo and favicon management moved to admin panel
- **CHANGED**: Footer content now dynamically loaded from database
- **CHANGED**: Hero section images now uploaded and stored in S3
- **CHANGED**: Contact page now fetches data from admin settings
- **CHANGED**: Meta tags now generated dynamically from database settings

#### Pricing System
- **CHANGED**: Pricing plans migrated from hardcoded to database storage
- **CHANGED**: Stripe integration enhanced with automatic product/price creation
- **CHANGED**: Credit packages now managed through admin panel

#### Analytics
- **CHANGED**: Removed all fallback mock data from analytics
- **CHANGED**: Improved chart visualizations with better styling
- **CHANGED**: Enhanced quarterly revenue calculation (March-March quarters)
- **CHANGED**: Recent purchases now show user emails instead of object IDs

### 🗑️ Removed

#### Cleanup
- **REMOVED**: Hardcoded fallback data from public pages (Privacy, Terms, FAQ, Contact)
- **REMOVED**: Hardcoded logo fallbacks from navbar
- **REMOVED**: Hardcoded meta title, description, and URL fallbacks
- **REMOVED**: Default favicon fallback (`app/favicon.ico`)
- **REMOVED**: Migration scripts (one-time use, no longer needed)
- **REMOVED**: Development documentation files (moved to Documentation folder)
- **REMOVED**: Sample/mock data from analytics routes

### 🐛 Fixed

#### Critical Fixes
- **FIXED**: Settings update validation errors (preserving required fields)
- **FIXED**: TypeScript errors in analytics and pricing routes
- **FIXED**: MongoDB query syntax errors in subjects route
- **FIXED**: S3 JSON logo CORS issues with proxy API route
- **FIXED**: Next.js image optimization for S3 URLs
- **FIXED**: Settings deep merge to preserve nested required fields

#### UI/UX Fixes
- **FIXED**: Custom confirmation dialog centering issues
- **FIXED**: Dialog backdrop not covering full viewport
- **FIXED**: Site name showing hardcoded value before settings load
- **FIXED**: Upload button click handlers on settings page
- **FIXED**: Hero image upload button visibility logic
- **FIXED**: Footer links not opening privacy/terms pages

#### Admin Panel Fixes
- **FIXED**: Missing skeleton component imports
- **FIXED**: React hooks dependency warnings
- **FIXED**: Collection analytics sample data generation
- **FIXED**: Quarterly revenue calculation accuracy
- **FIXED**: Recent purchases user email display

### 🔧 Technical Improvements

#### Database
- **NEW**: Settings collection for site-wide configuration
- **NEW**: PricingPlan collection for dynamic pricing management
- **NEW**: Page collection for dynamic content pages
- **NEW**: FAQ collection for dynamic FAQ management
- **IMPROVED**: Deep merge logic for nested settings updates
- **IMPROVED**: Better validation and error handling

#### API Routes
- **NEW**: `/api/admin/*` routes for admin operations
- **NEW**: `/api/admin/logo-json` proxy for S3 JSON files
- **NEW**: `/api/admin/analytics/quarterly-revenue` for quarterly data
- **NEW**: `/api/admin/recent-purchases` for purchase history
- **NEW**: `/api/settings/public` for public settings access
- **NEW**: `/api/pricing/public` for public pricing plans
- **IMPROVED**: Better error handling and validation

#### Components
- **NEW**: `LogoRenderer` component for image and JSON logos
- **NEW**: `SkeletonAdminTable`, `SkeletonAdminForm`, `SkeletonAdminCards` components
- **NEW**: `ConfirmDialog` component for consistent confirmations
- **NEW**: Custom toast provider and hook
- **IMPROVED**: Better component organization and reusability

### 📋 Updated Feature Set

#### ✅ Available Features (v2.1.0)
- **Admin Panel**: Complete admin dashboard with all management features
- **Dynamic Settings**: SEO, logos, footer, hero images, contact info
- **Dynamic Content**: Privacy Policy, Terms & Conditions, FAQs
- **Pricing Management**: Create and manage pricing plans from admin
- **Analytics Dashboard**: Revenue, users, quizzes, collections analytics
- **User Management**: View, manage credits, delete users
- **Content Management**: Files, quizzes, subjects, collections management
- **Contact Management**: Dynamic contact page with admin settings
- **Logo Support**: Image and JSON/Lottie logo uploads
- **Favicon Management**: Upload and manage favicon from admin

#### ❌ Removed from "Not Available"
- ~~**Admin Panel**: No admin dashboard~~ ✅ **NOW AVAILABLE**
- ~~**Email Settings**: No email configuration in profile~~ ✅ **NOW AVAILABLE** (Contact settings)

### 🚀 Migration from v2.0.0 to v2.1.0

#### Database Setup
```bash
# New collections will be created automatically:
# - settings (site configuration)
# - pricing_plans (dynamic pricing)
# - pages (dynamic content pages)
# - faqs (FAQ management)
```

#### Admin Setup
1. **Create Admin User**: Use Clerk Dashboard to add admin role metadata
2. **Access Admin Panel**: Navigate to `/admin/dashboard` after login
3. **Configure Settings**: Set up SEO, logos, footer, and contact information
4. **Create Pricing Plans**: Add your credit packages through admin panel
5. **Add Content**: Create Privacy Policy, Terms, and FAQs through admin

#### Environment Variables
No new environment variables required. Existing setup continues to work.

#### Code Changes
- Admin panel routes are automatically protected by middleware
- Public pages now fetch data from database instead of hardcoded values
- Settings API endpoints handle all configuration management

---

## [2.0.0] - 2025-01-15

### 🎉 Major Release - Complete System Overhaul

This is a major release that introduces breaking changes and significant new features. The application has been completely redesigned with a new credit-based system, retro UI theme, and enhanced functionality.

### ✨ Added

#### 💳 Credit-Based System
- **NEW**: Replaced subscription plans with flexible credit system
- **NEW**: Volume-based pricing with 10% discount per 50 credits
- **NEW**: Credit packages: 50 ($5), 100 ($9), 150 ($12.75), 200 ($17)
- **NEW**: 10 free credits for new users
- **NEW**: Real-time credit balance display in header
- **NEW**: Credit transaction history and analytics
- **NEW**: Insufficient credits popup with animations
- **NEW**: Custom credit purchase amounts

#### 📁 Collections & Organization
- **NEW**: Quiz collections system for content organization
- **NEW**: Create, edit, and delete collections
- **NEW**: Add/remove quizzes from collections
- **NEW**: Collection sharing (Private, Team, Public)
- **NEW**: Shared collections dashboard
- **NEW**: Team collaboration features
- **NEW**: Collection analytics and insights

#### 🎨 Retro UI Theme
- **NEW**: Complete UI redesign with retro aesthetic
- **NEW**: Bold black borders and vibrant colors
- **NEW**: System font family for better readability
- **NEW**: Smooth animations and transitions
- **NEW**: 3D button effects with shadows
- **NEW**: Consistent retro styling across all components
- **NEW**: Mobile-optimized retro design
- **NEW**: Skeleton loading states for better UX

#### 📊 Enhanced Analytics
- **NEW**: Comprehensive analytics dashboard
- **NEW**: Performance charts and metrics
- **NEW**: Progress tracking over time
- **NEW**: Weekly activity heatmaps
- **NEW**: Date-wise calendar view
- **NEW**: Live data updates
- **NEW**: Export analytics data

#### 📱 Mobile Experience
- **NEW**: Mobile-first responsive design
- **NEW**: Mobile navigation dock
- **NEW**: Touch-friendly interactions
- **NEW**: Optimized mobile layouts
- **NEW**: Mobile-specific animations

#### 🔧 Content Management
- **NEW**: Subject-based file organization
- **NEW**: Advanced file manager with S3 integration
- **NEW**: File search and filtering
- **NEW**: Grid and list view modes
- **NEW**: File upload progress tracking
- **NEW**: MongoDB database setup documentation
- **NEW**: Comprehensive environment variable documentation

#### 🎯 Quiz Features
- **NEW**: Enhanced quiz taking experience
- **NEW**: Real-time progress tracking
- **NEW**: Improved question navigation
- **NEW**: Better explanation system
- **NEW**: Quiz attempt history
- **NEW**: Performance insights per quiz

#### 🔐 Authentication & Security
- **NEW**: Enhanced Clerk integration
- **NEW**: Account deletion with reverification
- **NEW**: Improved session management
- **NEW**: Better error handling

#### 🤖 AI Integration
- **NEW**: Google Gemini AI integration
- **NEW**: Multiple choice question generation
- **NEW**: PDF document processing
- **NEW**: Custom prompt support
- **NEW**: Difficulty level selection (Easy, Medium, Hard)

### 🔄 Changed

#### Breaking Changes
- **BREAKING**: Removed subscription-based pricing model
- **BREAKING**: All plan-based validations replaced with credit system
- **BREAKING**: Updated API endpoints for credit management
- **BREAKING**: Changed user data structure for credits
- **BREAKING**: Switched from OpenAI to Google Gemini AI

#### UI/UX Improvements
- **CHANGED**: Complete visual redesign with retro theme
- **CHANGED**: Improved navigation and user flow
- **CHANGED**: Better mobile responsiveness
- **CHANGED**: Enhanced loading states and animations
- **CHANGED**: Improved error messages and feedback

#### Performance Optimizations
- **CHANGED**: Optimized MongoDB queries and aggregations
- **CHANGED**: Improved caching strategies
- **CHANGED**: Better error handling and recovery
- **CHANGED**: Reduced bundle size and load times

### 🗑️ Removed

#### Deprecated Features
- **REMOVED**: Subscription plans (Free, Pro, Enterprise)
- **REMOVED**: Plan-based feature restrictions
- **REMOVED**: Quiz sharing functionality (replaced with collections)
- **REMOVED**: Old pricing validation system
- **REMOVED**: Legacy UI components and styling
- **REMOVED**: OpenAI integration (replaced with Gemini)
- **REMOVED**: Multiple AI provider support
- **REMOVED**: True/false and short answer question types
- **REMOVED**: DOCX and TXT export options (PDF only)

#### Cleanup
- **REMOVED**: Unused dependencies and code
- **REMOVED**: Legacy API routes
- **REMOVED**: Old environment variables
- **REMOVED**: Deprecated utility functions

### 🐛 Fixed

#### Critical Fixes
- **FIXED**: MongoDB connection pooling and caching issues
- **FIXED**: Duplicate webhook processing
- **FIXED**: Credit deduction race conditions
- **FIXED**: File upload size limitations
- **FIXED**: Authentication state management

#### UI/UX Fixes
- **FIXED**: Mobile layout overflow issues
- **FIXED**: Modal responsiveness problems
- **FIXED**: Navigation state persistence
- **FIXED**: Loading state inconsistencies
- **FIXED**: Form validation errors

#### Performance Fixes
- **FIXED**: Memory leaks in React components
- **FIXED**: Unnecessary re-renders
- **FIXED**: Database query optimization
- **FIXED**: File upload performance

### 🔧 Technical Improvements

#### Architecture
- **IMPROVED**: Better separation of concerns
- **IMPROVED**: Enhanced error boundaries
- **IMPROVED**: Improved type safety with TypeScript
- **IMPROVED**: Better API error handling

#### Database
- **IMPROVED**: MongoDB schema optimization with 6 main collections
- **IMPROVED**: Better indexing strategies
- **IMPROVED**: Improved aggregation pipelines
- **IMPROVED**: Enhanced data validation
- **NEW**: Collections: users, quizzes, collections, quizattempts, credittransactions, user_files

#### Security
- **IMPROVED**: Better input sanitization
- **IMPROVED**: Enhanced authentication flows
- **IMPROVED**: Improved API security
- **IMPROVED**: Better error message handling

### 📋 Current Feature Set

#### ✅ Available Features
- **AI Quiz Generation**: Google Gemini AI powered
- **Question Type**: Multiple choice questions only
- **File Upload**: PDF files (15MB on AWS / 3MB on Vercel)
- **Export Format**: PDF export only
- **Credit System**: Flexible credit-based pricing ($5 for 50 credits, $9 for 100 credits, $17 for 200 credits)
- **Collections**: Organize and share quizzes (Private, Team, Public)
- **Analytics**: Performance tracking and insights with live data
- **Mobile Support**: Fully responsive retro design
- **Authentication**: Clerk-based auth system
- **Payment Processing**: Stripe integration
- **File Management**: Subject-based organization with S3 storage
- **Quiz Limits**: 30 questions max on AWS, 5 on Vercel

#### ❌ Not Available (Future Considerations)
- **Multiple AI Providers**: Only Gemini AI supported
- **Question Types**: No true/false or short answer
- **Export Formats**: No DOCX or TXT export
- **Multiple File Types**: PDF only
- **Bulk Operations**: No bulk file operations
- **Theme Settings**: No theme customization options

### 🚀 Deployment Recommendations

#### 🏆 AWS EC2 (Recommended)
- **File Size**: Up to 15MB
- **Questions**: Up to 30 per quiz
- **Processing**: No timeout limits
- **Best For**: Production use

#### ⚠️ Vercel (Limited)
- **File Size**: Up to 3MB only
- **Questions**: Up to 5 per quiz (recommended)
- **Processing**: 10-second timeout
- **Best For**: Development and testing

---

## [1.5.2] - 2024-11-20

### 🐛 Fixed
- **FIXED**: Quiz generation timeout issues
- **FIXED**: PDF upload processing errors
- **FIXED**: Mobile navigation bugs

### 🔧 Improved
- **IMPROVED**: AI model response handling
- **IMPROVED**: Error message clarity
- **IMPROVED**: Loading state management

---

## [1.5.1] - 2024-11-10

### ✨ Added
- **NEW**: OpenAI GPT integration
- **NEW**: Custom prompt templates
- **NEW**: Enhanced quiz export options

### 🐛 Fixed
- **FIXED**: Authentication redirect issues
- **FIXED**: File upload validation
- **FIXED**: Quiz timer accuracy

---

## [1.5.0] - 2024-10-25

### ✨ Added
- **NEW**: Advanced quiz analytics
- **NEW**: User progress tracking
- **NEW**: Enhanced file management
- **NEW**: Improved mobile experience

### 🔄 Changed
- **CHANGED**: Updated to Next.js 14
- **CHANGED**: Improved database performance
- **CHANGED**: Enhanced UI components

---

## [1.4.0] - 2024-09-15

### ✨ Added
- **NEW**: Subscription management
- **NEW**: Stripe payment integration
- **NEW**: User dashboard improvements
- **NEW**: Quiz sharing capabilities

### 🐛 Fixed
- **FIXED**: Memory optimization issues
- **FIXED**: API rate limiting
- **FIXED**: Cross-browser compatibility

---

## [1.3.0] - 2024-08-20

### ✨ Added
- **NEW**: PDF document upload and processing
- **NEW**: Multiple choice question support
- **NEW**: Quiz difficulty levels
- **NEW**: Time-limited quizzes

### 🔄 Changed
- **CHANGED**: Improved AI prompt engineering
- **CHANGED**: Better error handling
- **CHANGED**: Enhanced user interface

---

## [1.2.0] - 2024-07-10

### ✨ Added
- **NEW**: User authentication with Clerk
- **NEW**: Quiz history and results
- **NEW**: Export quiz to PDF
- **NEW**: Responsive design improvements

### 🐛 Fixed
- **FIXED**: Quiz generation consistency
- **FIXED**: Mobile layout issues
- **FIXED**: Performance optimizations

---

## [1.1.0] - 2024-06-05

### ✨ Added
- **NEW**: AI-powered quiz generation
- **NEW**: Multiple choice questions
- **NEW**: Basic user interface
- **NEW**: OpenAI GPT integration (later replaced with Gemini)

### 🔄 Changed
- **CHANGED**: Improved question quality
- **CHANGED**: Better user experience
- **CHANGED**: Enhanced error messages

---

## [1.0.0] - 2024-05-01

### 🎉 Initial Release

#### Core Features
- **NEW**: Basic quiz generation from text input
- **NEW**: Simple question and answer format
- **NEW**: Basic web interface
- **NEW**: AI integration

#### Technical Foundation
- **NEW**: Next.js application framework
- **NEW**: React-based user interface
- **NEW**: API route handling
- **NEW**: Basic styling and layout

---

## Migration Guide

### Upgrading from v1.x to v2.0

#### Database Migration
```bash
# Backup your existing database
mongodump --uri="your-mongodb-uri" --out=backup-v1

# Run migration scripts
npm run migrate:v2

# Verify migration
npm run verify:migration
```

#### Environment Variables
```bash
# Remove old OpenAI variables
OPENAI_API_KEY=
OPENAI_MODEL=

# Add new Gemini AI variables
GOOGLE_GENERATIVE_AI_API_KEY=your_gemini_api_key

# Remove old subscription variables
STRIPE_PRICE_ID_FREE=
STRIPE_PRICE_ID_PRO=
STRIPE_PRICE_ID_ENTERPRISE=

# Add new credit system variables
STRIPE_WEBHOOK_SECRET=your_webhook_secret
CREDITS_PER_QUESTION=1
NEW_USER_CREDITS=10
```

#### Code Changes
- Update all plan validation calls to credit validation
- Replace subscription components with credit components
- Update API endpoints for credit management
- Migrate user data to new schema
- Switch from OpenAI to Gemini AI integration

#### Testing
```bash
# Test credit system
npm run test:credits

# Test payment flow
npm run test:payments

# Test Gemini AI integration
npm run test:gemini-ai

# Test UI components
npm run test:ui
```

---

## Platform Compatibility

### ✅ Fully Supported
- **AWS EC2**: Complete feature set, no limitations
- **Self-hosted**: Full functionality on VPS/dedicated servers
- **Docker**: Containerized deployment support

### ⚠️ Limited Support
- **Vercel**: File size (3MB) and processing time limitations
- **Netlify**: Similar serverless constraints
- **Railway**: May have memory limitations

### ❌ Not Recommended
- **Shared Hosting**: Insufficient resources for AI processing
- **Static Hosting**: Requires server-side processing

---

## Support

For questions about this changelog or migration assistance:

- 📧 **Email**: Contact through CodeCanyon
- 📚 **Documentation**: Complete setup guides included
- 🛒 **Purchase**: Available on CodeCanyon Marketplace
- 💬 **Support**: CodeCanyon comment system and item support

---

## Contributors

Special thanks to all contributors who made v2.0 possible:

- **Lead Developer**: Core architecture and credit system
- **UI/UX Designer**: Retro theme design and user experience
- **Backend Engineer**: Database optimization and API improvements
- **QA Engineer**: Testing and quality assurance
- **DevOps Engineer**: Deployment and infrastructure

---

*This changelog follows [Keep a Changelog](https://keepachangelog.com/) format and [Semantic Versioning](https://semver.org/) principles.*