Skip to content

Skedaddle is a SOA-inspired Rails application. The frontend consumes API endpoints exposed by a backend consuming data from TrailAPI and Yelp Fusion API.

Notifications You must be signed in to change notification settings

skedaddle-llc/skedaddle-fe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Skedaddle

image

  • Skedaddle is a Rails application that has both frontend and backend repositories.
  • The frontend consumes API endpoints exposed by the backend, which is consuming data from TrailAPI and Yelp Fusion API.
  • This app creates a custom itinerary with three trails and three restaurants based on geodata.
  • This application utilizes a relational database to store user and itinerary data.
  • Google OAuth 2.0 is used to authenticate and authorize users
  • The application was deployed using CI/CircleCI on Heroku but can also be viewed on a local server.

πŸ“– Table of Contents

Table of Contents
  1. ➀ Technical Requirements
  2. ➀ Project Files Description
  3. ➀ Routes
  4. ➀ Database Schema
  5. ➀ Getting Started
  6. ➀ Test Suite
  7. ➀ Scenario 1: Login
  8. ➀ Scenario 2: Search for a Destination
  9. ➀ Scenario 3: View Additional Trail Details
  10. ➀ Scenario 4: View Additional Restaurant Details
  11. ➀ Scenario 5: Save Itinerary or Search Again
  12. ➀ Scenario 6: Saved Itinerary
  13. ➀ Credits

πŸ’» Technical Requirements

  • Ruby 2.7.4
  • Rails 5.2.6
  • RSpec-Rails 4.0.1
  • Bootstrap 4
  • Faraday
  • Figaro
  • Webmock
  • VCR
  • Capybara
  • SimpleCov
  • Launchy
  • Factory Bot
  • Faker
  • JSON API Serializer
  • Postman
  • Shoulda-Matchers

Installation instructions found in ➀ Getting Started

πŸ’Ύ Project Files Description

  • app/controllers/application_controller
    1. Application controller which includes helper method to account for current user
    2. Directs rendering of several elements based on whether a user has logged in

  • app/controllers/welcome_controller.rb
    1. Welcome page controller that initiates login via Google OAuth v2

  • app/controllers/sessions_controller.rb
    1. Sessions controller that checks for OmniAuth authentication and creates a new session for user if authentication is successful

  • app/controllers/dashboard_controller.rb
    1. Dashboard controller that creates user dashboard view which provides destination search functionality

  • app/controllers/itineraries_controller.rb
    1. Uses before_action to call backend API in order to receive data on trails and restaraunts based on the destination the user has searched for

  • app/models/user.rb
    1. User model that finds or creates a user after successful OAuth authentication for

  • app/models/itinerary.rb
    1. Itinerary model which references park and restaraunt objects created from API calls for

  • app/views/..
    1. Dynamic pages built in HTML and CSS using Bootstrap

Some other supporting files

  • spec
    1. Contains test suite files
    2. spec/fixtures/vcr_cassettes
      1. Subfolder that contains mocked data used in tests to prevent API endpoint calls every time testing suite is run

πŸ“‚ Routes

Rails Routes
root welcome#index goes to welcome index page
get '/auth/:provider/callback' 'sessions#omniauth'
get '/dashboard' 'dashboard#show'
delete '/sessions' 'sessions#destroy'
get '/about' 'about_us_contact#about_us'
get '/contact' 'about_us_contact#contact'
resources '/itineraries' except: %i[edit update]

πŸ–₯️ Database Schema

image

πŸ“– Getting Started

1. Create a new directory on your computer where you'd like the program to live.

$ mkdir /your_folder/skedaddle-fe

2. Navigate into the recently created directory.

$ cd /your_folder/skedaddle-fe

3. Copy the repository by clicking on the code button on Github repo page (using SSH).

183747041-40f47875-442e-4008-8d00-8c45bf2731fe

4. Clone the recently copied repository information into your currenty directory.

$ git clone git@github.com:JohnSantosuosso/skedaddle-fe.git

5. Open the repository in your preferred IDE. If you are using VSCode, use the code command shown below:

$ code .

6. Install dependencies found in Gemfile.

$ bundle install

10. Run migrations

$ rails db:{create,migrate,seed}

11. Initiate the application on your local server.

$ rails s

12. Open your favorite web browser and enter the URL in the address bar:

localhost:3000

βœ”οΈ Test Suite

To run the test suite, make sure you are in the root of the project and run:
bundle exec rspec

πŸ”Έ Scenario 1: Login

a. The user logs in using Google OAuth Services

ezgif com-gif-maker


πŸ”Έ Scenario 2: Search for a Destination

a. A user can search for a destination:

ezgif com-gif-maker-3

b. The user receives an itinerary with three nearby hiking trails and restaraunts:

ezgif com-gif-maker-4


πŸ”Έ Scenario 3: View Additional Trail Details

a. A user can visit the trail's website to view more information:

ezgif com-gif-maker-5


πŸ”Έ Scenario 4: View Additional Restaurant Details

a. A user can visit the restaurant's website to view more information:

ezgif com-gif-maker-6


πŸ”Έ Scenario 5: Save Itinerary or Search Again

A user has the option to save an itinerary or search again:

Screen Shot 2022-09-20 at 10 18 33 PM


πŸ”Έ Scenario 6: Saved Itinerary

a. User receives confirmation an itinerary has been saved:

image

b. User can delete a saved itinerary:

image



c. User can view saved itineraries:

image



d. Saved itineraries include a link to each itinerary:

image

πŸ“œ Credits

Nick Jones

GitHub Badge LinkedIn Badge

Drew MacNicholas

GitHub Badge LinkedIn Badge

Wes Miranda

GitHub Badge LinkedIn Badge

Eli Sachs

GitHub Badge LinkedIn Badge

John Santosuosso

GitHub Badge LinkedIn Badge

Project built as part of Turing School of Software and Design's Consultancy Competition.

About

Skedaddle is a SOA-inspired Rails application. The frontend consumes API endpoints exposed by a backend consuming data from TrailAPI and Yelp Fusion API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages