In this simple Blog Application, there are two types of users:
- Admin User
- Regular Users
Admin can add, delete, and update all the users. Simple users can only view others posts while can create an account and can edit/update/delete posts written by themselves (like we all do on facebook/Instagram). They can also update their profile.
When your program starts, it should provide users with options of Login and Signup. When a user is successfully logged in Home page should be shown to him. All the posts written by all the users in your database should be displayed on Home page as shown in the figure.
Note that On Home screen there is a button “Create Post” on the top of posts. When user click on it the following screen should be displayed.
After Creating a Post when user clicks on “Post” button , The data should be saved in the database and then redirect user to home screen where new post written by you along with all the previous posts are displayed. In the current Example I am logged in as Saira. Now if Saira wants to edit her post. She’ll click on her post Title and the following screen should be displayed.
When she clicks on delete button, the post should be deleted. When she clicks on Update, following screen should be displayed. After making changes when clicks on “Post” button, the post should be updated.
And the home screen will be displayed and the post should be updated there as well.
If she clicks on other people’s Posts, she will be provided with a screen where she can only read their post in detail but cannot edit/delete it as shown below. Only the author of the post should delete the post.