Coder Social home page Coder Social logo

matty-liu / petlove Goto Github PK

View Code? Open in Web Editor NEW
5.0 0.0 0.0 3.26 MB

Single page app for pet owners to help set up playdates for their pets

Home Page: https://pet1ov3.herokuapp.com/#/

Ruby 39.33% JavaScript 41.37% CSS 15.20% HTML 3.39% CoffeeScript 0.71%

petlove's Introduction

petLove (petLo<3)

petLove is a webapp to help people connect their pets with other pets for play dates. petLove uses Ruby on Rails and PostgreSQL on the backend, and React/Redux to handle state on the frontend.

petLove live

Feature and Implementation

screen shot 2017-11-03 at 11 13 58 am

User Matching

User matching is based on how users answer a set of personality question. Users start off with a compatibility score of 50 (scale is between 1-100) and based on how they answer those question will it change their compatibility score. By using a join table, between answer_id, and user_id, we can develop a compatibility score onto the user.

{filteredUsers.map((user) => {
  return (
    <div className="home-main-matches-thumbnail-container2" key={user.id}>
      <Link to={`profile/${user.id}`} key={user.id}>
        <div key={user.id} >
          <img
            src={user.image_url}
            className="home-main-matches-thumbnail"
            key={user.id}/>
          <div className="home-main-matches-thumbnail-username">
            {user.username}
          </div>
          <div className="home-main-matches-thumbnail-matchpercent">
            {`${91-Math.abs(user.compatibility_value-this.props.userCompatibilityValue)}% Match`}
          </div>
        </div>
      </Link>
    </div>
  )}
)}
</div>

screen shot 2017-11-03 at 12 02 12 pm

Question/Answers

Developing the back end for how we would generate a match was a huge challenege. Originally I intended to compare arrays of user answers to another user in order to calculate a compatibility score. This was an extremely difficult task on the backend handling array of answers and creating responses. After talks with other students, I decided it would be best to approach the matching in a completely different way. What we would do is generate a compatibility score for each user. Based on that score we could more efficiently generate a compatibility score, rather then comparing each individual answer.

Front End Search

Based on what matches returns from the user slice of state, we can do a quick search to filter users by their username on the front end.

let filteredUsers = [];
if (this.props.users) {
  filteredUsers = renderUsers.filter((user)=> {
    return (user.username.toLowerCase().indexOf(this.state.searchField.toLowerCase()) !== -1)
  })
}

screen shot 2017-11-03 at 11 42 22 am

Single Page App

petLove is a single page app using react to dynamically render the page based on what information is being request, meaning a faster and more responsive user experience.

Future Direction of Project

In addition to the features implemented, I'd like to implement additional features.

Backend Search

okCupid allow for users to search their database based on various user parameters (hobbies, location, likes, etc..). To do this I'd like to add to my search bar component to query the new string that is generated, and compare that to the user parameters that show matching likes and compatibility scores.

Messaging

okCupid also allows for direct messaging between users, I'd need to develop a new slice of state to track the messaging for a user.

Location

okCupid allows for matching based on location settings. If a user is too far, then that user will be filtered out of a match request. I'd like to implement that on my user matching and searching using the geocoder gem to generate coordinate for a users location when he submit his location to filter out additional matches.

petlove's People

Contributors

matty-liu avatar

Stargazers

Aarron Lee avatar Max Currier avatar Benjamin Blue avatar Victor Wu avatar Valery Zajkov avatar

petlove's Issues

Review User Auth

Sorry for the delay Alex, I reworked the login form to be in a modal and most of the functionality should work.

Thanks again!

Progress 10/25

Hey Matthew, you still have a lot of work to do on Auth, both functionally and aesthetically, so I'm not gonna start nitpicking yet. Right now you're at 1/7 MVP points. Keep up the hard work!

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.