quizcraft-quiz-platform

byjay bhatt

🎯 Prompt to Build QuizCraft — AI-Powered Quiz Platform Overview Build QuizCraft, a full-stack AI-powered quiz platform for instructors to create, share, and track student performance. Instructors log in to create quizzes (AI-generated or manual), share a public link with students (no login required), and view detailed analytics. Students take quizzes via the shared link, get graded instantly, and receive their results by email. Tech Stack React + Tailwind CSS + shadcn/ui components Framer Motion for animations Recharts for analytics charts date-fns for date formatting lucide-react for icons Base44 SDK for auth, entities, and AI integration React Router for navigation Data Model (Entities) Quiz title (string, required) description (string) subject (enum: mathematics, science, history, literature, geography, technology, business, custom; default: custom) difficulty (enum: easy, medium, hard; default: medium) time_limit (number — minutes, 0 = no limit) questions (array of objects, required): question (string) type (enum: multiple_choice, true_false, short_answer) options (array of strings) correct_answer (string) explanation (string) is_public (boolean, default: true) is_active (boolean, default: true) start_date (date-time) end_date (date-time) Built-in: id, created_date, updated_date, created_by QuizAttempt quiz_id (string, required) student_name (string) quiz_owner_email (string) user_answers (array of objects, required): question_index (number) answer (string) is_correct (boolean) time_spent (number) score (number, required — percentage) total_time (number — seconds) completed_at (date-time) Built-in: id, created_date, updated_date, created_by RLS: read = creator OR quiz_owner_email OR admin; write = creator OR admin Pages (Routes) 1. Dashboard (landing page) Purpose: Instructor's home — stats, analytics, recent quizzes, quick start Header: "Welcome back, {firstName}" + "Create New Quiz" button Stats cards (4): Quizzes Created, Quiz Attempts, Average Score, Study Time — each with trend ("X this week") Detailed Analytics section: filter by quiz & time range; bar/line/pie charts showing score distributions, completion trends, hardest questions Recent Quizzes grid (2/3 width): cards with subject/difficulty badges, status (active/closed/scheduled), take/share/edit/delete actions based on ownership Quick Start (1/3 width): buttons to create quiz, view results, etc. Data loading: User.me(), Quiz.list('-created_date', 50), QuizAttempt.filter({quiz_owner_email}), QuizAttempt.filter({created_by}) 2. CreateQuiz (4-step wizard) Step 1 — Configuration (QuizCreationForm): title, description, subject, difficulty, time_limit, start/end dates, is_public, is_active → Next Step 2 — AI Generation (AIGenerationForm): textarea for source text, question count (5-20), question type (mixed/multiple_choice/true_false/short_answer), "Generate with AI" button + "Add Manually" option → calls InvokeLLM with a detailed prompt and response_json_schema returning {questions: [...]} → loads questions into editor Step 3 — Edit Questions (QuestionEditor): add/edit/delete/reorder questions, set type/options/correct_answer/explanation → Preview Step 4 — Preview (PreviewQuiz): full quiz preview → Save (create or update if editing via ?id= param) Progress indicator: 4 numbered circles with connecting lines, current step highlighted with gradient Back button: navigates between steps Editing mode: loads existing quiz when ?id= present in URL 3. TakeQuiz (student-facing, no login required for students but requires auth) States: loading, start, in_progress, completed, already_taken, unavailable Start screen (QuizStartScreen): quiz title/description, question count, time limit; student enters name + optional email → Start In progress (QuestionDisplay): one question at a time, progress bar, timer (if set), answer input (radio for MCQ/T-F, text for short answer), Next button Completion: grades all answers, saves QuizAttempt, shows results screen with score, correct/incorrect breakdown, explanations Availability checks: is_active, start_date not yet reached, end_date passed → shows "Not Available" message Already taken check: if QuizAttempt exists for this quiz + user → shows "Already Completed" with previous score Email notification: if student provided email, sends result email via SendEmail (pass = score ≥ 70%) Grading logic (shared utility): MCQ & true/false: exact match (case-insensitive, trimmed) Short answer: Levenshtein similarity ≥ 40% 4. Results (instructor's personal history) Purpose: Instructor views their own quiz-taking history Stats: average score, best score, total attempts List: chronological attempts with quiz title, date, score badge (green ≥70%, amber 50-69%, red <50%), time taken 5. QuizResults (per-quiz detailed results — instructor only) Access control: only quiz owner or admin can view; others redirect to Dashboard Quiz info card: subject, difficulty, time limit, student count Share button: copies TakeQuiz?id={quizId} URL to clipboard Download CSV: exports all attempts as CSV (name, email, score, time, date) Statistics (QuizStatistics): average score, pass rate, score distribution chart Student results list (StudentResultsList): table of each student's name, score, time, date, pass/fail badge Layout (Sidebar) QuizCraft branding with BookOpen icon + gradient Nav items: Dashboard, Create Quiz, My Results (with icons) Quick Stats section: Quizzes Created count, Average Score Active state: gradient highlight on current route Responsive: sidebar collapses on mobile, hamburger header shown Theme: purple/blue gradient background (from-slate-50 via-blue-50 to-purple-50), glass cards, rounded-xl Embedded Chatbase widget: loaded via script in index.html for in-app support AI Generation Details Uses InvokeLLM with a prompt specifying: content, question count, difficulty, subject, question type response_json_schema returns { questions: [{question, type, options, correct_answer, explanation}] } Questions load into editor for review before saving Model: default (no URL); gemini_3_flash when URL-based (with add_context_from_internet: true) Design System Primary gradient: linear-gradient(135deg, hsl(250,84%,60%) 0%, hsl(260,80%,65%) 100%) — used on buttons, icons, active states Background: bg-gradient-to-br from-slate-50 via-blue-50 to-purple-50 Glass cards: bg-white/95 backdrop-blur border-white/20 Fonts: default sans Animations: Framer Motion — fade + slide on mount, staggered delays Badges: subject (blue), difficulty (purple), status (green/amber/red) Responsive: mobile-first, grid breakpoints (1 → 2 → 3 → 4 cols) Key Behaviors Students don't need accounts — they access via share link + enter name/email One attempt per student per quiz (enforced by checking existing attempts) Quizzes have scheduling (start/end dates) and active toggle Instructor sees only their own quizzes and analytics CSV export of all student results per quiz Email notifications sent to students on completion (if email provided) You can use your own tech stack and all

