An AI-powered platform for creating, reviewing, and managing aptitude questions with automated variant generation. Built with React and Supabase.
- AI Question Generation: Generate questions from topics and subtopics using OpenAI GPT
- Difficulty Management: Create questions with easy, moderate, and hard difficulty levels
- Variant Creation: Automatically generate multiple variants of base questions
- Review Workflow: Approve, reject, or regenerate questions with detailed review interface
- Export Functionality: Export approved questions to CSV/Google Sheets format
- User Authentication: Secure login and user management
- Real-time Updates: Live status tracking and progress monitoring
- Frontend: React 18, Vite
- Backend: Supabase (PostgreSQL, Auth, Real-time)
- AI Integration: OpenAI GPT-4 API
- Styling: Custom CSS with modern design
- Icons: Lucide React
- Node.js 18+ installed
- Supabase account
- OpenAI API key
- Create a new Supabase project at supabase.com
- Go to Settings → API to get your project URL and anon key
- Go to SQL Editor and run the schema from
database-schema.sql - Enable email authentication in Authentication → Settings
- Copy the example environment file:
cp .env.example .env- Update
.envwith your actual credentials:
# Supabase Configuration
VITE_SUPABASE_URL=your_supabase_project_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
# OpenAI Configuration
VITE_OPENAI_API_KEY=your_openai_api_keyImportant: Never commit your .env file to version control. It's already included in .gitignore.
# Install dependencies
npm install
# Start development server
npm run dev# Build for production
npm run build
# Preview production build
npm run preview- Sign up with email/password
- Sign in to access the dashboard
- Select topic and subtopic from dropdowns
- Set question count and difficulty distribution
- Optionally enable variant generation
- Click "Generate Questions" to create content
- Review generated questions one by one
- Approve, reject, or regenerate individual questions
- View detailed explanations and variants
- Track progress with status counters
- Export approved questions to CSV format
- Compatible with Google Sheets import
- Includes all question data and metadata
src/
├── components/
│ ├── Auth.jsx # Authentication component
│ ├── Dashboard.jsx # Main dashboard with tabs
│ ├── QuestionGenerator.jsx # Question generation form
│ └── QuestionReview.jsx # Question review interface
├── lib/
│ └── supabase.js # Supabase configuration
├── App.jsx # Main app component
├── main.jsx # React entry point
└── index.css # Global styles
The application uses the following main tables:
topics- Question topics (Quantitative, Logical, Advanced)subtopics- Specific subtopics within each topicquestions- Generated questions with metadataquestion_variants- Variants of base questionsquestion_sets- Grouped question collections
The app integrates with OpenAI GPT-4 for:
- Base question generation from topic/subtopic
- Variant creation with numerical/contextual changes
- Explanation generation aligned with teaching methodology
- Mock question generation for development
- Replace
generateMockQuestions()with actual OpenAI API calls - Add proper error handling and rate limiting
- Update the
TOPICSobject inQuestionGenerator.jsx - Add corresponding entries to the database via SQL
- Update the question object structure in generation functions
- Modify the review interface to match new fields
- Update export format accordingly
- Modify
src/index.cssfor global styles - Component-specific styles are inline for simplicity
- Consider moving to CSS modules for larger applications
- ✅ API keys are now managed through environment variables
- Add rate limiting for AI API calls
- Validate user inputs and sanitize data
- Consider moving OpenAI API calls to a backend service for production
- Add caching for frequently accessed topics/subtopics
- Implement pagination for large question sets
- Optimize database queries with proper indexing
- Add error tracking (Sentry, LogRocket)
- Implement usage analytics
- Monitor AI API costs and usage
- Bulk Operations: Import questions from existing materials
- Advanced Analytics: Question performance metrics
- Collaboration: Multi-user review workflows
- Integration: LMS and assessment platform connectors
- Mobile App: React Native version for mobile access
For issues and questions:
- Check the database schema is properly set up
- Verify Supabase and OpenAI API credentials
- Review browser console for error messages
- Ensure all dependencies are installed correctly