sajalshres / boggle-game

A simple implementation of Boggle game using React and Rails

Home Page:https://simple-boggle-game.herokuapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

boggle-game

A simple implementation of Boggle game using React and Rails

Table of content

Getting Started

The instruction below will get you a instance of the project up and running on you local machine.

You can visit the working app at https://simple-boggle-game.herokuapp.com/

Setup Boggle game instance

Setup your local environment

Using Docker

Prerequisites

Boggle game setup for docker requires the following:

  • Docker
  • Docker Compose

Install Docker CE

Installation is straight forward, but vaires by OS.

Detail instructions for each OS can be found here.

Install Docker Compose

Installation is straight forward, but vaires by OS.

Detail instructions for each OS can be found here.

Bring the Boggle game instance with Docker

Using manual installation

Prerequisites

Boggle game will require following dependencies:

  • Ruby on Rails
  • NPM
  • Heroku (Optional)

Install Ruby on Rails

Follow the steps found here

or better use manager like rbenv or or RVM

Install NPM

Follow the steps found here

Install Heroku (Optional)

Follow the steps found here

Bring the Boggle game instance

  • Install rails backend dependencies
    • bundle install
  • Install react frontend dependencies
    • cd client
    • npm install
  • Bring up the instance:
    • rake start
  • (OR)Bring up the instance individually
    • rails s -p 3001 # Starts backend
    • cd client && npm start # Starts fronend
  • Vist http://localhost:3000

Testing

Boggle game includes multiple test cases for both back-end and frontend

Test back-end:

Using docker-compose

  • cd boggle-game
  • docker-compose run web rails test

Using docker

  • docker exec boggle_web rails test

Using rails

  • cd boggle-game # root of project
  • rails test

Test front-end

Using docker-compose

  • cd boggle-game
  • docker-compose run web bash -c "cd client && npm test"

Using docker

  • docker exec boggle_web bash -c "cd client && npm test"

Using npm

  • cd boggle-game/client # OR cd client from root folder
  • npm test

End to End Test

Using docker-compose

  • cd boggle-game
  • docker-compose run web bash -c "cd client && CI=true npm test"

Using docker

  • docker exec boogle_web bash -c "cd client && CI=true npm test"

Using npm

  • cd boggle-game/client # OR cd client from root folder
  • npm test:e2e

Author

  • Sajal N. Shrestha

About

A simple implementation of Boggle game using React and Rails

https://simple-boggle-game.herokuapp.com/


Languages

Language:Ruby 98.1%Language:JavaScript 1.7%Language:CSS 0.2%Language:HTML 0.1%Language:Dockerfile 0.0%