A modern web application that generates realistic student responses to educational questions and provides AI-powered analysis to help educators understand learning patterns and misconceptions.
- Try Live Demo: One-click access to pre-made realistic student responses
- Example Questions: 8 ready-to-use educational questions with demo responses
- Professional Analysis Prompts: 10 research-based analysis templates organized by category
- Scalable Response Generation: Generate 1-50 student responses with multiple control options
- Flexible Controls: Slider, quick-select buttons (3, 5, 8, 10, 15, 20), and manual input
- Real AI Integration: Connect your OpenAI API key for genuine GPT-powered responses
- Secure API Key Management: Browser-only storage with security warnings and best practices
- Intelligent Fallback: Automatic fallback to sophisticated mock data if API calls fail
- Smart Demo Enhancement: Automatically supplements demo responses with mock data for larger classes
- Educational Focus: Specialized prompts designed for realistic student-like responses
- Professional Analysis Framework: Research-based prompts for educational assessment
- Visual Response Display: Color-coded responses with quality indicators and summary statistics
- Comprehensive Analysis Categories:
- π Insight & Summary (understanding assessment, misconception identification)
- π― Feedback & Grading (rubric scoring, personalized feedback, exemplar identification)
- π Extension & Strategy (follow-up questions, meta-cognitive analysis)
- π§° Technical Analysis (language patterns, model comparison)
- Modern UI: Clean, responsive design built with Tailwind CSS
- Scalable Controls: Multiple ways to select response count with visual feedback
- Performance Indicators: Real-time estimates of generation speed
- No Setup Required: Works immediately with sophisticated demo data
- Smart Scaling: Demo responses automatically supplement with mock data for larger requests
- Example Integration: Built-in example questions and responses for instant testing
- Frontend: Next.js 14 with React 18
- Styling: Tailwind CSS
- Language: TypeScript
- Future Integration: OpenAI GPT API (ready for integration)
- Node.js 18+ installed
- npm or yarn package manager
-
Clone or download the project files
-
Install dependencies:
npm install
-
Run the development server:
npm run dev
-
Open http://localhost:3000 in your browser
- Click "Try Live Demo": Instantly see the app in action with pre-made student responses
- Explore Analysis Tools: Try the comprehensive educational analysis prompts
- No setup required: Works immediately without any API keys
- Optional: Connect OpenAI API:
- Add your OpenAI API key for real AI responses
- Or skip this step to use sophisticated mock data
- Enter a Question: Type any educational question or use example questions
- Scale Response Count: Choose 1-50 responses using:
- Visual Slider: Smooth control with live preview
- Quick Buttons: Common class sizes (3, 5, 8, 10, 15, 20)
- Manual Input: Type exact number (up to 50 students)
- Generate Responses: Click "Generate Student Responses" to create varied responses
- Review Responses: View the generated responses, color-coded by quality level:
- π’ Strong responses (well-structured, comprehensive)
- π‘ Average responses (basic understanding, some gaps)
- π΄ Weak responses (misconceptions, limited understanding)
- Analyze Responses: Use professional educational analysis prompts:
- π Insight & Summary: Gauge overall comprehension and identify patterns
- π― Feedback & Grading: Generate rubric scores and personalized feedback
- π Extension & Strategy: Create follow-up questions and understand thinking patterns
- π§° Technical Analysis: Analyze language patterns and compare to model answers
-
Get an OpenAI API Key:
- Visit OpenAI Platform
- Sign up or log in to your account
- Navigate to API Keys and create a new secret key
- Copy the key (you won't see it again)
-
Add to App:
- Paste your API key in the secure input field at the top
- The app will validate the key format and store it securely
- Your key is only stored in your browser session
Ready-to-use Questions:
- "What is photosynthesis and why is it important for life on Earth?" (includes pre-made responses)
- "Explain the water cycle in your own words"
- "What causes the seasons on Earth?"
- "How does gravity work and why don't we float away?"
- "What is the difference between weather and climate?"
- "Explain how plants get their energy to grow"
- "Why do we have day and night?"
- "What happens to water when it evaporates?"
Professional Analysis Prompts:
- Insight & Summary: "Summarize the overall understanding students demonstrated"
- Misconception Analysis: "What are the most common misconceptions or errors?"
- Understanding Levels: "Cluster responses by correct, partial, and incorrect understanding"
- Rubric Scoring: "Assign rubric scores (0-3) and explain reasoning"
- Individual Feedback: "Generate personalized feedback for each student"
- Exemplar Identification: "Which responses best exemplify strong answers?"
- Follow-up Questions: "Suggest extension tasks to deepen thinking"
- Meta-cognitive Analysis: "What do responses suggest about thinking strategies?"
- Language Analysis: "What do frequently used words suggest about understanding?"
- Model Comparison: "Compare responses to the model answer"
βββ app/
β βββ globals.css # Global styles with Tailwind
β βββ layout.tsx # Root layout component
β βββ page.tsx # Main page component
βββ components/
β βββ QuestionInput.tsx # Question input and response count selector
β βββ StudentResponsesList.tsx # Display generated responses
β βββ AnalysisPanel.tsx # Follow-up analysis interface
β βββ ApiKeyInput.tsx # Secure API key input component
βββ lib/
β βββ types.ts # TypeScript type definitions
β βββ mockData.ts # Mock data generation functions
β βββ openaiApi.ts # OpenAI API integration and security utilities
βββ README.md
- Secure API key input with validation
- Visual security warnings and best practices
- Session-based storage management
- Show/hide key toggle for security
- Help documentation for getting API keys
- Handles question text input
- Range slider for response count selection
- Form validation and submission
- Loading states with spinner
- Displays generated responses with quality indicators
- Color-coded responses based on quality level
- Response summary with counts by quality
- Responsive layout
- Follow-up question input
- Suggested question buttons for quick access
- Analysis results display
- Loading states for analysis
When an API key is provided:
- Single API Call Efficiency: Generates all student responses in one optimized call
- Custom Educational Prompt: Uses specialized prompt designed for authentic student variety
- Smart Quality Assessment: AI-generated responses automatically classified by quality
- Real AI Analysis: GPT-powered analysis of student response patterns
- Automatic Fallback: Falls back to mock data if API calls fail
- Cost Optimized: Efficient token usage with dynamic response limits
When no API key is provided:
- Generates responses with realistic variation in quality
- Distributes quality levels (30% strong, 40% average, 30% weak)
- Customizes responses based on question content
- Provides realistic analysis based on common educational patterns
- Simulates API delays for realistic UX
Following industry best practices from Codefinity and Medium security guides:
- Session Storage Only: API keys stored in browser sessionStorage (cleared when browser closes)
- No Server Transmission: Keys never sent to our servers - all processing happens in your browser
- Format Validation: Validates OpenAI API key format before acceptance
- Security Warnings: Clear notifications about key handling best practices
- Easy Key Management: Simple buttons to change or clear stored keys
- No data collection or analytics
- No server-side storage of questions or responses
- All processing happens locally in your browser
- API calls go directly from your browser to OpenAI
- User authentication and saved sessions
- Export functionality for responses and analysis
- Advanced filtering and sorting options
- Custom response templates
- Batch question processing
- Integration with learning management systems
- Support for other AI providers (Anthropic, Google AI)
- Cost tracking and usage analytics
- Offline mode with enhanced mock data
β
Complete OpenAI Integration: Full GPT-3.5-turbo integration with secure key management
β
Scalable Response Generation: 1-50 student responses with multiple control options
β
Optimized API Usage: Single-call generation for speed and cost efficiency
β
Instant Demo Experience: Pre-loaded questions and responses for immediate testing
β
Professional Analysis Framework: 10 research-based educational analysis prompts
β
Smart Demo Enhancement: Automatically supplements demo data for larger classes
β
Intelligent Fallbacks: Automatic fallback to mock data if API fails
β
Security Best Practices: Industry-standard API key security implementation
β
Educational Focus: Custom prompts designed for authentic student variety
β
Smart Quality Classification: Automatic assessment of response quality levels
β
Error Handling: Comprehensive error handling and user feedback
- Modify
tailwind.config.jsfor custom design tokens - Update component classes for different color schemes
- Customize responsive breakpoints
- Edit
lib/mockData.tsto adjust response templates - Modify quality distribution ratios
- Add domain-specific response patterns
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is for educational and demonstration purposes.
Note: This is currently a demo application using mock data. For production use, integrate with actual LLM APIs and implement proper authentication and data management systems.