Back to Home
Quizly

Quizly Documentation

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:

  1. Go to Whop Dashboard
  2. Navigate to the Developer section
  3. Create a new app
  4. 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

  1. Go to Firebase Console
  2. Create a new project or use an existing one
  3. Enable Firestore Database
  4. Go to Project Settings → General
  5. 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)

1

Access the Quiz Creator

Navigate to your Whop experience and click "Create Quiz" if you have admin permissions.

2

Add Quiz Details

Enter a title and description for your quiz. Make them engaging and descriptive.

3

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
4

Set Point Values

Assign point values to each question based on difficulty or importance.

5

Save and Publish

Review your quiz and save it. It will be immediately available to community members.

Taking Quizzes (Members)

1

Browse Available Quizzes

View all quizzes available in your community with titles, descriptions, and question counts.

2

Start a Quiz

Click "Take Quiz" to begin. You'll see a progress indicator and timer.

3

Answer Questions

Navigate through questions using the Previous/Next buttons. Your progress is automatically saved.

4

Submit and Review

Submit your answers to get instant results with detailed feedback on each question.

API Reference

Quiz Management Endpoints

GET/api/quizzes

Fetch all quizzes for an experience. Supports experienceId query parameter.

POST/api/quizzes

Create a new quiz. Requires admin permissions.

GET/api/quizzes/[id]

Get a specific quiz by ID. Checks user access permissions.

PUT/api/quizzes/[id]

Update a quiz. Requires creator or admin permissions.

DELETE/api/quizzes/[id]

Delete a quiz (soft delete). Requires creator or admin permissions.

Quiz Attempt Endpoints

POST/api/quizzes/[id]/attempt

Submit a quiz attempt with answers and get results.

GET/api/quizzes/[id]/attempt

Get 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_ID

Firebase 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.

Getting Help

If you encounter issues not covered here: