Getting Started
Quizly is a powerful quiz creation and management application designed specifically for Whop communities. It allows administrators to create engaging quizzes while providing members with interactive learning experiences.
Role-Based Access
Admins create quizzes, members take them. Seamless integration with Whop permissions.
Real-Time Analytics
Track performance, completion rates, and detailed scoring metrics.
Multiple Question Types
Support for multiple choice, true/false, and short answer questions.
Prerequisites
- • Node.js 18 or higher
- • A Whop app with API credentials
- • A Firebase project with Firestore enabled
- • Access to a Whop community as an admin
Environment Setup
1. Whop App Configuration
First, create your Whop app and get your credentials:
- Go to Whop Dashboard
- Navigate to the Developer section
- Create a new app
- Copy your API credentials
2. Environment Variables
Create a .env.local file in your project root:
# Whop Configuration WHOP_API_KEY=your_whop_app_api_key WHOP_APP_ID=your_whop_app_id WHOP_AGENT_USER_ID=your_agent_user_id # Firebase Configuration NEXT_PUBLIC_FIREBASE_API_KEY=your_firebase_api_key NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project_id.firebaseapp.com NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_firebase_project_id NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project_id.appspot.com NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_messaging_sender_id NEXT_PUBLIC_FIREBASE_APP_ID=your_firebase_app_id NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID=your_measurement_id
Firebase Configuration
1. Create Firebase Project
- Go to Firebase Console
- Create a new project or use an existing one
- Enable Firestore Database
- Go to Project Settings → General
- Add a web app and copy the configuration
2. Firestore Security Rules
For development (permissive rules):
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if true; // Development only
}
}
}For production (secure rules):
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /quizzes/{quizId} {
allow read: if true;
allow write: if request.auth != null;
}
match /quiz_attempts/{attemptId} {
allow read, write: if request.auth != null;
}
}
}Usage Guide
Creating Quizzes (Admin)
Access the Quiz Creator
Navigate to your Whop experience and click "Create Quiz" if you have admin permissions.
Add Quiz Details
Enter a title and description for your quiz. Make them engaging and descriptive.
Create Questions
Add questions using the supported types:
- Multiple Choice: 2-4 answer options with one correct answer
- True/False: Simple binary choice questions
- Short Answer: Text input with exact match validation
Set Point Values
Assign point values to each question based on difficulty or importance.
Save and Publish
Review your quiz and save it. It will be immediately available to community members.
Taking Quizzes (Members)
Browse Available Quizzes
View all quizzes available in your community with titles, descriptions, and question counts.
Start a Quiz
Click "Take Quiz" to begin. You'll see a progress indicator and timer.
Answer Questions
Navigate through questions using the Previous/Next buttons. Your progress is automatically saved.
Submit and Review
Submit your answers to get instant results with detailed feedback on each question.
API Reference
Quiz Management Endpoints
/api/quizzesFetch all quizzes for an experience. Supports experienceId query parameter.
/api/quizzesCreate a new quiz. Requires admin permissions.
/api/quizzes/[id]Get a specific quiz by ID. Checks user access permissions.
/api/quizzes/[id]Update a quiz. Requires creator or admin permissions.
/api/quizzes/[id]Delete a quiz (soft delete). Requires creator or admin permissions.
Quiz Attempt Endpoints
/api/quizzes/[id]/attemptSubmit a quiz attempt with answers and get results.
/api/quizzes/[id]/attemptGet user's previous attempts for a specific quiz.
Troubleshooting
Common Issues
Authentication Errors
Ensure your Whop API credentials are correctly set in environment variables.
WHOP_API_KEY, WHOP_APP_IDFirebase Connection Issues
Check your Firebase configuration and ensure Firestore is enabled.
NEXT_PUBLIC_FIREBASE_*Permission Denied
Make sure users have proper access to the Whop experience and admin users have admin permissions.
