QuizCraft

QuizCraft Documentation · v1.0

Overview

QuizCraft is a production-ready SaaS quiz platform built with Django 5.0+ for educators, trainers, and content creators. It includes 8 question types, real-time analytics, Stripe-powered billing, a REST API, team management, dark mode, and multi-language support (EN, NL, ES, DE, FR).

Requirements

  • Python 3.10+
  • Django 5.0+
  • PostgreSQL 14+ (SQLite for development)
  • Redis (optional, for caching)
  • Stripe API keys (for billing)
  • SMTP server (for emails)

Quick Start

1. Extract the archive

unzip QuizCraft-v1.0.zip
cd QuizCraft

2. Create a virtual environment

python -m venv venv
source venv/bin/activate  # Linux/Mac
venv\Scriptsctivate     # Windows

3. Install dependencies

pip install -r requirements.txt

4. Configure environment

cp .env.example .env
# Edit .env with your settings (SECRET_KEY, database, Stripe keys, email)

5. Run migrations and create superuser

python manage.py migrate
python manage.py createsuperuser
python manage.py create_sample_quizzes  # Optional: load sample data

6. Collect static files and run

python manage.py collectstatic --noinput
python manage.py runserver

Visit http://localhost:8000 to see your QuizCraft instance.


Application Structure

QuizCraft/
├── accounts/          # Custom user model, auth, profiles, subscriptions
├── quiz/              # Quiz engine, questions, attempts, results
├── quizcraft/         # Project settings, URLs, WSGI/ASGI
├── templates/         # HTML templates (base, accounts, quiz pages)
├── static/            # CSS, JavaScript, images
├── locale/            # Translations (EN, NL, ES, DE, FR)
├── manage.py
├── requirements.txt
├── .env.example
├── README.md
├── LICENSE.md
└── CHANGELOG.md

Question Types

QuizCraft supports 6 question types out of the box:

Type Auto-Graded Description
Multiple Choice Yes Single correct answer from multiple options
True/False Yes Binary true or false question
Short Answer Yes Text input matched against correct answer
Essay No Long-form text response (manual grading)
Multiple Select Yes Multiple correct answers from options
Fill in the Blank Yes Complete a sentence with the missing word

Subscription Tiers

QuizCraft includes 5 built-in subscription tiers managed via Stripe:

Tier Price Quizzes Questions per Quiz
Free €0/mo 5 10
Teacher €9/mo 50 100
Professional €29/mo Unlimited Unlimited
School €79/mo Unlimited Unlimited + Teams
Enterprise €199/mo Unlimited Unlimited + API

Stripe Configuration

Set these in your .env file:

STRIPE_PUBLIC_KEY=pk_live_your_key
STRIPE_SECRET_KEY=sk_live_your_key
STRIPE_WEBHOOK_SECRET=whsec_your_secret
STRIPE_PRICE_TEACHER=price_teacher_id
STRIPE_PRICE_PROFESSIONAL=price_professional_id
STRIPE_PRICE_SCHOOL=price_school_id

Dark Mode

QuizCraft includes automatic dark mode that respects the user's system preference. Users can also toggle it manually via the moon/sun icon in the navbar. The dark theme applies to all pages including quizzes, dashboard, and the footer.


Multi-Language Support

QuizCraft ships with translations for 5 languages:

  • English (default)
  • Dutch (Nederlands)
  • Spanish (Español)
  • German (Deutsch)
  • French (Français)

Language switching is available via the navbar dropdown and uses Django's i18n framework with cookie-based persistence.

Adding a new language

  1. Add the language code to LANGUAGES in settings.py
  2. Run python manage.py makemessages -l <code>
  3. Translate the .po file in locale/<code>/LC_MESSAGES/
  4. Run python manage.py compilemessages

Production Deployment

Using Gunicorn + Nginx

# Install gunicorn
pip install gunicorn

# Run with gunicorn
gunicorn quizcraft.wsgi:application --bind 0.0.0.0:8000 --workers 3

Nginx configuration

server {
    listen 80;
    server_name yourdomain.com;

    location /static/ {
        alias /path/to/QuizCraft/staticfiles/;
    }

    location / {
        proxy_pass http://127.0.0.1:8000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Environment variables for production

DEBUG=False
ALLOWED_HOSTS=yourdomain.com
SECRET_KEY=your-strong-random-secret-key
DATABASE_URL=postgresql://user:pass@localhost:5432/quizcraft

Key Management Commands

Command Description
python manage.py create_sample_quizzes Load sample quizzes with questions
python manage.py createsuperuser Create admin user
python manage.py collectstatic Collect static files for production
python manage.py makemessages -a Extract translation strings
python manage.py compilemessages Compile translation files

API Endpoints

QuizCraft includes a REST API powered by Django REST Framework:

Endpoint Method Description
/api/quizzes/ GET List all quizzes
/api/quizzes/<id>/ GET Quiz detail
/api/quizzes/<id>/submit/ POST Submit quiz attempt
/api/results/ GET User's quiz results
/api/token/ POST Obtain JWT token
/api/token/refresh/ POST Refresh JWT token

Support


QuizCraft v1.0 — Built by DjangoZen

Info

Product: QuizCraft

Type: SaaS Application

Version: 1.0

Updated: Mar 23, 2026


All Documentation