Skip to content

TrailsNBrews/trails_n_brews_BE

Repository files navigation

trails_n_brews_BE

Activity Commit Contributors Forks Stargazers Issues Code-Size

Watchers


Logo

Trails N Brews, BE

A guide to lead hikers to "watering holes"
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents

About The Project

Trails N' Brews (TnB) is a web app seeking to answer one of life's greatest needs for the Colorado hiker. Whether it be a 1 mile trail along the front range or an expedition to the summit of one this great state's many 14ers all hikers want to know where the nearest brewery is to celebrate and wind down from their achievement. TnB is designed with service oriented architecture.

Trails N' Brews - BE is the back end portion and is in charge of setting the necessary endpoints and services needed by the FE half.

(back to top)

Learning Goals

Utilize an Agile project management process to hone skill and comfort with building a back end under a service oriented architecture. This will be achieved by consuming the Open Brewery DB's API and the Colorado Trail Explorer (COTREX) data and exposing them as API endpoints for our front end to call upon. Developers will build experience using Github Projects and the issues features as a project management tool.

(back to top)

Built With

  • Rails

(back to top)

Getting Started

Prerequisites

  • Ruby 2.7.4
  • Rails 5.2.8

Installation

  1. Clone the repo
    git clone https://github.com/TrailsNbrews/trails_n_brews_BE.git
  2. Install gems
    bundle install
  3. Setup db
    rails db:{create,migrate}
  4. Run RSpec tests
    bundle exec rspec

(back to top)

Roadmap

  • Add Changelog
  • Add back to top links
  • Add Additional Templates w/ Examples
  • Add "components" document to easily copy & paste sections of the readme

See the open issues for a full list of proposed features (and known issues).

(back to top)

Usage

Endpoints

  • Root directory: 'https://evening-caverns-30828.herokuapp.com/api/v1'

  • Try it now:
    'https://evening-caverns-30828.herokuapp.com/api/v1/search_trails?search=ber' 'https://evening-caverns-30828.herokuapp.com/api/v1/search_breweries?name=brew'

  • /users

    • GET user, /users/google_id?auth_token=token?auth_val=email

      • Receives the request for the user to log in, authenticates it, and returns the user info.
      • Headers:
        • CONTENT_TYPE => application/json
        • HTTP_AUTH_TOKEN is the google_token
        • HTTP_AUTH_VAL is the user email alt text
    • POST user, /users/

      • JSON string in the body with user email, first_name, last_name, google_id, google_token
      • Headers:
        • CONTENT_TYPE => application/json alt text
  • /search_breweries

    • Breweries by location

      • GET search_breweries?location="latitude,longitude"
        • Returns the nearest breweries to the location entered alt text
    • Breweries by name

      • GET search_breweries?name="name_fragment"&count="number_of_results"
        • Returns breweries in Colorado that closest match the name entered alt text
    • Brewery by ID

      • GET search_breweries?id="brewery_id"
        • Returns the exact match for a brewery with that ID alt text
  • /search_trails

    • Trails by name
      • GET search_trails?search="name_fragment"&count="number_of_results"
        • Returns trails in Colorado that closest match the name entered alt text
    • Trail by ID
      • GET search_trails?id="trail_feature_id"
        • Returns the exact match for a trail with that Feature ID alt text

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

Developers

Profile

Brandon Gray
Github: bGray88

Profile

Christian McCabe
Github: cemccabe

Profile

Kyle Ledin
Github: Kledin85

Profile

Leo Banos Garcia
Github: banosl

Profile

Max MacGillivray
Github: MoxieMax

Profile

Sergio Azcona
Github: Sergio-Azcona

Project Links:
Organization Link
Backend Link
Frontend Link

Project Managers-Instructors

  1. Meg Stang
  2. Mike Dao

(back to top)

Acknowledgments

(back to top)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published