Skip to content

Program Breakdown

Simon edited this page Jan 31, 2020 · 5 revisions

Breakdown of Instagram

The goal of this document is to compartmentalize the web application we have to build/replicate: Instagram.

Components

User login > Login Service

  • Login through username or email + password
  • Keep me logged in (doesn’t log them out unless logout button clicked)(implementation in front-end)
  • Remember me (retains user login information for next login), could some sort of token verification (implementation in front-end)
  • Greeting the user when logged in (not a feature, just nice UX)
  • Implement encryption with Spring Security
  • Account creation (Registration Service)
  • If user doesn’t have an account, redirected to this service (implementation in front-end)
  • Require username, email, password, birthday, gender (?)
  • Implement some sort of validation to make sure everything is valid
    • Email format, password length, no username repetition, age restriction, etc.
  • Profile page

View profile > Profile Service

  • Posted pictures (+count)
  • Number of followers
  • Number of followed accounts
  • Get List of follower
  • Get List of following
  • Display name, display picture, biography/description

Modify profile > Account Service 

  • Password, email, birthday

Database implementation done with MySQL and Hibernate (account identification)

Core Features

Posting a picture > Posting Service

  • Add caption (maybe limit the length of text?)
  • Can be edited
  • Should contain a limited number of hashtags (ig caps at 30)
  • Add location (geo-locate user for suggested locations?)
  • Tag users (new feature?; active ig feature)
  • Save image/info to database (associate to account)
  • Post multiple pictures at the same time (active ig feature)
  • Implement filters for easy picture editing (too complicated for scale?) (could be done in front-end)
  • Can delete picture
  • Can turn off commenting (new feature? like YT, active ig feature)
  • Can track numbers of likes and comments
  • Can retrieve comments
  • Keep track of date posted

Liking a picture > Like Service

  • A user can like its own post
  • Other users can like other user’s pictures/posts
  • Allow users to offer different reactions (new feature? active Facebook feature)

Commenting on a posted picture > Commenting Service

  • Allow users to comment on a picture
  • Limit length of comment (character/word limit)
  • Reply feature, like threads (new feature? active ig feature)
  • Allow likes on comment (new feature? active ig feature)
  • Allow to delete or edit comments (new feature? ig doesn’t let you edit)
  • Keep track of date commented

Follow another user > Following Service

  • Allow user to follow other users (unlimited)
  • Allow users to see content from other users they follow
    • Timeline system?
  • Suggest users to follow (new feature? active ig feature)

Model

A model represents the different entities we want to create

Account Model

Represent the user information (private)

  • Email (String)
  • Username (String) (primary key)
  • Password (String)
  • First name (String)
  • Last name (String)
  • Birthday (String?)
  • Profile (Profile Model)

Profile Model

  • Nb of followers (Integer)
  • Nb of following (Integer)
  • Nb of posts (Integer)
  • Biography/description (String)
  • Array of followings (Array of User Model)
  • Profile picture (Picture Model)
  • Created timestamp (date)

Picture Model

  • Unique ID referring to a picture (Primary Key)
  • Nb of likes (Integer)
  • Nb of comments (Integer)
  • Account/Profile ID (Foreign Key)
  • Created timestamp (date)
  • Caption (String)

Comment Model

  • Comment (String)
  • Nb of likes (Integer)
  • Picture ID (Foreign Key)
  • Created timestamp (date)

Clone this wiki locally