Skip to content

Quiz hub is a user login quiz website to allow people to share their knowledge of topics with other people by putting them to the test.

License

Notifications You must be signed in to change notification settings

marycpriyanka/quiz-hub

 
 

Repository files navigation

Quiz hub

badge

Description

Quiz hub is a user login quiz website to allow people to share their knowledge of topics with other people by putting them to the test. It could be used by an online trivia enthusiast to post quizzes and to take quizzes that others have posted so that they could test and compare their knowledge with other trivia enthusiasts.

Table of Contents

Installation

This program can be run through a browser using the link to the deployed application. Alternatively, to run this application locally you will need to:

  • Clone this repository to receive all of the files

  • Set up your environment variables in a .env file

    DB_NAME=quiz_db

    DB_USER=<mysql username>

    DB_PASSWORD=<mysql password>

  • Run npm install in the command line of your terminal to set up all of the dependencies

  • Initialize your database by running the schema.sql file inside "db" folder with MySQL

  • Populate the existing database items by running npm run db/seeds in your terminal

  • Run npm start to start the application's connection

  • Go to the url of the application (http//:localhost:3001) to begin using it

Usage

  • Use the deployed URL to open the deployed application. If already signed in, you will be presented with a homepage which includes existing quizzes (maximum of 9 only will be displayed).

homepage

  • If not signed in, you will be redirected to login page. If you are already a registered user, you can login and will be navigated to the homepage.

login

  • If a new user, you could click to sign up and will be taken to signup page.

signip

  • To start on a quiz right away either choose on one of the quizzes displayed on the home page or navigate to "Categories" in navigation bar and choose a quiz from there after selecting a desired category.

category

takeQuiz

  • Complete the quiz and view your score. You will also be presented with the top 5 scores of that quiz.

results

  • To create a quiz click on "Create" in the navigation bar. You will be taken to create quiz page. Select the category of the quiz and enter the name of the quiz.

createQuiz

Then you will be asked to enter the question and 4 choices(1 correct answer and 3 wrong answers). If you want to enter more questions, click on "Add another question". If you are done adding questions, click on Submit your quiz button. Your quiz will be added to database and you will be taken to the homepage.

createQuestions

  • To view all your scores click on "Scores" in navigation bar.

scores

  • To navigate back to the home page click on "Quiz Hub" title in header.
  • Clicking "Logout" will log you out of the website.

Technologies used

Node.js, Express.js, npm packages - shuffle-array, bcrypt, connect-session-sequelize, dotenv, express-session, mysql2, sequelize, handlebars, CSS, JavaScript

License

Quiz hub is available under the MIT License.

Deployed link

https://quiz-hub-2022.herokuapp.com/

How to Contribute

Contributions and ideas are welcome. Before submitting an issue, please take a moment to look over the contributing guidelines in https://www.contributor-covenant.org/ . Before submitting pull requests, ensure the following:

Fork the repo and create your branch from develop. Test your code.

Questions

https://github.com/marycpriyanka

For any addditional questions, reach me at marycpriyanka@gmail.com.

About

Quiz hub is a user login quiz website to allow people to share their knowledge of topics with other people by putting them to the test.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 55.4%
  • Handlebars 32.1%
  • CSS 12.5%