The post feature in MERN Social will allow users to share content on the MERN Social application platform and also interact with each other over the content by commenting on or liking a post, as shown in the following screenshot:
For this feature, we will implement a complete full-stack slice containing the post backend and frontend. The post backend will be comprised of a new Mongoose model for structuring the post data to be stored in the database, while the post CRUD API endpoints will allow the frontend to interact with the Post collection in the database. The post frontend will consist of post-related React components that will allow users to view posts, add new posts, interact with posts, and delete their own posts. In the following sections, we will define the data structure for posts in the Post schema, and then learn how to incrementally add the...