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.
- 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.
- 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, ensuringincorrectExplanationsaligns withcorrectOptionindices.extract_questions.py: Helper to pull specific question IDs for manual review.
- Node.js LTS
- npm or yarn
- Python 3.x (for utility scripts)
npm installnpx nx serve somNavigate to http://localhost:4200/.
To run the redundancy analyzer (requires sentence_transformers):
python analyze_redundancy.pyTo add a new subject or question bank to the application:
-
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"] } ] } -
Register the Configuration: Open
src/app/question-sets.config.tsand add a new entry to theQUESTION_SETSarray: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 } ];
-
Deploy: The application handles the rest. The new test will appear in the settings/selection menu.