LandingLoginDashboardResultsTakeQuizCreateQuizQuizResults
Landing

Comments (0)

No comments yet. Be the first!

Project Tasks

119 tasks
#1

Generate system requirement document

0m 54s0.05 cr used
Done
#2

Generate personas & user flows

0m 6s0.05 cr used
Done
#7

Create flow for Instructor

0m 5sCredits in parent
Done
#8

Create flow for Student

0m 5sCredits in parent
Done
#9

Landing

4m 6sCredits in subtasks
Done
#24

Fix Landing review findings: The shared quiz-link input is too narrow to show its… (+1 more)

0m 25s0.1 cr used
Done
#18

Landing / Navigation

0m 0s0.85 cr used
Done
#16

Landing / Hero Panel

1m 6s0.85 cr used
Done
#17

Landing / Audience Entry

0m 40s0.85 cr used
Done
#19

Landing / Footer

0m 0s0.85 cr used
Done
#22

Fix Landing: The shared quiz-link input is too narrow to show its placeholder at mobile width…

0m 52sCredits unavailable
Done
#23

Fix Landing: The student entry is unusable when no quiz ID is already in the URL: prevents opening…

0m 52sCredits unavailable
Done
#20

Navigation

0m 24sCredits in parent
Done
#21

Footer

0m 19sCredits in parent
Done
#10

Login

2m 5sCredits in subtasks
Done
#25

Login / Navigation Slot

0m 0s0.85 cr used
Done
#26

Login / Access Panel

0m 33s0.85 cr used
Done
#28

Login / Student Path Panel

0m 21s0.85 cr used
Done
#27

Login / Footer Slot

0m 0s0.85 cr used
Done
#11

Dashboard

11m 25sCredits in subtasks
Done
#68

Fix Dashboard review finding: Q1 as reviewed now: In…

0m 21s0.02 cr used
Done
#67

Fix Dashboard review finding: The hero orb overlaps and obscures supporting copy in…

0m 28s0.02 cr used
Done
#65

Dashboard / Sidebar

0m 1s0.85 cr used
Done
#58

Dashboard / Navigation

0m 0s0.85 cr used
Done
#59

Dashboard / Welcome Hero

0m 24s0.85 cr used
Done
#60

Dashboard / Stats Row

0m 37s0.85 cr used
Done
#61

Dashboard / Analytics Band

0m 45s0.85 cr used
Done
#62

Dashboard / Recent Quizzes

0m 54s0.85 cr used
Done
#63

Dashboard / Quick Start

0m 56s0.85 cr used
Done
#64

Dashboard / Footer

0m 0s0.85 cr used
Done
#66

Fix Dashboard: The hero orb overlaps and obscures supporting copy in Dashboard Welcome Hero.jsx /…

2m 47sCredits unavailable
Done
#12

Create Quiz

5m 8sCredits in subtasks
Done
#29

Create Quiz / Navigation Slot

0m 0s0.85 cr used
Done
#30

Create Quiz / Wizard Panel

1m 18s0.85 cr used
Done
#32

Create Quiz / Authoring Guide

