Example prompt
ZapQuiz: Interactive Quiz Application
DevelopmentPart Prompt (1)1
Project Overview
ZapQuiz is a Kahoot-like interactive quiz application that allows teachers to create quizzes and participants to join via QR codes, answering questions in real-time with a points-based scoring system.
Technology Stack
- Backend: PHP
 - Frontend: HTML, CSS, JavaScript (responsive design)
 - Database: MySQL/MariaDB
 - CSS Framework: Tailwind CSS
 - Real-time Updates: SSE (Server-Snet events)
 - Installation: Must support subdirectory installation (e.g., https://www.server.com/zapquiz)
 
Development Phases
The project will be developed in three distinct phases:
- Teacher Authentication & Quiz Management (current focus)
 - Quiz Session Initialization & Participant Onboarding
 - Quiz Execution, Scoring & Results Display
 
Phase 1: Teacher Authentication & Quiz Management System
Requirements
User Authentication
- Create a secure login system for teachers with:
- Username/email and password authentication
 - Password encryption using bcrypt
 - Session management
 - Basic "remember me" functionality
 - Password reset capability (optional)
 
 
Database Schema (Initial)
- 
Teachers Table:
- id (PRIMARY KEY)
 - username
 - password (bcrypt hashed)
 - created_at
 - updated_at
 
 - 
Quizzes Table:
- id (PRIMARY KEY)
 - teacher_id (FOREIGN KEY)
 - title
 - description
 - unique_identifier (for QR code generation)
 - status (draft, active, completed)
 - created_at
 - updated_at
 
 - 
Questions Table:
- id (PRIMARY KEY)
 - quiz_id (FOREIGN KEY)
 - question_text (HTML-formatted)
 - image_path (optional)
 - display_order
 - time_limit (default: 30 seconds)
 - created_at
 - updated_at
 
 - 
Answers Table:
- id (PRIMARY KEY)
 - question_id (FOREIGN KEY)
 - answer_text
 - is_correct (boolean)
 - answer_option (A, B, C, or D)
 - created_at
 - updated_at
 
 
Teacher Dashboard Functionality
- 
Authentication Pages:
- Login page
 - For now we don't need an registration page yet. Create one login wiht user admn, password admin123
 - No password recovery yet.
 
 - 
Quiz Management:
- List all quizzes with search/filter options
 - Create new quiz (with auto-generated unique identifier)
 - Edit existing quiz details
 - Delete quiz (with confirmation)
 - Duplicate quiz (optional)
 
 - 
Question Management:
- List all questions for a quiz
 - Add new questions with:
- Question text (HTML editor)
 - Image upload capability
 - Four answer options (A, B, C, D)
 - Correct answer designation
 - Question reordering capability
 
 - Edit existing questions
 - Delete questions (with confirmation)
 
 
Technical Implementation Details
- 
Directory Structure:
zapquiz/ ├── assets/ │ ├── css/ │ ├── js/ │ ├── images/ │ └── uploads/ ├── config/ │ └── database.php ├── includes/ │ ├── auth.php │ ├── functions.php │ └── header.php ├── models/ │ ├── Teacher.php │ ├── Quiz.php │ └── Question.php ├── views/ │ ├── auth/ │ ├── dashboard/ │ └── quiz/ ├── index.php └── .htaccess (for subdirectory configuration) - 
URL Structure:
/zapquiz/- Landing page/zapquiz/login- Teacher login/zapquiz/dashboard- Teacher dashboard/zapquiz/quiz/create- Create new quiz/zapquiz/quiz/{id}/edit- Edit quiz/zapquiz/quiz/{id}/questions- Manage questions/zapquiz/quiz/{id}/start- Initialize quiz (Phase 2)
 - 
Security Considerations:
- Input validation and sanitization
 - CSRF protection for forms
 - Session security
 - Proper handling of file uploads
 - Database query parameterization
 
 
UI/UX Requirements
- 
Teacher Dashboard:
- Clean, professional interface using Tailwind CSS
 - Responsive design for both desktop and tablet use
 - Intuitive navigation between quizzes and questions
 - Visual indication of quiz status (draft, active, completed)
 
 - 
Quiz & Question Editor:
- User-friendly HTML editor for question text
 - Simple image upload with preview
 - Clear visual distinction between correct and incorrect answers
 - Drag-and-drop functionality for question reordering (optional)
 
 
Deliverables for Phase 1
- Functional teacher authentication system
 - Complete quiz CRUD operations
 - Question and answer management system
 - Responsive UI built with Tailwind CSS
 - Database with appropriate schema and relationships
 - Installation instructions for subdirectory setup
 
Next Steps After Phase 1
Upon completion of Phase 1, development will proceed to Phase 2, focusing on quiz initialization, QR code generation, and participant onboarding.
--