Skip to content

Import & Export

ReQuizle allows you to import custom content and export full profiles for backup or sharing.

Authoring in the app

You can also create and edit subjects, topics, questions, and media in the in-app content editor (no JSON needed for routine updates). Use import/export when you want bulk data, merging, or backups.

Importing Content

  1. Open the Right Sidebar and click the Import tab.
  2. Upload a file or paste JSON directly.
  3. The import type is automatically detected.

Supported File Types

ExtensionContentDescription
.rqzlFull Profile archiveZIP archive (with .rqzl extension) containing manifest + media binaries. Best for backups and sharing.
.jsonSubjects or ProfileSubject lists or profile data (no archive media binaries; media may still be URLs/data URIs/file references).

Exporting Profiles

Open the Settings → Profiles section, then open the profile context menu (right-click, press and hold on touch, or the actions button on the card).

  • Export uses the default settings: .rqzl, include progress, include media.
  • Export as... lets you choose:
    • format: .rqzl, .zip, or .json
    • include progress on/off
    • include media on/off
  • JSON never includes media binaries. If format = json and include media is enabled, export is blocked until you either disable media or choose .rqzl/.zip.
  • If referenced local idb: media is missing from storage, archive export fails with an explicit error instead of silently omitting files.

Single-subject JSON (left sidebar)

From the subject context menu you can export one subject:

  • Quick Export uses the default settings: .rqzl, include progress, include media.
  • Export as... lets you choose:
    • format: .rqzl, .zip, or .json
    • include progress on/off
    • include media on/off
  • requizleSubjectExport: 1 + subject are always included.
  • progress is optional (omitted when exporting questions only).
  • JSON never includes media binaries. If format = json and include media is enabled, export is blocked until you either disable media or choose .rqzl/.zip.
  • If referenced local idb: media is missing from storage, archive export fails with an explicit error instead of silently omitting files.

JSON Format Reference

You can write your own quizzes using a simple JSON format. IDs are auto-generated if not provided.

Structure Overview

Subject (top level)
├── name: "Biology 101"
├── id: (optional, for merging)
└── topics: [
    └── Topic
        ├── name: "Cell Structure"
        ├── id: (optional, for merging)
        └── questions: [
            └── Question
                ├── type: "multiple_choice"
                ├── question: "..."
                ├── id: (optional, for merging)
                └── (type-specific fields)
        ]
]

Complete Example

Here's a complete example showing all 6 question types:

json
[
  {
    "name": "Example Subject",
    "topics": [
      {
        "name": "All Question Types",
        "questions": [
          {
            "type": "multiple_choice",
            "question": "What is the capital of France?",
            "choices": ["London", "Paris", "Berlin", "Madrid"],
            "answerIndex": 1,
            "explanation": "Paris is the capital of France."
          },
          {
            "type": "multiple_answer",
            "question": "Select all prime numbers:",
            "choices": ["2", "4", "5", "9"],
            "answerIndices": [0, 2],
            "explanation": "2 and 5 are prime. 4 and 9 are composite."
          },
          {
            "type": "true_false",
            "question": "The Earth is flat.",
            "answer": false,
            "explanation": "The Earth is roughly spherical."
          },
          {
            "type": "keywords",
            "question": "What gas do plants absorb from the air?",
            "answer": ["carbon dioxide", "co2"],
            "caseSensitive": false,
            "explanation": "Plants absorb CO2 for photosynthesis."
          },
          {
            "type": "matching",
            "question": "Match the countries to their capitals:",
            "pairs": [
              { "left": "Japan", "right": "Tokyo" },
              { "left": "Italy", "right": "Rome" },
              { "left": "Egypt", "right": "Cairo" }
            ]
          },
          {
            "type": "word_bank",
            "question": "Complete the sentence:",
            "sentence": "The _ is the powerhouse of the _.",
            "wordBank": ["mitochondria", "cell", "nucleus", "atom"],
            "answers": ["mitochondria", "cell"]
          }
        ]
      }
    ]
  }
]

Field Reference

Subject

FieldRequiredDescription
nameDisplay name
topicsArray of topics
idAuto-generated if not provided. Provide to enable merging.

Topic

FieldRequiredDescription
nameDisplay name
questionsArray of questions
idAuto-generated if not provided. Provide to enable merging.

Question (Common Fields)

