Code Monkey home page Code Monkey logo

quiz-app's Introduction

Sports Quiz Application

This is the repo for the quiz software that Sports Quiz uses to serve content for over 350k+ users. This is a MERN fullstack application built from scratch. The frontend portion of the website was built with ReactJS and vanilla CSS. Axios was used to fetch quiz data from the backend API. The backend portion of the website was built with NodeJS, Express, and MongoDB. The Mongoose library was used to do CRUD operations in the MongoDB instance. The backend of the application is under the gh-pages branch of this repo. HTTP requests are first checked in the backend and then sent to the frontend portion of the application.

Play a Quiz

In order to play a quiz, a search parameter is needed. This is done by adding "?search=QUIZ_NAME" to the url "quizzes.sportsquiz.org". For example, in order to play the Lakers quiz, the url would be quizzes.sportsquiz.org/?search=howWellDoYouKnowtheLakers. Questions for each quiz is randomized, has varying lengths in the number of options, has options to display images or not, can have answer explanations, and displays how often each option is selected. At the end of the quiz, the percentile of your score is calculated against thousands of previous scores and displayed.

Data is tracked throughout the quiz. The number of times a quiz is played, the number of times an option is selected, and the final score are all stored in the MongoDB instance. This data can be accessed using the RESTful API that was created using Node, Express, and Mongoose. The API can be used by adding "/data/QUIZ_NAME". For example, the Lakers quiz API would be quizzes.sportsquiz.org/data/howWellDoYouKnowtheLakers and return a JSON file that follows the schema:

_id: String,
name: String,
type: String,
images: Boolean,
plays: Number,
shuffle: Boolean,
questions: [{
	id: Number,
	title: String,
	desc: String,
	options: [{
		0: String,
		1: Number
	}],
	correct: String
}],
scores: [Number]

Social media marketing techniques and SEO are used to drive traffic to the website. Throughout the site's lifetime, it has reached over 350k+ sessions and 5.2 million pageviews, with a peak of 7k users in a single day.

quiz-app's People

Contributors

ikeg225 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.