Skip to content

yurisim/som

Repository files navigation

SOM Study App

Overview

This repository contains an Angular-based application designed as a Quiz & Study Aid: A robust multiple-choice quiz engine supporting various question sets (e.g., CompTIA Security+, ICFB).

The application includes features for progress tracking, visual themes, and mastery validation. It also includes utility scripts for managing and validating the question datasets.

Features

  • Quiz Engine:
    • Support for multiple question sets (swappable via configuration).
    • Single-answer and multi-select (checkbox) question types.
    • Immediate feedback with explanations for correct and incorrect answers.
    • Progress persistence.
  • Management Tools:
    • Python scripts for analyzing question redundancy and fixing data consistency.

Project Structure

Application (src/app/)

  • Question Sets:
    • questions-secp.json: CompTIA Security+ questions.
    • questions-ICFB1.json / questions-ICFB2.json: Specialized question banks (some password protected).
    • questions.json: Default question set.
  • Configuration:
    • question-sets.config.ts: Central registry for available quizzes.
  • Components:
    • quiz/: Quiz runner and logic.
    • checklist/: Inspection checklist UI.
    • mastery-animation/: Visual rewards for completion.

Utiliyze_redundancy.py`: Uses AI (Sentence Transformers) to identify duplicate or highly similar questions in the dataset.

  • question-fix.py: Automates fixes for JSON structure, ensuring incorrectExplanations aligns with correctOption indices.
  • extract_questions.py: Helper to pull specific question IDs for manual review.

Development

Prerequisites

  • Node.js LTS
  • npm or yarn
  • Python 3.x (for utility scripts)

Installation

npm install

Running the Application

npx nx serve som

Navigate to http://localhost:4200/.

Running Utility Scripts

To run the redundancy analyzer (requires sentence_transformers):

python analyze_redundancy.py

Adding New Test Types

To add a new subject or question bank to the application:

  1. Create the Data File: Place your JSON file in the src/app/ directory (e.g., src/app/questions-mytest.json).

    Note: For detailed documentation on all supported question types (Single Answer, Multi-Select, Drag-Order, Drag-Drop) and their JSON schemas, see question-format.md.

    Use the following structure for a basic question:

    {
      "questions": [
        {
          "id": 1,
          "questionText": "Question prompt here?",
          "options": ["Answer A", "Answer B", "Answer C", "Answer D"],
          "correctOption": 2, // 0-based index
          "explanation": "Why C is correct.",
          "incorrectExplanations": ["Why A is wrong", "Why B is wrong", null, "Why D is wrong"]
        }
      ]
    }
  2. Register the Configuration: Open src/app/question-sets.config.ts and add a new entry to the QUESTION_SETS array:

    export const QUESTION_SETS: QuestionSet[] = [
      // ... existing sets
      {
        id: 'my-test-id',           // Unique internal ID
        name: 'My New Test',        // Display name in UI
        fileName: 'questions-mytest.json', // The filename created above
        // Optional:
        // password: '123',         // Require password to access
        // studyGuideUrl: 'https://...' // Link to external resources
      }
    ];
  3. Deploy: The application handles the rest. The new test will appear in the settings/selection menu.