FieldRequiredDescription
typeOne of: multiple_choice, multiple_answer, true_false, keywords, matching, word_bank
questionThe question text (or use prompt). Supports LaTeX.
idAuto-generated if not provided. Provide to enable merging.
explanationShown after answering. Supports LaTeX.
mediaImage/video URL, idb: reference, data URI, or filename.

Type-Specific Fields

TypeRequired FieldsDescription
multiple_choicechoices (string[]), answerIndex (number)Single correct answer
multiple_answerchoices (string[]), answerIndices (number[])Multiple correct answers
true_falseanswer (boolean)True or false
keywordsanswer (string or string[]), optional caseSensitiveFree-form text input
matchingpairs ({left, right}[])Match all pairs correctly
word_banksentence (with _ blanks), wordBank (string[]), answers (string[])Fill blanks from word bank

Merging Behavior

By default, each import creates new content with unique auto-generated IDs. This prevents accidental data loss.

To update existing content, provide explicit matching id values:

json
// First import - creates new subject with ID "bio-101"
{"id": "bio-101", "name": "Biology", "topics": [...]}

// Later import - updates the same subject because ID matches
{"id": "bio-101", "name": "Biology", "topics": [...]}

Without explicit IDs, importing the same file twice creates separate copies (each gets a new auto-generated ID):

json
{"name": "Biology", ...}  // Creates "Biology" with a fresh ID
{"name": "Biology", ...}  // Creates another "Biology" with a different fresh ID

Merge Rules

  1. Subjects: If a Subject ID matches, topics are merged.
  2. Topics: If a Topic ID matches, questions are merged.
  3. Questions: If a Question ID matches, it overwrites the existing question.

TIP

To force a new copy of a question, give it a new or no ID.


Media Support

Questions can include images or videos that display above the prompt.

Supported Formats

  • Images: PNG, JPG, GIF, WebP, SVG
  • Videos: MP4, WebM, OGG, MOV, AVI, MKV
json
{
  "question": "What organ is highlighted in this diagram?",
  "media": "https://example.com/anatomy-diagram.png"
}

For videos:

json
{
  "question": "Watch and identify the process shown",
  "media": "https://example.com/mitosis.mp4"
}

Pros: Small file size. Cons: Requires internet; links may break.

2. Base64 Data URIs (Portable)

json
{
  "question": "Identify this structure",
  "media": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUg..."
}

Pros: Single standalone file. Cons: Large file size (~1.3x the image).

3. Local File References (with Upload)

Reference files by name, you'll be prompted to upload them during import:

json
{
  "question": "What is the capital marked on this map?",
  "media": "europe-map.png"
}

When importing, a modal will list the required files. Select them from your computer, and they'll be stored locally in your browser (Blob-backed IndexedDB entries referenced by idb:...).

Media Conflicts

If you upload a file named diagram.png but already have a different diagram.png stored, ReQuizle will warn you and let you choose how to resolve the conflict.


LaTeX Support

You can include mathematical notation in questions, choices, explanations, and answers.

Syntax

TypeSyntaxExample
Inline\(...\)"The formula \(E = mc^2\) describes..."
Block\[...\]"Solve: \[x^2 - 4 = 0\]"

Why not $...$?

ReQuizle uses \(...\) instead of $...$ to avoid conflicts with literal dollar signs (e.g., "$50").

Example with LaTeX

json
{
  "type": "multiple_choice",
  "question": "Solve for \\(x\\) in the equation \\(2x + 5 = 15\\)",
  "choices": ["\\(x = 5\\)", "\\(x = 10\\)", "\\(x = 7.5\\)", "\\(x = 2\\)"],
  "answerIndex": 0,
  "explanation": "Subtract 5: \\(2x = 10\\), then divide by 2: \\(x = 5\\)"
}

JSON Escaping

In JSON, backslashes must be escaped. Write \\( instead of \(.


Profile Export Format (.rqzl)

When you export a profile, it creates a .rqzl ZIP archive containing:

json
{
  "format": "requizle-archive-v1",
  "payload": {
    "id": "profile-id",
    "name": "My Profile",
    "subjects": [...],
    "progress": {...},
    "session": {...},
    "createdAt": 1234567890
  },
  "media": [
    {
      "id": "media-uuid",
      "filename": "diagram.png",
      "mimeType": "image/png",
      "path": "media/media-uuid"
    }
  ]
}

Archive files include manifest.json (with the structure above) plus binary files under media/.