A very simple vue3 quiz app that fetches quiz questions from https://opentdb.com/api_config.php
- It will also fetch quiz questions internally if the external api fails.
The feature includes:
- Selecting the type of quiz you want to take.
- Ability to go back and forth between each questions.
- Note: To jump to the next question, you must answer the current questions.
- A timer and progress to keep track.
- A review page to review your answer and re-select.
- Note: If you choose to re-select your answer, you can also quickly jump back to the review page.
- A result page to view your result.
- Setup Requirements
- Setup Instructions
- Running dev server
- Running unit test and linter
- Recorded Demo
- Technical Decision
- Screenshot
Ensure that you have:
- Brew setup https://brew.sh/
- Npm setup https://formulae.brew.sh/formula/node
- Pnpm setup https://pnpm.io/installation#using-homebrew
- Clone this repo via
git clone
- Install dependencies via
pnpm i
You can run the dev server via pnpm start
You can run unit test via pnpm test
For linter, you can run via pnpm lint
- For autoformatting, you can run via
pnpm format
Recorded Demo is split between external and internal quiz.
For external quiz (we retrieve the quiz from https://opentdb.com/api_config.php)
For internal quiz (we retrieve the quiz questions from this repo
- Why vue app? It is because there is already many ReactJS app for this quiz that I want this one to stand out.
- Why
pnpm
overnpm
oryarn
? Performance,pnpm
is both better in term of performances and efficiency. Reference - What factor contribute to the current cosmetic styling of this app? I wanted it to align with the dark-mode flavor of vue.
- Why use
Vuetify
for these form components? Vuetify is popular for Vue and using it will make this app more streamline. (not to mention speed up implementation) - Why
pinia
overvuex
? I am a die-hard fan of Pinia for its simplicity, which makes code more easier to work with and performant, better unit test can be written with pinia. Reference - How come there is only 1 unit test? Due to time constraint, I only added one unit test for now and that is for the critical pinia store piece which is less volatile compare to ui/ux designs which can change frequently.