-
Notifications
You must be signed in to change notification settings - Fork 0
User Stories
As an unauthorized user, I want to be able to login to the website via a form, so that I can access my private information and find a party host.
- How will a user login?
- User will login via email and password
- What routes should we use for login?
- User will be directed to a login form via
/loginroute - The form will use a method of
POSTwith an action of/login
- User will be directed to a login form via
- Where should the user be redirected after login?
-
Personal profile page
/users/:id(\\d+)
-
Personal profile page
- What happens if the user doesn't exist/enters bad credentials?
- Display the message "Invalid user credentials :( Please try again."
- Should this story include allowing a user to reset their password?
- Not yet -- maybe in a future story
- Should logging in use session-based or use token-based authentication?
- We will use session-based auth
- How will we protect from cross-site request forgery?
- We will use the
csurfpackage
- We will use the
Given that I'm a logged-out user and
-
When I'm on the
/loginroute- Then there will be a login form/Modal with an email and password field and a "Login" button to submit the form.
-
When I try to fill out the form with an invalid email and password combination and the "Login" button
- Then at the top of the form, I will see a red message "Invalid user credentials :( Please try again."
-
When I try to fill out the form with a valid email and password and press the "Login" button
-
Then I will be redirected to my profile home page at
/users/:id(\\d+)route.
-
Then I will be redirected to my profile home page at
-
When I try to navigate to any route on Wine Party as an unauthorized user
-
Then I will be redirected to the
/loginroute
-
Then I will be redirected to the
Given that I am a logged-in user
-
When I refresh a page
- Then I will still be logged in and stay on that page
As an unauthorized user, I want to be able to sign up for the website via a signup form, so that I can access Wine Party.
- Will the user enter a username and an email address to signup?
- User will enter first name, last name, email address and zip code to signup.
- Will we confirm their password during signup?
- User will confirm the password through a confirm password field.
- What route should we use for signup?
- User will be directed to a signup form via
/sign-uproute - The form will use a method of
POSTwith an action of/sign-up
- User will be directed to a signup form via
- Where should the user be redirected after signup?
-
Personal profile page
/users/:id(\\d+)
-
Personal profile page
- Will we allow OAuth authentication via a third party?
- Stretch Goal - yes but will be using sessions object in MVP
- What happens if the user with an email already exists?
- Use Flask SQLAlchemy to send error to a front end error display text field
- What happens if the user enters the wrong password confirmation?
- Use Flask SQLAlchemy to send error to a front end error display text field
- How will we protect from cross-site request forgery?
- We will use the
csurfpackage
- We will use the
Given that I'm a logged-out user and
-
When I'm on the
/loginroute- Then there will be a login form with an "Email" field, a "password" field and a "log in" button to submit the form.
-
When I try to fill out the form with an invalid email and password combination and press the "log in" button
-
Then at the top of the form, I will see a red message
Invalid user inputs :( please try again.
-
Then at the top of the form, I will see a red message
-
When I try to fill out the form with an email that doesn't exist in the system and press Enter or press the "Login" button
-
Then at the top of the form, I will see a red message
Invalid user inputs :( please try again.
-
Then at the top of the form, I will see a red message
-
When I try to fill out the form with a valid email and password and press press Enter or press the "Login" button
-
Then I will be redirected to my user home page at
/users/:id(\\d+).
-
Then I will be redirected to my user home page at
As a logged in user, I want to see a Nav Bar at the top of the page, so I can navigate between pages and logout.
- What will the nav bar allow the user to do?
- Navigate between pages and logout
- Which pages will there be links to in the nav bar?
- "My Events"
/users/:id(\\d+), "Find Hosts"/hosts/, and as a stretch goal
- "My Events"
- How will the links be made?
- Using React components to the corresponding page.
- How will the nav bar allow a user to logout?
- Using a React componen to
/logout
- Using a React componen to
- When a user clicks the logout button component, what page will they be redirected to?
- First to
/logoutto handle the logout, and that route handler will redirect them to/login
- First to
- How will the nav bar be created?
- Using a React navBar component.
- Will there be anything else on the nav bar outside of the links?
- Before the links, it will also say "Welcome to Wine Party,
First Name!"
- Before the links, it will also say "Welcome to Wine Party,
Given that I am a logged-in user
-
When I click logout
-
Then I will be redirected via logout component to
/logoutand that route handler will log me out and redirect me to/login
-
Then I will be redirected via logout component to
-
When I click on "My Events"
-
Then I will be redirected via React component to
/users/:id(\\d+)using their ownid.
-
Then I will be redirected via React component to
-
When I click on "Find Hosts"
-
Then I will be redirected via React component to
/hosts
-
Then I will be redirected via React component to
As a logged in user I want to view a list of hosts so that I can find the nearest hosts that might interest me.
- How many Hosts will the user be able to see on the screen at a time?
- All hosts will be visible as they scroll, but it will depend on media screen size, potentially 10 as a good starting point
- What information will users be able to see on hosts in the list?
- Basic information including
name,cityState,description - Whether if they are a Sommelier or Mixologist
- The
nameof the host will be a React component to the detailed view of that host (/hosts/:id(\\d+))
- Basic information including
- How will the hosts be ordered?
- Hosts will be ordered by
locationas a default, search and filter options will be a stretch goal.
- Hosts will be ordered by
- What route is used to view hosts?
- A
GETrequest to/hosts
- A
- What happens when a user clicks on a specific hosts?
- The user is redirected to the detailed host view at
/hosts/:id(\\d+)
- The user is redirected to the detailed host view at
Given that I am a logged-in user
-
When I use the option to view hosts
-
Then a list of all hosts shows up ordered by
locationshowing each hostsname,cityState,description.
-
Then a list of all hosts shows up ordered by
-
When I click on a specific host
-
Then I will be redirect to
/hosts/:id(\\d+)
-
Then I will be redirect to
As a logged in user I want to view specific hosts so that I can see details, see or add reviews, and add host to reserve for event.
- What information will be available on the detailed host view?
- Host Name (
First and last name) - Host review averages and comments
- Approximate distance to User
- A description of the host
- An unordered list of all connected reviews
- Each review will show reviewer (
reviewer) and the review text (reviewText).
- Each review will show reviewer (
- Host Name (
Given that I am a logged-in user
-
When I am viewing a specific host
-
Then I will see the host at
/hosts/:id(\\d+)that showsFirst name,Last name,cityState,description, buttons to reserve the host, and all connected reviews. Each review will showreviewerandreviewText.
-
Then I will see the host at
As a logged-in user I want to be able to click a button so that I can reserve a host for event
- Where will the buttons be available for a user?
- On the detailed view of host (
/trees/:id(\\d+))
- On the detailed view of host (
- How would the page let the user know a host has been reserved?
- By marking them reserved and added to calendar
- How would my app handle updating the database?
- Changing the
BOOLEANvalue totruefor “reserved” and adding reserved date andfalseto "not reserved"
- Changing the
- Will users be able to toggle if host is reserved?
- Yes, by clicking on the host and having calendar popup.
- Will users be able to remove reserved host from their event?
- As a stretch goal, a "remove" button will be available next to host in the event. This will remove host by deleting the coresponding entry in the database.
- What will happen if a user clicks on "reserve" and the host is already in their event?
- A new row in entry in the database will not be created. And a reminder that this host is already selected for the event.
Given I am a logged-in user
-
When I click the "reserve" button
- Then the Wine Party App will display a calendar popup to pick the date of the event and reserve the host.
-
When I click "reserve" button on a host that is already reserved
- Then either nothing will happen in the database and an alert will be sent to the browser or the database will be updated if it is different date than what was reserved.
As a logged in user, I want to be able to view my own events so that I can keep track of events and hosts.
- How will a user navigate to their own events page?
- By clicking on "My Events" in the nav bar.
- How will the user's page look?
- At the top of the page it will say "
First Name's Events" - Formatting can be the same as the
/hostsview
- At the top of the page it will say "
- Should we show something different for a new user because there will be no events?
- When there are no events, show an extra link in the middle of the page that redirects to
/eventswith an invitation to "Create an event and find your Host!".
- When there are no events, show an extra link in the middle of the page that redirects to
- What will happen when a user clicks on a Event name?
- The same thing that happens when they click on a host name in the
/hostsview. They will be redirected to the detailed view of the event at/events/:id(\\d+).
- The same thing that happens when they click on a host name in the
- Will users be able to remove events?
- A "remove" button will be available next to event, only when a user is looking at their list of events. This will remove event by deleting the corresponding entry in the database with a
DELETErequest to/events. The correction row in the table will be found usingwherewith theeventIdanduserId.
- A "remove" button will be available next to event, only when a user is looking at their list of events. This will remove event by deleting the corresponding entry in the database with a
Given that I'm a logged-in user and
-
When I am viewing my own home page
-
Then I will see "Welcome
First Nameat the top, followed by a list of "Upcoming and past events".
-
Then I will see "Welcome
-
When I click on the event names
-
Then I will be redirected to that events detailed page view at
/events/:id(\\d+)
-
Then I will be redirected to that events detailed page view at
As a logged in user, I want to be able to review hosts so that I and others read/see my reviews.
- How will a user access the review form for a host?
- User will click on a review button which will redirect them to
/reviews/new
- User will click on a review button which will redirect them to
- What is included on the review form for the tree?
- reviewText, "star" rating
- What type of elements are used for those form items?
- reviewText:
textarea - Stars:
selectelement with fiveoptionelements- Bad (value=1), Below Average (value=2), Average (value=3), Good (value=4), Amazing (value=5)
- reviewText:
- Where should the user be redirected after reviewing?
- User will be redirected to the detailed view of the host they reviewed
/hosts/:id(\\d+)
- User will be redirected to the detailed view of the host they reviewed
- How will we protect from cross-site request forgery?
- We will use the
csurfpackage
- We will use the
Given that I'm a logged-in user and
-
When I'm on the
/reviews/newroute- Then there will be a review form with five fields (described above) and a "Submit" button to submit the form.
-
When I try to fill out the form with empty inputs press the "Submit" button
- Then at the top of the form, I will see a red message "Review fields cannot be empty"
-
When I try to fill out the form with valid inputs and press press Enter or press the "Submit" button
-
Then I will be redirected to the detailed view of the host I reviewed
/hosts/:id(\\d+)
-
Then I will be redirected to the detailed view of the host I reviewed
As a logged-in-user I want to be able to favorite a host, so that I can I keep a record of my favorited hosts that I’ve reserved before.
- How would the page let the user know a host has been “favorited”?
- It changes the color of the word "favorite" when they click on it next to the host.
- How would the app update the database with the “favorited” hosts?
- We will use FLAS SQLAlchemy to toggle the
favStatusfrom the defaultfalseto true.
- We will use FLAS SQLAlchemy to toggle the
Given I am a user that’s signed in.
-
When I click on add favorite host
- Then the new host appears listed.