GithubHelp home page GithubHelp logo

zhaomh1998 / instafurniture Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 33.56 MB

License: MIT License

Ruby 63.86% JavaScript 0.39% CSS 4.03% Haml 16.89% Gherkin 12.26% HTML 1.91% CoffeeScript 0.36% SCSS 0.30%

instafurniture's Introduction

InstaFurniture

At InstaFurniture, we are aiming to make used furniture trading more safe and efficient for Columbia students. Check out our demo at YouTube!

Log in with demo account: https://insta-furniture.herokuapp.com/mock_login

Name | UNI

Member 1 Name: Duo Chen
Member 1 UNI:  dc3565
Member 2 Name: Hanwei Tang
Member 2 UNI:  ht2568
Member 3 Name: Minghui Zhao
Member 3 UNI:  mz2866
Member 4 Name: Yizhuo Wu
Member 4 UNI:  yw3689

Install Ruby

MacOS

# Install rbenv
brew install rbenv
echo 'export PATH="$HOME/.rbenv/shims:$PATH"' >> ~/.zshrc
brew install ruby-build

# Check rbenv installation -- make sure everything is OK
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/main/bin/rbenv-doctor | bash

# Install Ruby 2.6.6
rbenv install --verbose 2.6.6
rbenv global 2.6.6

# Check that ruby version is 2.6.6
ruby -v

Linux

# Install rbenv
sudo apt install rbenv
echo 'export PATH="$HOME/.rbenv/shims:$PATH"' >> ~/.bashrc
mkdir -p "$(rbenv root)"/plugins
git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build

# Check rbenv installation -- make sure everything is OK
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/main/bin/rbenv-doctor | bash

# Install Ruby 2.6.6
rbenv install --verbose 2.6.6
rbenv global 2.6.6

# Check that ruby version is 2.6.6
ruby -v

Setting up (Instructions to run and test the project)

1. Clone repo, install gems and dependencies

git clone https://github.com/zhaomh1998/InstaFurniture.git
cd InstaFurniture

# Resolve postgresql installation error
sudo apt install libpq-dev  # NOTE: on Mac, use `brew install postgresql` 

# Resolve ExecJS::RuntimeUnavailable: Could not find a JavaScript runtime
sudo apt install nodejs  # NOTE: on Mac, use `brew install node`

# (Mac only) Resolve mimemagic installation error 
brew install shared-mime-info

gem update bundler

bundle install

2. Set up API Keys

Make sure you added a .env file in the project root directory following instructions in API Keys

3. Setup db and run tests

bundle exec rake db:migrate db:test:prepare db:seed
bundle exec rspec
bundle exec cucumber

API Keys

  • Obtain API key from mapquest
  • Set up Google auth and obtain client id and client secret
  • Set up Amazon S3 bucket and obtain region and bucket name; set up IAM user with S3FullAccess permission, obtain access key id, secret access key
  • In the project root directory, create a file named .env with following content
MAPQUEST_APIKEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
MAPQUEST_APIKEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
GOOGLE_CLIENT_ID=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
GOOGLE_CLIENT_SECRET=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
S3_ACCESS_KEY_ID=XXXXXXXXXXXXXXXXXXXX
S3_SECRET_ACCESS_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
S3_REGION=XX
S3_BUCKET=XX
DEVELOPMENT=1

For heroku deployment, make sure Heroku CLI is installed. Then, use the following command to set the environment variable

heroku config:set MAPQUEST_APIKEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
heroku config:set GOOGLE_CLIENT_ID=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
heroku config:set GOOGLE_CLIENT_SECRET=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
heroku config:set S3_ACCESS_KEY_ID=XXXXXXXXXXXXXXXXXXXX
heroku config:set S3_SECRET_ACCESS_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
heroku config:set S3_REGION=XX
heroku config:set S3_BUCKET=XX

Heroku Deployment

First, make sure Heroku CLI is installed.

heroku create
# You should see heroku in `git remote -v`
# To remove a previous heroku remote, use `git remote rm heroku`
git push heroku main
# Note: To deploy from non-main branch, use
git push heroku <branch>:main

# Follow above "API Keys" to set up KEYs
heroku config:set XXX=XXXXX

# Initialize the databases
heroku run rake db:migrate db:seed

# To view any errors, use
heroku logs

# To use heroku terminal for any debugging or run rake commands, use
heroku run bash

Heroku Demo Deployment

https://insta-furniture.herokuapp.com/

GitHub Repo

https://github.com/zhaomh1998/InstaFurniture

instafurniture's People

Contributors

zhaomh1998 avatar yizhuowu avatar duochen13 avatar thw19990210 avatar

Watchers

James Cloos avatar  avatar

Forkers

thw19990210

instafurniture's Issues

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.