Frontend Routes - casey-cochran/Intermediate-group-proj GitHub Wiki

User-facing routes

Navigation bar

A user navigation bar is displayed across all pages of the app which will allow logged in users to logout, go to home, and create a post. Logged out users will only see home, login, and sign up buttons.

  • GET /
  • GET /users/signup
  • GET /users/login
  • GET /hobbyPosts/new (this goes to share a hobby page)

/

This page displays twenty most recent hobbyPost Titles along with posted date and hobbyist name, as well as a navigation bar with login/signup or logout buttons.

  • GET /

/login

This page displays a login form with email and password.

  • GET /login
  • POST /login

/signup

This page displays a sign up form with full name, email, and password.

  • GET /signup
  • POST /signup

/feed

This page displays twenty most recent hobbyPost Titles along with posted date and hobbyist name that the user follows, as well as a navigation bar with login/signup or logout buttons.

  • GET /feed

/hobbyPosts/:id

This page displays a hobby post. Each hobbyPost has an edit and delete button if it belongs to the currently logged in user. Logged in users can shaka the hobbyPost on this page. Logged in users can also follow the hobbyist displayed on the page.

  • GET /hobbyPosts/:id
  • POST /hobbyPosts/:id/shakas
  • DELETE /hobbyPosts/:id/shakas
  • POST /user/:id/followers
  • DELETE /user/:id/followers

/hobbyPosts/new

This page display a blank template to add title and content to a hobby post. Only logged in users are able to get to this page. On this page, users can click the "spread it around" button to share their hobby post. There will be a navigation bar with link to home, and logout.

  • GET /hobbyPost/new
  • POST /hobbyPosts
  • GET /

/hobbyPosts/:id/edit

This page will allow logged in and authorized users to edit a specific hobby post that they have already created. On this page, users can click the "spread it around" button to update their hobby post. There will be a navigation bar with link to home, and logout.

  • GET /hobbyPost/:id/edit
  • POST /hobbyPosts
  • GET /