In the MERN Expense Tracker application, a user who is signed in will be able to create and manage their expense records. To enable these features of adding and managing expense records, we will need to define how to store expense details, and implement the full-stack slices that will let users create new expenses, view these expenses, and update or delete existing expenses on the application.
In the following sections, first, we will define the Expense model with a Mongoose Schema to store the details of each expense record. Then, we will discuss implementations for the backend APIs and frontend views that are needed to allow a user to create new expenses, view a list of their expenses, and modify existing expenses by either editing details of or deleting an expense from the application.