user stories - nkuek/discordance GitHub Wiki

User Stories

Login

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.

Questions

  • Will the user enter a username or an email address to login?
    • User will login via email and password
  • What routes should we use for login?
    • User will login via / route
  • Where should the user be redirected after login?
    • User will be redirected to the /homepage
  • Will we allow OAuth authentication via a third party?
    • Not yet -- maybe in a future story
  • What happens if the user doesn't exist yet?
    • Display the message Invalid Login :( please try again.
  • What happens if the user enters the wrong password?
    • Display the message Invalid Login :( 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 for now

Acceptance Criteria

  1. Given that I'm a logged-out user and
    • When I'm on any route
    • Then there will be a login button that will pop up the form with an email and password field and a "Login" button to submit the form.
  2. When I try to fill out the form with an invalid email and password combination and press Enter or press the "Login" button
    • Then at the top of the form, I will see a red message Invalid Login :( please try again.
  3. 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 Login :( please try again.
  4. When I try to fill out the form with a valid email and password and press Enter or press the "Login" button
    • Then I will be redirected to the homepage at the / route.
  5. Given that I am a logged-in user
    • When I refresh the homepage at the / route
    • Then I will still be logged in
  6. Given that I am a logged-out user
    • When I try to navigate to the homepage at the / route
    • Then I will be redirected to the / route

Signup

As an unauthorized user, I want to be able to sign up for the website via a signup form, so that I can access Discordance.

Questions

  • Will the user enter a username and an email address to signup?
  • Will we confirm their password during signup?
  • What routes should we use for signup?
  • Where should the user be redirected after signup?
  • Will we allow OAuth authentication via a third party?
  • What happens if the user with the username or email already exists?
  • What happens if the user enters the wrong password confirmation?

Acceptance Criteria

  1. Given that I'm a user who has not signed up yet and
    • When I'm on the /signup route
    • Then there will be a signup form with an email, username, and password field and a "Sign Up" button to submit the form.
  2. When I try to fill out the form with an email or username that already exists with a valid password and press Enter or press the "Sign Up" button
    • Then at the top of the form, I will see a red message User with that email or username already exists.
  3. When I try to fill out the form with a password shorter than 6 characters and press Enter or press the "Sign Up" button
    • Then at the top of the form, I will see a red message Password must be at least 6 characters long.
  4. When I try to fill out the form with a valid email, username, and password and press Enter or press the "Sign Up" button
    • Then I will be redirected to the homepage at the / route.
  5. Given that I am a user that just signed up
    • When I refresh the homepage at the / route
    • Then I will still be logged in

Demo User

As a first-time user who just wants to demo Discordance, I want to be able to try out the site with a demo user login via a single button click on the login and signup form, so that I can access Discordance without having to go through the trouble of creating a new account.

Questions

  • Can demo users view servers and channels that they are members of?
  • Should the demo user be able to discover new servers that they aren't members of?
  • Should the demo users be able to post messages in channels?

Acceptance Criteria

  • When I choose the demo user option - Then I will be redirected to the Home page with login "demo" - I will be logged in as a demo user
  • Given that I am a demo user
    • Then I will be able to access and view pre-populated servers and channels.
    • Them I will be able to discover new servers on the Home Page.
    • Then I will be able to post persisting messages under the name "demo".
    • Then I will have all features of a logged-in user under "demo".

Logout

As a logged-in user, I want to log out via a button on the navigation bar so that I can hide my account information from the rest of the users on this device.

Questions

  • Can someone access my information after I am logged out?

Acceptance Criteria

  • When I click the logout button
    • Account information is hidden from the browser
    • Remove the session login status
    • Redirect to login/home page

Servers

As a user, when I access the home page there is a populated list of servers. I want to be able to click on a Server and be taken to a page containing details, channels, and messages for the Server.

Questions

  • What servers am I able to view?
  • What happens when I click on a Server?
  • How do we populate without an API?
    • We will create information through another source (ie discord) and seed the database by hand.
  • What will I be able to see on a server page?

Acceptance Criteria

  • Given that I am a logged-in user, when I click on a Server
    • Then I am redirected to a channel on the server's page servers/:id/:channel_id
    • I will be able to see the list of channels, live chat, and members list.
  • Given that I am a logged-in user,
    • I am only able to see the servers I have joined or created and any public servers in the home page.
    • Private servers will be hidden from me if I am not a member.
  • Given that I am a logged-out user,
    • I will only be able to view the home page to see public servers

Channels Within Servers

As a user, when I access a server there is a populated list of channels. I want to be able to click on a Channel and be taken to a page containing the messages for the channel.

Questions

  • What can I post in the channels?
  • How can I interact with messages?

Acceptance Criteria

  • Given that I am a logged-in user,
    • Then I will only be able to post text messages in the channel live chat

Live Chat

As a user, when I click on a server's channel, I will be able to see a populated list of messages from other users. I want to be able to post messages in the channel.

Questions

  • Where can I post messages?
  • How can I interact with messages?

Acceptance Criteria

  • Given that I am a logged-in user,
    • Then I will be able to post messages in a server's channel's input field
    • Then I will be able to edit and delete my own messages
    • Then I will be able to "like" other user's messages
    • Bonus Then I will be able to "react" to other user's messages

Direct Messaging

As a user, when I click on another user, I want to be able to message them directly via a private server.

Questions

  • What happens when I click on another user?
  • How can I interact with direct messages?
  • Will I be able to add more members to the direct message?

Acceptance Criteria

  • When I click on another user
    • Then I will see an input field where I can message them directly, which will create a new private server between us
  • Given that I am a logged in user,
    • Then I will be able to edit and delete my own messages
    • Then I will be able to "like" other user's messages
    • Bonus Then I will be able to invite other people to the direct message server

Home - Feature List - Frontend Routes - API Routes - Database Schema

⚠️ **GitHub.com Fallback** ⚠️