A full-stack solution that transforms Word documents into an interactive web-based quiz application, complete with automated CI/CD deployment.
This project demonstrates an end-to-end technical workflow: parsing structured data from a .docx file, rendering it in a modern web application, and deploying everything automatically via GitHub Actions. The result is a polished quiz experience that persists user progress and provides immediate feedback.
- Document Parsing: Python CLI tool extracts quiz questions from Word documents
- Interactive Quiz UI: Clean, responsive interface with real-time progress tracking
- State Persistence: Answers saved to localStorage—users can leave and return without losing progress
- Automated Deployment: Push to
maintriggers the full build pipeline and deploys to GitHub Pages - Automated Tests: Includes tests for both parsing logic and UI behavior
| Layer | Technology |
|---|---|
| Document Parser | Python 3 (stdlib only: zipfile, xml.etree, argparse) |
| Frontend | Vue 3 with Composition API, TypeScript |
| Build Tool | Vite |
| Testing | Python unittest, Vitest |
| CI/CD | GitHub Actions |
| Hosting | GitHub Pages |
command-line-parser/
├── parser/
│ ├── parse_docx.py # CLI tool for .docx → JSON conversion
│ ├── requirements.txt # Dependencies (stdlib only)
│ └── tests/
│ ├── test_parser.py # Parser unit tests
│ └── create_test_docx.py # Test fixture generator
├── quiz-app/
│ ├── src/
│ │ ├── App.vue # Main application with quiz logic
│ │ ├── components/
│ │ │ ├── QuizQuestion.vue # Question display component
│ │ │ └── QuizResults.vue # Results summary component
│ │ ├── types/
│ │ │ └── quiz.ts # TypeScript interfaces
│ │ ├── utils/
│ │ │ └── quiz-helpers.ts # Testable helper functions
│ │ └── __tests__/
│ │ └── quiz-helpers.test.ts # Frontend unit tests
│ ├── public/
│ │ └── questions.json # Generated quiz data
│ └── vite.config.ts # Vite + Vitest configuration
├── .github/
│ └── workflows/
│ └── deploy.yml # CI/CD pipeline
└── CLD TECH ASSESSMENT.docx # Source document
I broke this project into three distinct phases, each building on the last:
The first challenge was extracting structured data from a Word document. Since .docx files are actually ZIP archives containing XML, I used Python's standard library to:
- Open the archive and extract
word/document.xml - Parse the XML to identify paragraphs and list items
- Pattern-match to find questions (paragraphs starting with "Question")
- Validate that each question has exactly 4 answer choices
- Output clean JSON ready for the frontend
python parser/parse_docx.py "CLD TECH ASSESSMENT.docx" -o quiz-app/public/questions.jsonWith the data layer solved, I built the frontend using Vue 3's Composition API with TypeScript. Key implementation decisions:
- Reactive state management using
refandreactivefor questions, answers, and navigation - localStorage persistence with watchers that auto-save on every interaction
- Component decomposition separating concerns:
QuizQuestionhandles display logic,QuizResultshandles scoring and review - Accessible UI with keyboard navigation support and clear visual feedback
The final piece ties everything together with GitHub Actions:
- On push to
main, run the Python parser to regeneratequestions.json - Build the Vue app with Vite
- Deploy static assets to GitHub Pages
This means updating the source Word document automatically propagates to the live site—no manual intervention required.
- Python 3.8+
- Node.js 18+
cd parser
python parse_docx.py "../CLD TECH ASSESSMENT.docx" -o ../quiz-app/public/questions.jsoncd quiz-app
npm install
npm run devThe app will be available at http://localhost:5173
This project includes automated tests for both the parser and frontend.
cd parser
python3 tests/test_parser.pyRuns 11 tests covering:
- JSON structure validation
- Question extraction and counting
- Choice parsing and labeling
- Error handling for invalid files
cd quiz-app
npm testRuns 22 tests using Vitest covering:
- Progress calculation
- Answer counting
- Quiz completion detection
- Question validation
cd quiz-app
npm run buildStatic files are output to quiz-app/dist/
Why Python for parsing? Word's internal XML structure is well-documented, and Python's standard library handles both ZIP extraction and XML parsing cleanly. No external dependencies means zero configuration overhead.
Why Vue 3 Composition API? The Composition API provides better TypeScript integration and more flexible code organization than the Options API. Using <script setup> keeps components concise while maintaining full type safety.
Why Vite? Fast HMR during development, optimized production builds, and first-class Vue 3 support. The configuration for GitHub Pages deployment is straightforward.
Why GitHub Actions + Pages? Zero-cost hosting with automated deployments. The entire pipeline—from document parsing to live site—runs on push without any manual steps.
This project was developed using Cursor with Claude Opus 4.5 as an AI coding assistant. The AI helped accelerate development by suggesting implementations and catching edge cases, while I drove the architecture decisions, directed the technical approach, and ensured the final product met my quality standards.
MIT
