anon0mys / scavengr_rails_frontend

The front end of a Scavenger Hunt application. See the deployed app here:

Home Page:https://scavengr-rails.herokuapp.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

README

Scavengr - Rails Frontend

Table Of Contents

Versions/Prerequisites

The prerequisites for this application are:

  • Rails 5
  • Ruby 2.4+
  • npm 5.6
  • Elasticsearch
  • Python3 and pip3

Setup

  • Clone this repository:
git clone git@github.com:anon0mys/scavengr_rails_frontend.git
  • CD into the directory and run the following setup commands
bundle install
npm install
bundle exec figaro install
  • Run the server to make sure setup was successful
rails s
  • In config/application.yml set the following environment variables:

    test:
      BASE_URL: 'http://localhost:8080'
    
    development:
      BASE_URL: 'http://localhost:8080'
    
    production:
      BASE_URL: 'URL OF YOUR DEPLOYED APP HERE'
  • Setup the Django Backend

  • Setup Elasticsearch

Elasticsearch

  • This project uses elasticsearch as the docstore for location data. To set up a basic elasticsearch instance, follow the official getting started documentation.

  • Once elasticsearch is installed and started, run the rake setup task:

    rake elasticsearch:index_setup
    
  • If you ever need to reset the cluster and clear all the data, you can run: WARNING This will delete all of the data in your elasticsearch stores

    rake elasticsearch:index_reset
    

To Run the App Locally

  • Ensure the Django app is set up and that the database and migrations have run
  • Start your Django server on a port other than 3000:
    python3 manage.py runserver PORT
    
  • Start your Rails server:
    rails s
    

The Test Suite

  • The test suite is written in RSpec. To run the suite, you must have a python server running and connected to a test database.

    python3 manage.py runserver PORT
    
  • Once the python app is running, run the full test suite with:

    rspec
    

Contributions

Scavengr is open source and welcomes contributions. If you would like to contribute, please follow this workflow:

  • Select an Issue that you are interested in and get approval from one of the repository owners
  • Ensure you have installed the appropriate Versions/Prerequisites
  • Fork, then clone the repository
  • Follow the Setup instructions
  • Make your desired changes and accompanying tests
  • Open a PR to the anon0mys/scavengr_rails_frontend repository
  • An app administrator will conduct code review and contact you with requested changes, or to confirm your contribution has been merged

Authors

About

The front end of a Scavenger Hunt application. See the deployed app here:

https://scavengr-rails.herokuapp.com


Languages

Language:Ruby 57.7%Language:JavaScript 18.2%Language:HTML 13.8%Language:SCSS 9.3%Language:CSS 0.8%Language:Dockerfile 0.2%