Frontend Routes - anailopez/Woofuora GitHub Wiki

Frontend Routes

'/login'

Log in page

This page displays:

  • A login form that, when filled out without errors, will direct the user to the homepage.
  • A button that links to the '/signup' page where a new user can sign up for a Woofoura account.
  • A 'demo user login' button that, when clicked, will log in the demo user and direct the user to the homepage.

A logged out user will always be redirected to the log in page if they try to access any other page.

'/signup'

Sign up page

This page displays:

  • A sign up form that, when filled out without errors, will direct the new user to the homepage.
  • A button that links to the '/login' page where a user with an existing Woofoura account can log in and be directed to the homepage.

'/'

Homepage

This page displays:

  • The 'AllQuestions' component, which renders all questions made by the logged in user in addition to all other users.
  • A form that, when filled out without errors, will post a new question to the 'AllQuestions' component, thus rendering it on the homepage as the first question in the list. Logged in users can then edit or delete any question that they posted.
  • The 'AllAnswers' component, which renders all answers belonging to each question, if said question has existing answers. If there are no currently existing answers to a question and the question does not belong to the currently logged in user, the user will see a message prompting them to be the first to answer the question.
  • For each question that does not belong to the currently logged in user, the user will see a form that, when filled out without errors, will post new answers to that question. Logged in users can then delete any answer that they posted.