This document outlines the comprehensive feature specification and user stories for the "SocialApp" social media application. Covering both pre-login and post-login scenarios, it serves as a guide for functional requirements, use cases, and implementation details.
Pre-Login:
- The user should be able to register the application.
- The user should submit a username, password, email address, first name, and last name.
- The username is the primary identifier, it’s unique for each account.
- The email address is a secondary unique identifier. It’s used for communication and account recovery.
- The user should be able to log in to the application.
- The user can log in using their username or email address.
- The user should be able to reset their password using their username or email address.
Post-Login:
- The user should be able to see a list of tweets from their followers.
- The user's timeline should display the most recent tweets from users they are following. Tweets will be arranged from the latest at the top to the older tweets as the user scrolls down. Pagination capability is required.
- Each tweet should display the user's avatar and username, text, timestamp, count of likes and comments, and attached image if available.
- The maximum length of the displayed text should be 300 characters. A "read more” button should be added when the tweet’s length reaches the maximum. This button should navigate the user to the tweet’s page.
- The user should be able to search for any account by its username, see its profile and follow
it.
- The user should be able to search for an account by username or name.
- The search should support partial matching. Full-text search capability is required.
- The user should be able to see a matched user’s avatar, username, and name in the search bar.
- The user should be able to visit and see the profile and follow or unfollow another user from within the profile.
- Two users can follow each other.
- The user should be able to like and comment on tweets.
- If the tweet is seen from the timeline or its owner profile, clicking the comment button should navigate the user to the tweet’s page.
- The comment should have a minimum length of 5 characters and a maximum length of 1000 characters.
- The comment should have a timestamp.
- The user should be able to like and reply to comments.
- The user should be able to update their comments only within 1 hour of posting.
- The user should be able to delete their comments.
- The user should be able to add tweets.
- The user can attach an image to the tweet.
- The image should have a max size of 1 MB.
- The tweet's text should have a minimum length of 15 characters and a maximum length of 3000 characters.
- The tweet should have a timestamp.
- The user should be able to update their tweets only within 3 hours of posting.
- The user should be able to delete their tweets.
- The user should be able to choose an avatar.
- The user can choose static avatars or upload a new one.
- The uploaded image should have a max size of 500 KB.
- The user should be able to edit the bio.
- The bio should be optional.
- The maximum length should be 200 characters.
- The user should be able to log out of the application.
- The user’s session should be closed from the client and server side.
- The user's session should expire after 24 hours of inactivity (the user should be automatically logged out).