drink-this / drink-this-backend Goto Github PK
View Code? Open in Web Editor NEWA cocktail recommendation app. Find your new favorite based on ratings of other users like you.
Home Page: https://drink-this-frontend.herokuapp.com/
A cocktail recommendation app. Find your new favorite based on ratings of other users like you.
Home Page: https://drink-this-frontend.herokuapp.com/
Request tests for the controller
make sure find and create method for ratings (in controller) isn't making new row in database when a row for that cocktail+user combination already exists
5 rated cocktails sorted by stars
5 random cocktails the user has not rated
5 random cocktails by glass (coup in this case) that the user has not rated
5 random cocktails by alcohol (rum in this case) that the user has not rated
if one call is used it could look something like this
{
"rated": {
"cocktails": {}
},
"random": {
"cocktails": {}
},
"glass": {
"type": "coup",
"cocktails": {}
},
"alcohol": {
"type": "rum",
"cocktails": {}
}
}
As a user, when I click the button requesting a recommendation, I want to see a cocktail recommendation based on ratings I've provided and ratings from all other users in the system.
When a client sends a get request to "/api/v1/search/yelp", with a valid param in request body called "query" of type string, the response would be the results:
{
"data": [ {
"name": "business name",
"address": "business address",
"business_type": "type of business",
"thumbnail": "business thumbnail",
"yelp_link": "yelp link to business"
},
{
"name": "business name",
"address": "business address",
"business_type": "type of business",
"thumbnail": "business thumbnail",
"yelp_link": "yelp link to business"
} ]
}
As a user, I want to be able to create an account and then subsequently log into the app with Google.
When a client sends a get request to "/api/v1/search/cocktail", with a valid param in request body called "query" of type string, the response would be the results:
{
"data":
[ {
"id": "cocktail_id",
"type": "cocktails_search",
"attributes": {
"name": "cocktail name",
"thumbnail": "cocktail thumbnail",
"rating": "cocktail rating"
}
} ,
{
"id": "cocktail_id",
"type": "cocktails_search",
"attributes": {
"name": "cocktail name",
"thumbnail": "cocktail thumbnail",
"rating": "cocktail rating"
}
} ]
}
As a user, when I click on a cocktail to visit its show page, I want to see the cocktail's recipe (ingredients and amount/measure of each), full-size image, name, glass type, and description of how to make it.
(FE/BE)
Search now can include both the cocktail from the search by name and by ingred, so I just need to ensure we're filtering any and all duplicates out.
As a user with no ratings stored in the DB, I want a list of cocktails that I have not yet rated. I also want to get the number of ratings I need to complete, which should drop as I rate cocktails.
When a client sends a post "/api/v1/cocktails/:id/rating" to create a new rating, with a valid :id as an integer, the response status would be 201,
{
"data": {
"id": "id of rating",
"type": "cocktail_rating",
"attributes": {
"user_id": "user id",
"cocktail_id": "cocktail_id",
"stars": "rating of the cocktail"
}
}
}
for the rated cocktails page
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.