Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
58 changes: 23 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,23 @@
# Quiz machine

For this weekend weekend project we will create a quiz app. Please implement features from the set below.

* Fork and clone the repo at [https://github.com/constructorlabs/quiz-machine](https://github.com/constructorlabs/quiz-machine)
* Implement unit tests as part of code and ensure a high code coverage
* App should use a responsive layout and work well at all screen sizes. It should also look fun and appealing
* Avoid external JS libraries. Standard Express support libraries, charting or responsive grid libraries are ok
* Use a Node Express server to fetch data from Open Trivia Database using their API - [https://opentdb.com/api\_config.php](https://opentdb.com/api_config.php)
* On initial load it should render a page using node and display the first question
* Subsequent questions should be rendered in browser
* On submit notify user if their answer was correct.
* Each correct answer should increment the score. It's up to you how you want to score answers. You could apply a different score for different difficulty grades. After each correct answer display the next question
Hint: You can use server-side global variable object to store data
* Reset the score on an incorrect answer
* Gradually increment difficulty level
* It should display same question on refresh
* Allow user to select question category
* Avoid duplicate questions in a single session
* Gracefully handle any errors

Extensions

* Implement an extension of your choosing
* Show the user a 'happy' animated gif on a correct answer and a 'sad' gif on incorrect answer. You can use Giphy or other API to source gifs
* Implement a high score table, which displays names of players with highest scores as well as the time and date of their score
* Display statistics about player performance such as total questions played, average score, most popular category, category with highest percentage of correct etc.

Submission

* Document your solution in a README.md
* Make frequent commits, at least after each feature and push to origin
* Create a pull request after first push
* Don't commit external dependencies. Use .gitignore
* Include your unit test coverage in README.md
# Quiz Machine

Quiz Machine is a site where you can test your trivia. The site uses the [Open Trivia Database API](https://opentdb.com/api\_config.php).

When the quiz begins, the site will display a question. Answers are given as multiple choice: the user can choose between four different answers.

## The brief

The objective was to create a quiz app with a responsive design.

### Features

The Quiz Machine allows the user to start a quiz. Questions and answers are fetched from Open Trivia Database. The user is given a choice of four answers. The user will be awarded one point, if the answer is correct. If the answer is wrong, the user will get one minus point. The difficulty level increases gradually.

### Frameworks used

Node.js, Express, rendering using Handlebars as template.

The site is styled using bootstrap.

### Potential features
* Allowing the user to select question category
* Implementing a high score table
1 change: 1 addition & 0 deletions git.ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/node_modules
1 change: 1 addition & 0 deletions node_modules/.bin/acorn

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/babylon

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/escodegen

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/esgenerate

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/esparse

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/esvalidate

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/handlebars

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/import-local-fixture

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/is-ci

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/jest

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/jest-runtime

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/js-yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/jsesc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/json5

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/loose-envify

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/mime

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/mkdirp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/rimraf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/sane

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/semver

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/sshpk-conv

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/sshpk-sign

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/sshpk-verify

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/uglifyjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/uuid

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/watch

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/which

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

142 changes: 142 additions & 0 deletions node_modules/@babel/code-frame/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading