Coder Social home page Coder Social logo

inspire's Introduction

INSPIRE

https://inspire-288.herokuapp.com/

INSPIRE provides recommendations in the form of music, movies, shows, books, authors or games, based on user "interests". A logged in user can add interests, and then simply press the "Inspire Me" button on the home page to get a single recommendation. The recommendation is provided by the TasteDive API.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

From GitHub clone down repository using the following commands in terminal:

$ git clone [email protected]:ryan-mcneil/inspire.git
$ cd inspire

Prerequisites

INSPIRE was developed in Rails 5.2 and so we recommend using the same or a more current version of Rails. The Ruby version used is 2.4

To check your version using terminal run: rails -v in the command line. (use ruby -v to retrieve the ruby version)

If you have not installed rails, in terminal run:

$ gem install rails -v 5.2

TasteDive API

To run the application locally, you must apply for a API key here.

Once obtained run:

$ figaro install

and enter TASTEDIVE_API_KEY: <YOUR KEY> into the newly created application.yml file in ./config

Now your app can access the API!

Installing

Open terminal and run these commands:

$ bundle
$ rake db:{drop,create,migrate}
$ rails s

(this will fire up the development server)

Open up a web browser

Navigate to /localhost:3000/ to gain access to the INSPIRE landing page. Once on the landing page, follow the instructions to login or register, then add interests to get recommendations!

Running the tests

  • Note: Before running RSpec, ensure you're in the project root directory.

From the terminal run:

$ rspec

After RSpec has completed, you should see all tests passing as GREEN. Any tests that have failed or thrown an error will display RED. Any tests that have been skipped will be displayed as YELLOW.

Built With

  • Rails
  • TasteDive API
  • RSpec
  • ShouldaMatchers
  • Capybara
  • Pry
  • SimpleCov
  • BCrypt
  • PostreSQL
  • Figaro
  • Faraday
  • Webmock

Authors

Ryan McNeil - Github: ryan-mcneil

inspire's People

Contributors

ryan-mcneil avatar

inspire's Issues

User can see all interests

As a user
When I visit '/'
and I click on "My interests"
Then I am now on "/interests"
I see a list of my interests

A user can delete interests

As a user
When I visit '/interests'
Each interest has an 'X' button next to it
And when l click the 'X' button,
Then the interest is removed from the list

User Can get a random recommendation

As a user
When I visit '/'
And when I click on "Inspire me"
A section appears with a recommendation
And the recommendation has a name, a type, and a teaser

A user can create interests

As A User
When I visit '/interests'
I should see a text field
And the field has a placeholder "Add new Interest"
and there is a "+" button next to it.
And when I click the "+" Button
The page refreshes with the new interest now in the list

Style root page/Inspire me/recommendation

As A user
When I first visit the page
I will only see an "Inspire me" button, and a "My Interests" link
and when I click "Inspire me"
Then A div appears with:

  • a name
  • a category
  • a description

User can log out

As A user
When I visit '/'
Then I see a button to 'Logout'
And when I click on 'Logout'
Then I am redirected to '/login'

Style Register and Login pages

As A user,
I will see a similar layout between the register and login pages
and I will see a link to navigate between the two
and I will be unable to navigate to any other pages (redirect to /login)

User can log in

As an unverified user,
When I visit '/'
Then I am redirected to '/login'
And I see text fields for email and password
And when I fill them in with a correct email address and password combo
Then I am now on '/'
And I see a button "Inspire Me"
And I see a button for "My interests"

Visitor can register a new account

As A visitor,
When I visit '/'
Then I am redirected to '/login'
And I see a link for "New User"
And when I click on "New User"
Then I see text fields for email, password, and password confirmation.
And when I fill them in with a unique email address
Then I am now on '/'
And I see a button "Inspire Me"
And I see a button for "My interests"

Style Interests page

As A user
I will see "My Interests" as a heading
And I will see a flexible list of user's interests
and each of them will be in a div containing the name and an 'X' to delete
And at the bottom of the page will be a text field to create a new Interest with a '+' button to send POST

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.