Coder Social home page Coder Social logo

masahirano / quizmaster Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 1.0 1.56 MB

Manage and play your own quizzes. Powered by Rails6, React, Redux and Docker

Ruby 72.02% CSS 0.50% HTML 1.92% JavaScript 0.46% Dockerfile 1.38% TypeScript 23.13% SCSS 0.60%
activeadmin react react-router-redux redux-thunk redux-actions jest enzyme rspec docker-compose rails6-api

quizmaster's Introduction

Quiz Master

Quiz Master allows users to create test questions and answers.

Getting started

This project uses docker containers and they bind 3000 and 3001 ports to your machine.

$ git clone [email protected]:alpaca0984/QuizMaster.git
$ cd QuizMaster
$ docker compose build
$ docker compose run --rm app bundle install
$ docker compose run --rm app bundle exec rails db:create db:migrate db:seed
$ docker compose up

Now, you can access localhost:3001/admin/ to manage quizzes and localhost:3000 to play them.

Managing quizzes

When you access to http://localhost:3001/admin/ , a login page appears. Default user's account is here.

After login, click Questions tab on header, and you can make CRUD operations for questions.

You can provide formatting or styling for the question content with some HTML tags and style attribute. I prepared an example in db/seeds.rb.

Playing quizzes

When you access to http://localhost:3000/ , all questions appear. Click them and you can show it and submit an answer. In cases wherein the answer is/contains a number, it should recognize the number as words.

Example: Q: How many vowels are there in the English alphabet? A: 5

Given answer
Answer by user on Quiz mode: 5 CORRECT
Answer by user on Quiz mode: five CORRECT
Answer by user on Quiz mode: 6 INCORRECT
Answer by user on Quiz mode: six INCORRECT

Testing

Back-end

This script tests how Question model validates input data and checks given answers.

$ docker compose run --rm app bundle exec rspec spec/models

Front-end

Using jest and enzyme to tests if components are rendered normally.

$ docker compose run --rm app npm --prefix client test

Author

Masataka Hirano - alpaca0984

quizmaster's People

Contributors

masahirano avatar

Stargazers

Wade avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

subratcall

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.