Skip to content

Web app for ingredient searches with a NodeJS/MySQL back-end.

Notifications You must be signed in to change notification settings

davidrosenblum/DB-CS330

Repository files navigation

Cuisine Crusader

https://cuisine-crusader.herokuapp.com/

Local Setup

Node & MySQL are required to launch the server

NodeJS (with NPM)

MySQL 5.7.x

A Database Editor (any should be fine)

JavaScript/Web IDE (any should be fine)

Github

Server Settings

Settings.json file - created when server is first launched witih default values

{
    "port": 			8080,
    "mysql_host": 		"127.0.0.1",
    "mysql_user": 		"root",
    "mysql_password": 	"",
    "mysql_port": 		3306,
    "mysql_database": 	"cuisine_crusader"
}

Database Schema

Table Schema
cuisines {id, name, season, function, weight, volume, tips}
cuisine_associations {cuisine_id, association_id, compatibility}
tastes {id, name}
taste_associations {cuisine_id, taste_id}
techniques {id, name}
technique_associations {cuisine_id, technique_id}
accounts {account_id, email, first_name, last_name, pro_chef}
saved_associations {account_id, group_id, cuisine_id}

HTTP Headers

Header Value Purpose
x-cuisine-crusader "rjdr" required for non-search functions
x-session-guid (server assigned #) associates a session with an email
x-cc-dev "darksouls3" secret header for developer functions

REST API

URL Description Returns
https://cuisine-crusader.herokuapp.com/cuisines/search/_SEARCH_ Cuisine name search ["cusine1", "cuisine2", ..."cuisineN"]
https://cuisine-crusader.herokuapp.com/cuisines/info/_SEARCH_ Cuisine info search {name: "name", .... tips: "do something"}
https://cuisine-crusader.herokuapp.com/cuisines/associations/_SEARCH_ Cuisine associations search ["associate1", "associate2", ..."associateN"]
https://cuisine-crusader.herokuapp.com/tastes/search/_SEARCH_ Taste name search ["taste1", "taste2", ..."tasteN"]
https://cuisine-crusader.herokuapp.com/tastes/associations/_SEARCH_ Taste association search ["associate1", "associate2", ..."associateN"]
https://cuisine-crusader.herokuapp.com/techniques/search/_SEARCH_ Technique name search ["technique1, "technique2, ..., "techniquesN"]
https://cuisine-crusader.herokuapp.com/techniques/associations/_SEARCH_ Technique association search ["associate1", "associate2", ..."associateN"]

Secret Requests

Client Query Strings

Parameter Value Description Example
search item name (string) auto search on page load ?search=anise
form anything auto fills account registration form ?form=1
login anything auto filles login form ?login=1

About

Web app for ingredient searches with a NodeJS/MySQL back-end.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published