UML - lkacoy/webdev-cs5610-project GitHub Wiki
Class Diagram
Above is the class diagram for my project. I have chosen to create a blogging site for writers to add their content for other people to see. In this diagram, we have a base user class, followed by each type of user. Anonymous users are possible on this site, but are not displayed in this diagram since their information would not be stored.
A BlogWriter can create a Post that will be associated with their username. BlogFollowers can reshare Posts and add Comments to the Posts. A BlogFollower can reshare many posts and a post can have many shares: this many-many relationship is outlined in the Shares class.
BlogWriters can have different statuses based on their level/experience as a writer. This will likely be based on the quantity of Posts they have created. They can also classify their Post under specific topics. More topics will likely be added, but this is a base idea for that class. BlogWriters and BlogFollowers will have the ability to add the topics they are interested in their profiles.
Sequence Diagram
The sequence diagram above maps out some possible scenarios of the users interacting with the system once an account has been created. A BlogWriter can create a blog post. Here, they can begin to edit and create their content for the post. When the BlogWriter is ready to publish, they will hit a submit button. This will post the content to a Rest API. Once published, a BlogWriter may edit or delete their Post.
Once an article is published, a BlogFollower or Anonymous user can search for a Post. When they select a specific Post, a call is made to the database through an API to fetch the article. From here, a BlogFollower may submit a comment that would be saved to the database and associated with that particular Post. BlogFollowers can also edit comments.
AdminUsers can also search and get a particular Post. An AdminUser may delete a Post or Comment at any time once it is published for moderation purposes (ex: if the article is inappropriate, violent, etc.). This is similar to having superuser privileges.