0m 31s0.85 cr used
Done
#31

Create Quiz / Footer Slot

0m 0s0.85 cr used
Done
#13

Take Quiz

8m 55sCredits in subtasks
Done
#50

Fix Take Quiz review findings: Q1 as reviewed now: Quiz content failed to load; (+1 more)

0m 26s0.1 cr used
Error
#48

Fix Take Quiz: Quiz content failed to load; the student-facing quiz stage is replaced by an error state…

2m 56sCredits unavailable
Error
#49

Fix Take Quiz: The core Take Quiz surface is not verifiable from the supplied source — the file is…

2m 56sCredits unavailable
Error
#33

Take Quiz / Header

0m 0s0.85 cr used
Done
#34

Take Quiz / Stage

2m 20s0.85 cr used
Done
#36

Take Quiz / Preflight Guide

0m 28s0.85 cr used
Done
#35

Take Quiz / Footer

0m 0s0.85 cr used
Done
#14

Results

8m 53sCredits in subtasks
Done
#47

Fix Results review finding: Tablet results content is incorrectly constrained to the…

0m 18s0.1 cr used
Done
#38

Results / App Sidebar

0m 0s0.85 cr used
Done
#37

Results / Content

0m 48s0.85 cr used
Done
#39

Results / Footer

0m 0s0.85 cr used
Done
#46

Fix Results: Tablet results content is incorrectly constrained to the desktop sidebar column width…

1m 30sCredits unavailable
Done
#15

Quiz Results

11m 0sCredits in subtasks
Done
#56

Fix Quiz Results review finding: Q2 as reviewed now…

0m 33s0.1 cr used
Error
#55

Fix Quiz Results review findings: frontend/src/components/Quiz Results Info Band.jsx: the… (+3 more)

0m 50s0.1 cr used
Done
#52

Fix Quiz Results: Access control is hardcoded to two literal emails — / and . Any quiz whose is a…

3m 56sCredits unavailable
Error
#41

Quiz Results / Navigation

0m 0s0.85 cr used
Done
#42

Quiz Results / Info Band

1m 15s0.85 cr used
Done
#43

Quiz Results / Statistics Band

0m 36s0.85 cr used
Done
#44

Quiz Results / Student Table

1m 39s0.85 cr used
Done
#45

Quiz Results / Footer

0m 0s0.85 cr used
Done
#51

Fix Quiz Results: The page's primary quiz identity is gated on a URL query parameter that no in-page…

1m 11sCredits unavailable
Done
#53

Fix Quiz Results: The required Download CSV control is absent — the info band exposes only; no CSV export…

1m 11sCredits unavailable
Done
#54

Fix Quiz Results: The statistics band reads the quiz id from the URL independently ( → ) and falls back to…

1m 25sCredits unavailable
Done
#40

App Sidebar

0m 45sCredits in parent
Done
#57

Retry Failed Pages

7m 29s0.02 cr used
Done
#5

Architecture

0m 29s0.05 cr used
Done
#69

Create backend_modules diagram

0m 24sCredits in parent
Done
#70

Create er_diagram diagram

0m 23sCredits in parent
Done
#71

Create frontend_modules diagram

0m 23sCredits in parent
Done
#72

Create sequence diagram

0m 23sCredits in parent
Done
#73

Create service_network diagram

0m 23sCredits in parent
Done
#6

Workspace task plan

2m 45s0.05 cr used
Done
#74

Gate quiz access by availability and prior attempts

120 cr estimated
To Do
#75

Author, generate, preview, and save quizzes

140 cr estimated
To Do
#76

Show instructor personal attempt history with states

100 cr estimated
To Do
#77

Instructor login and protected-route identity gate

120 cr estimated
To Do
#78

Record graded student attempts with one-attempt enforcement

140 cr estimated
To Do
#79

Anonymous quiz-taking flow with instant grading and result email

140 cr estimated
To Do
#80

Dashboard data, quiz card actions, and sidebar navigation

120 cr estimated
To Do
#81

Instructor dashboard analytics scoped to own quizzes

120 cr estimated
To Do
#82

Instructor dashboard stats, analytics filters, and scoped quiz history

120 cr estimated
To Do
#83

Per-quiz results access, statistics, and share link

120 cr estimated
To Do
#84

AI quiz generation, quiz save, edit load, and share link

140 cr estimated
To Do
#85

Grading results, personal stats, and result-email pass threshold

120 cr estimated
To Do
#86

Quiz attempt lifecycle: availability, one attempt, save, and email

140 cr estimated
To Do
#87

Results tables, CSV export, share copy, and pass/fail badges

120 cr estimated
To Do
#88

Result email delivery with pass threshold

80 cr estimated
To Do
#89

Dashboard quiz management, analytics scope, and create/edit navigation

