Skip to content
Tan Loc Phan edited this page Jan 30, 2018 · 14 revisions

Frontend Routes

Note: The original page does not use a lot of front-end routes. It almost reloads the entire page every time users navigate throughout the website. However, my goal is to try my best to design this project as a single-page web application.

  • / - Homepage
  • /login - Log In form
  • /signup - Sign Up form
  • /recipes - Recipe Index
  • /recipes/:recipeId - Recipe Showpage
  • /stories - Story Index
  • /stories/:storyId - Story Showpage

API Endpoints

users

POST /api/users - sign up

session

POST /api/session - log in
DELETE /api/session - log out

stories

GET /api/stories - returns relevant stories
GET /api/stories/:id - returns story
POST /api/stories - creates a story
PATCH /api/stories/:id - edit a story
DELETE /api/stories/:id - remove a story

recipes

GET /api/recipes - returns relevant recipes
GET /api/recipes/:id - returns recipe
POST /api/recipes - creates a recipe
PATCH /api/recipes/:id - edit a recipe (or add rating)
DELETE /api/recipes/:id - remove a recipe

comments

POST /api/:storyId/comments - comment a story
POST /api/:recipeId/comments - comment a recipe
DELETE /api/comments/:commentId - delete a comment

Clone this wiki locally