This app is built with RESTful routes. You can interact with the app on heroku here: https://elaines-wineapp.herokuapp.com/
- A user can log in.
- A user can view all wines.
- A user can view all notes for a wine.
- A user can add a note, edit a note, or delete a note to a wine.
- A user can view their notes on their profile page
Column Name | Data Type | Notes |
---|---|---|
id | Integer | Serial Primary Key, Auto-generated |
name | String | Must be provided |
String | Must be unique / used for login | |
password | String | Stored as a hash |
createdAt | Date | Auto-generated |
updatedAt | Date | Auto-generated |
Column Name | Data Type | Notes |
---|---|---|
id | Integer | Serial Primary Key, Auto-generated |
wine | String | From API |
color | String | From API |
country | String | From API |
region | String | From API |
appelation | String | From API |
vintage | Integer | From API |
createdAt | Date | Auto-generated |
updatedAt | Date | Auto-generated |
Column Name | Data Type | Notes |
---|---|---|
id | Integer | Serial Primary Key, Auto-generated |
notes | Text | Must be provided |
userId | Integer | Must be provided |
wineId | Integer | Must be provided |
createdAt | Date | Auto-generated |
updatedAt | Date | Auto-generated |
Method | Path | Location | Purpose |
---|---|---|---|
GET | / | server.js | Home page |
GET | /auth/login | auth.js | Login form |
GET | /auth/signup | auth.js | Signup form |
POST | /auth/login | auth.js | Login user |
POST | /auth/signup | auth.js | Creates User |
GET | /auth/logout | auth.js | Removes session info |
GET | /profile | server.js | Displays a user's wine notes |
GET | /wines | wines.js | get wines from API |
GET | /wines/:id | wines.js | render both wine details and associated wineTastings for a wine |
POST | /winesTastings | wineTastings.js | while in the wine create a new tasting |
GET | winetasting/:id/:winename | wineTastings.js | get a wineTasting by id and return the wine name in profile |
PUT | /wineTastings/:id | wineTastings.js | update a wine tasting |
DELETE | /wineTastings/:id | wineTastings.js | delete a wine tasting |
- Fork this repo
npm i
sequelize db:create and update your database with your database file. sequelize db:migrate
Create your .env file, input your secret session and api key from Global Wine score, https://www.globalwinescore.com/api/ .
I'd like to add additional features to my application, like increasing styling to reflect the sommelier exam.