140 cr estimated
To Do
#90

Instructor quiz builder: configure, generate, edit, preview, and save

140 cr estimated
To Do
#91

Students take a shared quiz and get an instant graded score

120 cr estimated
To Do
#92

Email quiz results to students who shared an address

80 cr estimated
To Do
#93

One attempt per student, with timer expiry and invalid-link handling

120 cr estimated
To Do
#94

Instructor sign-in gates the protected workspace

120 cr estimated
To Do
#95

Per-quiz results view with info card, statistics, and student table

120 cr estimated
To Do
#96

Owner-or-admin results access with CSV export

120 cr estimated
To Do
#97

Instructor dashboard: own quizzes, analytics, sharing, and deletion

120 cr estimated
To Do
#98

Student quiz-taking runtime: availability, start, one-attempt, grading, and result email

140 cr estimated
To Do
#99

Instructor quiz authoring runtime: configure, AI-generate, edit, preview, and save

140 cr estimated
To Do
#100

Instructor dashboard data: owned quizzes, attempt analytics, filters, and share

120 cr estimated
To Do
#101

Quiz persistence and publishing: creator/admin writes, 5–20 AI bound, shareable save

100 cr estimated
To Do
#102

Per-quiz results runtime: owner/admin access, student table, statistics, and CSV export

120 cr estimated
To Do
#103

Embed the Chatbase support widget via index.html script

40 cr estimated
To Do
#104

Application-owned instructor authentication

120 cr estimated
To Do
#105

Authorization rules for quiz ownership, results access, and attempt records

140 cr estimated
To Do
#106

Provide in-app support through the embedded Chatbase widget

60 cr estimated
To Do
#107

Classify quiz scores as pass or fail at 70%

60 cr estimated
To Do
#108

Load the Chatbase support widget on application load

60 cr estimated
To Do
#109

Enforce Quiz Attempt read and write access rules

120 cr estimated
To Do
#110

Make the Chatbase widget available to visitors

60 cr estimated
To Do
#111

Grade short answers by Levenshtein similarity

80 cr estimated
To Do
#112

Call the AI generation service during the AI generation step

100 cr estimated
To Do
#113

Show an instructor their personal quiz-taking history

80 cr estimated
To Do
#114

Compute per-quiz statistics for the results view

100 cr estimated
To Do
#115

Wire the student quiz page to live quiz data and grading

140 cr estimated
To Do
#116

Make instructor sign-in live on the Login page

120 cr estimated
To Do
#117

Wire the quiz creation wizard to AI generation and saving

140 cr estimated
To Do
#118

Wire the Results page to live attempt history

100 cr estimated
To Do
#119

Wire per-quiz results, access control, and CSV export

120 cr estimated
To Do
#120

Finish Landing navigation, motion, and support widget

80 cr estimated
To Do
#121

Wire the Dashboard to live quizzes, analytics, and actions

140 cr estimated
To Do
Landing design preview
Landing: Choose instructor entry
Login: 1. Enroll or verify identity
Login: 2. Retry after inline error
Dashboard: 1. Review stats and trends
Dashboard: Filter analytics by quiz and range
Dashboard: 2. Start new quiz
CreateQuiz: 3. Configure quiz settings
CreateQuiz: 4. Fix missing title error
CreateQuiz: 5. Generate questions with AI
CreateQuiz: 6. Retry generation or add manually
CreateQuiz: 7. Edit and reorder questions
CreateQuiz: 8. Preview full quiz
CreateQuiz: 9. Save new quiz
Dashboard: 10. Edit owned quiz
CreateQuiz: 11. Update existing quiz
Dashboard: Share owned quiz link
QuizResults: 12. Copy share link
QuizResults: 13. Review statistics and student table
QuizResults: 14. Download attempts CSV
Dashboard: Return after access denied
Results: Review personal attempt history
Landing design preview
Landing: Choose instructor entry
Login: 1. Enroll or verify identity
Login: 2. Retry after inline error
Dashboard: 1. Review stats and trends
Dashboard: Filter analytics by quiz and range
Dashboard: 2. Start new quiz
CreateQuiz: 3. Configure quiz settings
CreateQuiz: 4. Fix missing title error
CreateQuiz: 5. Generate questions with AI
CreateQuiz: 6. Retry generation or add manually
CreateQuiz: 7. Edit and reorder questions
CreateQuiz: 8. Preview full quiz
CreateQuiz: 9. Save new quiz
Dashboard: 10. Edit owned quiz
CreateQuiz: 11. Update existing quiz
Dashboard: Share owned quiz link
QuizResults: 12. Copy share link
QuizResults: 13. Review statistics and student table
QuizResults: 14. Download attempts CSV
Dashboard: Return after access denied
Results: Review personal attempt history