This repo represents the front-end portion of a three-part project as part of Turing School of Software and Design's Back-End Engineering program, Module 3.
Titled Relocate, this application aims to ease the chaos of moving, providing a resource for users to discover services in their new hometown. Upon creating an account, users can search a new hometown by zip code and browse categories of businesses they need such as different utility companies, gyms, parks, and plumbing. Users can also save favorites to their account to revisit businesses of their choice. Each business show page displays its phone number, address, and name as well as a link to that business' Yelp page for further information.
All three repositories that make up this project can be found here.
- The project is split into three repositories, implementing a Service Oriented Architecture for future scalability. This repository in particular is responsible for the user-facing views along with all services and controllers necessary to query our backend's API.
- One database is utilized here on the front-end solely for saving limited user information from Google OAuth to log in a user.
These setup instructions are for Mac OS.
This project requires the use of Ruby 2.5.3
and Rails 5.2.4.3
.
We also use PostgreSQL
as our database.
-
Verify your machine has the correct version of Ruby installed (2.5.3). You can check this by entering
ruby -v
from the command line.- To install, enter
rbenv install 2.5.3
from the command line.
- To install, enter
-
Verify your machine has the correct version of Rails installed (5.2.4.3). You can check this by entering
rails -v
from the command line.- To install, enter
gem install rails -v 5.2.3
from the command line.
- To install, enter
- Fork & Clone Repo
- Run
bundle install
. - Setup database:
rails db:create
.
- Register a new app with Google Api Console and give consent.
- Add a Credential, setting to 'External use' and 'Web Application', and give it a title (eg. 'Oauth Login'). Add the following URI to the redirect/callback field
http://localhost:3000/auth/google_oauth2/callback
. - Record the given Client_ID and Client_Secret.
- Run
bundle exec figaro install
to set up theapplication.yml
file to hide your sensitive credentials. - Add your credentials to
application.yml
as environment variables:
GOOGLE_CLIENT_ID: <add your client id>
GOOGLE_CLIENT_SECRET: <add your client secret>
RELOCATE_BE_DOMAIN: <add your backend server>
From the command line, within the project's directory, run bundle exec rspec
. You should see all passing tests.
To run this project locally, enter rails server
from the command line and visit http://localhost:3000
to navigate to the homepage. It is encouraged to visit this URL in an Incognito window of your browser to prevent needing to periodically delete cookies.
Start up the Back-End and Sinata Microservice as instructed.
- Christopher Allbritton - Turing Student - GitHub Profile - Turing Alum Profile - LinkedIn
- Dani Coleman - Turing Student - GitHub Profile - Turing Alum Profile - LinkedIn
- Kevin Cuadros - Turing Student - GitHub Profile - Turing Alum Profile - LinkedIn
- Hanna Davis - Turing Student - GitHub Profile - Turing Alum Profile - LinkedIn
- Hope Gochnour - Turing Student - GitHub Profile - Turing Alum Profile - LinkedIn
- Jake Heft - Turing Student - GitHub Profile - Turing Alum Profile - LinkedIn
- John Kim - Turing Student - GitHub Profile - Turing Alum Profile - LinkedIn
- Jose Lopez - Turing Student - GitHub Profile - Turing Alum Profile - LinkedIn
- Brett Sherman - Turing Student - GitHub Profile - Turing Alum Profile - LinkedIn
- Zach Stearns - Turing Student - GitHub Profile - Turing Alum Profile - LinkedIn